Submits Your Posts Too Twitter
#1
If you would like to have the option of allowing anybody on your own MyBB forum, the option of being able to submit not just a thread (but any post to twitter). This is how you can add this feature below.

Open the template: Post Bit Templates/postbit_author_user

And find this code:

{$post['replink']}{$post['warninglevel']}

Change that code to this below (new code added highlighted in red):

Quote: {$post['replink']}{$post['warninglevel']}<br />
<script src="http://platform.twitter.com/widgets.js" type="text/javascript"></script><a href="http://twitter.com/share?url={$mybb->settings['bburl']}/thread-{$tid}-post-{$post['pid']}.html#pid{$post['pid']}&amp;text={$post['subject']}&amp;count=none" class="twitter-share-button">Tweet</a>

If you would like the Twitter button to display a small "counter". Change the part in the code below that says "none" to "horizontal", for a large counter change "none" to "vertical".

&amp;count=none

The code used for this is XHTML W3C valid also.



If instead you would like to show a large counter. Change it to "vertical".

&amp;count=vertical

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)