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

Reply
 
Thread Tools
Locked Flash Avatar + Modified User Menu (Legacy) 1.3 Details »»
Locked Flash Avatar + Modified User Menu (Legacy) 1.3
Version: 1.3, by Freesteyelz Freesteyelz is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.5.3 Rating:
Released: 02-06-2006 Last Update: Never Installs: 17
Template Edits
 
No support by the author.

Brief Description:
Flash enabled avatars using a Custom Profile Field. It may work in other vB versions (untested) though this mod is created for 3.5.3. A simple mod (for "Legacy" view).

Thank you(s) to: Luggruff (early beta user); masterross (for transparent value)

Support: I'll try to support it the best I can.



Browsers Tested:
Internet Explorer (5 - 6); Firefox (1.0.4 - latest)

**Remember to Disable users from uploading their own Flash avatars. Allow only the Flash avatars from people you can trust...Never by strangers. Flash may contain codes that can harm your site/forum so be cautious.



Templates Modified:
postbit_legacy

Installation Instructions (6 easy steps):
In Admin CP:

1. Create new User Profile Field by going to User Profile Fields --> Add New User Profile Field and create a Single-Line Text Box. In the Title add "CUSTOM AVATAR (FLASH)". Conditions:

"Field Required": No
"Field Editable by User": No (IMPORTANT!)
"Private Field": No
"Field Searchable on Members List": No
"Show on Members List": No
"Which page displays this option?": Options: Other

*For security reasons set to no "Field Editable by User" so that only the CP Admin(s) can upload the .swf files.

*Remember the Field number you've just created. You may need to change the "20". For this mod I used "field20".

2. Press "Save".

3. Then go to Styles & Templates --> Style Manager --> All Style Options --> Edit Templates --> Postbit Templates --> postbit_legacy and look for this code:

Code:
            <if condition="$show['avatar']">
                <div class="smallfont">
                    &nbsp;<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
                </div>
            </if>
and replace it with:

Code:
<!-- _______ CUSTOM AVATAR (FLASH) _______ -->
            <if condition="$post['field20']">
<!-- Flash Avatar -->
<if condition="$post['field20']">
<div>
<br />
<object width="128px" height="128px">
<param name="movie" value="$post[field20]"> <param name="quality" value="high"> <param name="wmode" value="transparent">
<embed src="$post[field20]" width="128px" height="128px" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" menu="false" quality="high" wmode="transparent" scale="default">
</embed>
</object>
</div></if>
<!-- End -->
                        <else />
<!-- vB Avatar -->
            <if condition="$show['avatar']">
                <div class="smallfont">
                    <br /><img src="$post[avatarurl]" width="128px" height="128px" alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" />
                </div>
            </if>
<!-- End -->
                        </if>
<!-- _______ END _______ -->
*Change the "width" and "height" variables in the "embed" tag to the size you want the Flash avatar displayed. Again, change "field20" to the number of the new field you've just created. *If you want to remove "width" and "height" of vB's default avatar (NOT the Flash avatar), go ahead.

4. Press "Save".

*The "object" and "embed" codes are the minimal to play Flash in the browser. If you have the plugin it should work. Tested in Internet Explorer (5 - 6) and FireFox (1.0.4 to latest).

5. Now go to the User's Profile you want to add the Flash avatar and enter the .swf file URL in the "CUSTOM AVATAR (FLASH)" text area. It should be in the "User Profile Fields" section.

*It is recommended that you upload the avatar to your server to prevent users from editing it.

6. Press "Save" and Done!

*To use non-.swf avatars use vB's default Avatar option "Change Avatar".

*You will need to have Flash enabled in your browser.

**Remember to Disable users from uploading their own Flash avatars. Allow only the Flash avatars from people you can trust...Never by strangers. Flash may contain codes that can harm your site/forum so be cautious.


7. Click if you use it. Thanks!


****************************************


********************
********************
OPTIONAL code to display the popup menu horizontally with Flash Avatars:

Conditional: 1. If you're using vB's default avatar this code will display the default "post $post[postid] popup menu". 2. If you're using a Flash Avatar the modified popup menu will override the default's, whether or not you've entered both avatar types.

Code below:
********************
********************

Installation Instructions (2 steps):
In Admin CP:

1. Then go to Styles & Templates --> Style Manager --> All Style Options --> Edit Templates --> Postbit Templates --> postbit_legacy and look for this code:

Code:
<!-- post $post[postid] popup menu -->
<div class="vbmenu_popup" id="postmenu_$post[postid]_menu" style="display:none">
    <table cellpadding="4" cellspacing="1" border="0">
    <tr>
        <td class="thead">$post[username]</td>
    </tr>
    <if condition="$show['profile']">
        <tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]u=$post[userid]">$vbphrase[view_public_profile]</a></td></tr>
    </if>
    <if condition="$show['pmlink']">
        <tr><td class="vbmenu_option"><a href="private.php?$session[sessionurl]do=newpm&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[send_private_message_to_x]</phrase></a></td></tr>
    </if>
    <if condition="$show['emaillink']">
        <tr><td class="vbmenu_option"><a href="sendmessage.php?$session[sessionurl]do=mailmember&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[send_email_to_x]</phrase></a></td></tr>
    </if>
    <if condition="$show['homepage']">
        <tr><td class="vbmenu_option"><a href="$post[homepage]"><phrase 1="$post[username]">$vbphrase[visit_xs_homepage]</phrase></a></td></tr>
    </if>
    <if condition="$show['search']">
        <tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=finduser&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[find_more_posts_by_x]</phrase></a></td></tr>
    </if>
    <if condition="$post['userid'] AND $show['member']">
    <tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=addlist&amp;userlist=buddy&amp;u=$post[userid]"><phrase 1="$post[username]">$vbphrase[add_x_to_buddy_list]</phrase></a></td></tr>
    </if>
    </table>
</div>
<!-- / post $post[postid] popup menu -->
And Replace it with:

Code:
<!-- _______ Popup Menu Modified _______ -->
            <if condition="$post['field20']">
<!-- Flash Avatar DHTML Popup Menu -->
<div class="vbmenu_popup" id="postmenu_$post[postid]_menu" style="display:none;margin-top:-39px">
    <table cellpadding="4 cellspacing="1" border="0">
              <tr>
              <td class="thead">$post[username]
              </td>
    <if condition="$show['profile']">
        <td class="vbmenu_option"><a href="member.php?$session[sessionurl]u=$post[userid]">$vbphrase[view_public_profile]</a>
    </if>
    <if condition="$show['pmlink']"><td class="vbmenu_option">
        <a href="private.php?$session[sessionurl]do=newpm&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">Send PM</phrase></a></td>
    </if>
    <if condition="$show['emaillink']"><td class="vbmenu_option"> 
        <a href="sendmessage.php?$session[sessionurl]do=mailmember&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">Send E-Mail</phrase></a></td>
    </if>
    <if condition="$show['homepage']"><td class="vbmenu_option">
        <a href="$post[homepage]"><phrase 1="$post[username]">Visit Homepage</phrase></a>
    </if>
    <if condition="$show['search']"><td class="vbmenu_option">
        <a href="search.php?$session[sessionurl]do=finduser&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">Find More Posts</phrase></a></td>
    </if>
    <if condition="$post['userid'] AND $show['member']"><td class="vbmenu_option">
    <a href="profile.php?$session[sessionurl]do=addlist&amp;userlist=buddy&amp;u=$post[userid]"><phrase 1="$post[username]">Add To Buddy List</phrase></a></td>
    </if>
        </td></tr>
    </table>
</div>
<!-- End -->
                        <else />
<!-- post $post[postid] popup menu -->
<div class="vbmenu_popup" id="postmenu_$post[postid]_menu" style="display:none">
    <table cellpadding="4" cellspacing="1" border="0">
    <tr>
        <td class="thead">$post[username]</td>
    </tr>
    <if condition="$show['profile']">
        <tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]u=$post[userid]">$vbphrase[view_public_profile]</a></td></tr>
    </if>
    <if condition="$show['pmlink']">
        <tr><td class="vbmenu_option"><a href="private.php?$session[sessionurl]do=newpm&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[send_private_message_to_x]</phrase></a></td></tr>
    </if>
    <if condition="$show['emaillink']">
        <tr><td class="vbmenu_option"><a href="sendmessage.php?$session[sessionurl]do=mailmember&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[send_email_to_x]</phrase></a></td></tr>
    </if>
    <if condition="$show['homepage']">
        <tr><td class="vbmenu_option"><a href="$post[homepage]"><phrase 1="$post[username]">$vbphrase[visit_xs_homepage]</phrase></a></td></tr>
    </if>
    <if condition="$show['search']">
        <tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=finduser&amp;u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[find_more_posts_by_x]</phrase></a></td></tr>
    </if>
    <if condition="$post['userid'] AND $show['member']">
    <tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=addlist&amp;userlist=buddy&amp;u=$post[userid]"><phrase 1="$post[username]">$vbphrase[add_x_to_buddy_list]</phrase></a></td></tr>
    </if>
    </table>
</div>
<!-- / post $post[postid] popup menu -->
                        </if>
<!-- _______ End _______ -->
2. Press "Save" and You're Done.

3. Click if you use it. Thanks!

*Now the username drop down menu will display horizontally with the Flash avatar. View image attachment below for an example:

********************
********************

*If you've installed this hack please click the "Install" button.

Show Your Support

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

Comments
  #32  
Old 02-09-2006, 09:12 PM
Freesteyelz's Avatar
Freesteyelz Freesteyelz is offline
 
Join Date: Jan 2006
Posts: 1,552
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by masterross
yes indeed flash will be ot top layer...
but if you do like in my way -> wmode="transparent" all will be "normal"
check it

thank ones again for great hack

BR,
Ross

NP at all.

For some reason it didn't work for me. Ahh well. I've included the "transparent" value into the mod.
Reply With Quote
  #33  
Old 02-09-2006, 09:27 PM
masterross's Avatar
masterross masterross is offline
 
Join Date: Nov 2005
Location: Bulgaria
Posts: 315
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ohh
and 1 suggestion - flash avatar can be shown in MEMBERINFO too couse now when flash is used nothing is shown
this will be nice

regards,
Ross
Reply With Quote
  #34  
Old 02-09-2006, 09:38 PM
masterross's Avatar
masterross masterross is offline
 
Join Date: Nov 2005
Location: Bulgaria
Posts: 315
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

and the problem that not works for u is because u forgot to add wmode="transparent" here:

Code:
 
<embed src="$post[field20]" width="128px" height="128px" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" menu="false" quality="high" wmode="transparent" scale="default">
</embed>
without this transparent wont work neither popup menu will show correctly

Ross
Reply With Quote
  #35  
Old 02-09-2006, 09:44 PM
Freesteyelz's Avatar
Freesteyelz Freesteyelz is offline
 
Join Date: Jan 2006
Posts: 1,552
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by masterross
ohh
and 1 suggestion - flash avatar can be shown in MEMBERINFO too couse now when flash is used nothing is shown
this will be nice

regards,
Ross
Since I don't display avatars I didn't initially consider it into the mod. LOL. Though it is a good suggestion and it shouldn't be difficult to do. All is needed is to copy and paste the Flash avatar code in Step 1 to the Memberslist template or even Public Profile template.

I'll place it on the "list to do".
Reply With Quote
  #36  
Old 02-09-2006, 09:51 PM
Freesteyelz's Avatar
Freesteyelz Freesteyelz is offline
 
Join Date: Jan 2006
Posts: 1,552
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by masterross
and the problem that not works for u is because u forgot to add wmode="transparent" here:

Code:
 
<embed src="$post[field20]" width="128px" height="128px" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" menu="false" quality="high" wmode="transparent" scale="default">
</embed>
Ross
Ohh geez...That's right. Thank you. I've added it into the mod and updated the version and text.
Reply With Quote
  #37  
Old 02-10-2006, 11:20 AM
Luggruff's Avatar
Luggruff Luggruff is offline
 
Join Date: Apr 2005
Posts: 239
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by masterross
great thanks Freesteyelz !!!

i've been searched for this hack long time ago!

it works great!
also i did some modification to be use tnansparent flashes:
Code:
<!-- _______ CUSTOM AVATAR (FLASH) _______ -->
<if condition="$post['field20']">
<!-- Flash Avatar -->
<if condition="$post['field20']">
<div>
<br />
<object width="128px" height="128px">
<param name="movie" value="$post[field20]"> 
<param name="quality" value="high">
<param name="wmode" value="transparent">
<embed src="$post[field20]" width="128px" height="128px" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" menu="false" quality="high" wmode="transparent" scale="default">
</embed>
</object>
</div></if>
<!-- End -->
<else />
<!-- vB Avatar -->
<if condition="$show['avatar']">
<div class="smallfont">
<br /><img src="$post[avatarurl]" width="128px" height="128px" alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" />
</div>
</if>
<!-- End -->
</if>
<!-- _______ END _______ -->

also why i should use this step?
Code:
Installation Instructions (2 steps):
In Admin CP:

1. Then go to Styles & Templates --> Style Manager --> All Style Options --> Edit Templates --> Postbit Templates --> postbit_legacy
it works perfect without this! And i dont want to view horizontal popup menu

BR,
Ross
Does this work with shockwave too?
Reply With Quote
  #38  
Old 02-10-2006, 12:09 PM
masterross's Avatar
masterross masterross is offline
 
Join Date: Nov 2005
Location: Bulgaria
Posts: 315
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

addition mod:
if you want to see flash avatar in "Public Profile"
in MEMBERINFO
go to Styles & Templates --> Style Manager --> All Style Options --> Edit Templates --> Member Info Templates --> MEMBERINFO

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>
and replace with:

Code:
 <!-- _______ CUSTOM AVATAR (FLASH) _______ -->
<if condition="$userinfo['field5']">
<!-- Flash Avatar -->
<if condition="$userinfo['field5']">
<div>
<br />
<object width="100px" height="100px">
<param name="movie" value="$userinfo[field5]">
<param name="quality" value="high">
<param name="wmode" value="transparent">
<embed src="$userinfo[field5]" width="100px" height="100px" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/...ShockwaveFlash" menu="false" quality="high" wmode="transparent" scale="default">
</embed>
</object>
</div></if>
<!-- End -->
						<else />
<!-- vB Avatar -->
<if condition="$show['avatar']">
	<div class="smallfont">
	 <br /><img src="$userinfo[avatarurl]" alt="<phrase 1="$userinfo[username]">$vbphrase[xs_avatar]</phrase>" border="0" />
	</div>
</if>
<!-- End -->
						</if>
<!-- _______ END _______ -->

then enjoy

BR,
Ross
Reply With Quote
  #39  
Old 04-17-2006, 04:48 PM
vyas1980 vyas1980 is offline
 
Join Date: Apr 2006
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I managed to upload it but its still showing default avtar.. Please help!!!1
Reply With Quote
  #40  
Old 04-17-2006, 11:00 PM
Freesteyelz's Avatar
Freesteyelz Freesteyelz is offline
 
Join Date: Jan 2006
Posts: 1,552
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

For the Custom Profile Field that you created for the Flash avatar, what is the ID (#)? Can you also provide me your postbit code so that I can help you.
Reply With Quote
  #41  
Old 04-24-2006, 10:22 PM
hypnoticpimp hypnoticpimp is offline
 
Join Date: Dec 2004
Posts: 132
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

wow, good job! 1 thing is, i have a avatar gallery, default avatar gallery from vbulletin , is there anyway admins can upload flash avatars to the default gallery, and members can select and view the flash avatar in there usercpanel by selecting edit avatar, etc
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 04:47 AM.


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.12705 seconds
  • Memory Usage 2,345KB
  • 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
  • (10)bbcode_code
  • (4)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
  • (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