From: <li...@us...> - 2010-12-05 22:43:15
|
Revision: 31161 http://tikiwiki.svn.sourceforge.net/tikiwiki/?rev=31161&view=rev Author: lindonb Date: 2010-12-05 22:43:08 +0000 (Sun, 05 Dec 2010) Log Message: ----------- Add options, default fields and other cleanup to plugin info for use in plugin edit popup and plugin manager, Also pulled info related changes made in trunk to hopefully avoid merge conflicts. Modified Paths: -------------- branches/6.x/lib/wiki-plugins/wikiplugin_category.php Modified: branches/6.x/lib/wiki-plugins/wikiplugin_category.php =================================================================== --- branches/6.x/lib/wiki-plugins/wikiplugin_category.php 2010-12-05 22:05:21 UTC (rev 31160) +++ branches/6.x/lib/wiki-plugins/wikiplugin_category.php 2010-12-05 22:43:08 UTC (rev 31161) @@ -27,8 +27,8 @@ function wikiplugin_category_info() { return array( 'name' => tra('Category'), - 'documentation' => 'PluginCategory', - 'description' => tra("Insert list of items with the current/given category in the wiki page"), + 'documentation' => tra('PluginCategory'), + 'description' => tra('Insert list of items with the current/given category in the wiki page'), 'prefs' => array( 'feature_categories', 'wikiplugin_category' ), 'params' => array( 'id' => array( @@ -36,93 +36,162 @@ 'name' => tra('Category IDs'), 'description' => tra('List of category IDs separated by + signs. ex: 1+2+3. Default will use category of the current page.'), 'filter' => 'digits', - 'separator' => '+' + 'separator' => '+', + 'default' => '', ), 'types' => array( 'required' => false, 'name' => tra('Types'), 'description' => tra('List of object types to include in the list separated by plus signs. ex: article+blog+faq+fgal<br />+forum+igal+newsletter<br />+event+poll+quiz+survey<br />+tracker+wiki+img'), - 'filter' => 'alpha' + 'filter' => 'alpha', + 'default' => '*', ), 'sort' => array( 'required' => false, 'name' => tra('Sort Order'), - 'description' => tra('fieldName_asc|fieldName_desc, valid fields: type, created, name, hits, shuffle'), - 'filter' => 'text' + 'description' => tra('Sort ascending or descending based on various attributes (sorted ascending by name by default)'), + 'filter' => 'text', + 'default' => '', + 'options' => array ( + array('text' => tra(''), 'value' => ''), + array('text' => tra('Created Ascending'), 'value' => 'created_asc'), + array('text' => tra('Created Descending'), 'value' => 'created_desc'), + array('text' => tra('Hits Ascending'), 'value' => 'hits_asc'), + array('text' => tra('Hits Descending'), 'value' => 'hits_desc'), + array('text' => tra('Item ID Ascending'), 'value' => 'itemId_asc'), + array('text' => tra('Item ID Descending'), 'value' => 'itemId_desc'), + array('text' => tra('Name Ascending'), 'value' => 'name_asc'), + array('text' => tra('Name Descending'), 'value' => 'name_desc'), + array('text' => tra('Type Ascending'), 'value' => 'type_asc'), + array('text' => tra('Type Descending'), 'value' => 'type_desc'), + ), ), 'split' => array( 'required' => false, 'name' => tra('Split'), - 'description' => 'y|n', - 'filter' => 'alpha' + 'description' => tra('Whether multiple categories will be listed on different lines (default is to split them)'), + 'filter' => 'alpha', + 'default' => '', + 'options' => array( + array('text' => '', 'value' => ''), + array('text' => tra('Yes'), 'value' => 'y'), + array('text' => tra('No'), 'value' => 'n') + ), ), 'and' => array( 'required' => false, 'name' => tra('And'), - 'description' => 'y|n', - 'filter' => 'alpha' + 'description' => tra('If set to y (Yes), only objects in all of the categories will be shown (default is to show objects in any of the categories)'), + 'filter' => 'alpha', + 'default' => '', + 'options' => array( + array('text' => '', 'value' => ''), + array('text' => tra('Yes'), 'value' => 'y'), + array('text' => tra('No'), 'value' => 'n') + ), ), 'sub' => array( 'required' => false, - 'name' => tra('With sub-categories'), - 'description' => 'y|n', + 'name' => tra('With Sub-categories'), + 'description' => tra('Also list objects in sub-categories of the categories given (default is to list sub-category objects)'), 'default' => 'n', - 'filter' => 'alpha' + 'filter' => 'alpha', + 'options' => array( + array('text' => '', 'value' => ''), + array('text' => tra('Yes'), 'value' => 'y'), + array('text' => tra('No'), 'value' => 'n') + ), ), 'showdescription' => array( 'required' => false, - 'name' => tra('Show description'), - 'description' => 'y|n', + 'name' => tra('Show Description'), + 'description' => tra('Show descriptions (not shown by default)'), 'default' => 'n', + 'filter' => 'alpha', + 'options' => array( + array('text' => '', 'value' => ''), + array('text' => tra('Yes'), 'value' => 'y'), + array('text' => tra('No'), 'value' => 'n') + ), ), 'showname' => array( 'required' => false, - 'name' => tra('Show object name'), - 'description' => 'y|n', + 'name' => tra('Show Name'), + 'description' => tra('Show object names (shown by default)'), 'default' => 'y', 'filter' => 'alpha', + 'options' => array( + array('text' => '', 'value' => ''), + array('text' => tra('Yes'), 'value' => 'y'), + array('text' => tra('No'), 'value' => 'n') + ), ), 'showtype' => array( 'required' => false, 'name' => tra('Show type'), - 'description' => 'y|n', + 'description' => tra('Show type (shown by default)'), 'default' => 'y', 'filter' => 'alpha', + 'options' => array( + array('text' => '', 'value' => ''), + array('text' => tra('Yes'), 'value' => 'y'), + array('text' => tra('No'), 'value' => 'n') + ), ), 'one' => array( 'required' => false, - 'name' => tra('Show one object per line'), - 'description' => 'y|n', + 'name' => tra('One Per Line'), + 'description' => tra('Show one object per line (multiple per line shown by default)'), 'default' => 'n', 'filter' => 'alpha', + 'options' => array( + array('text' => '', 'value' => ''), + array('text' => tra('Yes'), 'value' => 'y'), + array('text' => tra('No'), 'value' => 'n') + ), ), 'showlinks' => array( 'required' => false, - 'name' => tra('Show children category links'), - 'description' => 'y|n', + 'name' => tra('Show Child Links'), + 'description' => tra('Show children category links (shown by default)'), 'default' => 'y', 'filter' => 'alpha', + 'options' => array( + array('text' => '', 'value' => ''), + array('text' => tra('Yes'), 'value' => 'y'), + array('text' => tra('No'), 'value' => 'n') + ), ), 'categoryshowlink' => array( 'required' => false, - 'name' => tra('Show top category link'), - 'description' => 'y|n', + 'name' => tra('Show Top Link'), + 'description' => tra('Show top category link (shown by default)'), 'default' => 'y', 'filter' => 'alpha', + 'options' => array( + array('text' => '', 'value' => ''), + array('text' => tra('Yes'), 'value' => 'y'), + array('text' => tra('No'), 'value' => 'n') + ), ), 'maxRecords' => array( 'required' => false, 'name' => tra('Max Records'), - 'description' => tra('Maximum number of objects to list. Default 50'), + 'description' => tra('Maximum number of objects to list (default is 50)'), 'default' => '50', 'filter' => 'digits', ), 'showTitle' => array( 'required' => false, 'name' => tra('Show Title'), - 'description' => tra('Show title text above category object lists'), + 'description' => tra('Show title text above category object lists (shown by default)'), 'default' => 'y', 'filter' => 'alpha', + 'options' => array( + array('text' => '', 'value' => ''), + array('text' => tra('Yes'), 'value' => 'y'), + array('text' => tra('No'), 'value' => 'n') + ), ), ), ); @@ -163,7 +232,7 @@ $list = explode(',', $sort); foreach ($list as $l) { if (!in_array($l, array('name_asc', 'name_desc', 'hits_asc', 'hits_desc', 'type_asc', 'type_desc', 'created_asc', 'created_desc', 'itemId_asc', 'itemId_desc'))) { - return tra('Incorrect param:').' sort'; + return tra('Incorrect parameter:').' sort'; } } } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |