PDA

View Full Version : [quick 2.0b2 hack] Specify global default style-set


Mas*Mind
Fri 23rd Feb '01, 12:16pm
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:


// 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:


// 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 :)

eva2000
Fri 23rd Feb '01, 12:19pm
wow, you don't leave a moment to spare already with a hack for beta 2 :)

chrispadfield
Mon 28th May '01, 5:09pm
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?

Mas*Mind
Mon 28th May '01, 5:12pm
still works fine..I'm using it :)

Guess this thread can be moved to the 2.0 releases forum