Adding a Twitter stream to Pligg

Posted In Modules - By Geoserv On Sunday, July 12th, 2009 With 93 Comments

The hottest things online right now is social media, namely Digg style websites and Twitter.  With so many Digg style websites going up these days, it’s important to try and stand out from the pact and your niche.

Twitter streamingSo, why not put the power of Twitter to work for you?  A friend of mine suggested perhaps a Twitter stream in the sidebar.  This sounded great, but let’s make it even better.  I have one setup on FAQPAL, I decided to use as a reward for active members.  On FAQPAL, for each member that submits 3 tutorials their name is added, as long as the submissions are recent.

You can use whatever requirements you want, but you get the idea.  By using the method I have, this offers my users one more reason to submit, not only will the submission be promoted, but everything they tweet will also be promoted in my sidebar.

Here’s how to add it to your Pligg install:

Download and upload the following to your /js folder:

  Twitter Stream JS (6.4 KiB, 390 hits)

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

{literal}
<script type="text/javascript"><!–
  var rpnetTwitAttrs = {
    usernames: "Pliggs,Grafpedia,dennysugar,bkmacdaddy",
    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 class="tlb">
        <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.

The original idea came from our friends at Ronak Patel

If you haven’t added us on Twitter, you can find us at @Pliggs

Related Search:

  • dericeket info
  • twitter
  • how to change twitter account in pligg
  • change pligg twitter
  • pligg sidebar twitterfeed
  • twitter module for pligg download
  • twitter stream
  • twitter stream script

About - Geoserv has been working with the Pligg CMS for 2+ years.

  • Pingback: Pliggs

  • Pingback: Pliggs

  • Pingback: You are now listed on FAQPAL

  • Pingback: Vote for this article at blogengage.com

  • Pingback: Adding a Twitter stream to Pligg | Adobe Tutorials

  • Pingback: Posts about Digg as of July 12, 2009 » The Daily Parr

  • Pingback: Adding a Twitter stream to Pligg

  • http://macfanboys.com Denny

    Very cool, simple. Going to have to add that. Nice man!
    .-= Denny´s last blog ..The mighty mini, take two: DIY video baby monitor =-.

  • Pingback: Adding Tweetmeme to Pligg

  • http://www.blogengage.com bbrian017

    If I send you my summary.tpl can you help me add re tweet to it for blogengage like you have on FAQ pal?

  • http://www.faqpal.com Geoserv

    @Denny, thanks.

    @Brian, of course, send it to me.
    .-= Geoserv´s last blog ..Animate a Contact Us Slide-Out Area using jQuery =-.

  • http://www.seomkt.com bbrian017

    I forget your e-mail oops!
    .-= bbrian017´s last blog ..Converting New Readers or Taping New Markets =-.

  • http://www.faqpal.com Geoserv
  • Pingback: Rebecca Donaldson

  • http://twitter.com/freebiequeen/statuses/2768658608 freebiequeen (Rebecca Donaldson)

    Twitter Comment


    Adding a Twitter stream to Pligg [link to post]

    Posted using Chat Catcher

  • http://mrdefinite.com/ Kenneth Lee

    Thanks for the cool widget. I’m gonna try on it and see how it goes. :)
    .-= Kenneth Lee´s last blog ..ALERT: Google Dance Happening; Possibly Affects Web Traffic =-.

  • http://www.wholesaletoner.com.au/hp-laser-cartridges-c-116_180.html hp laser cartridges

    Just subscribe. Its a awesome post. thanks for sharing it.

  • dhamphy

    Thanks for this. I will be using this in my blog.

  • Absolutereturn

    Hello buddy nice post. I have bookmarked your site.

  • http://www.buk-mark.com/ raghhav

    do i have to put pligg.tpl code right after </head> tag or before <body> tag, if i am not mistaken. waiting for your clarification

  • http://www.faqpal.com Pliggs

    Put it just before the closing body tag

  • raghhav

    thanks

  • raghhav

    I tried submitting 3 stories and usernames are NOT getting listed at the twitter stream panel. Could you give me details of the usage.

  • raghhav

    any updates on 3 stories issue

  • http://www.faqpal.com Pliggs

    Have the users been active on Twitter since you added them?

  • raghhav

    you mean, they have to be active on twitter (logged in @ twitter) to work twitterstream. how exactly this works, can you please be elaborative on this?

  • http://www.faqpal.com Pliggs

    How it works is simple, you add the usernames, the script then checks Twitter via an API whenever your website is loaded. If the people you have listed have been active then the script will pll in whatever number of Tweets you specify.

    As far as the 3 stories thing, that is just something I did for http://www.faqpal.com, it has nothing to do with this script, it was a way I decided who to add to the list is all.

    Are you getting anything showing up when you load your website?

  • raghhav

    no, i dont see anything new. can you also check at buk-mark.com

  • Pingback: uberVU - social comments

  • http://www.faqpal.com Pliggs

    Seems you have some apostrophes that didn't render properly just before the closing body tag.

    <!�
    var rpnetTwitAttrs = {
    usernames: “sammrat”,
    count: 5,
    title: “Twitter Stream”,
    showImages: true,
    imageHeight: �30px�,
    imageWidth: �30px�
    };
    //

    Try fixing those first.

  • http://www.faqpal.com Pliggs

    Yours should be:

  • http://www.faqpal.com Pliggs

    Email me your pligg.tpl file to utopianwd@msn.com

    _________________________________________________________________
    Lots of fantastic Windows 7 offers, in one convenient place. Get the perfect deal for you now.
    http://go.microsoft.com/?linkid=9691633

  • http://www.faqpal.com Pliggs

    Email me your pligg.tpl file to utopianwd@msn.com

  • raghhav

    count: 5, ——- 5 is showing in red in dreamweaver that means there is an error in the code.

  • http://www.faqpal.com Geoserv

    Email me your pligg.tpl file to utopianwd@msn.com

  • raghhav

    fixed but nothing happening. what exactly happens when i load my site?

  • http://www.tampabaypos.com/ Restaurant POS Systems

    Twitter stream looks good. It's easy just copy this code and paste it.

  • http://www.patikornekleri.com/ patik ornekleri

    Do you share a very useful article. learned thanks to you

  • http://www.harmony-rehab.net/ Rehabilitation FL

    Social media sites now very popular. Thanks for information about it digg style website.

  • http://www.funintofitness.com.au/ Fitness Gold Coast

    The computer to find out what colour that homosexual bent nosed git Mr Frys shirt is and where our licence money is going to send the poof today. You are missing out my friend. Get on it now but remember a twitter is only one letter short of being a Stephen.

  • http://www.super.ae/ خبار الرياضة

    this is a good idea if you want to promote your website in social networking websites.

  • http://www.07il.com/ antalya

    For twitter user must use that. thanks I use your code.

  • http://www.super.ae/ أخبار الريا ضة

    and I am using it!!

  • http://www.funintofitness.com.au/ Fitness Gold Coast

    Though I do think it's pretty interesting to follow your favorite artists who post updates about their work on their album or they let you know when they're going on tour, especially “less-known” celebrities.

  • http://www.diycarhire.com.au/ Car hire

    You use a lot of good imagery in this piece, however, sometimes you overuse descriptive, complex vocabulary. It's an excellent piece though but it could do with more variety. If you alter the mood you'll be able to engage the reader more easily.

  • http://www.diycarhire.com.au/ Car hire Brisbane

    Most celebrities are tutored or a type of home schooling. They don't have regular hours to be 'in' school, as long as they get the right number of schooling hours in. They sometimes have tutors or teachers who come to the set of movies etc.

  • http://www.changsunha.com/ Encyclopedia

    Thank you so much.

  • http://www.indirmix.net vektörel

    thanks I use your code.

  • John Singh

    Thanks you so much

  • http://www.bedsforlife.com.au Beds Melbourne

    Cheers and thanks for the coverage – exciting times here at #HootSuite HQ and props to new ad partners at #140Proof.