vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Reading templates from file during plugin development (https://vborg.vbsupport.ru/showthread.php?t=242365)

aviv_el 05-12-2010 02:08 PM

Reading templates from file during plugin development
 
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

Quote:

Originally Posted by Ryan Ashbrook (Post 2036122)
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

Quote:

Originally Posted by vbenhancer (Post 2036332)
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 ?


All times are GMT. The time now is 12:45 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01133 seconds
  • Memory Usage 1,716KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete