PDA

View Full Version : Reading templates from file during plugin development


aviv_el
05-09-2010, 12:16 PM
Hi guys,

I'm developing a rather large product for vbulletin, which has dozens of templates.
One of the major hassles I'm hitting is the requirement for the template to live inside the database, rather than in file - so whenever I change a template I have to do it using admincp->style->templates.

Is it possible that during development the templates will be run directly from a file? ie, have the rendering engine fetch templates direclty from the file? That would significantly ease on development of the new product.

It's fairly easy to do with plugins (all of my plugins are simple require_once codes), but I dont know how to do it with templates.

Thanks!
Aviv.

Paul M
05-09-2010, 02:31 PM
Its not possible unless you wrote some code to do it - you would have to re-compile the template from the file version each time you called the render.

aviv_el
05-09-2010, 06:21 PM
Hmm, ok. I can try to do that. Much easier than copy-n-pasting template into admincp every tiny change.
Can you guide me to the template compilation functions? where should I look?

aviv_el
05-11-2010, 09:45 AM
I'm thinking of maybe set the datastore to filecache would be of help?

Still, I'll have to force rendering (or inserting into cache) of the template files for each request... would be great if someone can confirm or point me to the right place?

thanks!

aviv_el
05-12-2010, 01:23 PM
Bumping :)

Anyone?