I have a plugin that Is finally working (thanks to Paul M)
Here is the code for it:
PHP Code:
if (in_array($_REQUEST['do'], array('contributors')))
{
// disable other displays
$vbulletin->bf_ugp_genericoptions['showgroup'] = 0;
$vbulletin->options['forumleaders'] = 0;
$groupcache = array();
while ($user = $db->fetch_array($users))
{
$user = array_merge($user , convert_bits_to_array($user['options'], $vbulletin->bf_misc_useroptions));
if ($user['userid'])
{
$t = strtoupper($user['title']);
$u = strtoupper($user['username']);
$groupcache["$t"]["$u"] = $user;
}
}
$usergroups = '';
if (sizeof($groupcache) >= 1)
{
foreach ($groupcache AS $users)
{
ksort($users); // alphabetically sort users
$usergroupbits = '';
foreach ($users AS $user)
{
exec_switch_bg();
$user = process_showgroups_userinfo($user);
if ($user['receivepm'] AND $vbulletin->userinfo['receivepm'] AND $permissions['pmquota'] AND $vbulletin->options['enablepms'])
{
$show['pmlink'] = true;
}
else
{
$show['pmlink'] = false;
}
if ($user['showemail'] AND $vbulletin->options['displayemails'] AND (!$vbulletin->options['secureemail'] OR ($vbulletin->options['secureemail'] AND $vbulletin->options['enableemail'])))
{
$show['emaillink'] = true;
}
else
{
$show['emaillink'] = false;
}
eval('$usergroupbits .= "' . fetch_template('showgroups_usergroupbit') . '";');
}
eval('$usergroups .= "' . fetch_template('showgroups_usergroup') . '";');
}
}
$customgroups = $usergroups;
}
and I have this; which I know integrates pages into usercp's look with the links and navbar.
PHP Code:
$headinclude = str_replace('clientscript', $vbulletin->options['bburl'] . '/clientscript', $headinclude);
$navbits = array('usercp.php' . $vbulletin->session->vars['sessionurl_q'] => $vbphrase['user_control_panel']);
$navbits[''] = "New Page Title";
$navbits = construct_navbits($navbits);
eval('$navbar = "' . fetch_template('navbar') . '";');
eval('$HTML = "' . fetch_template('blah') . '";');
eval('print_output("' . fetch_template('USERCP_SHELL') . '");');
I think the main problem is changing
PHP Code:
eval('$HTML = "' . fetch_template('blah') . '";');
this to wrap around the rest of the code, I tried to mesh them together and its not worked, any Help?