Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons

Reply
 
Thread Tools
Add Video Or Mp3 To Play On Your Avatar Details »»
Add Video Or Mp3 To Play On Your Avatar
Version: 1.1, by friend01 friend01 is offline
Developer Last Online: Jun 2013 Show Printable Version Email this Page

Category: Add-On Releases - Version: 3.7.x Rating:
Released: 06-29-2008 Last Update: Never Installs: 23
Template Edits
Additional Files  
No support by the author.

Add Video or audio player to you Avatar V1.1

vBB: 3.6x-3.7x

Code: V1.1
Author : Friend01
date: juni.29.2008
demo:
Video avatar

mp3 Avatar

Install: Easy < 10 min
Templates chance: 1 and/or 2
postbit and/or postbit_legacy

STEP1.

1. Upload the contents of the "upload" folder to you root forums.

2. Goto ACP >>User Profile Fields >>Add New User Profile Field

Profile Field Type: Single-Line Text Box

click: Continue
---------------------------------------------------------------------
Title: TT-AV-Avatar

Description:
Paste the youtube video link or you mp3 link in the box below.<br />
Example:
youtube link ( http://de.youtube.com/watch?v=yeCEOLan1h4 ).<br />
or you link to you mp3 file ( http://www.Examler.com/music/file.mp3 )<br />
leave this Box blank to show you normal Avatar.

Max length of allowed user input: 500

Field Length: 50

Field Editable by User: yes

Private Field: no

Which page displays this option?: Edit Your Details

click Save.
----------------------------------------------------------------------------
Goto ACP >>User Profile Fields>>User Profile Field Manager
Take notice of the field number next to your new profile field. In the sample below it's
TT-AV-Avatar >>>>>>> Name : field5 (field5 is on my forum).

IMPORTANT! Replace all [field5] with the your forums field number!
And Replace all link in Green color to you link!
////////////////////////////////////////////////
STEP2.
TEMPLATE CHANGES:

Goto ACP >>Styles & Templates>>Style Manager
selec you skin >> Edit Templates
In template: postbit
Find:

Code:
<if condition="$show['avatar']"><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>


Replace with:

Code:
<if condition="$bbuserinfo['usergroupid'] != 1"> 

            <if condition="in_array($post['usergroupid'], array(2,5,6,7,9,12,14))      AND $post[field5]">
<td class="alt2">
<embed
src="http://www.examle.com/forum/tt-av-avatar-v1.0/mediaplayer.swf"
width="150"
height="124"
allowscriptaccess="always"
allowfullscreen="true"
flashvars="height=124&width=150&file=$post[field5]&image=$post[avatarurl]&showstop=true&enablejs=true"
/>
</td>
</if>
<else /> 
<if condition="$show['avatar']"><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>

------------------------------------------------------------------------------
Click Save.
------------------------------------------------------------------------------
In template: postbit_legacy

Find:

Code:
<if condition="$show['avatar']">
                <div class="smallfont">
                    &nbsp;<br /><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>
                </div>
            </if>

Delete this.
-----------------------------------------------------
Find:
Code:
<div id="postmenu_$post[postid]">
                <if condition="$show['profile']">
                <a class="bigusername"
Add befor:
Code:
<if condition="$bbuserinfo['usergroupid'] != 1"> 
<if condition="in_array($post['usergroupid'], array(2,5,6,7,12,14)) AND $post[field5]">
<div class="smallfont">
<embed
src="http://www.examle.com/forum/tt-av-avatar-v1.0/mediaplayer.swf"
width="150"
height="124"
allowscriptaccess="always"
allowfullscreen="true"
flashvars="height=124&width=150&file=$post[field5]&image=$post[avatarurl]&showstop=true&enablejs=true"
/>
</div>
</if>
<else /> 
<if condition="$show['avatar']">
<div class="smallfont">
&nbsp;<br /><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>
</div>
</if>
</if>

----------------------------------------------------------------------------------
Click Save
----------------------------------------------------------------------------------
Final:
Goto >> User CP>>>Edit Your Details to Add video link or mp3 link
----------------------End-------------------------


Update 6.1.2008 : Hide
TT-AV-Avatar from Guests
The following template modifications will prevent guests (unregistered / not logged in) from seeing TT-AV-Avatar.

in templastes
postbit and/or postbit_legacy

Find:

Code:
<if condition="in_array($post['usergroupid'], array(2,5,6,7,12,14)) AND $post[field5]">
Add before:
Code:
<if condition="$bbuserinfo['usergroupid'] != 1">
Find:
Code:
so.addVariable('searchbar','false');
so.write('player');
</script>
</div>
Add after:
Code:
</if>
Update: (6.3.2008)

- Complete code
With Hide TT-AV-Avatar from Guests.
- Fix Error in IE
-Fix probleme wen click drop down member menu on postbit_legacy.


-----END-----

Supporters / CoAuthors

Show Your Support

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

Comments
  #12  
Old 06-30-2008, 12:53 PM
TheInsaneManiac TheInsaneManiac is offline
 
Join Date: Feb 2008
Posts: 1,360
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TimberFloorAu View Post
Seems like a good idea.

How could we limit this to certain user groups. or those with post count over say 1000

Problem I forsee, is the page load speed, on a busy forum.

Seems like a great idea, but can only imagine the page speed is going to be sooooo slow... your page took 17 seconds to load, for the mp3 Slightly less for the youtube vid.

The mp3, presumably.. is constructed from either ( hosted or hotlinked files ) which again.. could take for ever to load.

Any stats please?
I have a execution time script on my forums. My forums execute in 0.2 seconds. After just using my mp3 it took it up to 4 seconds. After using Youtube it took it up to 1 second. Sorry, but uninstalled.
Reply With Quote
  #13  
Old 06-30-2008, 01:24 PM
globofan globofan is offline
 
Join Date: Jun 2008
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is amazing, easy install also great mod. very unquie.
Reply With Quote
  #14  
Old 06-30-2008, 01:57 PM
KURTZ KURTZ is offline
 
Join Date: Nov 2006
Location: Italy
Posts: 2,257
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

amazing job!

anyway i've a question: if i've already a custom avatar selected it shows my avatar like a background of the video when this is paused ... right?

also i've found an issue: check the attachment ... only in the first post i've got the video ...

edit: just tried onto another (testing) board ... same issue ...
Reply With Quote
  #15  
Old 06-30-2008, 02:50 PM
princeedward's Avatar
princeedward princeedward is offline
 
Join Date: Jan 2007
Location: Deutschland
Posts: 901
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks....just workin fine to my vb3.6.8. PL2 i wonder if we can add or make this work to
Profile Page Avatar or Profile Picture too...

great...

Reply With Quote
  #16  
Old 06-30-2008, 02:52 PM
iogames's Avatar
iogames iogames is offline
 
Join Date: Jan 2007
Location: Las Vegas, NV.
Posts: 1,433
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow! amazing... Installed, but got a question, that NEWS STICKER that you have on the demo, where do you get it?
Reply With Quote
  #17  
Old 06-30-2008, 03:39 PM
whitetigergrowl whitetigergrowl is offline
 
Join Date: Jun 2004
Posts: 243
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

My biggest concern which the others have reflected and the coder has said nothing in response to is page load speed. As well as the number of queries being added.
Reply With Quote
  #18  
Old 06-30-2008, 07:04 PM
dvbusuario's Avatar
dvbusuario dvbusuario is offline
 
Join Date: Oct 2007
Posts: 153
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by KURTZ View Post
amazing job!

anyway i've a question: if i've already a custom avatar selected it shows my avatar like a background of the video when this is paused ... right?

also i've found an issue: check the attachment ... only in the first post i've got the video ...

edit: just tried onto another (testing) board ... same issue ...
To display only in First Post:

find:
Quote:
<if condition="in_array($post['usergroupid'], array(2,5,6,7,9,12,14)) AND $post[field5]">
Change to
Code:
<if condition="in_array($post['usergroupid'], array(2,5,6,7,9,12,14)) AND !$GLOBALS['FIRSTPOSTID'] AND $post[field5]">
Reply With Quote
  #19  
Old 06-30-2008, 07:15 PM
KURTZ KURTZ is offline
 
Join Date: Nov 2006
Location: Italy
Posts: 2,257
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@dvbusuario: something is changed ... now i got all the avatars, but the video is showed only in the first post like you said .... no i need the video onto all my posts is possible?

thanks ...
Reply With Quote
  #20  
Old 07-01-2008, 12:08 AM
friend01 friend01 is offline
 
Join Date: Jan 2007
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Update 6.1.2008 : Hide TT-AV-Avatar from Guests
The following template modifications will prevent guests (unregistered / not logged in) from seeing TT-AV-Avatar.
Reply With Quote
  #21  
Old 07-01-2008, 12:36 AM
TimberFloorAu's Avatar
TimberFloorAu TimberFloorAu is offline
 
Join Date: May 2008
Location: Brisbane
Posts: 2,264
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please is there a way of restricting this to members with a minimum post count.

We do not have different usergroups based on post count.

Any suggestions?
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 08:31 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.04651 seconds
  • Memory Usage 2,320KB
  • Queries Executed 26 (?)
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
  • (3)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
  • (3)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