friend01
09-12-2010, 10:00 PM
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:
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:
<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:
<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:
<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:
<div class="postdetails">
<div class="userinfo">
<div class="username_container">
------------------------------
replaced:
<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!
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:
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:
<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:
<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:
<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:
<div class="postdetails">
<div class="userinfo">
<div class="username_container">
------------------------------
replaced:
<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!