Posts: 4,846
Threads: 180
Joined: May 2007
Reputation:
254
2014-09-03, 11:30 PM
(This post was last modified: 2014-09-03, 11:41 PM by pavemen.)
Use the pre_output_page or post_output_page hooks output_page function in functions.php
you cant update a template already parsed but you can use a string replace on the already parsed template before it is output to the browser.
Like insert "<myplaceholder>" in the template you want to update, then your plugin will create a string variable that you then replace <myplaceholder> with in the HTML available in that hook
Lost interest, sold my sites, will browse here once in a while. It's been fun.
Posts: 4,846
Threads: 180
Joined: May 2007
Reputation:
254
(2014-09-03, 11:51 PM)Destroy666 Wrote: You can also use the new global_intermediate hook (if the code is for 1.8 only): https://github.com/mybb/mybb/blob/featur...l.php#L436 Everything you may need is defined before it - $templates, $theme, etc. And every template is eval'd after it.
That will save a ton of effort for several plugins! Nice addition.
Lost interest, sold my sites, will browse here once in a while. It's been fun.