Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Social Networking in Postbit Popup Details »»
Social Networking in Postbit Popup
Version: 0.3, by stoute stoute is offline
Developer Last Online: Jan 2016 Show Printable Version Email this Page

Category: Profile Enhancements - Version: 4.2.0 Rating:
Released: 08-29-2012 Last Update: Never Installs: 9
Template Edits
Re-useable Code Additional Files Translations  
No support by the author.

This is my first posted template modification so be kind...

This will add a users social networks icon and link in the popup menu in postbit when you click on the User's name. The link is only accessible by the user groups you choose.

To install:

Step 1:

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.



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:
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



Step 3:

This step adds the links in the postbit popup.

ACP> Styles & Templates> Search in Templates for "memberaction_dropdown"

Links at the TOP:

Find:
Code:
<ul class="popupbody popuphover memberaction_body">
Continue to STEP 4

Links at the BOTTOM;


Find:
Code:
<vb:if condition="$show['emaillink']">
and find the next:
Code:
</vb:if>
Continue to Step 4

Step 4:

Paste this:
Code:
<!-- Social Networking -->
<vb:if condition="is_member_of($bbuserinfo, X, Y)">

<!-- Twitter -->
<vb:if condition="$memberinfo['A']">
        <li class="left">    
            <a href="http://twitter.com/{vb:raw memberinfo.A}" TARGET="_blank" class="siteicon_twitter">Twitter
            </a>
        </li>
     </vb:if>

<!-- Facebook -->
<vb:if condition="$memberinfo['B']">
        <li class="right">    
            <a href="http://facebook.com/{vb:raw memberinfo.B}" TARGET="_blank" class="siteicon_facebook">Facebook
            </a>
        </li>
     </vb:if>

<!-- Google+ -->
<vb:if condition="$memberinfo['C']">
        <li class="left">    
            <a href="http://plus.google.com/{vb:raw memberinfo.C}" TARGET="_blank" class="siteicon_googleplus">Google+
            </a>
        </li>
     </vb:if>

<!-- YouTube -->
<vb:if condition="$memberinfo['D']">
        <li class="right">    
            <a href="http://youtube.com/{vb:raw memberinfo.D}" TARGET="_blank" class="siteicon_youtube">Youtube
            </a>
        </li>
     </vb:if>
        </vb:if>
Change the red letters to the correct information. X and Y are where you enter the user groups that can view this information. A, B, C, and D need to be replaced this the field names we found in the last step. in the image A = field5, B = field6, C = field7, D = filed13

Step 5:

Upload the extracted zip to your forum root.

Step 6:

This step adds the images to your postbit (you can edit these if you like just make sure you have them in the correct location and the size is 16px x 16px)

ACP> Styles & Templates > Style Manager> [your style]> Template Options> Edit Templates> CSS Templates> additional.css

Paste the below

Code:
<!-- Social Networking in Postbit Popup -->
.memberaction_body.popupbody li .siteicon_twitter { 
	background:url({vb:stylevar imgdir_siteicons}/socialpopup/twitter.png) {vb:stylevar left} 2px no-repeat; 
}.memberaction_body.popupbody li .siteicon_facebook { 
	background:url({vb:stylevar imgdir_siteicons}/socialpopup/facebook.png) {vb:stylevar left} 2px no-repeat; 
}.memberaction_body.popupbody li .siteicon_googleplus { 
	background:url({vb:stylevar imgdir_siteicons}/socialpopup/googleplus.png) {vb:stylevar left} 2px no-repeat; 
}.memberaction_body.popupbody li .siteicon_youtube { 
	background:url({vb:stylevar imgdir_siteicons}/socialpopup/youtube.png) {vb:stylevar left} 2px no-repeat; 
}
Step 7:

Enjoy



Icon Images

- Twitter
- Facebook
- Google+
- YouTube

Special Thanks to:
Mobo for Edit User link in postbit UserName popup menu
Lycaon @ theadminzone.com for assistance with resolving issue

Download Now

File Type: zip images.zip (3.8 KB, 35 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 08-30-2012, 09:26 PM
Skyrider Skyrider is offline
 
Join Date: Feb 2006
Location: Netherlands
Posts: 1,392
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Images with the result would be awesome
Reply With Quote
  #3  
Old 08-30-2012, 09:53 PM
stoute stoute is offline
 
Join Date: May 2010
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Duplicate Post
Reply With Quote
  #4  
Old 08-30-2012, 10:07 PM
stoute stoute is offline
 
Join Date: May 2010
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

lol this is the worst... after writing all this up it stopped working on my site. If you have success or fails please let me know so i can see where I went wrong.
Reply With Quote
  #5  
Old 09-01-2012, 09:04 PM
stoute stoute is offline
 
Join Date: May 2010
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code has been fixed and is now working again!
Reply With Quote
  #6  
Old 09-02-2012, 07:08 PM
stoute stoute is offline
 
Join Date: May 2010
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Added "approved" twitter icon...
Reply With Quote
  #7  
Old 09-14-2012, 06:05 PM
It's Damn Real! It's Damn Real! is offline
 
Join Date: Mar 2011
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have this set for registered users and Admins, and the dropdown is viewable for myself and my mods, but I can't view it under a registered user level.
Reply With Quote
  #8  
Old 09-14-2012, 06:58 PM
stoute stoute is offline
 
Join Date: May 2010
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can you post your edited version of:

Code:
<!-- Social Networking -->
<vb:if condition="is_member_of($bbuserinfo, X, Y)">
Reply With Quote
  #9  
Old 09-14-2012, 07:02 PM
It's Damn Real! It's Damn Real! is offline
 
Join Date: Mar 2011
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yup:

Code:
<!-- Social Networking -->
<vb:if condition="is_member_of($bbuserinfo, 2)">
I also tried:

Code:
<!-- Social Networking -->
<vb:if condition="is_member_of($bbuserinfo, 2, 6)">
Reply With Quote
  #10  
Old 09-14-2012, 07:53 PM
stoute stoute is offline
 
Join Date: May 2010
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

so the condition will allow the given usergroups to see the social network icons.

what this is basically saying is "if" you are a member of usergroup "x" then you can view the social network icons.

So when you have is set to usergroup 2 then only members of usergroup 2 can view the icons...
When you have it set to usergroup 2 and 5 then only those member groups can see them.

Are you having an issue once you set your usergroup to admin only to see it?
Reply With Quote
Reply


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 02:14 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.11088 seconds
  • Memory Usage 2,315KB
  • Queries Executed 24 (?)
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
  • (8)bbcode_code
  • (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
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (1)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • 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