Simple enough - as per the topic title, this snippet allows you to tweet this topic. If you're not logged in when you click the link, simply log in and you'll redirected with the tweet still kept (not done by me, you can thank twitter devs for that
For a demo, check these very forums. I have it here ^_^
OPEN: viewtopic.php
FIND:
- Code: Select all
// Send vars to template
- Code: Select all
$hashtag = ' #phpBB #6StringMODs';
Comment:
Feel free to change your hashtags to whatever your feel like - your own sitename perhaps. It would also be nice to tweet this topic/post/page via your won account
Feel free to change your hashtags to whatever your feel like - your own sitename perhaps. It would also be nice to tweet this topic/post/page via your won account
FIND:
- Code: Select all
'WARN_IMG' => $user->img('icon_user_warn', 'WARN_USER'),
AFTER ADD:
- Code: Select all
'TWEET_TOPIC' => urlencode('Read This: ') . generate_board_url() . "/viewtopic.$phpEx?f=$forum_id%26t=$topic_id" . htmlspecialchars(urlencode($hashtag)),
OPEN: language/en/viewtopic.php
FIND:
- Code: Select all
'SUBMIT_VOTE' => 'Submit vote',
AFTER ADD:
- Code: Select all
'TWEET_TOPIC' => 'Tweet this topic',
OPEN: styles/prosilver/template/viewtopic_body.html
FIND:
- Code: Select all
</h2>
BEFORE ADD:
- Code: Select all
<span class="tweet-link"><a href="http://twitter.com/home?status={TWEET_TOPIC}" class="tweet-link" title="{L_TWEET_TOPIC}"></a></span>
OPEN: styles/prosilver/theme/colours.css
FIND:
- Code: Select all
a.right:hover {
color: #5E7BAA;
}
AFTER ADD:
- Code: Select all
.tweet-link a {
float: left;
background-image: url("{T_THEME_PATH}/images/twitter-logo.png");
padding-left:18px;
height: 18px;
background-repeat: no-repeat;
position: absolute;
}
And just for you lot, I already have created a little twitter logo. Although you can replace if you so wish



