Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Template Modifications
UKBL ~ Twitter profile link on Postbit ~ Clickable Details »»
UKBL ~ Twitter profile link on Postbit ~ Clickable
Version: 1.00, by UKBusinessLive UKBusinessLive is offline
Developer Last Online: Feb 2012 Show Printable Version Email this Page

Category: End-User Options - Version: 3.7.6 Rating:
Released: 04-25-2009 Last Update: Never Installs: 10
Template Edits
Re-useable Code Translations  
No support by the author.

UKBL ~ Twitter profile link on Postbit ~ Clickable !!


Member on Twitter? Show other members that you have a Twitter presance by adding a Twitter Icon to your postbit

Not been on for a while but i've had numerous requests for this Twitter hack so here we go....

This is a cool hack which will let your members add a Twitter Icon to their Postbit template, They need to add their Twitter Profile user name in their userCP for this to show, If they don't enter one, then the badge don't show

Runs along the same lines as the Facebook Hack, so if you've installed that, you'll love this




How to install.

Its really easy to do, as always, so if your sitting comfortably, lets begin

Now we need to create a User Custome field, so.....

AdminCP and add a custom field > User Profile fields > Add New User Profile Field

Title = Twitter User Name

Description = Enter Your Twitter username from your Twitter User Profile

Default Value = Leave empty

Max length of allowed user input = 20

Display Size = 10

Display Order = 10 or 15

Field Required = No as default

Field Editable by User = Yes in case member wants to delete, Later

Private Field = No

Field Searchable on Members List = No

Show on Members List = Yes

Regular Expression = leave empty

Save the field

Once you've saved you can see what the field number is, So lets say its Field11 for example, Remember this as will need it for your Postbit Edits :up:

Thats the first bit done, now Part Two

Go to the template you are using in Styles & Templates/Style Manager, and select Edit templates.

Go to "postbit templates" and select the template you are using, either postbit or postbit_legacy.

Find the following

Code:
<if condition="$post['joindate']"><div class="postbit">$vbphrase[join_date]: $post[joindate]</div></if>
Directly above it add

Code:
<if condition="is_member_of($bbuserinfo, 6, 7, 9)">
<if condition="$post['field11']">
<a href="https://twitter.com/$post[field11]">
<img alt="My Twitter" border="0" src="http://i475.photobucket.com/albums/rr114/ukbusinesslive/twitter3.gif" border="0"/>
</if></if>
replace the RED Field attribute for your own and dont forget to replace the twitter image show in the above code for your own, see below

Code:
http://i475.photobucket.com/albums/rr114/ukbusinesslive/twitter3.gif
I've added several twitter images below but feel free to use your own

They are in .gif and .png, use the ones you feel happiest with








Now when members sign up their Twitter badge and enter their profile user ID into the "Enter your twitter username from your Twitter User Profile" section in their UserCP, The Badge will automatically appear in their Postbit

Don't forget to change the usergroup condition with the number of the usergroups that you want to be able to view this

Code:
<if condition="is_member_of($bbuserinfo, 6, 7, 9)">
That means that guests and banned users will not be able to view members Twitter profile urls

Members who do not add a user id will not be shown anything.

Next, Upload the Twitter icon to your forums/images/misc folder and add the full url to the part in the code which shows the image.

if you are just seeing a red cross on your postbit, then its because your image url is not right

Oh Forgot to say, Badge is fully clickable so members can click directly to Twitter



Please Click Installed and I'll support you 100%

Thanks

Show Your Support

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

Comments
  #2  
Old 04-26-2009, 04:02 PM
UKBusinessLive UKBusinessLive is offline
 
Join Date: Sep 2008
Location: Essex, United Kingdom
Posts: 1,637
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Reserved
Reply With Quote
  #3  
Old 10-09-2009, 11:58 PM
Chuta's Avatar
Chuta Chuta is offline
 
Join Date: Aug 2009
Location: Costa Rica
Posts: 108
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very, Very Nice!!
Is there a Demo or Screenshot?
Reply With Quote
  #4  
Old 10-11-2009, 12:59 AM
TheLastSuperman's Avatar
TheLastSuperman TheLastSuperman is offline
Senior Member
 
Join Date: Sep 2008
Location: North Carolina
Posts: 5,844
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Chuta View Post
Very, Very Nice!!
Is there a Demo or Screenshot?
One of those images above will be in the postbit template... so look above my actual (this here your reading) text and above under my title it could be there or if your forums use postbit_legacy it can be near the location info etc you can place it virtually anywhere in postbit but again look above the post content where it has my avatar/name and it would be near those typically.

Hope that helps
Reply With Quote
  #5  
Old 10-12-2009, 07:59 PM
Nabs Nabs is offline
 
Join Date: Oct 2004
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works nicely and quite simple to install. thank you.
Reply With Quote
  #6  
Old 05-22-2010, 09:52 PM
NP Carling26 NP Carling26 is offline
 
Join Date: Jul 2009
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, I just installed this and I love it! But there's a problem, doing exactly as you stated, I put it above my registration date, which is fine, and the picture becomes clickable, but so does alot of other things including my Join Date, Location, Posts, Reputation, vBux, etc. Anyway to make it so that just the image is clickable? I used the exact code you provided, so it must just be some simple error with the hyper linking, but I can't figure out how to make it apply only to the image.
Reply With Quote
  #7  
Old 11-09-2011, 12:56 PM
MaXimus MaXimus is offline
 
Join Date: Nov 2011
Location: Dubai, U.A.E.
Posts: 291
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I followed the guide but but when I saved the template it gave me the following error:

Warning: Invalid argument supplied for foreach() in [path]/includes/functions.php on line 3545

The following error occurred when attempting to evaluate this template:
%1$s
This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.


I guess the guide was made for an earlier version of vBulletin I am using the latest 4.1.7

Please help
Reply With Quote
  #8  
Old 11-09-2011, 03:45 PM
HMBeaty's Avatar
HMBeaty HMBeaty is offline
 
Join Date: Sep 2005
Posts: 4,141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Matrix Leader View Post
I guess the guide was made for an earlier version of vBulletin I am using the latest 4.1.7

Please help
Considering you're in the forum for vBulletin 3.7.x modifications.....
Reply With Quote
  #9  
Old 11-20-2011, 01:15 PM
MaXimus MaXimus is offline
 
Join Date: Nov 2011
Location: Dubai, U.A.E.
Posts: 291
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by HMBeaty View Post
Considering you're in the forum for vBulletin 3.7.x modifications.....
oh sorry coz I landed here via the Google Search
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 07:09 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.09269 seconds
  • Memory Usage 2,287KB
  • Queries Executed 22 (?)
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_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (9)postbit_onlinestatus
  • (9)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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete