PDA

View Full Version : Postbit_legacy display problem


alternity
05-26-2008, 07:37 PM
This isn't a design question, but I recently upgraded to 3.7.0 and my postbit_legacy template has disappeared. When I try to modify the template it reloads and shows up blank.

Even if i open the column in phpmysql and replace it then reload it is unsuccessful with the change. Is there something I need to modify in this postbit to get it to run in 3.7?

postbit_legacy posted on pastebin as it's too long->
http://paste2.org/p/31938

Lynne
05-26-2008, 07:49 PM
It is very, very long. Have you tried saving just half of it and seeing if that works? Maybe the thing to do is replace some of that stuff with a custom template hook (or use one already available) and put a bunch of the stuff in it's own template and call it from a plugin.

alternity
05-26-2008, 07:59 PM
I think you're right. Could you just briefly tell me how to do that, or point me to somewhere that can show me?

Lynne
05-26-2008, 09:40 PM
Look in the template for something that looks like "$template_hook[somename]". If it is located where you want to add some text, great. If not, you can input something into the template in that format "$template_hook[yourname]". Then, create a template, your_template, and put in the contents you want to enter there. Then, create a plugin that uses a hook on that page and in that plugin just put
eval('$template_hook[yourname] .= "' . fetch_template('your_template') . '";');(Replace "yourname" with "somename" if you are using an existing template hook.) This will insert the contents of your template, your_template, at the place you put the template_hook, yourname.


(I could have sworn I saw a good article on this, but right now all I'm finding is this: Template Hook (https://vborg.vbsupport.ru/showthread.php?t=147447&highlight=hook) )