Simple way to Add Twitter stream to Pligg Site

by enbeeone3 on 24/01/10 at 12:57 pm

Simple way to Add Twitter stream to Pligg Site

Adding Twitter Stream to Your Pligg site  allows the visitors to your site to search for topics on twitter that interest them. The results display twitter users that are interested in the same topic. You can then invite those users to come participate in your site. Visitors are also able to tweet stories out from your Pligg site.

Download and upload the following to your /js folder:

TwitterWidget

Open pligg.tpl, locate /body and add the following before:

{literal}
<script type=”text/javascript”><!–
var rpnetTwitAttrs = {
usernames: “enbeeone3,surfider”,
count: 5,
title: “Twitter Stream”,
showImages: true,
imageHeight: ‘48px’,
imageWidth: ‘48px’
};
// –></script>
<script type=”text/javascript” src=”http://www.domain.com/js/TwitterWidget.js”>
</script>
{/literal}

make sure you change the domain.com to whatever your url is.  The values for “username” can be changed to whatever Twitter id’s you want to display.

Open sidebar.tpl and add the following line where you want the stream to appear:

{if $pagename neq “story”}{assign var=sidebar_module value=”twitterstream”}{include file=$the_template_sidebar_modules.”/wrapper.tpl”}{/if}

Save and close.

Now, create a file called twitterstream.tpl and add the following to it:

<div>
<a id=”rpnet_twTitle” href=”#”>Twitter Stream</a></div>
<div id=”rpnet_twitterWidget”>
Get your username listed here by <a title=”Submit a tutorial” href=”http://www.domain.com/submit”>submitting tutorials</a></div>

Again, be sure to change domain.com to whatever your url is.

Save and upload to your sidebar_modules directory.

That’s it.

Notes:

Because of Twitter’s API limitations on the number of API calls in one hour, the stream may appear blank after a while, depending on the traffic to your site, if it does, you will need to wait until the hour is up.  I am hoping to have a cache feature added it to soon to prevent time outs.


Now you Make a Choice Again, Trade your $14.90 to your Own max, 10 Minutes of time :)

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

2 Responses to “Simple way to Add Twitter stream to Pligg Site”

  1. [...] tried that. And most of the things in "Pligg Pro Shop" can also be found for FREE such as Twitter Stream Retweet Button in Pligg and they work [...]

  2. [...] Simple way to Add Twitter stream to Pligg Site | Enbeeone3 : A … [...]

Leave a Reply


You must be logged in to post a comment.