I am trying to put the groups into a drop down format. I am not having an issue grabbing the groups or anything, but with the templating system that phpbb needs to use I am having trouble displaying it properly and I am not sure how to go about displaying it correctly in a single drop down box. Here is the current code I have:
PHP:
Code: Select all
<?php
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
$sql = 'SELECT group_name FROM phpbb_groups ORDER BY group_id';
$result = $db->sql_query($sql);
while ($groups = $db->sql_fetchrow($result))
{
$template->assign_block_vars('somerow', array(
'VAR1' => $groups['group_name'],
)
);
}
page_header('Test');
$template->set_filenames(array(
'body' => 'test.html',
));
make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
page_footer();
?>
Code: Select all
<!-- BEGIN somerow -->
<select>
<option>{somerow.VAR1}</option>
</select>
<!-- END somerow -->