I found and modified a piece of code so I can hide links from users.. but members in a group will be able to see them..
this is the code...
in includes/page_header.php
$sql = 'SELECT * FROM ' . USER_GROUP_TABLE . '
WHERE group_id=USER GROUP ID HERE
AND user_id=' . $userdata['user_id'] . '
AND user_pending=0
LIMIT 1';
$is_vip = 0;
if (($result = $db->sql_query($sql)) != FALSE)
{
$is_vip = $db->sql_numrows($result);
$db->sql_freeresult($result);
}
if ($is_vip == 0)
{
$template->assign_block_vars('non_vips_only', array());
}
WHERE group_id=USER GROUP ID HERE
AND user_id=' . $userdata['user_id'] . '
AND user_pending=0
LIMIT 1';
$is_vip = 0;
if (($result = $db->sql_query($sql)) != FALSE)
{
$is_vip = $db->sql_numrows($result);
$db->sql_freeresult($result);
}
if ($is_vip == 0)
{
$template->assign_block_vars('non_vips_only', array());
}
and in the tpl file you need it
This works great for one group but I have tried and failed so it allows 2 groups...
in the code you have USER GROUP ID HERE where you can place one group id.. I thought if you added a comma and then the second group id it would work but it does not....
I am at a bit of a loss as how to do this, and I would appreciate any help anyone could offer..
Thanks