Simple Post Template WordPress Plugin

Many bloggers use a similar format for many or all of their posts. WordPress provides no native way to pre-fill your new posts with such a template. This plugin provides the simplest solution to this problem. It takes 5 minutes to install and setup. The template allows you to define a title and a body and support HTML and even PHP.  There’s no easier solution.

Version 1.1:

  • You can now specify a default excerpt in your template (in case you wanted to)
  • Rewrote backend to use standard supported methods and less hacking.
  • Completely fixed issue with template content breaking “Insert Template” button. Contents is now encoded to HEX and decoded upon insert.
  • Removed upgrade option for legacy versions. I never received any feedback on this feature and suspect it was rarely used, if used at all.
  • Redesigned admin panel for aesthetic and informational purposes. Now includes PHP examples and considerations.

Version 1.0.0.1:

  • Fixed security issue. Now only Administrators can access admin pages.

Version 1.0:

  • Moved all settings to administration pages under Settings -> Simple Post Template.
  • Moved content of template and title to WordPress options.
  • Provided upgrade mechanism to convert old templates to the new format. (May not work for all applications. Some may work but may be more complex than neccessary.)
  • Added optional “Insert Template” button to new post page. You can now determine from the settings page whether or not the template will be automatically applied to all new posts.
  • Plugin is now upgrade proof. Settings are stored using WordPress’s setting functions.
  • Various other improvements were made to address inefficiencies in the first version.

Version 0.1:

  • Original release.
    New administration panel.

    New administration panel.

    New button (only appears when auto fill is deselected in admin panel)

    New button (only appears when auto fill is deselected in admin panel)

    Installation

    1. Upload the directory “simple-post-template” to the `/wp-content/plugins/` directory
    2. Activate the plugin through the ‘Plugins’ menu in WordPress
    3. Go to Settings -> Simple Post Template and enter your desired title and body for new posts. (Feel free to use any combination of HTML and PHP.)
    4. If you select “Auto fill new posts with this template.” all new posts will be created with your template. If you uncheck this, the new posts screen will have a new sidebar widget with a button allowing you to apply the template.
    5. There’s nothing else to do. Enjoy! (unless you are upgrading, in which case, see below)

    ATTENTION UPGRADERS FROM VERSION 0.1, READ THIS:
    If you use automatic upgrade from the WordPress plugin screen, WordPress will most likely delete your current templates. Period. I didn’t realize this until after I wrote and uploaded these instructions. If you wish to use the described upgrade feature (that I apparently spent way too much time on!) simply copy your template.php and title.php files to another location before upgrading automatically, OR upgrade the old fashioned way.

    Version 1.0 provides vast improvements to the way templates are stored and executed. Consequently, I no longer use template.php and title.php to create templates. The template is now stored in the WordPress database and PHP is processed at runtime using eval(). To assist users of old version, the admin screen provides an Upgrade button for those who still have the old flat files. The upgrade tasks is not fool proof. The original templates were stored in a string in two flat files. I have attempted to copy over that string and encapsulate it in a PHP echo which should keep most HTML and PHP working well. However, the result is likely to be more complicated than necessary…

    For example, if you original template had this:
    $template = “Hi this is some text and whoops!”.$some_php_variable.” What was that??”;

    Than your new template will look something like:
    <?PHP echo “Hi this is some text and whoops!”.$some_php_variable.” What was that??”; ?>

    Quite obviously, this can be done different/better with the new system:
    Hi this is some text and whoops! <?PHP echo $some_php_variable; ?> What was that??

    The latter example is obviously much better and will make templates *much* easier to do for first time users. This should be the last time I make large changes to the way templates are done. Because of this, I’m comfortable releasing it at version 1.0 instead of 0.2 or some derivative.

    So, once again, the upgrade mechanism is provided as a curteousy. I’ve tried to make it as easy as possible to upgrade, but I encourage to fine tune the result of this upgrade and make it your own.

    Frequently Asked Questions

    • Can you add multiple templates that are selectable from a dropdown?
      I intend to do this eventually.
    • Can feature x be added?
      Probably! E-mail me: webmaster[at]clifgriffin.com

    Download it now…
    Simple Post Template 1.1 for WordPress 3.0.4

    Featured Category WordPress Plugin

    About a month ago I began searching for a plugin I just knew existed.  I needed a plugin that would allow me to select a category, a number of posts, and display a neatly formatted list of the applicable posts from that category.

    For the site in question, I needed to list recent posts from a “Projects” category. I imagined that there would be at minimum a plugin for posting news items that I could modify. I settled with using The_Loop. At the time I made a mental note “I need to turn this into a plugin.”

    Which brings us to Featured Category, my first WordPress Plugin. (Be gentle!)

    I tried to follow the WordPress API as closely as possible.

    Once you activate the plugin, , simply load it’s settings page and choose the category, the title or “heading” and the number of posts you wish to display.

    If the style is not to your liking, simply modify featcat_style.css in the plugin directory. I have included entries for implemented and unimplemented portions to speed things up.

    An example from this site. (See home page)

    An example from this site. (See home page)

    A screenshot from the settings page.

    A screenshot from the settings page.

    This plugin makes displaying posts from a specific category simple.

    Please contact me with any questions. Feel free to post a comment below.

    Any feedback will be appreciated.

    1.1

    • Integrated CSS into admin panel. Now stores stylesheet in WordPress database.
    • Added instructions.
    • Tweaked a few other things.

    1.0.2.1

    • Fixed security issue. Now only administrators can modify admin settings.
    • Deleted trailing spaces at the end of the main plugin file. This was somehow causing conflicts with WP Super Cache plugin. Bizzarre, I know.

    1.0.2

    • Fixed path name. (WordPress renamed the installation folder.)

    1.0.1

    • Settings page now sets the category drop down box selection when you return to the page.
    • It shouldn’t run in sidebar widgets anymore. (Assuming the content portion loads before sidebar…I may need to tweak this in the future.)

    1.0

    • Original release.

    Download it now…
    Featured Category 1.1 for WordPress 3.0.4

    MusicSort 0.1

    Find a bug?

    If you believe you have found a bug, please open a ticket here. This will allow me to track the issue as a single issue and others to comment and give feedback.

    I’m finding it difficult to discern user error from bug from configuration differences among different installations. All of this will lead to a quicker turn around for reported issues. Isn’t that cool?

    About two years ago I decided to organize all of my MP3 and WMA files into a reasonable structure. I had tried letting Windows Media Player do this but it always seemed inconsistent.

    This program does it all in a fraction of a second.

    The other methods of sorting are disabled simply because I haven’t rewritten the code to support them. I need to rewrite my sorting method to be more flexible but haven’t the time currently.

    The software is being released under the BSD license.

    The MP3/WMA tag reading portions were not written by me, and unfortunately, I can’t remember who wrote them. But suffice it to say, those portions of the software are not under the BSD license as I have no rights to release them as such.

    Download it now:
    Click here to download Music Sort 0.1 including Source…

    MTA Purge 0.9 Download

    Find a bug?

    If you believe you have found a bug, please open a ticket here. This will allow me to track the issue as a single issue and others to comment and give feedback.

    I’m finding it difficult to discern user error from bug from configuration differences among different installations. All of this will lead to a quicker turn around for reported issues. Isn’t that cool?

    Anyone who manages an exchange environment of any size has undoubtedly come across a scenario where they are asked to remove e-mails from their Exchange MTA outbound queue. This may be due to spamming users or, possibly an e-mail accidentally being sent to many users.

    Whatever the case, if the e-mail has not been fully processed by the MTA server, you can still remove these e-mails. Unfortunately, Microsoft has not provided any tools to make this easier.

    [Read more...]