Rah's Default Category

Rah_default_category is a tiny admin-extension for Textpattern CMS. The plugin brings the default section feature to categories. The extension adds new options to Textpattern’s Advanced Preferences that allow site admins set default article categories, just like one can select a default article section. Selected default categories are then used as the default option on the Write panel.


Version 0.6 Aug 27, 2012
Other versions...

A cup of coffee
via PayPal


Rah_default_category’s minimum requirements:

  • Textpattern v4.4.0 or newer.
  • PHP 5.2 or newer.


Rah_default_category’s installation follows the standard plugin installation steps.

  1. Download the plugin installation code.
  2. Copy and paste the installation code into the Install plugin box of your Textpattern Plugin pane.
  3. Run the automated setup.
  4. After the setup is done, activate the plugin. Done.


Version 0.6 – 2012/08/27

  • Added: Finnish translation.
  • Added: French translation by Patrick Lefevre.
  • Improved: Now uses escape_js() to make sure JavaScript strings are valid.
  • Improved: Language strings aren’t embedded to the source code, but uses external Textpack that are ran during install.
  • Changed: Wrapped functions to a class.
  • Changed: Renamed Preference group to Default article categories.
  • Changed: In preferences displays categories as a tree. Child categories are listed under the parent.
  • Fully compatible with Textpattern v4.5.

Version 0.5 – 2011/06/29

Version 0.4 – 2011/06/29

  • Changed: Integrated the plugin’s preferences pane to Textpattern’s build in Advanced Preferences interface. The plugin no longer has own tab, but instead the preferences are located at TXP/Admin/Preferences/Advanced.
  • Changed: Preferences are now stored in txp_prefs table instead of its own table. The plugin comes with migration script that makes transition automatic.
  • Fixed: Doesn’t throw up JavaScript if browser’s JavaScript support is disabled.
  • Added: Language string support.
  • Added: Options link to the Textpattern’s plugins pane.
  • For full feature compatibility requires Textpattern 4.2.0 or newer.

Version 0.3 – 2010/11/02

  • Removed unnecessary default values from the installation query.
  • Removed no-longer used HTML IDs.

Version 0.2 – 2010/08/11

  • Fixed: conditional logic. Now doesn’t reselected default categories after article post + empty categories combination.
  • Removed tables from the plugin’s prefs panel and changed to better layout.
  • Removed inline styles.
  • Improved installer.
  • Now uses same coding style as all newer rah-plugins.
  • Centralized preferences fetcher.
  • Changed prefs panel event from rah_default_category_page to rah_default_category.
  • Now requires Textpattern version 4.0.7 or newer.

Version 0.1 – 2008/12/11

  • Initial release.