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

Reply
 
Thread Tools
Twitter Anywhere in Postbit and bbcode Details »»
Twitter Anywhere in Postbit and bbcode
Version: 1.00, 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: 05-08-2011 Last Update: Never Installs: 26
Template Edits
Translations Is in Beta Stage  
No support by the author.

Hi Guys,

Nice Twitter mod here for you today. It involves creating an anywhere app on the twitter website which then can be used on your forums, it basically involves a custom profile field which the user will put there Twitter username in and then it will be shown in the postbit but with a mouseover popup displaying information about their Twitter account, i've also worked out some bbcode for it so it can be used in posts. To show it a bit better i've attached a couple of screenshots before we get into the install details,

Postbit:



bbcode:





Like the look of it? Then read on for install instructions!

First off before we do anything we need to create the app on twitter.

Step 1 - Go to https://dev.twitter.com/anywhere/apps/new

Step 2 - Fill out the app details, how to fill it out:

Application Name - Your Website Name

Application Website -
Your Forum URL

Callback URL - Your Forum URL

Default Access Type - Read & Write

Step 3 - After filling out the captcha and accepting the terms you will be provided with a block of code which will look something like this:
HTML Code:
  <script src="http://platform.twitter.com/anywhere.js?id=your-API-Key&amp;v=1">
  </script>
  <script type="text/javascript">
     twttr.anywhere(function(twitter) {
              twitter.hovercards();
     });
  </script>
Only difference is i've not copied the <head> tags as we DO NOT need them so you do not need to copy them either else it will cause problems. Your code will also have an API key where the code above says your-API-Key.

Step 4 - Open template - headinclude and paste in your code from Twitter at the top of the template, again make sure you do not copy the <head> tags. Save.

-------

Ok, we now have the app all setup, now all we need to do is set everything up on your forum.

Step 1 - User profile fields -> Add new user profile field:

Profile Field Type - Single-Line Text Box
Title - Twitter
Description - Insert your Twitter Username.
Field Searchable on Members List - NO
Show on Members List - NO

Step 2 - Open Template - Postbit Templates -> postbit or postbit_legacy (depends on your forum layout postbit is the horizontal postbit and postbit legacy is the vertical postbit)

Find -
HTML Code:
<dt>{vb:rawphrase 'posts'}</dt> <dd>{vb:raw post.posts}</dd>
Add, Under -
HTML Code:
<vb:if condition="$post['field##']">
<dt>Twitter</dt><dd>@<a target ="blank" class="twitter-anywhere-user" href="http://twitter.com/{vb:raw post.field##}">{vb:raw post.field##}</a></dd>
</vb:if>
Replace the 3 ## with the field number of the Twitter profile field you created before, to find out the profile field number go to User Profile Fields -> User profile field manager.

And that's it for your postbit! For the bbcode see below:

------------------

Step 1 - Custom BB Codes -> Add New BB Code

Title - Twitter Anywhere

BB Code Tag Name - twitter

Replacement -
HTML Code:
<a target ="blank" class="twitter-anywhere-user" href="http://twitter.com/{param}">{param}</a>


Example -
@[twitter]Twitter[/twitter]

Use {option} - No

Disable BB Code Within This BB Code -
Yes

Disable Smilies Within This BB Code -
Yes

Disable Word Wrapping Within This BB Code -
Yes

Disable Automatic Link Parsing Within This BB Code
- Yes

You can add an icon at your own discretion.

And that's it! Any questions or issues just post in here. All screenshots are below.

Enjoy! And remember to mark as installed for future updates and support!

Boydy

Screenshots

File Type: png 1304955977.png (3.2 KB, 0 views)
File Type: png 1304956004.png (22.5 KB, 0 views)
File Type: png 1304956019.png (9.1 KB, 0 views)
File Type: png 1304956047.png (27.5 KB, 0 views)
File Type: png 1304958521.png (17.0 KB, 0 views)

Show Your Support

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

Comments
  #2  
Old 05-09-2011, 04:59 PM
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 looking mod, I'll take a look at this tonight if I remember

[high]* Brandon Sheley tags this mod[/high]
Reply With Quote
  #3  
Old 05-09-2011, 07:39 PM
egyptsons's Avatar
egyptsons egyptsons is offline
 
Join Date: Jan 2004
Location: Egypt
Posts: 250
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great !!!
I will try it )

Thank you
Reply With Quote
  #4  
Old 05-09-2011, 11:13 PM
gscimbomcom's Avatar
gscimbomcom gscimbomcom is offline
 
Join Date: Nov 2008
Location: Turkey / Istanbul
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thnx
Reply With Quote
  #5  
Old 05-10-2011, 04:10 AM
CRDeveloper's Avatar
CRDeveloper CRDeveloper is offline
 
Join Date: Aug 2009
Location: Costa Rica
Posts: 95
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed, looking good and very useful!
Reply With Quote
  #6  
Old 05-10-2011, 08:26 AM
boydy's Avatar
boydy boydy is offline
 
Join Date: Jan 2011
Location: UK
Posts: 98
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks people, remember to mark installed though!
Reply With Quote
  #7  
Old 05-11-2011, 06:38 PM
harderstylez harderstylez is offline
 
Join Date: Dec 2010
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Awesome mod thnx!
Reply With Quote
  #8  
Old 09-22-2012, 09:30 PM
burak61 burak61 is offline
 
Join Date: Dec 2008
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How can i do this for vb 3.8.x ?
Reply With Quote
  #9  
Old 09-24-2012, 12:49 PM
00glenn 00glenn is offline
 
Join Date: Jul 2008
Location: Costa del Sol
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great mod, thanks
Reply With Quote
  #10  
Old 09-24-2012, 03:24 PM
xixxon's Avatar
xixxon xixxon is offline
 
Join Date: Jun 2007
Location: Việt Nam.
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great !!!
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:47 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.09965 seconds
  • Memory Usage 2,321KB
  • 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
  • (4)bbcode_html
  • (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
  • (5)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