vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=155)
-   -   Youtube Video in User Profiles (https://vborg.vbsupport.ru/showthread.php?t=136865)

ryans 01-17-2007 10:00 PM

Youtube Video in User Profiles
 
This has been covered on how to embed it in posts, but here is how you can do it on your user profile pages.

in AdminCP scroll down to "User Profile Fields" and Add New User Profile Field.

Choose Single Line Text Box
Title: You Tube Video #1
Description: Add the last part of the youtube url after the ?v=ngWb3oyUSow ie just the <b>ngWb3oyUSow</b part
default value - leave it blank
max length 100
display size 100

Up to you to have the field searchable and required. I say no though.

Now edit memberinfo template. Add this code. anywhere you want.

Code:

<if condition="$userinfo[field88]">
    <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
        <tr class="tcat">
        <td class="text" wrap="" style="" align="left" height="10" valign="center" colspan="2">
            <span class=""><strong>$userinfo[username]'s Favorite Video Clip </span> </td> </font></strong>
        </tr>
        <tr class="alt2">
        <td align="left" valign="top"> <div align="center">
<object width="425" height="350">
<param name="movie" value="http://www.youtube.com/v/$userinfo[field88]">
</param>
<embed src="http://www.youtube.com/v/$userinfo[field88]" type="application/x-shockwave-flash" width="425" height="350">
</embed>
</object>
</div></td>
        </tr>
    </table>
</if>

Be sure to change the field88 to the number that corresponds with your value on your forums.

Example URL: http://www.sromagazine.com/members/ryans

Soliloquy 01-21-2007 12:09 AM

I added this (thanks!) and it works well, except the video id number shows up under Additional Information, in addition to the embedded video. I've checked and made sure that custom fields are disabled under User Listing & Profile Viewing, but the id number is still showing up. How did you disable it on your demo site?

ryans 01-21-2007 04:01 AM

please pm me your site so I can take a quick look.

salata 02-04-2007 01:21 AM

isnt there a way to just add the complete url instead of taking a part of it?

rjmjr69 02-04-2007 01:53 AM

I'm a bit lost on it to. Does it allow the members to set there own video?

Bass Nutz 02-07-2007 08:13 AM

Did just what you posted......it doesn't work. :down:


All times are GMT. The time now is 05:30 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01151 seconds
  • Memory Usage 1,719KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete