PDA

View Full Version : Globalize all templates? ** important


Koutaru
04-27-2003, 05:09 PM
I'm sure many people would want this
Sometimes I try to put customized templates from hacks under a certain section. (like customized error pages) I do this query:

$DB_site->query("UPDATE template SET templatesetid='-1' WHERE title like 'error%'");

But then I realize that I get doubles in my admin panel:

error_activatedthanks [change original]
error_activatedthanks [change original]
error_activate_moderation [change original]
error_activate_moderation [change original]
error_activate_wrongusergroup [change original]
error_activate_wrongusergroup [change original]

from the original templates I had edited.

Can someone create a php file that will globalize all templates (put them under the appropriate section) as well as create sections (Ex: such as "Bank" and have all bank templates under that section) And will not have doubling in thet admin cpanel from previously edited original templates?

This would be greatly appreciated :)
Thanks!!

Xenon
04-27-2003, 06:58 PM
creating new sections you just have to edit template.php

and for creating global templates, just enable debug mode on your board and edit the global set :)

Koutaru
04-27-2003, 07:12 PM
:) Thanks Xenon, I'll try your suggestion

BTW, is there any way to get rid of the double:

error_activatedthanks [change original]
error_activatedthanks [change original]
error_activate_moderation [change original]
error_activate_moderation [change original]
error_activate_wrongusergroup [change original]
error_activate_wrongusergroup [change original]

or should i just go into phpmyadmin and delete?

They're the exact same template

irn-bru
04-28-2003, 04:53 PM
I would recommend this hack by TWTCommish

https://vborg.vbsupport.ru/showthread.php?s=&threadid=35681

Xenon
04-29-2003, 04:37 PM
if you enable debug mode you can even remove global templates, so just click at remove on the double templates :)