I think i put this post in the wrong forum but here it is in a different one in case someone who knows the answer hasnt looked in the other forum :)
Sorry for repeating myself...
Ive re-dun most of my index.template.php file to allow the design to fit in nicely with the rest of my site but theres one thing i havent managed to do so far... there are various ads around the place in index.template.php and i would like to "hide" these ads if say a members changes group - ive tried:
Code:
if (in_array(55, $user_info['groups']))
{
}
else
{
include("ads.php");
}
but i got errors. is this not the correct way of doing it? is there a better way :)suggestions appreciated!
What errors do you get? you might also want to try and put the full path to ads.php :)
2: in_array(): Wrong datatype for second argument
File: /homepages/htdocs/smf/Themes/default/shout.template.php (eval?)
Line: 676
Back
Notice: Array to string conversion in /homepages/htdocs/smf/Sources/Subs.php on line 1801
have you globalled $user_info? why not just use $context['user']?
does that work for groups tho? if u use $context['user']?
could u jus global $user_info at the top of index.template.php and it might work?
yeah, you can do that
$context['user'] would be better in themes though, IMHO