Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications

Reply
 
Thread Tools
Social Networking in Postbit (with or without block) Details »»
Social Networking in Postbit (with or without block)
Version: 1.0.2, by boydy boydy is offline
Developer Last Online: Dec 2014 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 4.x.x Rating:
Released: 01-26-2011 Last Update: 07-15-2011 Installs: 59
Template Edits
Re-useable Code Additional Files  
No support by the author.

Hi guys,

This is the first mod/hack i have published on here although i do have other projects in use on my own forums.

This mod/hack gives a user the abillity to share their accounts on Twitter/Facebook/MySpace/Bebo/Linkedin/Flickr/Tumblr/Youtube/Vimeo/PSN/XBL which appear in the postbit/postbit legacy.

=|= Install =|=

=|= Step 1 =|=
The first step you will need to go through is creating the custom profile fields for the following:

Profile Field Type
- Single-Line Text Box
Title - Twitter
Description - Add a link to your Twitter profile.
Field Searchable on Members List - NO
Show on Members List - NO

Profile Field Type - Single-Line Text Box
Title - Facebook
Description - Add a link to your Facebook profile.
Field Searchable on Members List - NO
Show on Members List - NO

Profile Field Type - Single-Line Text Box
Title - Google+
Description - Add a link to your Google+ profile.
Field Searchable on Members List - NO
Show on Members List - NO

Profile Field Type - Single-Line Text Box
Title - MySpace
Description - Add a link to your MySpace profile.
Field Searchable on Members List - NO
Show on Members List - NO

Profile Field Type - Single-Line Text Box
Title - Bebo
Description - Add a link to your Bebo profile.
Field Searchable on Members List - NO
Show on Members List - NO

Profile Field Type - Single-Line Text Box
Title - Youtube
Description - Add a link to your Youtube profile.
Field Searchable on Members List - NO
Show on Members List - NO

Profile Field Type - Single-Line Text Box
Title - Vimeo
Description - Add a link to your Vimeo profile.
Field Searchable on Members List - NO
Show on Members List - NO

Profile Field Type - Single-Line Text Box
Title - Linkedin
Description - Add a link to your Linkedin profile.
Field Searchable on Members List - NO
Show on Members List - NO

Profile Field Type - Single-Line Text Box
Title - Flickr
Description - Add a link to your Flickr account.
Field Searchable on Members List - NO
Show on Members List - NO

Title - Tumblr
Description - Add a link to your Tumblr account.
Field Searchable on Members List - NO
Show on Members List - NO

Title - Xbox Live ID
Description - Enter your Xbox Live id.
Field Searchable on Members List - NO
Show on Members List - NO

Title - Playstation Network ID
Description - Enter your Playstation Network id.
Field Searchable on Members List - NO
Show on Members List - NO

Once you have done the above please take a note of the profile field numbers that show under the "name" heading in the admincp, eg;



=|= Step 2 =|=

The second step is to download one of the attached zip files containing the images and upload them to the root of your forums. The exact URL should be:
Code:
www.yoursite.com/yourforum/images/postbit_social/image.png


=|= Step 3 =|=

We have 2 options here, you can have it with or without the block.

Social Networking with Block

This option is ONLY available to members that use the Vertical Postbit (postbit_legacy);

Open Template - Postibit Templates -> postbit_legacy

Find -
Code:
{vb:raw post.skypeicon}


Add after
-
Code:
<!--Social Start--><br /><br />
<vb:if condition="$post['field#'] OR $post['field#'] OR $post['field#'] OR $post['field#'] OR $post['field#'] OR $post['field#'] OR $post['field#'] OR $post['field#'] OR $post['field#'] OR $post['field#'] OR $post['field#'] OR $post['field#']">
<div id="thread_info" class="thread_info block">
<h4 class="threadinfohead blockhead" align="center"> Social Networking </h4>
<div id="thread_onlineusers" class="thread_info_block blockbody formcontrols">
<div class="inner_block">
<div align="center"><vb:if condition="$post['field#']">
<a target ="blank" href="{vb:raw post.field#}"><img src="images/postbit_social/twitter.png" onmouseover="this.src='images/postbit_social/twitter_a.png'" onmouseout="this.src='images/postbit_social/twitter.png'" alt="Follow {vb:raw post.username} On Twitter" /></a>
</vb:if>
<vb:if condition="$post['field#']">
<a target ="blank" href="{vb:raw post.field#}"><img src="images/postbit_social/facebook.png" onmouseover="this.src='images/postbit_social/facebook_a.png'" onmouseout="this.src='images/postbit_social/facebook.png'" alt="Add {vb:raw post.username} on Facebook" /></a>
</vb:if>
<vb:if condition="$post['field#']">
<a target ="blank" href="{vb:raw post.field#}"><img src="images/postbit_social/google.png" onmouseover="this.src='images/postbit_social/google_a.png'" onmouseout="this.src='images/postbit_social/google.png'" alt="Add {vb:raw post.username} on Google+" /></a>
</vb:if>
<vb:if condition="$post['field#']">
<a target ="blank" href="{vb:raw post.field#}"><img src="images/postbit_social/bebo.png" onmouseover="this.src='images/postbit_social/bebo_a.png'" onmouseout="this.src='images/postbit_social/bebo.png'" alt="Add {vb:raw post.username} on Bebo" /></a>
</vb:if>
<vb:if condition="$post['field#']">
<a target ="blank" href="{vb:raw post.field#}"><img src="images/postbit_social/myspace.png" onmouseover="this.src='images/postbit_social/myspace_a.png'" onmouseout="this.src='images/postbit_social/myspace.png'" alt="Add {vb:raw post.username} on MySpace" /></a>
</vb:if>
<vb:if condition="$post['field#']">
<a target ="blank" href="{vb:raw post.field#}"><img src="images/postbit_social/linkedin.png" onmouseover="this.src='images/postbit_social/linkedin_a.png'" onmouseout="this.src='images/postbit_social/linkedin.png'" alt="Add {vb:raw post.username} on Linkedin" /></a>
</vb:if>
<vb:if condition="$post['field#']">
<a target ="blank" href="{vb:raw post.field#}"><img src="images/postbit_social/tumblr.png" onmouseover="this.src='images/postbit_social/tumblr_a.png'" onmouseout="this.src='images/postbit_social/tumblr.png'" alt="Follow {vb:raw post.username} on Tumblr" /></a>
</vb:if>
<vb:if condition="$post['field#']">
<a target ="blank" href="{vb:raw post.field#}"><img src="images/postbit_social/flickr.png" onmouseover="this.src='images/postbit_social/flickr_a.png'" onmouseout="this.src='images/postbit_social/flickr.png'" alt="Follow {vb:raw post.username} on Flickr" /></a>
</vb:if>
<vb:if condition="$post['field#']">
<a target ="blank" href="{vb:raw post.field#}"><img src="images/postbit_social/youtube.png" onmouseover="this.src='images/postbit_social/youtube_a.png'" onmouseout="this.src='images/postbit_social/youtube.png'" alt="Visit {vb:raw post.username}'s Youtube Channel" /></a>
</vb:if>
<vb:if condition="$post['field#']">
<a target ="blank" href="{vb:raw post.field#}"><img src="images/postbit_social/vimeo.png" onmouseover="this.src='images/postbit_social/vimeo_a.png'" onmouseout="this.src='images/postbit_social/vimeo.png'" alt="Visit {vb:raw post.username}'s Vimeo Channel" /></a>
</vb:if>
<br />
<vb:if condition="$post['field#']">
<a target ="blank" href="http://live.xbox.com/en-GB/MyXbox/Profile?gamertag={vb:raw post.field#}"><img src="images/postbit_social/xbl.png" onmouseover="this.src='images/postbit_social/xbl_a.png'" onmouseout="this.src='images/postbit_social/xbl.png'" alt="Add {vb:raw post.username} on Xbox Live" /></a>
</vb:if>
<vb:if condition="$post['field#']">
<a target ="blank" href="http://us.playstation.com/publictrophy/index.htm?onlinename={vb:raw post.field#}"><img src="images/postbit_social/psn.png" onmouseover="this.src='images/postbit_social/psn_a.png'" onmouseout="this.src='images/postbit_social/psn.png'" alt="View {vb:raw post.username}'s Playstation Network Profile" /></a>
</vb:if>
</div>
</div>
</div>
</div>
</vb:if>
<!--Social End-->


NOTE:
Please remember to replace # with the relevant profile field number that you created earlier!

With this update you will also need to add all of your relevant profile field numbers to the line of code at the top, if you are not using all of the social accounts then just add the numbers you need and remove the rest.

This is the line of code in question:
Code:
<vb:if condition="$post['field#'] OR $post['field#'] OR  $post['field#'] OR $post['field#'] OR $post['field#'] OR $post['field#']  OR $post['field#'] OR $post['field#'] OR $post['field#'] OR  $post['field#'] OR $post['field#'] OR $post['field#']">
------------------------------------------------------------------------------------------------------

Social Networking without Block

This is available to members who use both the Vertical or Horizontal postbit.

Open Template - Postibit Templates -> postbit_legacy or postbit

Find -
Code:
{vb:raw post.skypeicon}


Add after
-
Code:
<!--Social Start--><br />
<vb:if condition="$post['field#']">
<a target ="blank" href="{vb:raw post.field#}"><img src="images/postbit_social/twitter.png" onmouseover="this.src='images/postbit_social/twitter_a.png'" onmouseout="this.src='images/postbit_social/twitter.png'" alt="Follow {vb:raw post.username} On Twitter" /></a>
</vb:if>
<vb:if condition="$post['field#']">
<a target ="blank" href="{vb:raw post.field#}"><img src="images/postbit_social/facebook.png" onmouseover="this.src='images/postbit_social/facebook_a.png'" onmouseout="this.src='images/postbit_social/facebook.png'" alt="Add {vb:raw post.username} on Facebook" /></a>
</vb:if>
<vb:if condition="$post['field#']">
<a target ="blank" href="{vb:raw post.field#}"><img src="images/postbit_social/google.png" onmouseover="this.src='images/postbit_social/google_a.png'" onmouseout="this.src='images/postbit_social/google.png'" alt="Add {vb:raw post.username} on Google+" /></a>
</vb:if>
<vb:if condition="$post['field#']">
<a target ="blank" href="{vb:raw post.field#}"><img src="images/postbit_social/bebo.png" onmouseover="this.src='images/postbit_social/bebo_a.png'" onmouseout="this.src='images/postbit_social/bebo.png'" alt="Add {vb:raw post.username} on Bebo" /></a>
</vb:if>
<vb:if condition="$post['field#']">
<a target ="blank" href="{vb:raw post.field#}"><img src="images/postbit_social/myspace.png" onmouseover="this.src='images/postbit_social/myspace_a.png'" onmouseout="this.src='images/postbit_social/myspace.png'" alt="Add {vb:raw post.username} on MySpace" /></a>
</vb:if>
<vb:if condition="$post['field#']">
<a target ="blank" href="{vb:raw post.field#}"><img src="images/postbit_social/linkedin.png" onmouseover="this.src='images/postbit_social/linkedin_a.png'" onmouseout="this.src='images/postbit_social/linkedin.png'" alt="Add {vb:raw post.username} on Linkedin" /></a>
</vb:if>
<vb:if condition="$post['field#']">
<a target ="blank" href="{vb:raw post.field#}"><img src="images/postbit_social/tumblr.png" onmouseover="this.src='images/postbit_social/tumblr_a.png'" onmouseout="this.src='images/postbit_social/tumblr.png'" alt="Follow {vb:raw post.username} on Tumblr" /></a>
</vb:if>
<vb:if condition="$post['field#']">
<a target ="blank" href="{vb:raw post.field#}"><img src="images/postbit_social/flickr.png" onmouseover="this.src='images/postbit_social/flickr_a.png'" onmouseout="this.src='images/postbit_social/flickr.png'" alt="Follow {vb:raw post.username} on Flickr" /></a>
</vb:if>
<vb:if condition="$post['field#']">
<a target ="blank" href="{vb:raw post.field#}"><img src="images/postbit_social/youtube.png" onmouseover="this.src='images/postbit_social/youtube_a.png'" onmouseout="this.src='images/postbit_social/youtube.png'" alt="Visit {vb:raw post.username}'s Youtube Channel" /></a>
</vb:if>
<vb:if condition="$post['field#']">
<a target ="blank" href="{vb:raw post.field#}"><img src="images/postbit_social/vimeo.png" onmouseover="this.src='images/postbit_social/vimeo_a.png'" onmouseout="this.src='images/postbit_social/vimeo.png'" alt="Visit {vb:raw post.username}'s Vimeo Channel" /></a>
</vb:if>
<vb:if condition="$post['field#']">
<a target ="blank" href="http://live.xbox.com/en-GB/MyXbox/Profile?gamertag={vb:raw post.field#}"><img src="images/postbit_social/xbl.png" onmouseover="this.src='images/postbit_social/xbl_a.png'" onmouseout="this.src='images/postbit_social/xbl.png'" alt="Add {vb:raw post.username} on Xbox Live" /></a>
</vb:if>
<vb:if condition="$post['field#']">
<a target ="blank" href="http://us.playstation.com/publictrophy/index.htm?onlinename={vb:raw post.field#}"><img src="images/postbit_social/psn.png" onmouseover="this.src='images/postbit_social/psn_a.png'" onmouseout="this.src='images/postbit_social/psn.png'" alt="View {vb:raw post.username}'s Playstation Network Profile" /></a>
</vb:if>
<!--Social End-->
-------------------------------------------------------------------------------------------------------

And that's it! Screenshots below showing you how it looks in both postbit templates.

If you have any questions/issues please post below and i'll be happy to help. Also if you wish to request any other Social Networking sites to be added just post a commment and i'll see what i can do!

Hope you enjoy this mod/hack, please make sure you mark as installed!

Thanks!

Boydy

Update Changelog;
  • Added mouseover/mouseout animation.
  • Added new websites and icons.
  • Included PSN and XBL options.
  • Added option of using a block in Vertical postbit with a title.
  • Modified code for both postbits making things much tidier.
Note: New screenshots and images uploaded below, this is effectivley a new modification, i've removed all previous images and code.

For the automatic install product version with no manual edits go here - https://vborg.vbsupport.ru/showthread.php?t=267019

Download Now

File Type: zip Postbit Icons.zip (690.2 KB, 119 views)

Screenshots

File Type: png 1310845972.png (23.9 KB, 0 views)
File Type: png 1310846005.png (22.8 KB, 0 views)
File Type: png 1310846347.png (21.7 KB, 0 views)
File Type: png 1310846384.png (18.0 KB, 0 views)
File Type: png 1310847503.png (25.0 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
Teascu Dorin

Comments
  #42  
Old 02-06-2011, 01:26 PM
BadgerDog BadgerDog is offline
 
Join Date: Oct 2006
Location: Toronto
Posts: 1,789
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed with thanks for testing ...

I'm not sure why the icons are up as high as they are and in the wrong place ...

I put the code where suggested, but that's where they ended up ..

Any idea how to relocate them to the bottom?

Thanks for any feedback ...

Regards,
Doug

Edit: Figured it out ... moved code within IM block and they appear in the right place fine now.
Attached Images
File Type: png Screen shot 2011-02-06 at 10.22.18 AM.png (57.7 KB, 0 views)
Reply With Quote
  #43  
Old 02-08-2011, 09:22 PM
Merenguista's Avatar
Merenguista Merenguista is offline
 
Join Date: Sep 2010
Location: Morocco
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks man ..
Reply With Quote
  #44  
Old 02-28-2011, 03:55 PM
utahraves's Avatar
utahraves utahraves is offline
 
Join Date: May 2007
Location: Utah
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is similar to my old release for VB3.
https://vborg.vbsupport.ru/showthread.php?t=224861

Yours is specifically for postbits, mine had edited files in VB3 to show up other places social networking was added, like profiles, member list, etc.
I don't have time to rewrite mine for VB4 but this would be better IMO if VB recognized these additional fields for profiles. You can look and see what I did and use whatever I did to hard-code it in there if you were looking to make it more integrated throughout VB instead of just postbits (which is something that would be beneficial for people who often refer to profiles like they do on my server).
Reply With Quote
  #45  
Old 03-30-2011, 01:17 AM
FallenEmpire FallenEmpire is offline
 
Join Date: Dec 2010
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed and thanks for the images!
Reply With Quote
  #46  
Old 05-30-2011, 07:05 PM
adiabatic adiabatic is offline
 
Join Date: Nov 2010
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for a great mod

I would like to add the following text right above the icons;

<span class="smallfont">F?lg {vb:raw post.username} via Sosiale Medier</span>

The text is fine, but I would like it only to be visble when one or more of the social media is used.

Any idea how to to do it?

Thanks,

Morten
Reply With Quote
  #47  
Old 06-25-2011, 07:13 AM
adiabatic adiabatic is offline
 
Join Date: Nov 2010
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by adiabatic View Post
Thanks for a great mod

I would like to add the following text right above the icons;

<span class="smallfont">F?lg {vb:raw post.username} via Sosiale Medier</span>

The text is fine, but I would like it only to be visble when one or more of the social media is used.

Any idea how to to do it?

Thanks,

Morten
Anyone?
Reply With Quote
  #48  
Old 07-09-2011, 04:10 AM
rasp187 rasp187 is offline
 
Join Date: Dec 2005
Location: Ohio
Posts: 112
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Adding Google+ would be awesome for an updated release. Lots of people are beginning to use it, even though it's not "live" yet.
Reply With Quote
  #49  
Old 07-09-2011, 08:00 AM
Spectre_Aidan Spectre_Aidan is offline
 
Join Date: Jul 2011
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks man i will do this when i have more time
Reply With Quote
  #50  
Old 07-14-2011, 12:45 PM
Spectre_Aidan Spectre_Aidan is offline
 
Join Date: Jul 2011
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

mine moves to the side of my avatar :/
Reply With Quote
  #51  
Old 07-14-2011, 03:38 PM
LA-Aquarium LA-Aquarium is offline
 
Join Date: Jul 2011
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Mine is also to the side of my avatar, how can this be fixed? I posted the code in the proper place.

EDIT: I did some searching in the thread and found a fix.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:05 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08995 seconds
  • Memory Usage 2,376KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (6)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (1)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (7)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete