Log in

View Full Version : Template questions...


FleaBag
06-20-2002, 04:47 PM
My templates are a little worse for wear following about a years worth of constant editing and potching. I intend to delete them all, and start from the global template once more. Firstly, how do I revert the global template to it's default state - eg no extra or modified templates. Secondly how do I change vBulletin so any new templates use the default template set rather than the global one? Thanks in advance! :D

FleaBag
06-20-2002, 04:51 PM
OK scratch the second question, I just found this (https://vborg.vbsupport.ru/showthread.php?s=&threadid=33247). If anyone could help with the first question though, I'd appreciate it! :)

Admin
06-20-2002, 04:54 PM
You want to delete all customized templates from all styles?

DELETE FROM template WHERE templatesetid NOT IN (-1, -2);
Back your styles up before doing this.

FleaBag
06-20-2002, 04:57 PM
Basically, I want the global template to be exactly as it is in a new installation of vBulletin. Will that query do it for me?

Admin
06-20-2002, 05:05 PM
Yes, but it will also remove all custom templates you have added.

FleaBag
06-20-2002, 05:09 PM
Thanks for the help yet again FireFly! :)

FleaBag
06-20-2002, 06:55 PM
It hasn't worked FireFly. My template system is completely screwed up - I don't have ANY templates, styles or replacement sets. Because I don't have a default template to edit, my site is just using the global template set. How do I get my default style set back, i.e. the one that can't be deleted?

Admin
06-20-2002, 06:59 PM
Running that query shouldn't have deleted your style, but delete all customized templates.

Anyway, if you want to start fresh (including replacement sets), make sure vbulletin.style is in the /admin folder, and create a new style.

FleaBag
06-20-2002, 07:01 PM
I'm not sure what's going on, it wasn't your query that messed it up, it was messed up before. I don't have ANY styles, templates or replacement sets.

FleaBag
06-20-2002, 07:13 PM
Why do I have a feeling I've done something I'm going to regret? :( I've tried searching through the tables manually in phpMyAdmin, I didn't see anything that would help at all. :(

FleaBag
06-20-2002, 07:46 PM
/me cries for help in desperation.

FleaBag
06-20-2002, 09:26 PM
Phew, disaster averted! :D I dropped the style, template, templateid, replacement and replacementid tables from my database, then did a dump of the same tables from a fresh install on vB. I then applied this dump to my database, and it seems to have fixed all my problems.

* GamerForums wipes the sweat from his brow.

Velocd
06-20-2002, 09:35 PM
Nice avatar ;)

FleaBag
06-20-2002, 09:47 PM
Thanks LOL. Can't remember where I got it from. Anyway, I can't view showthread.php now, I get database errors. It seems for some reason rather than stating the path as root/forums it's stating it as root/forums/forums... Here's the error. Anyone able to help please? :(


Database error in vBulletin 2.2.6:

Invalid SQL:
SELECT username,invisible,userid
FROM user
WHERE inthread=762
AND lastactivity>1024611544
AND lastvisit<>lastactivity

mysql error: Unknown column 'inthread' in 'where clause'

mysql error number: 1054

Date: Thursday 20th of June 2002 11:34:04 PM
Script: http://www.gamerforums.com/forums/forums/showthread.php?s=&postid=38136#post38136
Referer: http://www.gamerforums.com/forums/


...and under that...


Database error in vBulletin 2.2.6:

Invalid SQL: UPDATE user SET lastactivity=1024612444,inforum='24',inthread='762 ' WHERE userid='166'
mysql error: Unknown column 'inthread' in 'field list'

mysql error number: 1054

Date: Thursday 20th of June 2002 11:34:04 PM
Script: http://www.gamerforums.com/forums/forums/showthread.php?s=&postid=38136#post38136
Referer: http://www.gamerforums.com/forums/

FleaBag
06-20-2002, 10:14 PM
Nevermind, looks like it was a hack causing the trouble. A LOT of problems to sort out here. :(

Admin
06-21-2002, 07:58 AM
It's the "Users browsing this thread" hack, for some reason you dropped the inthread field from the user table.

FleaBag
06-21-2002, 10:15 AM
Ah I see, thanks FireFly. :D Should have everything back up by the end of tonight, hopefully with at least 50 hacks and a new design. :)