Back to vBulletin 4.x Add-ons

Youtube-Avatar on Show Thead
Mod Version: 1.00, by friend01

vB Version: 4.0.6 Rating: (1 vote - 5.00 average) Installs: 9
Released: 13 Sep 2010 Last Update: Never Downloads: 0
Not Supported Template Edits  

Youtube-Avatar on Show Thead
change your avatar into a youtube video
DEMO: http://www.phim-film.net/forum/test-forums/12083-test-youtube-avatar.html
Go to admincp -> User Profile Fields
-> Add New User Profile Field
- Profile Field Type:Single-line Test Box
- click to Continue
Title: Youtube-Avatar
Description:
Code:
Paste the youtube video link in the box below.<br />
Example:
youtube link ( http://de.youtube.com/watch?v=yeCEOLan1h4 ).<br />
leave this Box blank to show you normal Avatar.
Profile Field Category:
Default Value:
Max length of allowed user input:500
Field Length: 50
Profile Field Type: Single-Line Text Box
Display Order:
Field Required: No
Field Editable by User: Yes
Private Field: No
Field Searchable on Members List: Yes
Regular Expression:
Which page displays this option?: Edit Profile
Click to Save
Go to admincp -> User Profile Fields -> User Profile Field Manager
View Profile Field you've created now? (For example, my forum is: field5)
if your not just my needs change.
if the other numbers, you change your number on the part of code is highlighted in red below.
------------------------
Step 2:
Acp -> Styles & Templates -> Style Manager
select styles that you want to use YouTube-Avatar
Edit Templates -> Postbit Templates -> postbit
search for:
Code:
<vb:if condition="$show['avatar']">
                    <a class="postuseravatarlink" href="{vb:link member, {vb:raw post}}" title="{vb:rawphrase {vb:raw post['onlinestatusphrase']}, {vb:raw post.username}}">
                        <vb:if condition="$post.avatarurl">
                            <img src="{vb:raw post.avatarurl}" alt="{vb:rawphrase xs_avatar, {vb:raw post.username}}" />
                        <vb:else />
                            <img src="{vb:stylevar imgdir_misc}/unknown.gif" />
                        </vb:if>
                    </a>
                </vb:if>
                <div class="username_container">
------------------------
replaced by:
Code:
            
<vb:if condition="$show['avatar']">
                    <a class="postuseravatarlink" href="{vb:link member, {vb:raw post}}" title="{vb:rawphrase {vb:raw post['onlinestatusphrase']}, {vb:raw post.username}}">
<vb:if condition="in_array($post['usergroupid'], array(2,5,6,7,17)) AND $post['field5']">                        
<vb:if condition="$post.avatarurl">
<td class="alt2">
<script language="JavaScript" type="text/javascript">
var link="{vb:raw post.field5}";
pos=link.indexOf("www.youtube.com");
    if(pos>=0) {
sublink=link.substr(31,11);
document.write ("<object width=150 height=125><param name='movie' value='http://www.youtube.com/v/"+sublink+"'></param><embed src='http://www.youtube.com/v/"+sublink+"' type='application/x-shockwave-flash' width='150' height='125'></embed></object>");
}
</script></td></vb:if>
<vb:else />
<img src="{vb:raw post.avatarurl}" alt="{vb:rawphrase xs_avatar, {vb:raw post.username}}"/>
</vb:if></vb:if>
                <div class="username_container">
-> Click Save
--------------------
Edit Templates -> Postbit Templates -> postbit_legacy:

find and delete:
Code:
    
<vb:if condition="$show['avatar']">
            <a class="postuseravatar" href="{vb:link member, {vb:raw post}}" title="{vb:rawphrase {vb:raw post['onlinestatusphrase']}, {vb:raw post.username}}">
                <img src="{vb:raw post.avatarurl}" alt="{vb:rawphrase xs_avatar, {vb:raw post.username}}" title="{vb:rawphrase xs_avatar, {vb:raw post.username}}" />
            </a>
            </vb:if>
--------------------------
find:
Code:
    
<div class="postdetails">
        <div class="userinfo">
            <div class="username_container">
------------------------------

replaced:
Code:
    
<div class="postdetails">
<div class="userinfo">
<vb:if condition="$show['avatar']">
                    <a class="postuseravatarlink" href="{vb:link member, {vb:raw post}}" title="{vb:rawphrase {vb:raw post['onlinestatusphrase']}, {vb:raw post.username}}">
<vb:if condition="in_array($post['usergroupid'], array(2,5,6,7,17)) AND $post['field5']">                        
<vb:if condition="$post.avatarurl">
<td class="alt2">
<script language="JavaScript" type="text/javascript">
var link="{vb:raw post.field5}";
pos=link.indexOf("www.youtube.com");
    if(pos>=0) {
sublink=link.substr(31,11);
document.write ("<object width=150 height=125><param name='movie' value='http://www.youtube.com/v/"+sublink+"'></param><embed src='http://www.youtube.com/v/"+sublink+"' type='application/x-shockwave-flash' width='150' height='125'></embed></object>");
}
</script>
</td></vb:if>
<vb:else />
<img src="{vb:raw post.avatarurl}" alt="{vb:rawphrase xs_avatar, {vb:raw post.username}}"/>
</vb:if></vb:if>
            <div class="username_container">
----------------------
Step 3:
bring your favorite music on Youtube-Avatar.
back to forums click on Settíng -> My Settíng -> Edit Profile,
in Section: Additional Information
add youtube video link to Youtube-Avatar.
completed!

Download

No files for download.

Similar Mods

Forum Display Enhancements If User Hasn't Got An Avatar Show Default Avatar With Link To Set One Modification Graveyard
Show "No Avatar" Image If No Avatar is Selected vBulletin 2.x Full Releases

vblts.ru supports vBulletin®, 2022-2024