Uutiset:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu
Advertisement:

Group Permissions in index.template.php

Aloittaja russ, helmikuu 05, 2005, 06:23:14 AP

« edellinen - seuraava »

russ

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!

Jerry

What errors do you get? you might also want to try and put the full path to ads.php :)


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

russ

 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

Kirby

have you globalled $user_info? why not just use $context['user']?

russ

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?

Kirby

#5
yeah, you can do that
$context['user'] would be better in themes though, IMHO

Advertisement: