Support Forums

youtube video embed

This is a discussion on youtube video embed within the Technical Support forums, part of the Technical Support Forums category; Does anyone know how to embed a youtube video on an "extra field" for v4?...


Go Back   68 Classifieds Forums > Technical Support Forums > Technical Support

This topic is resolved.

If you have a similar issue that this thread does not address, open a new related support topic.

 
Thread Tools Display Modes
Old 05-02-2008, 11:30 PM   #1
Member
 
Join Date: Apr 2008
Posts: 51
Rep Power: 15
anna245 is on a distinguished road
Question youtube video embed

Does anyone know how to embed a youtube video on an "extra field" for v4?
anna245 is offline  
Old 05-03-2008, 01:12 AM   #2
Senior Member
 
cwp's Avatar
 
Join Date: Jun 2007
Posts: 296
Rep Power: 24
cwp is a jewel in the rough
Default

There may be a better way to do this.. but I went to a random youtube video, and got the code:

Code:
<object width="425" height="355">
<param name="movie" value="http://www.youtube.com/v/nHyoKC3C0bg&hl=en">
</param><param name="wmode" value="transparent"></param>
<embed src="http://www.youtube.com/v/nHyoKC3C0bg&hl=en" 
type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>
The video URL is listed in the code twice.

So, replace where the url went with this -> {$entry.extrafield2} (replacing the 2 with the extra field id)

Code:
<object width="425" height="355">
<param name="movie" value="{$entry.extrafield2}">
</param><param name="wmode" value="transparent"></param>
<embed src="{$entry.extrafield2}" 
type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>
The URL that the user will have to enter will have to be the url that youtube gives you for the custom code. So your users will have to know where to find this.

This post will tell you all about how to get the extra fields if you hadn't seen it already.
MODIFICATION: Display your extra fields on the showlistings.tpl page
__________________
Version 4.0.3 Developer
cwp is offline  
Old 05-03-2008, 10:01 AM   #3
Member
 
Join Date: Apr 2008
Posts: 51
Rep Power: 15
anna245 is on a distinguished road
Question

Where would I put that code? I placed it in the listings.php file as I did with the other "extra fields" but it's not working.
anna245 is offline  
Old 05-05-2008, 01:57 AM   #4
Senior Member
 
cwp's Avatar
 
Join Date: Jun 2007
Posts: 296
Rep Power: 24
cwp is a jewel in the rough
Default

Which code? The code that I just posted? You would post this in the viewlistings.tpl OR viewlistings2.tpl page, because you want the youtube video to display in the person's listing.
__________________
Version 4.0.3 Developer
cwp is offline  
Old 05-05-2008, 02:00 AM   #5
Senior Member
 
cwp's Avatar
 
Join Date: Jun 2007
Posts: 296
Rep Power: 24
cwp is a jewel in the rough
Default

Also the link I posted about the extra fields was the wrong one. Since you want the extra field to show up in the viewlisting.tpl template use this method ->
MODIFICATION: Display extra fields separately.
__________________
Version 4.0.3 Developer
cwp is offline  
Old 05-05-2008, 05:05 PM   #6
Member
 
Join Date: Apr 2008
Posts: 51
Rep Power: 15
anna245 is on a distinguished road
Question Still A little bit confused

so, the extra field for the video is id#10.

i take this code and then paste it into viewlistings.tpl? am i suppose to place this in a specific spot?


<object width="425" height="355">
<param name="movie" value="{$entry.extrafield10}">
</param><param name="wmode" value="transparent"></param>
<embed src="{$entry.extrafield10}"
type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>
anna245 is offline  
Old 05-06-2008, 02:28 AM   #7
Senior Member
 
cwp's Avatar
 
Join Date: Jun 2007
Posts: 296
Rep Power: 24
cwp is a jewel in the rough
Default

Yes, you'd place that code where you want the youtube video to show up within the listing in viewlisting.tpl. Let me know how it works.
__________________
Version 4.0.3 Developer
cwp is offline  
Old 05-06-2008, 04:03 PM   #8
Senior Member
 
Join Date: Oct 2006
Posts: 133
Rep Power: 22
manilaboy is on a distinguished road
Default

Quote:
Originally Posted by cwp
Yes, you'd place that code where you want the youtube video to show up within the listing in viewlisting.tpl. Let me know how it works.
What type of extra field should be added to add videos like the one mentioned in this thread? Will this be a secure feature? I am concerned of malicious uploads.
__________________
Mike D.
manilaboy is offline  
Old 05-06-2008, 04:06 PM   #9
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,489
Rep Power: 135
Eric Barnes is just really nice Eric Barnes is just really nice
Default

I would recommend only allowing the users to use a service like youtube and have the enter the video id. That way you use their servers to scan the files for viruses.
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline  
Old 05-06-2008, 04:17 PM   #10
Senior Member
 
cwp's Avatar
 
Join Date: Jun 2007
Posts: 296
Rep Power: 24
cwp is a jewel in the rough
Default

Eric just gave me an idea..

I'd use this code instead:
Code:
<object width="425" height="355">
<param name="movie" value="http://www.youtube.com/v/{$entry.extrafield10}">
</param><param name="wmode" value="transparent"></param>
<embed src="http://www.youtube.com/v/{$entry.extrafield10}" 
type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>
Now your users just have to enter the ID of the youtube video and not the entire address.
__________________
Version 4.0.3 Developer
cwp is offline  
Closed Thread

Tags
video embed , you tube video

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
video classifieds and html ads manilaboy Pre Sales Questions 3 03-15-2009 04:40 AM
Video in Details Grebogreen Pre Sales Questions 4 04-14-2007 05:59 PM


All times are GMT -4. The time now is 10:29 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2011, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0