Sweet!
This is what I did based on your instructions:
functions.php now include:
//
// Generate the "navigator" that appears at the top of every page (Sidelinks Only)
//
function generate_sidelinks()
{
global $pun_config, $lang_common, $pun_user;
// Index and Userlist should always be displayed
$links[] = '<li id="sideindex"><a href="index.php">'.$lang_common['Index'].'</a>';
$links[] = '<li id="sideuserlist"><a href="userlist.php">'.$lang_common['User list'].'</a>';
if ($pun_config['o_rules'] == '1')
$links[] = '<li id="siderules"><a href="misc.php?action=rules">'.$lang_common['Rules'].'</a>';
if ($pun_user['is_guest'])
{
if ($pun_user['g_search'] == '1')
$links[] = '<li id="sidesearch"><a href="search.php">'.$lang_common['Search'].'</a>';
$links[] = '<li id="sideregister"><a href="register.php">'.$lang_common['Register'].'</a>';
$links[] = '<li id="sidelogin"><a href="login.php">'.$lang_common['Login'].'</a>';
$info = $lang_common['Not logged in'];
}
else
{
if ($pun_user['g_id'] > PUN_MOD)
{
if ($pun_user['g_search'] == '1')
$links[] = '<li id="sidesearch"><a href="search.php">'.$lang_common['Search'].'</a>';
$links[] = '<li id="sideprofile"><a href="profile.php?id='.$pun_user['id'].'">'.$lang_common['Profile'].'</a>';
//require(PUN_ROOT.'include/pms/functions_navlinks.php');
if($pun_config['o_pms_enabled'] && $pun_user['g_pm'] == 1)
$links[] = '<li id="sidemessage_list"><a href="message_list.php">'.$lang_common['Messages'].'</a>';
$links[] = '<li id="sidelogout"><a href="login.php?action=out&id='.$pun_user['id'].'">'.$lang_common['Logout'].'</a>';
}
else
{
$links[] = '<li id="sideuploadimg"><a href="uploadimg.php">'.$lang_common['Upload Image'].'</a>';
$links[] = '<li id="sidesearch"><a href="search.php">'.$lang_common['Search'].'</a>';
$links[] = '<li id="sideprofile"><a href="profile.php?id='.$pun_user['id'].'">'.$lang_common['Profile'].'</a>';
$links[] = '<li id="sideadmin"><a href="admin_index.php">'.$lang_common['Admin'].'</a>';
if($pun_config['o_pms_enabled'] && $pun_user['g_pm'] == 1)
$links[] = '<li id="sidemessage_list"><a href="message_list.php">'.$lang_common['Messages'].'</a>';
$links[] = '<li id="sidelogout"><a href="login.php?action=out&id='.$pun_user['id'].'">'.$lang_common['Logout'].'</a>';
}
}
// Are there any additional sidelinks we should insert into the array before imploding it?
if ($pun_config['o_additional_sidelinks'] != '')
{
if (preg_match_all('#([0-9]+)\s*=\s*(.*?)\n#s', $pun_config['o_additional_sidelinks']."\n", $extra_links))
{
// Insert any additional links into the $links array (at the correct index)
for ($i = 0; $i < count($extra_links[1]); ++$i)
array_splice($links, $extra_links[1][$i], 0, array('<li id="sideextra'.($i + 1).'">'.$extra_links[2][$i]));
}
}
return '<ul>'."\n\t\t\t\t".implode($lang_common['Link separator'].'</li>'."\n\t\t\t\t", $links).'</li>'."\n\t\t\t".'</ul>';
}
header.php now includes:
// START SUBST - <pun_sidelinks>
$tpl_main = str_replace('<pun_sidelinks>','<div class="inbox">'."\n\t\t\t". generate_sidelinks()."\n\t\t".'</div>', $tpl_main);
// END SUBST - <pun_sidelinks>
and main.tpl now includes:
<div class="block">
<h2><span>Menu</span></h2>
<div class="box">
<pun_sidelinks>
</div>
</div>
It works GREAT! Thank you so much for your help on this.
Bingiman