November 21, 2008

Pages


Search Site


Topics



Archives

Tweets

Entries Tagged as 'My projects'

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 | 2 comments

Announcing my Twitter Bot: TwitMeBack

September 28 2008 by Adam

Over a few evenings last week and over the weekend I wrote a twitter bot. It's not a client or a mashup. It simply looks for you to say certain things and replies later. It's basically a glorified alarm clock — one that you can set and receive via text message (if you have twitter setup for mobile updates).

The syntax is pretty simple:

@twitmeback in 15 time to make the donuts

or

@twitmeback in 1:45 check parking meter

You can specify the duration until you're reminded in either [hours]:[minutes] or just in a count of minutes.

Where I think this really gets useful is that it can do direct messages, too. Personally I prefer to keep mobile updates to directs only, so if I want a text message reminder, it needs to be in the form of a direct message. The bot will automatically follow you back if you follow it (it checks every half hour). Then, you can set reminders via direct message, like so:

d twitmeback in 30 don't forget to submit your time sheet

or

d twitmeback in 4:00 lunch time!

If your reminder is received via DM, it will remind you via DM. This way, your reminders can be totally private (if that's what you want), or work totally from text message.

Lastly, you can also specify a DM reminder by starting your message with "d", like so:

@twitmeback d in 90 is the pizza here yet?

Now go forth, and be reminded.

Posted in My projects | 2 comments

Related Entries plugin for Mango Blog

September 10 2008 by Adam

This plugin has been a long time in the making. It's something I knew from the outset that I would want in Mango, but after getting my feet wet by writing a few other small plugins, I knew I could do it. I made it as simple as I could, but there are still a couple of things you will need to know; one of which is that you might need to modify your theme to broadcast a new event in a couple of places. This new event is going to be a part of future versions of Mango, so there isn't any worry about future-compatability and worries when upgrading.

First of all, though you need a small update to the core of Mango. Even if you've got the latest version of Mango (1.1)! Laura posted a comment on the plugin ideas page with a link to the update zip file, and an explanation that it included a new plugin (home page chooser), some core modifications that were needed to support that plugin, and most importantly, some bug fixes — one of which is necessary for back-linking of related entries to work correctly. So before you do anything else, make sure you grab and install that update!

Once you've got the Mango update installed, go ahead and download my Related Entries plugin.

Now about that event. It's really simple to add. Open up your theme's index.cfm and post.cfm files (and archives, and other places you may want to show related entries…). The code to broadcast the event is really simple:

<mango:Event name="beforePostContentEnd" />

Simple, right? And where do you put it? Anywhere, really… within reason. It uses contextual information to look up related entries data for the current post, so you must broadcast it inside of a (custom tag) block. So for example, here's the relevant information from my theme's index.cfm template:

<mango:Posts count="5">
<mango:Post>
...
<mango:Event name="beforePostContentEnd" />
<p class="date">Posted in ...</p>
...
</mango:Post>
</mango:Posts>

 

That's almost it! After you install the plugin, and add the event broadcast to your theme, there's just 2 more things.

First, relate a couple of entries. Edit a post, and look at the bottom of the form.

This new section should be displayed at or toward the bottom of the form. As it explains, you select a category from the left column to see its entries from the selected categories (use control to select multiple). Then click on any entries from the center column that you want to relate to the current entry; they will be displayed in the right column. (This is all done with jQuery ajax!) To remove an entry from the right column, double click it. When you submit the form, the posts in the right column will be marked as related to the current entry; and in addition to that, the current entry will be related to those posts.

When you submit the form, if you get an error that looks like this, then you didn't install the update!:

If you don't get the above error, then your data should be good to go. Now, you just need to style it.

When you've got related entries data, the event you're broadcasting is going to be replaced with some code along this line:

<div class="related">
<h2 id="RelatedEntries">Related Entries:</h2>
<ul>
<li><a href="http://server/post/your-post">Post Title</a></li>
<li><a href="http://server/post/your-post">Post Title</a></li>
<li><a href="http://server/post/your-post">Post Title</a></li>
</ul>
</div>

So, you can define some css rules for .related, #RelatedEntries (or .related h2), and .related ul, .related ul li, .related ul li a.

That's it. Enjoy!

One note for the future: The update I talk about above should be included in Mango 1.2, so if you've got 1.2 (or later) installed, don't worry about the update.

In case you missed the link before, you can Download my Related Entries Mango Blog Plugin right here.

Posted in AJAX | ColdFusion | JavaScript | My projects | Mango | 7 comments

Introducing SmartType Mango Blog Plugin

August 21 2008 by Adam

Last night I quickly threw together a Mango Blog plugin for something I've wanted ever since leaving WordPress: Smart Dashes. Since it was possible with the component I was implementing, I also added conversion of elipses.

I can't take any credit for any of the difficult parts of this; all I did was wrap Seb's Code in a Mango plugin.

From the project page:

SmartType Mango Blog Plugin is a simple implementation of Seb Duggan's SmartType ColdFusion Component to prettify post and page content and titles. It implements his replacement for elipses (... as …) and en and em dashes (- as – and -- or --- as —). Folks who have used WordPress in the past should be familiar with this behavior, except that I'm not changing single or double quotes. That was one of the things I hated about WordPress, because it always messed up my code samples.

If you want to include in an elipses, single dash, or set of dashes, without it being replaced, preceed it with a back-slash: \

Download it here: SmartType Mango Blog Plugin 0.1

Install Instructions:

  1. Unzip to the components/plugins/user/ folder
  2. Activate in the Add-ons section of your Mango Blog Admin
  3. There is no step 3.

Posted in My projects | Mango | 2 comments

Easily create/list/update/delete IIS mappings from ColdFusion

April 08 2008 by Adam
When I needed to create mappings on the fly for a client, I did some reading and wrote a quick component to make it easier. (Hat tip: Eric Jones) Once I had that done, it was obvious to me that I should extrapolate this into a full CRUD object. Enter IISVDM (IIS Virtual Directory Manager). It uses CFExecute to wrap the VBScript "iisvdir.vbs" included with IIS6.0. Obviously, then, there are some fairly steep technical requirements: CFMX6+, to use components, IIS6.0 (5.0 and earlier don't have the VBScript tool available), and appropriate permissions to run CFExecute. I should note that I've only tested with CF8, so there may be a syntax difference or two. (Please point those out if you find them!) Of course, using CFExecute and VBScript imposes a certain security risk. Please do make sure you secure access to any pages that use the component. I'm working on documentation and I've included some example scripts in the download. I'm also working on improving the return values from the create/edit/delete functions so that not only do you get a success flag (bool), but also error messages (if any), and the output of the cfexecute(s).

Posted in ColdFusion | iisvdm | My projects |