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
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
  #12  
Old 09-25-2012, 10:25 AM
burak61 burak61 is offline
 
Join Date: Dec 2008
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ı use mention system on my forum. when someone posts like "@nickname" it shows a twitter account which is @nickname. How can i block it ?
Reply With Quote
  #13  
Old 09-29-2012, 07:28 PM
burak61 burak61 is offline
 
Join Date: Dec 2008
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I want only this

https://vborg.vbsupport.ru/attachmen...6&d=1304956083

Not this

https://vborg.vbsupport.ru/attachmen...8&d=1304956083

How can i fix it ?
Reply With Quote
  #14  
Old 05-28-2013, 05:59 AM
artscripts artscripts is offline
 
Join Date: Aug 2011
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does not work
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 03:59 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.10442 seconds
  • Memory Usage 2,271KB
  • Queries Executed 19 (?)
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
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (3)postbit
  • (5)postbit_attachment
  • (4)postbit_onlinestatus
  • (4)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