1

Topic: YouTube

When I searched for youtube on the forum, I read to embed youtube you needd to create a custom field using textarea.

So -- I created a youtube field under the Personal group. After I created, I embeded the youtube in my profile but when I view my profiile, all I see is the code.

There must be more to it than the info I found on the forum. I'm trying to keep up with my competitor who has this capability for his members. Any clue what I'm missing to display the youtube video in a members profile would be apprreciated?

http://www.filipina-lady.net/test/you01.jpg

2

Re: YouTube

It's because HTML is escaped in order to prevent abuse. What you can do is ask members to type in their video's ID, which is "Wy52yueBX_s" in the above code and then use it to display videos.

Developer

3

Re: YouTube

Sorry vlad, I don't understand.

If I put Wy52yueBX_s in the text area field it won't display a video, but the code.

Last edited by db3204 (2007-11-10 13:59:36)

4

Re: YouTube

Yes, you will need to edit member_profile.tpl template file and put the code you posted above and insert the dynamic ID.

Developer

5

Re: YouTube

vlad I think I'm close but still  missing something. I put the following in the member_profile.tpl -- didn't work.

<object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/{video_id}"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/{video_id}" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>


And then I typed in the video Id (Wy52yueBX_s) in the custom text field I created.

Still only see Wy52yueBX_s in the profile.

If this is right, may I ask, where would I put the above code in member_profile.tpl and if there is anything else I would need to do to the member_profile.tpl file or in the custom field CP?


Thanks

Last edited by db3204 (2007-11-10 16:00:07)

6

Re: YouTube

Since you're using the tag outside the "begin/end" loop, you must use a full name (see documentation) such as {profile_field_video_id_value}

Developer

7

Re: YouTube

Vlad. Just looked at the docs hoping I would find my answer...I still must be missing a step or I'm  not putting the code in the right place or could it be I'm putting it in the wrong place. Below is what I did step by step. Hopefully you will be willing to tell me where I went wrong and how to correct it.

Thanks

NOTE: One small change with below.........where you see video_id I put videoid but still does not work

http://www.filipina-lady.net/test/tube01.jpg

http://www.filipina-lady.net/test/tube02.jpg

http://www.filipina-lady.net/test/tube03.jpg

http://www.filipina-lady.net/test/tube04.jpg

NOTE: One small change with the above.........where you see video_id I put videoid but still does not work

Last edited by db3204 (2007-11-10 17:04:36)

8

Re: YouTube

When you use global tags inside the loops (between "begin" and "end" keywords as in your second to last picture) you must prefix them with "top." as it states in the manual. Thus you must use {top.profile_field_video_id_value}

Developer

9

Re: YouTube

No.........it must be something else....I did try the following codes in member_profile.tpl. The reason I tried two is because somewhere I read that you should not use underscore in the label. But it doesn't matter. The results are the same either way. What is displayed is the code I type in the text field, not the video.



                                            <!-- BEGIN profile_fields -->
                                            <object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/{top.profile_field_video_id_value}"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/{top.profile_field_video_id_value}"type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>


and


                                    <!-- BEGIN profile_fields -->
                                            <object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/{top.profile_field_videoid_value}"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/{top.profile_field_videoid_value}"type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>


Vlad, for the label in the youtube field I used video_id for the first code and videoid for the second. The label should match the code above after profile_field -- right?

If I have the code correct above and it is the right place in member_profile.tpl, it has to be something else.

Man, I want to make this work.....help.

Last edited by db3204 (2007-11-10 18:51:32)

10

Re: YouTube

Did you set the profile field AND its profile group to load in profile?

Developer

11

Re: YouTube

yes, they are both set to yes to  load in profile.

12

Re: YouTube

Ok........vlad...........I have been playing around...dam, sometimes the problem is I don't know how vldPersonals works...I'm going to display 4 large graphic files....hopefully this will clear things up and your next answer will show me the light smile

This is My Page. As you can see it displays the code only and not the video

http://www.filipina-lady.net/test/tube08.jpg


When I log in as a different member and look at my profile it displays.......THE ONLY PROBLEM IS IT DISPLAYS 6 TIMES FOR SOME REASON

http://www.filipina-lady.net/test/tube06.jpg


The youtube code in members_profile.tpl messes up all profiles -- even if they do not have youtube in their pofile. As you can see, it spreads it out -- probably related to the height of the youtube code of 425px or the fact it displays 6 times

http://www.filipina-lady.net/test/tube07.jpg

Here is what members_profile.tpl looks like in graphic view with youtube code

http://www.filipina-lady.net/test/tube09.jpg


We are close vlad..........I'm not sure what the next move is, but the problem is that it displays youtube 6 times and it meses up the other profiles even if they do not have youtube. The fact it does not show the video in My Page is no big deal.


Thanks for your patience and help.

p.s. For now I removed youtube video from member_profile so I don't freak out other members but I would still like to have it as a option for members.

Last edited by db3204 (2007-11-10 21:46:00)

13

Re: YouTube

It displays multiple times because you inserted it into the begin/end loop. Please do read the documentation about how template engine works in order to understand it. Otherwise it'll be a trial and error routine every time.

Developer

14

Re: YouTube

Vlad

Thanks for your help. Just so you know, I did read it several times, but understanding it is a different story smile

cheers

15

Re: YouTube

<object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/{top.profile_field_videoid_value}"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/{top.profile_field_videoid_value}"type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>

If anyone  knows where to put the youtube code so it doesn't mess up the members_profile.tpl, please post. Ideally, the video plays where you create the custom field. Not the case. I created a custom field under the Personal group but the video is displayed where the above code is placed  in the members_profile.tpl, not where the custom field is created.

No matter where you place the youtube code (inside or outside the loop) it will effect the area around it in the  members profile -- I looked, but I could not find in the docs where you could display  code and have it not effect other areas of the template.

Otherwise this thread is a pretty good guide how to get it to work but getting it to work in the right place is my only problem -- in my case I created a youtube field under the Personal group. When I type the video ID in the youtube field, it should display in the Personal group area. Instead it displays where you put the youtube code in the member_profile.tpl. If anyone has any clue, please post.

thanks in advance for any input or thoughts....maybe together we can figure it out. If someone else has already, you would be doing us a great service by posting. Youtube is growing and more and more dating sites are using it as part of the member's profile.

Last edited by db3204 (2007-11-11 10:57:01)