Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Change Admin CP Style Without Logging Out Details »»
Change Admin CP Style Without Logging Out
Version: 1.00, by Slynderdale Slynderdale is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 07-23-2004 Last Update: Never Installs: 3
 
No support by the author.

I made a small hack that adds a small nav menu of all the admin cp styles that you can click on to quickly and esily update your admin cp style without having to log out and then select a new style and then re-log in. Its a simple and small hack, but a nice one if you have alot of admin cp styles.

You can always make your own styles or find a bunch at vBulletinTemples.com
http://www.vbulletintemplates.com/mo...&type=admincss

In your admincp folder, open index.php and find:
PHP Code:
 // #############################################################################
 // ################################## REDIRECTOR ###############################
 // #############################################################################
 
 
if (!empty($redirect))
 { 
Above that add:
PHP Code:
 // #############################################################################
 // ############################### Update CP Style #############################
 // #############################################################################
 
if ($_REQUEST['do'] == 'cpstyle')
 {
   unset(
$stylefolder);
   
$getcssoptions fetch_cpcss_options();
     foreach (
$getcssoptions AS $folder => $foldername)
     {
     if(
$_REQUEST['style'] == $folder) {
       
$stylefolder $folder;
       break;
     }
     }
     if (
$stylefolder
     {
       
$DB_site->query("
           UPDATE " 
TABLE_PREFIX "administrator
           SET  cssprefs = '" 
addslashes($stylefolder) . "'
           WHERE userid = 
$bbuserinfo[userid]
       "
);
   }
   
$redirect "./index.php";
 } 
In the same file find:
PHP Code:
 // ################################ NAVIGATION FRAME #############################
 
 if ($_REQUEST['do'] == 'nav')
 {
     require_once('./includes/adminfunctions_navpanel.php');
     print_cp_header();
 
     echo "\n<div>";
     ?><img src="../cpstyles/<?php echo $vboptions['cpstylefolder']; ?>/cp_logo.gif" title="<?php echo $vbphrase['admin_control_panel']; ?>" alt="" border="0" hspace="4" <?php $df print_form_middle("L3475c86"); ?> vspace="4" /><?php
     
echo "</div>\n\n" iif(is_demo_mode(), "<div align=\"center\"><b>DEMO MODE</b></div>\n\n") . "<div style=\"width:168px; padding: 4px\">\n";
 
     
// cache nav prefs
     
can_administer();
 
     
construct_nav_spacer();
and under it add:
PHP Code:
     $printhr true;
     
$getcssoptions fetch_cpcss_options();
     foreach (
$getcssoptions AS $folder => $foldername)
     {
       if (
$foldername AND $folder) {
           
construct_nav_option($foldername,"index.php?$session[sessionurl]do=cpstyle&amp;style=$folder");
         }
     }
     
construct_nav_group($vbphrase['change_admin_cp_style'], '<hr />');
     if (
$printhr == true)
     {
      
construct_nav_spacer();
     } 
then add a new phrase to Control Panel Global called:
change_admin_cp_style
with:
Change Admin CP Style

Thats all, I'll include a screenshot below as an example of how it would look.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 07-24-2004, 10:33 PM
Merjawy's Avatar
Merjawy Merjawy is offline
 
Join Date: Sep 2002
Location: USA
Posts: 505
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very nice.. thnx.. I hated it when I had to log out just to do that
Reply With Quote
  #3  
Old 08-06-2004, 08:42 AM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Moved
Reply With Quote
  #4  
Old 09-10-2004, 09:50 AM
Megareus Rex's Avatar
Megareus Rex Megareus Rex is offline
 
Join Date: Feb 2004
Location: Pennsylvania, USA
Posts: 243
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice hack. My co-admins didnt even know there were multiple admin CP styles till i installed this :P
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:12 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03938 seconds
  • Memory Usage 2,244KB
  • Queries Executed 17 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (3)postbit
  • (4)postbit_onlinestatus
  • (4)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete