PDA

View Full Version : Show things in template depending on usergroup - conditionals needed!


Sho
08-17-2002, 02:33 AM
Now, not being very familiar with the English language, I have a very hard time explaining what I need. I will try my best. I want to apologize for any inconvenience my flawed skills might cause.

The goal is to show a different button bar to admins than to regular users. Now there is a "Set Style based on usergroup" hack, but that doesn't get the job done. I have different styles for different forums and use "Override users custom styles", so one style per usergroup is insufficient.

As I far as I understand it, vB3 will allow me to write if/then/else conditionals in templates. If user is of usergroup X, show Y, else show Z. That is *exactly* what I need - but for vB2, since vB3 not here yet and I won't update on the day it's released.

Anyone willing to take on the challenge? ;)

Sho
08-17-2002, 04:08 AM
On second thought, maybe I can pull it off using the "PHP parsed code" box in the style properties and something like that:

if ($bbuserinfo['usergroupid'] == 6) {
$thingsforadmins =

*thinks*

*goes away to try it out*

g-force2k2
08-17-2002, 04:13 AM
Sho try using the phpinclude template... it allows for php in that template only ;) see what you can do :)

g-force2k2

Sho
08-17-2002, 04:16 AM
Yeah, just got it working :rambo:. Stupid me :rolleyes:.