Hello,
I am modifying /Themes/default/Display.template.php because I want to add a link there, only for admins and mods.
So I am using this code :if($context['allow_admin'] || in_array(2, $user_info['groups']))
This makes the link viewable by the admins, but not by the mods (group 2).
This code works on another part of the website (with SSI.php).
I don't really know what's wrong.
Thanks,
Mike
Do you get any errors?
No, not any.
I tried to look for the $user_info array :
echo '<pre>';
print_r($user_info);
echo '</pre>';
But it gives no output, so the array would not exist when displaying a topic ?
No, that means it's not in scope. Add $user_info to the list of global variables at the start of the function.
Excellent that did it ! Thank you for your speed and accuracy :)