PDA

View Full Version : Reading templates from file during plugin development


aviv_el
05-12-2010, 02:08 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.

I've also posted this on vb4 programming help forum, but so far, no response, so reposting here :)

Thanks!

Ryan Ashbrook
05-13-2010, 04:35 AM
Without modifying the way the template engine fetches, caches, and parses templates, I'd say no.

You could just copy and paste between your IDE and the Admin CP (that's what I do, anyway).

aviv_el
05-13-2010, 06:37 AM
Without modifying the way the template engine fetches, caches, and parses templates, I'd say no.

You could just copy and paste between your IDE and the Admin CP (that's what I do, anyway).

Thing is, it's becoming a nightmare to copy-paste from IDE to admincp.
I mean, it's fine with up to 5 templates or so.
But I have about a dozen templates, which I frequently change. It's very hard to work that way.
I'm prefectly fine to mess with the template engine, on my development environment.
Can you point me to the functions I should play with?

vbenhancer
05-13-2010, 12:50 PM
you do not have to write everything down from the IDE to the admincp... simply write down everything in the product file and import back your product each time for testing... it's just 2 clicks away, and all coders here are forced to do it, due to the problem based on the template engine.. :)

aviv_el
05-16-2010, 08:20 AM
you do not have to write everything down from the IDE to the admincp... simply write down everything in the product file and import back your product each time for testing... it's just 2 clicks away, and all coders here are forced to do it, due to the problem based on the template engine.. :)

I am doing it with plugins code, but how do I do that with templates ?