Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Template Modifications

Reply
 
Thread Tools
YouTube Video Avatars for specified usergroups Details »»
YouTube Video Avatars for specified usergroups
Version: 1.00, by 4x4 Mecca 4x4 Mecca is offline
Developer Last Online: Jun 2013 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 3.6.4 Rating:
Released: 06-24-2007 Last Update: 06-24-2007 Installs: 100
Template Edits
Is in Beta Stage  
No support by the author.

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!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 06-26-2007, 05:19 PM
4x4 Mecca 4x4 Mecca is offline
 
Join Date: Feb 2007
Posts: 396
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Jacquii, I'll work on that today or tomorrow, I have family in town, so I'm pretty busy.
Reply With Quote
  #23  
Old 06-26-2007, 05:24 PM
4x4 Mecca 4x4 Mecca is offline
 
Join Date: Feb 2007
Posts: 396
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Dave, what are you making the video avatar user groups for. I mean what decides who gets put in it. If it's something like length of time or posts, I could probably work something. I don't user secondary user groups so I'm not sure how they work.
Reply With Quote
  #24  
Old 06-26-2007, 09:20 PM
tipoboy's Avatar
tipoboy tipoboy is offline
 
Join Date: Dec 2005
Location: scotland
Posts: 693
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by 4x4 Mecca View Post
Dave, what are you making the video avatar user groups for. I mean what decides who gets put in it. If it's something like length of time or posts, I could probably work something. I don't user secondary user groups so I'm not sure how they work.
in your user manager there is an option to allow additional usergroups

i made a video avatar usergroup and added it to me as a aditional user group but this didnt work(see Screen Shot)

would i have to make up another user group for video avatars enabled for each group i want it to be effective on eg 1 for admin 1 for moderators 1 for registered users or could i do it using this method with alterations in the template change??

i hope this is clear as i love this mod and want to restrict the use to people in the video avatars group only

hope u understand and can achieve this
thanks for the help
dave
Reply With Quote
  #25  
Old 06-26-2007, 09:25 PM
tipoboy's Avatar
tipoboy tipoboy is offline
 
Join Date: Dec 2005
Location: scotland
Posts: 693
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

better screen shot for u
Reply With Quote
  #26  
Old 06-26-2007, 10:38 PM
4x4 Mecca 4x4 Mecca is offline
 
Join Date: Feb 2007
Posts: 396
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks dave, I understand what 2ndary user groups are, i just didn't get how you were going to choose who went in there. I will see if I can do it that way.. keep an eye on this thread.
Reply With Quote
  #27  
Old 06-26-2007, 10:55 PM
TheBlackPoet's Avatar
TheBlackPoet TheBlackPoet is offline
 
Join Date: May 2006
Location: Pasadena, Texas, USA
Posts: 577
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this is my working version.... see what you can do with this..
Reply With Quote
  #28  
Old 06-26-2007, 11:29 PM
4x4 Mecca 4x4 Mecca is offline
 
Join Date: Feb 2007
Posts: 396
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tipoboy View Post
better screen shot for u
Dave, change
Quote:
<if condition="in_array($post['usergroupid'], array(5,6,7,12,14)) AND $post[field54]">
to

Quote:
<if condition="$post['membergroupids'] == 9 AND $post[field6]">

Where 9 is the additional usergroup ID and 6 is your field number. That will work
Reply With Quote
  #29  
Old 06-26-2007, 11:39 PM
4x4 Mecca 4x4 Mecca is offline
 
Join Date: Feb 2007
Posts: 396
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

jacquii, let me know if this works.

replace this
Quote:
<!-- user info -->
<table cellpadding="0" cellspacing="$stylevar[cellpadding]" border="0" width="100%">
<tr>
<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 -->
<td class="alt2">
<a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
</td>
</if>
</if>

with this

Quote:
<!-- user info -->
<table cellpadding="0" cellspacing="$stylevar[cellpadding]" border="0" width="100%">
<tr>
<if condition="in_array($post['usergroupid'], array(5,6,7,12,14)) AND $post[fieldXX]">
<div class="smallfont">
<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>
</div>
<else />
<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 -->
<td class="alt2">
<a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
</td>
</if>
</if>
</if>
but edit the field number and user groups to match your site.
Reply With Quote
  #30  
Old 06-27-2007, 01:46 PM
tipoboy's Avatar
tipoboy tipoboy is offline
 
Join Date: Dec 2005
Location: scotland
Posts: 693
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by 4x4 Mecca View Post
Dave, change


to




Where 9 is the additional usergroup ID and 6 is your field number. That will work
worked a treat thanks muchly for the quick help and reply!!!!!!!!!!

**tipoboy clicks nominate**
Reply With Quote
  #31  
Old 06-27-2007, 02:29 PM
ThaSuper ThaSuper is offline
 
Join Date: Jun 2007
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great mod installed with no problems.
I have one question though...
Is there a way to restrict Video Avatars to only users with a certain number of post or greater?
Example: User1 reaches 100 post then Video Avatars show. User2 with less than 100 post his video avatar does not show.

Let me know if this is possible?

Thanks.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:42 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05068 seconds
  • Memory Usage 2,312KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (7)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete