Twitter Plugin For Mango Blog

Posted By: Mark Aplet 12 Comments October 07, 2008

UPDATE: A new version of the twitter plugin is now available for Mango Blog 1.3 Please see the new post for details and download.

Twitter, the popular micro blogging social phenomenon is taking the blogosphere by storm. I felt Mango Blog needed to keep up with the times. I was also working on a new theme that required a twitter sidebar widget. This meant I had to force myself to learn about the plugin system for mango blog. I was about to throw in the towel, call it quits and cry my eyes out then all of a sudden it started to "click". Within the next hour or so I fixed my plugin and got it working as intended. Hooray!

Features

I tried to make it as flexible as possible. Adding a few extra hooks for future styling needs.  While I was at it. I added a custom javascript that automatically links @Usernames as well as hyperlinks in the tweet. Something the original twitter badge does not do.

Configuration Settings

I tried to make the plugin settings functional as well for future proofing the plugin. I added the ability to customize the H2 text that appears in the sidebar. Or you can choose not to show any heading at all by leaving the field blank.

Additionally, I added a location selector for the follow me hyperlink. There are three settings available: None for do not show a link. Below for displaying the traditional link below the posts, or Above if you want to link to a twitter logo or other graphic.

Lastly, I added the ability to specify the number of posts to show at a time.

Download Plugin

So here is it! My very first mango blog plugin! Since this is my first plugin, I would really appreciate your feedback, comments or suggestions.

Custom Tag Option

As a side note, I also have a custom tag version of this plugin. It's not as good as the plugin, but sometimes a theme might require something unique that a sidebar plugin cannot provide.

Thank You

Thanks to Laura for advising me on pod enabeling this plugin, and also for writing a portion of the installer script so that it's "Mango Certified"

Tags: Freebies · Mango · Plugins · ColdFusion

12 comments so far ↓

  • 1 Seb Duggan // Oct 14, 2008 at 11:15 AM
    Hey Mark,

    Finally redesigned my site, and your Twitter plugin is part of it...

    Works fine, except in IE6 (yes, I know, but I thought I'd better test it) - which for some reason marks all tweets as having been posted in the last minute.

    Not a show-stopper - to be honest, anyone using IE6 deserves all they get - but I thought you might like to know...
  • 2 Mark Aplet // Oct 15, 2008 at 8:42 PM
    @seb Glad to hear that someone is using my plugin! That's awesome! IE6 is acting wonkey? Imagine that? haha. I will have to run some tests on it. I have to admit that I did not test it on IE6. I'm sort of "over it" but I should still support it for plugins that I create. That being said, I have an upgraded twitter coming soon that supports cached tweet's. So when I roll it out, I will hopefully have a fix for IE6. Thanks for alerting me to the issue.
  • 3 johngag // Oct 28, 2008 at 4:39 PM
    I got this error and cant get it to go back

    Please help

    Error:
    Object of type class java.lang.String cannot be used as an array
  • 4 johngag // Nov 11, 2008 at 11:30 AM
    Works great Mark! Keep up the sweet work
  • 5 mac jordan // Jan 8, 2009 at 8:22 AM
    Hi, sorry to appear dim, but where do I install this? I'm absolutely brand new to Mango (I normally use WordPress), and have no idea how to implement this ...
  • 6 John Gag // Jan 8, 2009 at 8:27 AM
    @mac jordan - simple copy the folder twitter and paste it in the following directory of your mango blog.

    components -> plugins -> user

    Then go into your blog admin and activate it. Let me know if you need help.
  • 7 mac jordan // Jan 8, 2009 at 9:34 AM
    Yes, thanks - I sussed that just after I typed the message.

    Now I'm having problems with your Sidenote addon - it tells me Plugin cannot be activated. I suspect this is a permissions issue, but I'll keep digging.
  • 8 jonese // Feb 27, 2009 at 3:37 PM
    Mmm just installed this on mango 1.3.1 and i'm not getting anything from my twitter feed.. thoughts?

    it's in the sidebar, bottom right... Heading is I Am....
  • 9 Seb Duggan // Feb 27, 2009 at 4:14 PM
    Looks like it's tripping up on the setup() function, where it tries to copy the JS file to the assets directory.

    Line 59 of Handler.cfc should read:

    <cfif assetsSettings.path EQ "assets/content/">

    ...and then it will all work fine.

    Mark - if you're going to do a new release anyway to fix this, I'd suggest using the new installation features included in Mango 1.3, as it's a much safer way of doing it now - less susceptible to copy/paste errors!
  • 10 Mike Benner // Feb 27, 2009 at 11:21 PM
    Seb is right on that one. I made that code change and it started working for me.
  • 11 Jonathan // Mar 9, 2009 at 1:46 PM
    The install and activation went smoothly, and the twitter pod is appearing in my sidebar - but the twitter updates are not appearing. How often does it pull updates from the specified twitter feed?
  • 12 Mark Aplet // Mar 11, 2009 at 4:23 PM
    Jonathan, if your using the 1.3 or newer version of Mango Blog please use the newest version of this plugin. http://www.visual28.com/articles/twitter-plugin-updated-1-3

Leave a Comment

Leave this field empty:

Theme Design By Mark Aplet

Super Powered by Mango Blog

viral-abdomen