vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Show Thread Enhancements - Youtube-Avatar on Show Thead (https://vborg.vbsupport.ru/showthread.php?t=250422)

friend01 09-12-2010 10:00 PM

Youtube-Avatar on Show Thead
 
1 Attachment(s)
Youtube-Avatar on Show Thead
change your avatar into a youtube video
DEMO: http://www.phim-film.net/forum/test-...be-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!

ellinofatsa 09-13-2010 05:00 PM

nice!!!!!!!!!!!!!!!!!!works on 4,06

herkulest 09-13-2010 05:39 PM

screenshot?

zonaenlinea 09-13-2010 07:14 PM

screenshot plisss

Skyrider 09-13-2010 07:23 PM

What above said, screenshotties please :).. Or better yet, a demo.

friend01 09-13-2010 10:49 PM

Demo Here: :)
http://www.phim-film.net/forum/test-...be-avatar.html

COL NIL SATIS 09-14-2010 06:38 PM

Nice one ..tagged for now !!!

goran424 09-30-2010 10:55 AM

I want to install this but need to know if it works on 4.0.2?

OldSchoolDSL 10-25-2010 10:40 PM

A few questions.... Will this work with 4.0.8?

Is there away to apply this only on select user groups?

goran424 10-26-2010 01:44 AM

2 installs only??? Feedback please....


All times are GMT. The time now is 09:00 AM.

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.01100 seconds
  • Memory Usage 1,748KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete