Posts Tagged Simple Post Template
WordPress Plugin Updates
Posted by clifgriffin in Technology on May 6th, 2009
I spent some time updating all of my WordPress plugins today. A few months ago commenter Bramus noted that Simple LDAP Login allowed all WordPress users, regardless of rights, to access the administrative page. I took an appalling amount of time to get around to updating this, but I went ahead and updated it in all of my plugins. (Those with admin pages)
I also fixed a couple of other minor issues that hardly merit mention.
If you are using these plugins, I suggest you go ahead and update.
Simple Post Template Version 1.0
Posted by clifgriffin in Technology on December 24th, 2008
Over the past few days I made some fairly significant changes to Simple Post Template. If you are upgrading, be sure to read the upgrade instructions first!
In short, I’ve moved away from flat files and now store the template in the database. I execute PHP statements using eval. (A pretty nifty PHP function!) All settings are now stored and modified in the WordPress administration pages and you can select whether or not to prefill new posts with your template or click a button on the new post page.

New administration panel.

New button (only appears when auto fill is deselected in admin panel)
I for one like the result.
That’s all for now.
Simple Post Template WordPress Plugin
Posted by clifgriffin in Code, Technology on October 28th, 2008
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?
Official WordPress Link
UPGRADERS, please read the updated installation instructions. There have been some important changes since the first release. (they’re good ones)
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 History
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 necessary.)
- 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.
- Original release.

New administration panel.

New button (only appears when auto fill is deselected in admin panel)
Installation
- Upload the directory “simple-post-template” to the `/wp-content/plugins/` directory
- Activate the plugin through the ‘Plugins’ menu in WordPress
- 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.)
- 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.
- 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
Why not store the title/template in the database?
This was addressed in version 1.0.Will you be adding a way to modify the templates from the administration panels?
This was also fixed in version 1.0.- Can feature x be added?
Probably! E-mail me: webmaster[at]clifgriffin.com
Download it now…
Simple Post Template 1.0.0.1 for WordPress 2.7.1

Recent Comments