This is what I'm building into my new theme:
A new block editor that will allow a user to choose from all available blocks and drag/drop to left or right and drag/drop to sort.
Each block's title will also be editable as sometimes I like to have a different title in different contexts - or none at all.
So a new table will be created to hold:
'type'=>'story', 'staticpage' or 'poll',
'id'=>story, staticpage or poll id,
'lblocks=>array(array('bid'=>block's id, 'title'=>regular block title or chosen new title)),
'rblocks=>array(array('bid'=>block's id, 'title'=>regular block title or chosen new title))
and in theme_createHTMLDocument I'll load my blocks based on this new info.
So far I have chosen
HTML5 Sortable and have wireframed my block editor which will be integrated into story, staticpage and poll editors.(any others I should consider?)
Not really sure if it will be appropriate for polls as I've never really used them.
On another note, and this is very important:
Before release, you should require plugins to supply plugin_getBlocksConfig_pluginName and some actual config options before allowing the plugin to return plugin_getBlocks_pluginName
Just for a test I created:
Text Formatted Code
function plugin_getBlocks_G2Bridge($side, $topic='') {
if ($side=='right')
return array(
array(
'name' => 'G2B_rand_photo',
'type' => 'dynamic',
'onleft' => false,
'title' => 'Random Photo',
'blockorder' => 1,
'content' => phpblock_G2B_rand_photo(),
'allow_autotags' => false,
'help' => ''
)
);
}
and my Random Photo block shows up like it is supposed to, but without any config options or even plugin_getBlocksConfig_G2Bridge
the site owner is going to be confused/frustrated as to where this block is coming from and have no way to disable
without editing code or disabling the plugin.
-s
FlashYourWeb and Your Gallery with the E2 XML Media Player for Gallery2 -
http://www.flashyourweb.com