vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Only admins can see style set! (https://vborg.vbsupport.ru/showthread.php?t=44955)

N9ne 10-24-2002 06:32 PM

Only admins can see style set!
 
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 06:44 PM

edit member.php find:

PHP Code:

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

Replace it as:

PHP Code:

if ($thisid==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 06:46 PM

How can it be done for multiple styleids?

Logician 10-24-2002 07:12 PM

if (($thisid==X OR $thisid==Y OR $thisid==Z) AND $bbuserinfo[usergroupid]!=6)

N9ne 10-24-2002 07: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 :)


All times are GMT. The time now is 04:43 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01672 seconds
  • Memory Usage 1,719KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete