Results 1 to 4 of 4

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

  1. #1
    Senior Member Mas*Mind has disabled reputation
    Join Date
    Jun 2000
    Location
    Amsterdam, The Netherlands
    Age
    30
    Posts
    1,450
    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. #2
    vBulletin Team eva2000 is on a distinguished road eva2000's Avatar
    Join Date
    May 2000
    Location
    Brisbane, Australia
    Posts
    29,252
    wow, you don't leave a moment to spare already with a hack for beta 2
    _
    * Required server info for server performance issues here
    * Choosing right cpus for high concurrency vB servers

    => Xeon Nehalem-EP 55xx > Xeon 54xx harpertown > Xeon 53xx > Opteron
    => vB4 FAQ | vB 4 Features | vB4 Syle Info | Internet brand Message
    => IBxAnders vB4.0 Search & InnoDB | InnoDB conversion | Large forums drive configs!
     

  3. #3
    Senior Member chrispadfield is on a distinguished road chrispadfield's Avatar
    Join Date
    Aug 2000
    Location
    London, UK
    Age
    28
    Posts
    5,368
    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?
     

  4. #4
    Senior Member Mas*Mind has disabled reputation
    Join Date
    Jun 2000
    Location
    Amsterdam, The Netherlands
    Age
    30
    Posts
    1,450
    still works fine..I'm using it

    Guess this thread can be moved to the 2.0 releases forum
     

Similar Threads

  1. Ability to set the default Style Set from the Style Manager
    By leadZERO in forum vBulletin 3.0 How Do I and Troubleshooting Forum
    Replies: 0
    Last Post: Wed 18th Jun '03, 7:55pm
  2. Set A Style As Default?
    By CeleronXT in forum vBulletin 2 'How Do I' and Troubleshooting
    Replies: 1
    Last Post: Tue 10th Dec '02, 7:58pm
  3. Set a different style as default?
    By TutorialForums in forum vBulletin 2 'How Do I' and Troubleshooting
    Replies: 5
    Last Post: Thu 3rd Oct '02, 2:02pm
  4. possible to create a quick duplicate of a style set?
    By Bobbi in forum vBulletin Templates, Graphics & Styles
    Replies: 2
    Last Post: Tue 25th Sep '01, 8:47pm
  5. Specify Default Style Set?
    By Steve Machol in forum vBulletin 2 'How Do I' and Troubleshooting
    Replies: 11
    Last Post: Tue 15th May '01, 10:31pm

Bookmarks

Posting Permissions

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