Code: Select all
<!-- IF U_MCP --><!-- ENDIF -->
for example
Code: Select all
<!-- IF U_USERGROUP=CLAN -->lalala<!-- ENDIF -->
So only members of the "clan" usergroup can see "lalala"
Is any of this possible?
Code: Select all
<!-- IF U_MCP --><!-- ENDIF -->
Code: Select all
<!-- IF U_USERGROUP=CLAN -->lalala<!-- ENDIF -->
Code: Select all
// The following assigns all _common_ variables that may be used at any point in a template.
Code: Select all
if ( !function_exists('group_memberships') )
{
include($phpbb_root_path . 'includes/functions_user.'.$phpEx);
}
$groups = group_memberships(false,$user->data['user_id']);
foreach ($groups as $grouprec)
{
$template->assign_vars(array(
'S_GROUP_' . $grouprec['group_id'] => true
));
}
Code: Select all
<!-- IF S_GROUP_2 -->some stuff here<!-- ENDIF -->
Code: Select all
if ( !function_exists('group_memberships') )
{
include($phpbb_root_path . 'includes/functions_user.'.$phpEx);
}
$groups = group_memberships(false,$user->data['user_id']);
foreach ($groups as $grouprec)
{
$template->assign_vars(array(
'S_GROUP_' . $grouprec['group_id'] => true
));
}
Code: Select all
<!-- IF S_GROUP_2 -->some stuff here<!-- ENDIF -->
So the switch gets added after the last } of the new added code?stevemaury wrote:...You would change the 2 in the template switch example to the id of the group in question. The switch does not need to be on a new line....
Code: Select all
if ( !function_exists('group_memberships') )
{
include($phpbb_root_path . 'includes/functions_user.'.$phpEx);
}
$groups = group_memberships(false,$user->data['user_id']);
foreach ($groups as $grouprec)
{
$template->assign_vars(array(
'S_GROUP_' . $grouprec['group_id'] => true
));
}
Code: Select all
'A_COOKIE_SETTINGS' => addslashes('; path=' . $config['cookie_path'] . ((!$config['cookie_domain'] || $config['cookie_domain'] == 'localhost' || $config['cookie_domain'] == '127.0.0.1') ? '' : '; domain=' . $config['cookie_domain']) . ((!$config['cookie_secure']) ? '' : '; secure')),
));
3767# if ( !function_exists('group_memberships') )
{
include($phpbb_root_path . 'includes/functions_user.'.$phpEx);
}
$groups = group_memberships(false,$user->data['user_id']);
foreach ($groups as $grouprec)
{
$template->assign_vars(array(
'S_GROUP_' . $grouprec['group_id'] => true
));
}
// application/xhtml+xml not used because of IE
header('Content-type: text/html; charset=UTF-8');
header('Cache-Control: private, no-cache="set-cookie"');
header('Expires: 0');
header('Pragma: no-cache');
return;
}
Code: Select all
// The following assigns all _common_ variables that may be used at any point in a template.
Code: Select all
$good_souls_member = group_memberships(69,$user->data['user_id']);