Thanks for the code!

Hmmm, here’s a first; Roc posting something useful AND intelligent! Yeah, yeah, laugh it up chuckleheads.

Was just playing around with the Twitter hashtag widget. Thought it might be slick to have that down the right hand column of my blog; maybe start promoting the #rocsgirls hashtag a bit more or something.

Anyway, it doesn’t matter. WordPress.com doesn’t allow Javascript. Malicious potential and all that which I can totally respect. Sometimes I wonder if I should just do wordpress.org and give myself full freedom, but I’ve done a few of those installs and they always end up being more headache than they are worth, at least for me.

So I’ll stick with wordpress.com for now. Let someone else take on the headaches. I like to keep things simple.

But I figured why let this code go to waste? So if any of you want to put a slick Twitter hashtag widget on your site that updates in real-time, just copy/paste the code below, making sure to swap out the important things. If you have no idea what any of the code below means, probably just best to keep moving along, or you can just ask me in the comments below.

<script src="http://twitter.com/javascripts/widgets/widget.js"></script>
   <script>
     new TWTR.Widget({
	   version: 2,
       type: 'search',
       search: "#eveonline", // includes all advanced search queries.
       width: 250,
       height: 350,
       interval: 10000,
       subject: "Welcome to our universe",
       title: "EVE Online",
       rpp: 30,
       footer: "X up pilot!",
       theme: {
         shell: {
           background: '#2e2e2e',
           color: '#ffffff'
         },
         tweets: {
           background: '#ffffff',
           color: '#444444',
           links: '#1985b5'
         }
       },

       features: {
         avatars: true, // defaults to false for profile widget, but true for search & faves widget
         hashtags: true,
         timestamp: true,
         fullscreen: false, // ignores width and height and just goes full screen
         scrollbar: false,
         live: true,
         loop: false,
         behavior: 'default',
         dateformat: 'absolute', // defaults to relative (eg: 3 minutes ago)
         toptweets: true // only for search widget
       }
     }).render().start();
   </script>
   <div id="twtr-widget-1"></div>

And that’s all it takes. Not quite the regular recipe you’re used to on a Friday, or a good workout routine, or a rousing story of one pilot’s plights in New Eden, but it’s all you get today.

4 responses to “Thanks for the code!

    • It creates a little box widget that basically cycles through anyone posting with the #eveonline hashtag on Twitter. You can change the tag, and all the other arguments in the code. I didn’t write this code. Twitter did. I just implemented it for myself and thought since I can’t use it, other pilots might.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.