scbFramework: Introducing scbFramework

While developing plugins for WordPress, I found that one of the most time-consuming and error prone tasks was creating user-friendly settings pages.

That is how this framework was born. It’s basically a set of extensible classes that make plugin development faster. I already use it in most of my plugins.

It requires PHP5 and WordPress 2.5 or newer.

scbForms

This by far the most useful class. With it, you can create any type of form element without writing a single line of HTML.

scbOptions

This is a class that handles storing and updating plugin settings in a single field in the wp_options table.

scbAdminPage

This class extends scbForms to provide an easy way to create custom admin pages.

scbBoxesPage

This is an extension to the scbOptionsPage class that lets you easily create dashboard-like pages with collapsible boxes.

scbCron

This is a class that lets you create wp-cron schedules easier.

scbWidget

This class makes scbForms work with the new WP_widget class in WP 2.8.

Front-end Editor: Version 0.9

This version adds post meta editable fields. These are a little different from the others. To add a custom field editable meta, you have to add something like this inside The Loop in you WordPress theme:

<?php editable_post_meta($post->ID, 'my_key', 'textarea'); ?>

The first argument is the current post id, the second is the custom field key and the third is the type of field you want (input, textarea or rich).

Front-end Editor: Version 0.7

This version adds a Settings page under Settings -> Front-end Editor. There you can choose which editable fields are active and which aren’t.

Also, double-clicking should work now for Internet Explorer users.

Front-end Editor: Version 0.6

This version makes it possible to also edit tags inline. However, due to a bug* in WordPress, it won’t work on most themes. If you want this feature you will have to make the following modification to your theme:

Replace the_tags() with echo get_the_tag_list().

Some fixes for the autogrow script have also been added. Props Jean-Paul Horn.

It’s now a lot easier to add new editable fields. I will be writing a post for developers on how to add new editable fields using this plugin.

____
* I’ve submitted a ticket, so the bug will hopefully be fixed in WP 2.8.

Front-end Editor: Version 0.5

Front-end Editor in action

Front-end Editor is a plugin that lets you edit posts or pages directly from your site. No need to load the admin backend just to correct a typo.

To edit something, just double-click it.

Current Features

  • edit title or content
  • works for posts and pages
  • should work with any theme
  • lightweight

This is just the first version and more features are still to come. What I have in mind:

  • include WYSIWYG editor
  • edit tags and/or categories

Hide Spam Count: Version 1.0

Whenever I visit my site’s dashboard, the first thing I see is the bold red Spam count.

Instead of wasting time deleting spam comments, I prefer to let Akismet do that automatically, so I don’t need to see how many spam comments there are.

This little plugin simply hides that part:

Demo

Custom Field Taxonomies: Version 1.2

Another substantial update for y’all:

Revamped Admin Page

New CFT Admin Page
The new admin page is built up entirely of shiny 2.7 style boxes. They work just like the ones on your dashboard.

The admin page has been moved to Posts -> CF Taxonomies for easier access. There is also a new feature to add default values.

Enhanced sorting

Version 1.1 introduced an option to display posts with a relevance less than 100%. Now you have an extra option to also adjust the relevance based on the order of the query vars in the URL.

For example, if your URL is http://example.com?foo=xxx&bar=yyy, posts that don’t have bar=yyy, but have foo=xxx will rank higher than those that have bar=yyy but don’t have foo=xxx.

Important bugfix

In earlier version, if you used query_posts() anywhere in the template file that was used by the plugin, you would get all kinds of errors. Not anymore:

Now you can use query_posts() and even have multiple loops on the same page and CFT will only modify the main loop.

Custom Field Taxonomies: Version 1.1

This version brings several important new features:

Wildcard support

http://example.com/?field=abc* will fetch all posts that have a meta key field with any value beginning with abc: ‘abc’, ‘abcd’ etc.

The ‘*’ character can appear multiple times, anywhere: http://example.com/?field=*ab*c*&another=foo*bar

Relevance:

There’s a new checkbox in the settings page that allow the following behaviour:

http://example.com/?key1=value1&key2=value2 will fetch posts that have at least one of those key=value pairs.

There is also a new template tag that displays the relevance for each post: meta_relevance()

Enhanced search & replace

Now you can select in which meta taxonomy you want values replaced. This allows for better control over your custom fields.

Important: The parameters for meta_cloud() have changed. Check template-tags.php to learn more.