Announcement

Collapse
No announcement yet.

[quick 2.0b2 hack] Specify global default style-set

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [quick 2.0b2 hack] Specify global default style-set

    Here's what the hack does: You can specify the stylesetid you wanna use globally when no other styleset is used by the visitor. The way it worked now was that it reverted back to the 'Default'-styleset.

    It was a very quick hack, but seemed to be working very well. The option will be in the 'options-area', right below the Add template name in comments option.

    Instructions:

    First backup you're global.php (in the root dir, not the admin dir)

    Now open up global.php (in the root dir) and look for the line:

    PHP Code:
      // Will look in the user info for a style
      
    if ($bbuserinfo['styleid']!=0) { //style specified
        
    $styleid=$bbuserinfo['styleid'];
      } else { 
    //no style
        
    $styleid=1;
      } 
    replace it with:

    PHP Code:
      // Will look in the user info for a style
      
    if ($bbuserinfo['styleid']!=0) { //style specified
        
    $styleid=$bbuserinfo['styleid'];
      } else { 
    //no style
        
    $styleid=$defaulttplset;
      } 
    Save global.php

    The insert a new line in the 'setting' table through phpMyAdmin, with the values:

    settinggroupid: 23
    title: Default template-set
    varname: defaulttplset
    value: 1
    description: Specify the templatesetid of the template-set you wanna use globally if no other set is used
    optioncode:
    displayorder: 2

    or execute the following query:

    Insert into setting (settinggroupid, title, varname, value, description, optioncode, displayorder) values('23', 'Default template-set', 'defaulttplset', '1', 'Specify the templatesetid of the template-set you wanna use globally if no other set is used', '', '2')

    All done! Enjoy

  • #2
    wow, you don't leave a moment to spare already with a hack for beta 2
    :: Always Back Up Forum Database + Attachments BEFORE upgrading !
    :: Nginx SPDY SSL - World Flags Demo [video results]
    :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

    Comment


    • #3
      this is "exactly" what i want. Just checking there are no changes for vb2.0 - i doubt there are considering the change but does it still work fine?
      Christopher Padfield
      Web Based Helpdesk
      DeskPRO v3.0.3 Released - Download Demo Now!

      Comment


      • #4
        still works fine..I'm using it

        Guess this thread can be moved to the 2.0 releases forum

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...
        X