Log in

View Full Version : Modifying functions.php


Chris M
05-12-2005, 10:18 PM
I'm trying to modify functions.php in an answer to a modification request by a user that I myself would want to use...

I've edited functions.php but instead of showing all styles to the allowed groups and the public ones to registered users, it shows none to either :confused:

I'm guessing I've made a very stupid mistake (its a long time since i've coded a hack so be patient:p)

if (($style['userselect']) AND (in_array($bbuserinfo['usergroupid'], array(5, 6, 7, 8))) AND ($style['ispremium']))

Basically the existing code just checks if it can be selected (userselect) but I'm trying to make it check if they have permission, and if its a premium style...

Any help would be appreciated - I can PM you the full functions.php modification if you like but will not post it as it is a fair bit of code ;)

Satan

Paul M
05-12-2005, 10:39 PM
That should work if 'userselect' is true, 'ispremium' is true, and the usergroupid is one of 5, 6, 7 or 8.

stick an echo above the test to output them and see what they actually are.

Chris M
05-13-2005, 09:11 AM
Thats an idea - I'll do that :p

Satan