A Joint Venture with “Role Manager”

The following will be likely the last feature incorporated to Custom Write Panel before the plugin enters beta phase.

In WordPress, a user could be assigned a role and, accordingly, that user will or will not have the capability to write a new Post.

With this upcoming new feature, a custom write panel could be accessible to certain roles only. For example, a custom write panel “Music Review” is created and a role “Music Review Writer” is invented. This custom write panel could be set to be visible to this new role only.

To accomplish this, another plugin needs to be installed in conjunction with Custom Write Panel, and that plugin would be “Role Manager.” Custom Write Panel will be responsible for creating a new capability as a custom write panel is created. Role Manager will allow adding that capability to an existing or a new role.

Upgrading Alpha Versions

Several alpha versions have been released the past few days which include upgrade instructions. Generally, there are two ways to upgrade to higher version. The easiest would be to completely uninstall Custom Write Panel plugin, de-activate it, upload new package, and then re-activate the plugin. Complete uninstallation is performed by doing the following steps.

  1. Go to ‘Options’ > ‘Custom Write Panel’
  2. Type uninstall in the last textbox
  3. Click ‘Update Options’
  4. Deactivate the plugin from the ‘Plugins’ menu

The upgrade method above will delete previously created custom write panels.

Another way of upgrading will involve running some queries via phpMyAdmin (or similar tool) in WordPress database. This method will preserve all custom write panels created. One thing to note when upgrading by the latter method is you can’t skip the upgrade instruction between the old version and the new version. Say, you’re upgrading from version 1.0.0a7 to 1.0.0a10, you will download 1.0.0a10 package, upload it, then you will performed upgrade instruction (when provided) specified for version 1.0.0a8, 1.0.0a9, and 1.0.0a10.

Upgrade script could’ve been included but I’d rather not clutter the code with so many upgrade routines between alpha versions. A proper upgrade script will be supplied for official release to make upgrading smoother, which may only involve de-activating and re-activating the plugin.

Alpha Version Released

Custom Write Panel version alpha is available below. Though unstable (I suppose, since it hasn’t undergone many test cases), it should be safe to install it.

The agreement is, when you download it, you’ll be testing it for me. Thanks :). Significant enhancement requests most likely will be turned down, but do mention them. I’ll save them for the next release. Please direct any feedback to my forum.

2007-07-14 1.0.0a12

Change log:
Fix bug with custom write panel’s role restriction
Drop unused table fields.

Upgrade instruction:
Do either one (not both) of the following.

  1. Do complete uninstallation as specified in readme.txt, de-activate, and re-activate the plugin. This will remove all custom write panel data previously saved.
  2. Run the following SQL statements in phpMyAdmin (or similar tool) in your WordPress database. Change the table name wp_rc_cwp_write_panels accordingly.

ALTER TABLE wp_rc_cwp_write_panels
DROP display_title,
DROP display_body,
DROP title_label,
DROP body_label;

2007-07-10 1.0.0a11

Change log:
Allow restricting access to a custom write panel to a specific role.

Upgrade instruction:
Do either one (not both) of the following.

  1. Do complete uninstallation as specified in readme.txt, de-activate, and re-activate the plugin. This will remove all custom write panel data previously saved.
  2. Run the following SQL statements in phpMyAdmin (or similar tool) in your WordPress database. Change the table name wp_rc_cwp_write_panels accordingly.

ALTER TABLE wp_rc_cwp_write_panels ADD capability_name VARCHAR( 50 ) NOT NULL ;

For the latter method of upgrading, you also have to update your existing custom write panels for the right field in the table to be populated. Just edit, hit update (no need to make any changes), and you’re set.

To enable access restriction of a custom write panel to a specific role, go to ‘Options’ > ‘Custom Write Panel’ and select “Assign custom write panels to a role.” Secondly, you need to install the plugin “Role Manager.” After activating Role Manager, go to ‘Users’ > ‘Roles.’ You should see a list of roles with all capabilities that can be assigned to them. You should see capabilities with names similar (if not the same) as the names of your custom write panels.

Yes, the implementation still has some holes in it. But do report it in the forum when you see one.

2007-07-08 1.0.0a10

Change log:
Allow hiding input fields added by other plugin

Upgrade instruction:
De-activate and re-activate plugin

2007-07-071.0.0a9

Change log:
Fix bug with Post field not hidden when rich editor is enabled

2007-07-071.0.0a8

Change log:
Allow specifying default value for the following custom field types: Checkbox List, Radiobutton List, Dropdown List, Listbox.

Upgrade instruction:
Do either one (not both) of the following.

  1. Do complete uninstallation as specified in readme.txt, de-activate, and re-activate the plugin. This will remove all custom write panel data previously saved.
  2. Run the following SQL statements in phpMyAdmin (or similar tool) in your WordPress database. Change the table name wp21_rc_cwp_custom_field_types accordingly.


ALTER TABLE wp21_rc_cwp_custom_field_types
ADD allow_multiple_values ENUM( 'true', 'false' ) DEFAULT 'false' NOT NULL;

UPDATE wp21_rc_cwp_custom_field_types
SET allow_multiple_values = 'true'
WHERE name IN (
'Checkbox List',
'Listbbox'
);

2007-07-071.0.0a7

Change log:
Fix bug that causes error message after WP’s autosave routine

2007-07-01 1.0.0a6

Change log:
Allow Post to be hidden
Prevent full re-installing after re-activation and de-activation if it’s not previously fully uninstalled
Pre-fill custom field properties in Create Custom Field wizard
Fix bug with Listbox not set with previously set values

2007-06-28 1.0.0a5

1.0.0a