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
Official "Follow me" twitter button Details »»
Official "Follow me" twitter button
Version: 1.00, by ToNetU ToNetU is offline
Developer Last Online: Oct 2012 Show Printable Version Email this Page

Category: Profile Enhancements - Version: 4.x.x Rating:
Released: 05-31-2011 Last Update: Never Installs: 34
Template Edits
Re-useable Code  
No support by the author.

Hello there,
For people don't know, Twitter just released their new "Follow Button" so we can use it in our website.. Source

- What is this mod for?
This mod is to help your members to show there there twitter username so people can follow them. and with this button you don't have to leave the page to enter to twitter then press the follow button "like the old days"
now people can follow you without leaving the page in just one touch!

- Can I show how many followers He/She has next to the Follow button?
Yes, Twitter added this choose so it's up to you "as forum admin" if you want to show to your members how many followers they have or not.

let's begin work..

1- you have to add new user profile field:
- Go to your admincp.
- From "User Profile Fields" choose "Add New User Profile Field"
- Choose "Signle-Line Text Box"
- Make it like this screenshot:

- Click "Save"
- Remember this number after you save your new field "check the screenshot" :

2- Now edit your (Postbit or Postbit_legacy Template) dependence on which one your are using.
- Search for in it for:
Code:
{vb:raw template_hook.postbit_messagearea_start}
- Add below it:
If you want to show how many followers She/He has add this:
Code:
<vb:if condition="$post['field5']">
<center><a href="http://twitter.com/{vb:raw post.field5}" class="twitter-follow-button">Follow @{vb:raw post.field5}</a></center>
<script src="http://platform.twitter.com/widgets.js" type="text/javascript"></script>
</vb:if>
- Change 5 to the field number you made before "check the second screenshot above"
If you doesn't want to show how many followers they have add this:
Code:
<vb:if condition="$post['field5']">
<center><a href="http://twitter.com/{vb:raw post.field5}" class="twitter-follow-button" data-show-count="false">Follow @{vb:raw post.field5}</a></center>
<script src="http://platform.twitter.com/widgets.js" type="text/javascript"></script>
</vb:if>
- Change 5 to the field number you made before "check the second screenshot above"
- Press "Save"
3- This is how it going to be in the thread:

And this is After you press "Follow"



4- That's it

NOTE:
- Note your member that if they want to add there twitter ID they have to edit their "profile" by going to "Setting" then "Edit Profile". And type their username without the @ . Ex: ToNetU not @ToNetU


UPDATE:
- If you want the button to be below the avatar, go to this post https://vborg.vbsupport.ru/showpost....05&postcount=9

Screenshots

File Type: png Screen shot 2011-06-01 at 03.56.14.png (89.5 KB, 0 views)
File Type: jpg 2.jpg (78.9 KB, 0 views)
File Type: jpg 3.jpg (16.8 KB, 0 views)
File Type: jpg 4.jpg (14.5 KB, 0 views)

Show Your Support

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

Comments
  #12  
Old 06-06-2011, 06:08 AM
Bozza Bozza is offline
 
Join Date: Jul 2003
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed as it's a great idea, but I'm only getting text displayed 'eg Follow @NorthStandChat', not the Twitter graphic. The link it generates is going to twitter.com home page and not my Twitter account too.

Can be seen in first post here:
http://www.northstandchat.com/showth...alk-now-on-NSC

Edit: Ignore - all fixed now!
Reply With Quote
  #13  
Old 06-07-2011, 11:13 PM
ashley76 ashley76 is offline
 
Join Date: Jan 2008
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ToNetU View Post
It worked with you? Just to be sure.. Thanks
Yep, works like a charm!
Reply With Quote
  #14  
Old 06-08-2011, 12:50 AM
ToNetU ToNetU is offline
 
Join Date: Mar 2003
Posts: 117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Bozza View Post
Installed as it's a great idea, but I'm only getting text displayed 'eg Follow @NorthStandChat', not the Twitter graphic. The link it generates is going to twitter.com home page and not my Twitter account too.

Can be seen in first post here:
http://www.northstandchat.com/showth...alk-now-on-NSC

Edit: Ignore - all fixed now!
GREAT!

Quote:
Originally Posted by ashley76 View Post
Yep, works like a charm!
Thank you!
Reply With Quote
  #15  
Old 06-08-2011, 02:37 AM
Brandon Sheley's Avatar
Brandon Sheley Brandon Sheley is offline
 
Join Date: Mar 2005
Location: Google Kansas
Posts: 4,678
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice mod, thanks for sharing!
Reply With Quote
  #16  
Old 06-18-2011, 02:22 PM
zagman76 zagman76 is offline
 
Join Date: Sep 2005
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello - this seems to break the board when using IE9. I suppose it could be used as a deterrent to the members from using this browser...

It works for FF & Chrome though! Thanks!
Reply With Quote
  #17  
Old 06-30-2011, 07:27 AM
skylab's Avatar
skylab skylab is offline
 
Join Date: Feb 2009
Location: Everywhere
Posts: 149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can't believe I didn't think of this earlier. Well done. Got it installed. Thanks!
Reply With Quote
  #18  
Old 07-24-2011, 09:21 AM
Bozza Bozza is offline
 
Join Date: Jul 2003
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just changed mine to place it with the avatar etc. On my forum, and on many I suspect, with the full follower stats displayed, the text spills over quite messily so I'm using the no stat display now. Should be fine for all but the very longest Twitter usernames.
Reply With Quote
  #19  
Old 08-01-2011, 11:37 AM
Seductor Seductor is offline
 
Join Date: May 2011
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi! Is there any way to display the follow button only for admins?
Reply With Quote
  #20  
Old 09-13-2011, 02:10 PM
x YNWA x x YNWA x is offline
 
Join Date: Jun 2007
Posts: 119
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice Mod.

For me, the follower count spills onto the post itself, is there a way of fixing this? I have it in the user info part...

Also when I click follow, it does not change to following, should it?
Reply With Quote
  #21  
Old 09-24-2011, 05:06 AM
billstelling's Avatar
billstelling billstelling is offline
 
Join Date: Apr 2011
Posts: 246
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any way to just show the button and no text? I also noticed that using the no followers version it still "sees it" when centering so it is left of center..

Nice mod by the way. Cool to have it on the forum now.
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 12:03 PM.


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.04832 seconds
  • Memory Usage 2,340KB
  • 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
  • (3)bbcode_code
  • (3)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
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (4)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
  • 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