Programmatically Turn Off Comments in Wordpress with Filter
To turn comments off programmatically with a filter in Wordpress, you can set the post object's comment_status variable to "closed". Call the filter at some point after the post is loaded but before the comments are rendered. This is a hack, but I haven't...
Written by Sean Behan on 06/17/2012
Hacking Rails Plugins
Using the Acts as Taggable On plugin to add categories to a model class, I wanted to override the to_param method and place the name attribute in the url. The plugin, installed as a gem, source shouldn't need to be hacked in order to accomplish this. The ...
Written by Sean Behan on 06/17/2012
Rails Plugin Acts as Taggable on Steriods
You can download it here http://github.com/suitmymind/acts-as-taggable-on-steroids as well as read usage info (which is for the most part reprinted here). ./script/plugin install http://svn.viney.net.nz/things/rails/plugins/acts_as_taggable_on_steroids ....
Written by Sean Behan on 06/17/2012
TinyMCE Rich Text Editor: HELLO EDITOR Plugin Tutorial and Example
I wanted to create a button for the TinyMCE Rich Text Editor for Wordpress. It was tough to find good docs on the subject. There are a couple of useful posts out there but in general I found them lacking. http://codex.wordpress.org/TinyMCE_Custom_Buttons...
Written by Sean Behan on 06/17/2012
Rails Paperclip Plugin Options for Attaching Files
I usually change some of the default settings when I use the Paperclip plugin. For most of my projects I don't like having separate directories for each image that is uploaded. I prefer, in this instance, to put avatars of different sizes together under o...
Written by Sean Behan on 06/17/2012
Build Your Own Calendar in Rails without any Plugins in less than 10 lines of Ruby Code
There are a number of terrific calendar plugins for Rails. But it's almost as easy, if not easier, to implement your own calendar. The steps are pretty simple. First get the @beginning_of_month and @end_of_month and iterate over the days in between. In t...
Written by Sean Behan on 06/17/2012
Acts_as_versioned Rails Plugin
Versioning models with the acts_as_versioned plugin cd rails/app ./script/plugin install git://github.com/technoweenie/acts_as_versioned.git ./script/generate model post title:string body:text In your model class Post < ActiveRecord::Base acts_as_ve...
Written by Sean Behan on 06/17/2012
using rails paperclip plugin on ubuntu
paperclip is an awesome plugin for rails. it let's you attach an image to any of your models. installation and usage more information is available at http://jimneath.org/2008/04/17/paperclip-attaching-files-in-rails/ by default paperclip uses the image m...
Written by Sean Behan on 06/17/2012