January 6, 2009

Pages


Search Site


Topics



Archives

Tweets

Popular Posts Pod Plugin for Mango

November 11 2008 by Adam

I've created a plugin for Mango Blog that will list your N most popular (most commented) posts in a pod, at the request of Russ Johnson. I've been meaning to figure out how to make custom pods in Mango, so it seemed like a good place to dive in.

The plugin seems to work fine for me in my development site and on another Mango blog I have (not in use here on FusionGrokker – my theme isn't pod enabled), but I've been told by a friend who tried it that he had trouble with it and didn't see the pod show up. Everyone is short on time these days, so I've decided to throw this out to the community and see if anyone can find anything wrong with it. As far as I can tell, it should work fine, and generally I would just post it and call it done… but with the only report I've gotten back so far being negative, I'd like some more feedback.

Download Mango Popular Posts Pod Plugin

Here are some things to do to find issues (if there are any).

  • Is your Mango installation up to date? You should be at version 1.2.2, at least.
  • Is your theme pod-enabled? It must be. If you can view the "pod manager" section in admin and it doesn't say that your theme isn't pod enabled, then it is.
  • Did you correctly spell the Pod ID when you added it in Pod Manager? ("Popular Posts" the space is required, but the text is case-insensitive)
  • Make sure no errors or warnings are captured by Mango when activating the plugin or viewing your blog. To check this:
    • De-activate the plugin, if it's active
    • Delete these files, if they exist
      • /components/utilities/logs/error.log.html
      • /components/utilities/logs/warning.log.html
    • Activate the plugin; check for existence of error log or warning log
    • Configure; check for existence of error log or warning log
    • View your blog homepage, pod should be displayed; check for existence of error log or warning log

Like I said, it works fine for me. Hopefully it will work for you too. If any of the above steps cause the error and/or warning logs to come back for you, please feel free to email them to me. My email address is in the License.txt included in the zip, as well as the license blurb at the top of all of the other included files.

Posted in My projects | Mango | 6 comments

6 comments:

  1. John Gag Says:

    I wanted to test it out for ya and could not get it to work..
  2. Adam Says:

    John, I sent you an email but you haven't responded. What version of Mango are you running? Were any errors or warnings generated?
  3. Laura Arguello Says:

    Hi Adam,
    I checked it, and there is a problem in the query in MySQL. TOP only works in MSSQL. I would recommend using maxrows in the cfquery tag to avoid cross-db issues.

    By the way, a minor detail, I would make the plugin id something more like a variable, without spaces (I usually replace the space with a dash)
  4. Laura Arguello Says:

    Hi Adam,
    Ignore my previous comment. I just realized that you are making the query the right way, that is, using the queryInterface. Because of that, you cannot add the maxrows attribute to the query.

    Maybe have different queries for the different db types?
  5. Adam Says:

    Laura, thanks for the insight. That may very well be what is causing other folks to have problems. I'll be sure to work on a fix for that very soon... my son was just born on Thanksgiving day and we're still adjusting around here. :)
  6. Laura Arguello Says:

    Congrats, Adam!

Leave a Reply