Revision 199
Added by ryan about 19 years ago
index.php | ||
---|---|---|
120 | 120 |
|
121 | 121 |
// Insert values into module list |
122 | 122 |
$template->set_block('main_block', 'module_list_block', 'module_list'); |
123 |
if($handle = opendir(WB_PATH.'/modules/')) { |
|
124 |
while (false !== ($file = readdir($handle))) { |
|
125 |
if($file != '.' AND $file != '..' AND $file != '.svn' AND is_dir(WB_PATH."/modules/$file") AND file_exists(WB_PATH."/modules/$file/info.php")) { |
|
126 |
// Include the modules info file |
|
127 |
require(WB_PATH.'/modules/'.$file.'/info.php'); |
|
128 |
if ($module_type=='page') { |
|
129 |
$template->set_var('VALUE', $file); |
|
130 |
$template->set_var('NAME', $module_name); |
|
131 |
$template->parse('module_list', 'module_list_block', true); |
|
132 |
} |
|
133 |
} |
|
123 |
$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'module' AND function = 'page'"); |
|
124 |
if($result->numRows() > 0) { |
|
125 |
while($addon = $result->fetchRow()) { |
|
126 |
$template->set_var('VALUE', $addon['directory']); |
|
127 |
$template->set_var('NAME', $addon['name']); |
|
128 |
$template->parse('module_list', 'module_list_block', true); |
|
134 | 129 |
} |
135 | 130 |
} |
136 | 131 |
|
137 | 132 |
// Insert values into template list |
138 | 133 |
$template->set_block('main_block', 'template_list_block', 'template_list'); |
139 |
if($handle = opendir(WB_PATH.'/templates/')) { |
|
140 |
while (false !== ($file = readdir($handle))) { |
|
141 |
if($file != '.' AND $file != '..' AND $file != '.svn' AND is_dir(WB_PATH."/templates/$file") AND file_exists(WB_PATH."/templates/$file/info.php")) { |
|
142 |
// Include the modules info file |
|
143 |
require(WB_PATH.'/templates/'.$file.'/info.php'); |
|
144 |
$template->set_var('VALUE', $file); |
|
145 |
$template->set_var('NAME', $template_name); |
|
146 |
$template->parse('template_list', 'template_list_block', true); |
|
147 |
} |
|
134 |
$result = $database->query("SELECT * FROM ".TABLE_PREFIX."addons WHERE type = 'template'"); |
|
135 |
if($result->numRows() > 0) { |
|
136 |
while($addon = $result->fetchRow()) { |
|
137 |
$template->set_var('VALUE', $addon['directory']); |
|
138 |
$template->set_var('NAME', $addon['name']); |
|
139 |
$template->parse('template_list', 'template_list_block', true); |
|
148 | 140 |
} |
149 | 141 |
} |
150 | 142 |
|
Also available in: Unified diff
Fixed minor bugs with template and module permissions on groups