Adding YouTube to Member Profile Page

Sheldon

Well-known member
Alright, I am 100% a complete noob on this, so please hang with me. What I am attempting, I have hardcoded on my local install. Here is the image showing such:
3iJUgG.png


My members are all about customization, and if they like it, we attempt to bring it in to them. The area I hardcoded this at is inside the ad_member_view_below_avatar. I realize that likely this won't be an option to use that template, but I just wanted to attempt to get the video to show, which was a success. Now, I am hoping somehow, I can set it up to allow this as a Custom Profile Field (like ArnyVee's Panoramic image display he added.

Here is the hardcode of what I have
Code:
<xen:hook name="ad_member_view_below_avatar" />
<iframe width="192" height="156" src="http://www.youtube.com/embed/X2HYBosYQNo" frameborder="0" allowfullscreen></iframe>

Again, I realize it can't be done this way, especially for user customization. I am just lost at where to begin. Thus far, I have created a custom userfield called YouTube...
Field ID: YouTube
Title: YouTube
Description: blah blah blah
Display: Preferences ???

Field Type: Single-Line Text Box ???
Value Match: URL ???

User Editable = checked

I am assuming I can somehow use the example Arny has provided, and tweak the code to allow it to show somewhere in that template?
Code:
<xen:if is="{$user.customFields.testfield}">
    <img src="path/to/images/{$user.customFields.testfield}.jpg" />
</xen:if>

I am not sure what code to edit, I assume it would be the img scr part, and of course replacing the testfield bit.

Am I headed in the correct direction with this? Can anyone help, or point me in the correct place. Just trying to add something that can be used by the community, as well as start learning xenForo a bit better.

I appreciate any and all help.
 
Ok, moving onto the next step, and I am sure I have it wrong, considering... :oops:

I attempted to mess around with the example from Arny's post. I left my original video hardcoded below, for reference to see if anything would change, or I could get something to appear. I now have this:
p24M55.png


Here is what I have coded in that template from above:
Code:
<xen:hook name="ad_member_view_below_avatar" />
<xen:if is="{$user.customFields.YouTube}">
    <iframe width="192" height="156" src="{$user.customFields.YouTube.$value}" frameborder="0" allowfullscreen></iframe>
</xen:if>
 
<iframe width="192" height="156" src="http://www.youtube.com/embed/X2HYBosYQNo" frameborder="0" allowfullscreen></iframe>

Where am I going wrong? I mean, honestly, I am glad I got something to at least appear... hah.

In Firebug is shows the source coming from "h"
5id9yY.png

o_O
 
Ok, no matter what I have tried, I cannot get this:
ZUNYF8.png


To transfer EXACT into the code part of:
Code:
<iframe width="192" height="156" src="{$user.customFields.YouTube.$value}" frameborder="0" allowfullscreen></iframe>

Does it just need to be $value or $valueUrl ?
 
Stew, I'm finishing dinner, but you may want to try just the YagboJGglfA&ob part of the code in the profile field (the part after the =) and see if that works.
 
Yeah, trying that now... still not getting it to transfer over.

Got this coded:
Code:
<xen:hook name="ad_member_view_below_avatar" />
<xen:if is="{$user.customFields.YouTube}">
    <iframe width="192" height="156" src="http://www.youtube.com/watch?{$user.customFields.YouTube.$value}" frameborder="0" allowfullscreen></iframe>
</xen:if>

In Firebug, I get this:
q2CsPm.png


So, it is attempting to gather something... the "v". I have tried multiple things, just not sure where it is incorrect at.
 
Top Bottom