Back to vBulletin 3.5 Add-ons

[ACP] Style available only for you
Mod Version: 1.00, by deathemperor

This modification is in the archives.
vB Version: 3.5.0 Rating: (0 vote - 0 average) Installs: 2
Released: 20 Oct 2005 Last Update: Never Downloads: 0
Not Supported  

The purpose:

I have a site with a style customized but me, but my admins keep editing it of course that's ok as long as he didn't pull out any error for me to fix. And life is not that simple, I have to fix the errors times by times. I quitted, and today I force myself to change that. Find a way to make the style only available for me to edit/upload/download, etc.

This hack modify one file: adminfunctions_template.php, and the function cache_styles() so that it won't select the style you specify in the query.

in adminfunctions_template.php FIND:

PHP Code:
    $styles $vbulletin->db->query_read("SELECT * FROM " TABLE_PREFIX "style ORDER BY displayorder"); 
replace it with:

PHP Code:
        if($vbulletin->userinfo['userid'] == 1)
        {
            
$styles $vbulletin->db->query_read("SELECT * FROM " TABLE_PREFIX "style ORDER BY displayorder");
        }
        else
        {
            
$styles $vbulletin->db->query_read("SELECT * FROM " TABLE_PREFIX "style WHERE styleid != 11 ORDER BY displayorder");
        } 
the style with id 11 won't be available to edit/download/upload/export/import for everyone except the user with userid = 1.

and that's it. anyone see this useful ? ^^ maybe not but well it helps me now, I can have peace nights.

Download

No files for download.


vblts.ru supports vBulletin®, 2022-2025