vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=192)
-   -   Show Thread Enhancements - YouTube Video Avatars for specified usergroups (https://vborg.vbsupport.ru/showthread.php?t=150574)

4x4 Mecca 06-24-2007 10:00 PM

YouTube Video Avatars for specified usergroups
 
Hello, what this mod does is allows users to have a "Video Avatar" if they are a member of the usergroup you specify.

Installation instructions are attached. See screen shots below to get an idea of what it looks like.

UPDATE! I recorded a video of me installing it on a blank board. The video should help anyone having trouble. There are a couple extra things like me closing my password manager that you should ignore, but the video will show you what to do.

Installation Video Instructions

You can change the height and width of the video by changing the attributes in the code.

It requires one template edit, 2 if you use both postbit styles.
It requires one profile field.

I am new to the modding still, and my instructions here aren't great, but you can see it in action here.

UPDATE!
To Display them in your user profiles
open the memberinfo template
find
Code:

                        <if condition="$show['avatar']">
                                <td><img src="$userinfo[avatarurl]" $userinfo[avatarsize] alt="<phrase 1="$userinfo[username]">$vbphrase[xs_avatar]</phrase>" border="0" style="border:1px solid $stylevar[tborder_bgcolor]; border-top:none" /></td>
                        <else />
                                <td>&nbsp;</td>
                        </if>

Replace with
Code:

<if condition="in_array($post['usergroupid'], array(5,6,7,12,14)) AND $post[fieldXX]">
<td>
<object width="150" height="123.5"><param name="movie" value="http://www.youtube.com/v/$post[fieldXX]"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/$post[fieldXX]" type="application/x-shockwave-flash" wmode="transparent" width="150" height="123.5"></embed></object>
</td>
<else />       
                        <if condition="$show['avatar']">
                                <td><img src="$userinfo[avatarurl]" $userinfo[avatarsize] alt="<phrase 1="$userinfo[username]">$vbphrase[xs_avatar]</phrase>" border="0" style="border:1px solid $stylevar[tborder_bgcolor]; border-top:none" /></td>
                        <else />
                                <td>&nbsp;</td>
                        </if>
                        </if>
</if>

Be sure you replace all fieldXX with your actual field number!

Click installed!
Nominate for MOTM!

rjmjr69 06-25-2007 02:05 AM

Friggen awesome idea. Installing now and I'll leave feedback thanks

4x4 Mecca 06-25-2007 02:10 AM

Let me know how it goes, and if anyone can make this a plugin or product, feel free to.

PoetJA-1975 06-25-2007 05:28 AM

WOW - very nice!
Thanx for the sharing ;)

Jacquii.

4x4 Mecca 06-25-2007 05:54 AM

Thanks! I'm eager to see this working on other peoples forums. If anyone installs this, let me know how the instructions are and maybe a link to your forum. Thanks :)

PoetJA-1975 06-25-2007 06:46 AM

Instructions are good - but It's not showing correctly on regular postbit :(
Of course JPiC postbit is heavily modified - but looking at the code - I'm not sure exactly how to make it show... Test thread at http://jpicforum.info/recycle-bin/te...html#post21003

I also have installed the Staff Badges so Postbit code looks like:
Quote:

<if condition="$show['avatar']">
<!-- check for staff -->
<if condition="in_array($post[usergroupid], array(5,6,7))">
<!-- I am staff so do this -->
<td class="alt2">

<table cellpadding="4" cellspacing="0" border="0" width="190" height="120" align="center" background="images/$post[username]_avatar.gif" nowrap="nowrap" no-repeat>
<tr>
<td width="46%">&nbsp;</td>
<td><img src="$post[avatarurl]" height="70" width="70" align="center"></td>
</tr>
</table>
</td>
<else />
<!-- I am not staff so do this -->

<!-- Video Avatar Code -->
<if condition="in_array($post['usergroupid'], array(9,10)) AND $post[field12]">
<div class="smallfont">
<object width="150" height="123.5"><param name="movie" value="http://www.youtube.com/v/$post[field12]"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/$post[field12]" type="application/x-shockwave-flash" wmode="transparent" width="150" height="123.5"></embed></object>
</div>
</if>
<else />
<!-- End Video Avatar Code -->
Help appreciated AND thanx for sharing ;)

Jacquii.

PoetJA-1975 06-25-2007 07:42 AM

Anyway - I've taken screenshots in flock and in opera
seems the vid avatar is not aligned with the rest...
I'm sure it's a simple html issue - just don't wanna fool with it now...
Thanx for the sharing anyway - ALSO will appreciate any help getting it aligned right ;)

Jacquii.

4x4 Mecca 06-25-2007 03:33 PM

Quote:

<!-- Video Avatar Code -->
<if condition="in_array($post['usergroupid'], array(9,10)) AND $post[field12]">
<div class="smallfont">
<object width="150" height="123.5"><param name="movie" value="http://www.youtube.com/v/$post[field12]"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/$post[field12]" type="application/x-shockwave-flash" wmode="transparent" width="150" height="123.5"></embed></object>
</div>
<else />
<!-- End Video Avatar Code -->
<if condition="$show['avatar']">
<!-- check for staff -->
<if condition="in_array($post[usergroupid], array(5,6,7))">
<!-- I am staff so do this -->
<td class="alt2">

<table cellpadding="4" cellspacing="0" border="0" width="190" height="120" align="center" background="images/$post[username]_avatar.gif" nowrap="nowrap" no-repeat>
<tr>
<td width="46%">&nbsp;</td>
<td><img src="$post[avatarurl]" height="70" width="70" align="center"></td>
</tr>
</table>
</td>
<else />
<!-- I am not staff so do this -->
That is the start, I'll need a few more lines to see where to put the other </if> code :)

rjmjr69 06-25-2007 05:07 PM

IT says updated but what was updated? I can't get it to work at all

TheBlackPoet 06-25-2007 07:55 PM

yes! it worked perfectly!! i love it....!!! i love it a lot... i think the only problem will be something out the hands of the coder of this wonderful hack.....

when the publisher of the youtube video decides to pull the vid... you have to go hunt for another....

but this is an awesome addition and option for forum members to have and better express their personalities.....

thanks for the work...


All times are GMT. The time now is 10:09 PM.

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.01305 seconds
  • Memory Usage 1,749KB
  • 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
  • (2)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete