vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Profile Enhancements - Postbit Social Network Icons (https://vborg.vbsupport.ru/showthread.php?t=287387)

stoute 09-01-2012 10:00 PM

Postbit Social Network Icons
 
1 Attachment(s)
This is a quick template modification that works with the "User Profile Fields" and adds a social network icon for; Twitter, Facebook, Google+, and YouTube. Once Completed you will see this:
Image Removed by Staff (image changed with new domain owner etc)

This will not work in the postbit_legacy. Use this for postbit_legacy template: HERE

Step 1: Create your User Profile Fields

Make Custom Profile Fields for each of the four social networks; Twitter, Facebook, Google+, and Youtube.

ACP> User Profile Fields> Add New User Profile Field

Profile Field Type: Single-Line Textbox

Create your profile fields as below. you can leave "default value" blank.

Image Removed by Staff (image changed with new domain owner etc)

Make one of these for each of the social networks. Once you have created your fields for Twitter, Facebook, Google+, and YouTube.

Continue to Step 2

Step 2: Locate the Correct Field Names

ACP> User Profile Fields> User Profile Field Manager

Take note of your "field name". Below you will find a screen shot; notice I have labeled the field names A - D. for refrence a = twitter; b = facebook; c = google+; d = youtube

Image Removed by Staff (image changed with new domain owner etc)

Continue to Step 3

Step 3: Adding the code

ACP> Styles & Templates> [Your Style]> Edit Templates> Postbit Templates > Postbit

Find:
Code:

{vb:raw post.skypeicon}
Add After:
Code:

<!-- Social Networking -->
<!-- Twitter -->
<vb:if condition="$post['A']">
            <a href="http://twitter.com/{vb:raw post.A}" alt="Twitter" TARGET="_blank"><img src="./images/site_icons/socialpopup/twitter.png" /></a>
</vb:if>
<!-- Facebook -->
<vb:if condition="$post['B']">
            <a href="http://facebook.com/{vb:raw post.B}" alt="Facebook" TARGET="_blank"><img src="./images/site_icons/socialpopup/facebook.png" /></a>
</vb:if>
<!-- Google+ -->
<vb:if condition="$post['C']">
            <a href="http://plus.google.com/{vb:raw post.C}" alt="Google+" TARGET="_blank"><img src="./images/site_icons/socialpopup/googleplus.png" /></a>
</vb:if>
<!-- YouTube -->
<vb:if condition="$post['D']">
            <a href="http://youtube.com/{vb:raw post.D}" alt="Youtube" TARGET="_blank"><img src="./images/site_icons/socialpopup/youtube.png" /></a>
</vb:if>
<!-- #Social Networking -->

CHANGE THE RED LETTERS above or this will NOT work!

Step 4: Images!!!

Upload the extracted zip to your forum root.

Step 5: Enjoy!

Image Removed by Staff (image changed with new domain owner etc)

stoute 09-02-2012 07:04 PM

uploaded "approved" twitter logo

clutchthese 07-01-2013 08:50 PM

All these images are broken...

ramesh_umk3 07-03-2013 04:01 AM

pls update your images

datoneer 08-13-2013 08:56 PM

Thanks man! It is great! Installed and nominated v 4.2.1

tevbas 05-04-2016 01:33 PM

please fix it tutorial images.

tme_power 06-19-2016 08:42 AM

Just try, look pretty good, changed css a bit.

ukhostz 06-30-2016 02:16 PM

Just to clarify for people who are not 100% code savvy, change the abcd to the field number as stated in the "User Profile Field Manager" e.g. field6, field7, field8, field9.
So if your twitter profile was say field 6 then it should be changed to the example below
Code:

<vb:if condition="$post['field6']">
            <a href="http://twitter.com/{vb:raw post.field6}" alt="Twitter" TARGET="_blank"><img src="images/site_icons/socialpopup/twitter.png" /></a>
</vb:if>

Hope this helps :)

tme_power 07-10-2016 02:34 AM

Quote:

Originally Posted by ukhostz (Post 2572649)
Just to clarify for people who are not 100% code savvy, change the abcd to the field number as stated in the "User Profile Field Manager" e.g. field6, field7, field8, field9.
So if your twitter profile was say field 6 then it should be changed to the example below
Code:

<vb:if condition="$post['field6']">
            <a href="http://twitter.com/{vb:raw post.field6}" alt="Twitter" TARGET="_blank"><img src="images/site_icons/socialpopup/twitter.png" /></a>
</vb:if>

Hope this helps :)

Thank you man.


All times are GMT. The time now is 07:56 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.01127 seconds
  • Memory Usage 1,735KB
  • 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
  • (4)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete