how can i create a php script that adds templates?
as i've seen in some hacks, there's a script that adds templates in the installation process. How can i create a script like that?
Velocd
06-17-2004, 05:34 PM
Via an SQL query.
Assuming you are requiring global.php on the page.
$DB_site->query("
INSERT INTO template
(
styleid, title, template, template_un, templatetype,
dateline, username, version
)
VALUES
(
{your_style_id}, 'some_name', '".addslashes($your_template)."',
'$your_template', 'template', ".time().",
'".addslashes($bbuserinfo['username'])."', '{vBulletin version}'
)
");
It's not recommended to add templates this way. Also, I think you'll need to rebuild the style (with the $debug=1) via AdminCP.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.