vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Plugin Authors Should Read: Latest Dev Blog (v4 Templates) (https://vborg.vbsupport.ru/showthread.php?t=212623)

Ryan Ashbrook 05-01-2009 04:39 PM

Plugin Authors Should Read: Latest Dev Blog (v4 Templates)
 
http://www.vbulletin.com/forum/blog.php?b=2362

I figure this is pertinent enough for the focus of this board to generate some discussion.

I, for one, am looking forward to this. Especially the <vb:each> loops.

If I understood it correctly, this will allow use to reduce the amount of templates we have to create just by placing the bits inside the <vb:each> loops (like threadbits, forumbits, etc.). I've asked for clarification but Scott hasn't gotten back to me yet.

Still, this is great news. :)

Btw, mods, I didn't know if this belonged here or in the Community Lounge, feel free to move if needed.

Paul M 05-01-2009 04:59 PM

Interesting. :)

Also means almost all 3.x products will not work on 4.0

Lynne 05-01-2009 05:04 PM

Quote:

Originally Posted by Paul M (Post 1802604)
Interesting. :)

Also means almost all 3.x products will not work on 4.0

True, but it looks straight forward enough that changing the templates and plugins shouldn't be *too* difficult.

I like it.

Ryan Ashbrook 05-01-2009 05:31 PM

I wonder, though.

If they are not using eval ( ), what will they be using? print ( )? include ( )?

There's a million ways to do a template system, I'm curious on how the $templater object works behind the scenes.

Lynne 05-01-2009 06:05 PM

It looks like you use render() instead. It looks like you define it, then define the variables to include, then you render it.

Wayne Luke 05-01-2009 07:06 PM

I think he wants to know how the render method causes the text substitution to build a page and output it to the browser.

I think it would be interesting to see. I am going to guess it will be a combination of preg_replace and output buffering techniques. I haven't seen the code yet though.

Reeve of shinra 05-01-2009 07:09 PM

I hope some of the more experienced coders will update some of the tutorials that have been used around here and maybe write one for updating old plugins so they can be compatible with vb4. :)

Dean C 05-03-2009 07:29 AM

If you look at the example, the output from render is caught to a variable. Meaning you'll just echo $template->render().


All times are GMT. The time now is 02:33 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.02149 seconds
  • Memory Usage 1,719KB
  • 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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