Log in

View Full Version : Only admins can see style set!


N9ne
10-24-2002, 07:32 PM
I want a hack that will give me the option next to the style sets in adminCP whether all members can see it or if only admins can. This option will be able to be changed of course though.

Ie. a scenario:

I want to create a new style but I do not want my members to see it until I'm finished with it. I want to make it on the forums and make it so only the admins can see it. Once i've finished with it, I set it so everyone can see it...:)

So is this possible?

Logician
10-24-2002, 07:44 PM
edit member.php find:

eval ("\$stylesetlist .= \"".gettemplate("modifyoptions_styleset")."\";");
eval ("\$stylecell = \"".gettemplate("modifyoptions_stylecell")."\";");

Replace it as:


if ($thisid==X AND $bbuserinfo[usergroupid]!=6)
{
$stylesetlist .= '';$stylecell .= '';
}
else
{
eval ("\$stylesetlist .= \"".gettemplate("modifyoptions_styleset")."\";");
eval ("\$stylecell = \"".gettemplate("modifyoptions_stylecell")."\";");
}

Replace X with your style id. You should apply the same hack to register.php and dont forget to revert back when you finished working on the style..

The other way would be to overwrite user's style choice in global.php if he is not an admin. So he can choose it, but it wouldnt avail..

N9ne
10-24-2002, 07:46 PM
How can it be done for multiple styleids?

Logician
10-24-2002, 08:12 PM
if (($thisid==X OR $thisid==Y OR $thisid==Z) AND $bbuserinfo[usergroupid]!=6)

N9ne
10-24-2002, 08:14 PM
Thanks! This will help me a lot :)

You should release this hack, as little as it may seem, I have been looking for this kind of thing for months..I'm sure others can benefit from it, and what's the hurt in releasing anyway? It will only make life easier for others, just like it did for me, and they will just have to search the full releases forum or the database :)