Updated for Enano 1.1.6.
--- a/plugins/CategoryList.php Fri Aug 15 20:39:02 2008 -0400
+++ b/plugins/CategoryList.php Sat May 16 23:55:59 2009 +0000
@@ -9,14 +9,14 @@
*/
// attach parser hook
-$plugins->attachHook('render_wikiformat_pre', 'catlist_parser_hook($text);');
+$plugins->attachHook('render_wikiformat_veryearly', 'catlist_parser_hook($text);');
function catlist_parser_hook(&$text)
{
if ( preg_match_all('/\{\{
- Category:
+ CategoryContents:
([^|\r\n\a\t]+?) # category name
- (\|(?:(?:[a-z0-9_]+)(?:[\s]*)=(?:[\s]*)(?:[^\}\r\n\a\t]+))) # parameters
+ (\|(?:(?:[a-z0-9_]+)(?:[\s]*)=(?:[\s]*)(?:[^\}\r\n\a\t]+)))? # parameters
\}\}/x', $text, $matches) )
{
foreach ( $matches[0] as $i => $match )
@@ -106,7 +106,7 @@
$ticker = 0;
$have_subcats = false;
$class = 'row1';
- while ( $row = $db->fetchrow() )
+ while ( $row = $db->fetchrow($q) )
{
if ( empty($row['is_subcategory']) )
break;