PDA

View Full Version : Add-On Releases - Add Video Or Mp3 To Play On Your Avatar


friend01
06-29-2008, 10:00 PM
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 (http://thuytinh.name/forums/test-forums/11622-test-video-avatar.html#post16978)

mp3 Avatar (http://thuytinh.name/forums/test-forums/11623-test-mp3-avatar.html#post16979)

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:


<if condition="$show['avatar']"><td class="alt2"><a href="member.php?$session[sessionurl]u=$post"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></td></if>


Replace with:


<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:

<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:

<div id="postmenu_$post[postid]">
<if condition="$show['profile']">
<a class="bigusername"
Add befor:

<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-------------------------
:D

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:


<if condition="in_array($post['usergroupid'], array(2,5,6,7,12,14)) AND $post[field5]">
Add before:

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

so.addVariable('searchbar','false');
so.write('player');
</script>
</div>
Add after:

</if>
[U]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-----
:cool:

ShawneyJ
06-30-2008, 02:14 AM
i cant use this but its really cool man congrats.

dvbusuario
06-30-2008, 02:27 AM
Very, Very Good Install!!! an Nominate

Alfa1
06-30-2008, 02:30 AM
Is it possible to define which usergroups can use this?

TimberFloorAu
06-30-2008, 02:36 AM
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?

Barakat
06-30-2008, 03:22 AM
realy nice idea ,,,, installleddddddddddddd

friend01
06-30-2008, 08:20 AM
Is it possible to define which usergroups can use this?
You can limit for group in Red color number!
Examle: array(5,6,7) this only for Group Mod,Admin and Smod

<if condition="in_array($post['usergroupid'], array(2,5,6,7,12,14))

Hornstar
06-30-2008, 10:59 AM
Looks great. Lets just hope this doesnt lag the page load too much. (It shouldnt as it doesnt load until you click on it)

Alfa1
06-30-2008, 11:27 AM
You can limit for group in Red color number!
Examle: array(5,6,7) this only for Group Mod,Admin and Smod

<if condition="in_array($post['usergroupid'], array(2,5,6,7,12,14))
Does that not limit the usergroups that can view it, instead of limit the usergroups that can use it?

rooban12
06-30-2008, 12:19 PM
really nice
thanks for the hack

TheInsaneManiac
06-30-2008, 12:53 PM
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.

globofan
06-30-2008, 01:24 PM
This is amazing, easy install also great mod. very unquie.

KURTZ
06-30-2008, 01:57 PM
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 ... :(

princeedward
06-30-2008, 02:50 PM
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...

;)

iogames
06-30-2008, 02:52 PM
Wow! amazing... Installed, but got a question, that NEWS STICKER that you have on the demo, where do you get it?

whitetigergrowl
06-30-2008, 03:39 PM
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.

dvbusuario
06-30-2008, 07:04 PM
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:
<if condition="in_array($post['usergroupid'], array(2,5,6,7,9,12,14)) AND $post[field5]">

Change to
<if condition="in_array($post['usergroupid'], array(2,5,6,7,9,12,14)) AND !$GLOBALS['FIRSTPOSTID'] AND $post[field5]">

:D

KURTZ
06-30-2008, 07:15 PM
@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 ...

friend01
07-01-2008, 12:08 AM
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.

TimberFloorAu
07-01-2008, 12:36 AM
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?

Hornstar
07-01-2008, 12:43 AM
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?

I'd suggest you set up the usergroups in vbulletin, it is probably the better way of doing thing.

princeedward
07-01-2008, 05:28 AM
Wow! amazing... Installed, but got a question, that NEWS STICKER that you have on the demo, where do you get it?i hope what you mean here is the scrolling rainbow words into black box...right?...it called the "Led Scroller" just googlesearch for it...i know there's a generator out there...

best regards...

;)

TimberFloorAu
07-01-2008, 05:38 AM
I'd suggest you set up the usergroups in vbulletin, it is probably the better way of doing thing.



By this do you mean create a whole new group?

Not sure what you mean

KURTZ
07-01-2008, 09:41 AM
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.

what about my trouble Friend? :o

Alfa1
07-01-2008, 12:18 PM
You can limit for group in Red color number!
Examle: array(5,6,7) this only for Group Mod,Admin and Smod

<if condition="in_array($post['usergroupid'], array(2,5,6,7,12,14))

Does that not limit the usergroups that can view it, instead of limit the usergroups that can use it?

I think you might have missed my question.

7lanet
07-01-2008, 11:47 PM
I have problem

When you click on the name of a member
Show the drop-down list of quick links behind Avatar

look in the pic

http://www.7lanet.com/up/out.php?i=6944_13.gif

http://www.7lanet.com/up/out.php?i=6945_5555.gif

friend01
07-03-2008, 12:57 AM
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.

7lanet
07-05-2008, 08:42 AM
Before adding video celebrate the avatar

https://vborg.vbsupport.ru/external/2008/07/32.gif (http://www.7lanet.com/up)
After the addition of video

https://vborg.vbsupport.ru/external/2008/07/32.gif (http://www.7lanet.com/up)

7lanet
07-06-2008, 06:30 PM
Before adding video celebrate the avatar

http://www.7lanet.com/up/out.php?i=7014_2.gif (http://www.7lanet.com/up)
After the addition of video

http://www.7lanet.com/up/out.php?i=7013_1.gif (http://www.7lanet.com/up)

please help me

Blacura
07-12-2008, 11:15 PM
I'm Lookin to make my members avatar or profile pictures Bigger. help

mystic10
07-15-2008, 02:29 AM
this is awesomeeeeeeeeeeeeeeeeee thanks so much

bago200
07-28-2008, 05:41 PM
Hey great mod but one question, i have done everything the instructions said to do but i only got this as the result https://vborg.vbsupport.ru/ any reasons?

Alfa1
07-31-2008, 10:27 PM
How do I display this on MEMBERINFO, memberlist, groups, Blog and forum leaders?

KURTZ
08-02-2008, 05:20 PM
Hey great mod but one question, i have done everything the instructions said to do but i only got this as the result http://img186.imageshack.us/img186/1646/19782153fs7.jpg any reasons?

me too ....

Mr-Mo3ath
08-28-2008, 10:47 PM
its not working good
he give me in a my avoter
thuytinh.name
see the attach please

Mr-Mo3ath
08-28-2008, 11:53 PM
its fixed now
because the namd with file its change now see the attach
the menu its behaned the video

Mr-Mo3ath
08-29-2008, 06:59 AM
the thuytinh.name proplem its back
but that when if ih have 2 user change him avator to mp3 or video in first post he give me the avtor for other server or he give me any thing else

and the other user he give him thuytinh.name
please see the url or attach
http://www.wa.ahba.in/showthread.php?p=223049#post223049

DJ Matt4684
09-21-2008, 08:56 PM
This was working for me. I added it last night, but now today its not working. Anyone who has added a video avatar, it now says thuytinh.name in place of where the avatar is. Can anyone help? Thanks for any help that is given.

friend01
12-19-2008, 12:38 AM
This was working for me. I added it last night, but now today its not working. Anyone who has added a video avatar, it now says thuytinh.name in place of where the avatar is. Can anyone help? Thanks for any help that is given.

Download: Attach Files - unzip-Upload to forum
Goto ACP >>Styles & Templates>>Style Manager
selec you skin >>Common Templates.
in: headinclude
Add above: <script type="text/javascript" src="swfobject.js"></script>
:up:

Mr-Mo3ath
01-26-2009, 12:45 PM
are workinge with 3.8