View Full Version : File template compiler
sllik
11-19-2005, 07:17 PM
Maybe there is already a mod like this, but I wasn't able to find it. I would really love a hack that would make template development easyer. What I would like is a hack that will read the html files from a spesific directory and then insert the html files into vbulletin as templates (where the template name is the file name). That way I can use whatever editor I like to make my templates. If the template already exists with the same name, then it will update it.
Andreas
11-19-2005, 08:07 PM
Warning! Only for usage on secured developement boards!
1. Create a directory templates below vBulletin root
2. Create your templates in style manager, use
<<< FILE >>>
as content
3. Create files templatename.html in directory templates
4. In includes/functions.php FIND and UNCOMMENT
if ($template == '<<< FILE >>>')
{
$template = addslashes(implode('', file("./templates/$templatename.html")));
$vbulletin->templatecache["$templatename"] = $template;
}
Done.
Tradjick
11-19-2005, 08:16 PM
It would be good if there were an install button in this thread for refinding it later. But anyways, i?ll just bookmark it.
Thanks, Andreas :)
sllik
11-19-2005, 09:54 PM
Is there anyway to get the template in files to go into the database? Would the site run slower if the templates are in files?
Andreas
11-19-2005, 10:12 PM
Way slower.
sllik
11-19-2005, 10:38 PM
So basicaly I'm requesting a mod that would insert the file templates into the database (and compile them)
sllik
11-25-2005, 09:30 PM
has anyone done this before?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.