How to add Twitter interactivity retweet to your news pages?

Category:   Blog | Author:   nlstart

Twitter is 'hot'. So here's a very simple 'how to' instruction to add some Twitter interactivity to your e107 news pages.

1. create a new file e107_themes/yourthemefolder/retweet.sc with following content:

$news_item = getcachedvars('current_news_item');
return "<script type=\"text/javascript\">tweetmeme_url = '".SITEURL."news.php?item.".$news_item['news_id']."';
</script><script type=\"text/javascript\" src=\"http://tweetmeme.com/i/scripts/button.js\"></script>";

2. at the top of your theme.php (e.g. under language include) add this line:
$register_sc[]= "RETWEET";


3. in your theme.php in section $NEWSSTYLE use {RETWEET} E.g. behind

Enjoy!

 printer friendly create pdf of this news item