PDA

View Full Version : Mini Mods - YouTube Subscribe in Postbit


basilrath
16 Apr 2009, 18:46
Hi everyone

Just a little modification which will add a small YouTube icon to your postbit / legacy (next to yahoo, aim etc). This will allow the user to add their own youtube "username" in their own profile / usercp etc to allow it to show in the postbit / legacy which other members can click and directly go to the posters YouTube page (allowing easy subscription if needed). I hadnt seen a little mod so added it here, apolagies if its already been added previously.

1.Make A New Profile Field By

User Profile Fields>Add New User Profile Field
Profile field type = Single-line text box
Title: Your YouTube ID For Others To Subscribe (or whatever you like)
Description: Type in your full Youtube "username" not full URL
Private field: No
Field Searchable on Members List: Yes
Show on Members List: No


2. Template changes - In postbit_lecacy & Postbit

Find:
Code:

<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]

Directly After Add:

<!-- YouTube start -->
<if condition="$post[fieldX]"><a href="http://www.youtube.com/$post[fieldX]" title="Subscribe To My Youtube" target="_blank">
<img src="/images/misc/youtube.png" border="0"></a>
</if>
<!-- YouTube end -->

+++Remember to note the field id. Example: field19. You need to replace the X in the code with the number 19 (on both counts !) +++

3. YouTube Icon Upload
Upload to Your /images/misc/youtube.png (remember to put the correct path in the img src)

YouTube Icon
http://www.tabletennistalk.co.uk/forum/images/misc/youtube.png

Demo .......... HERE (http://www.tabletennistalk.co.uk/forum/showthread.php?t=1574&page=3)

Screenshot
97878

BlueNinjaGo
16 Apr 2009, 19:19
Looks nice... work ok with 3.7.X?

basilrath
16 Apr 2009, 19:33
Not checked it on there but cant see any reason not to.

Jasem
16 Apr 2009, 21:19
Excellent, thank you!

DieselMinded
18 Apr 2009, 23:18
installed

attached is a better image to use

lebmedia
17 Jun 2009, 05:21
nothing Work With Me , I Did All The Steps :(
The Field Appear In UserCp, Edit Details , but The Youtube Pic Don't Appear In The Showthread ( The IMG Link Is Correct ) I'm Using vb 3.8.3

powersilie
30 Jun 2009, 09:00
Hi!

I'm also using vB 3.8.3 and it works.

1.) You must not use field ID 19. You have to create a new profile field and you have to replace the X with the ID of YOUR new profile field. Then you go to your profile and fill in only your youtube USERNAME.

2.) First the pic didn't appear in my board also, but i changed the path of the pic this way:
http://www.myurl.de/images/misc/youtube.png

and it works great!

greez
Karin

Crossbow
09 Mar 2011, 00:51
Thank you.

Goomzee
28 Oct 2011, 10:53
thanks for sharing this simple and good mod

BASHEER
09 Nov 2011, 23:32
thank you