PDA

View Full Version : Hooks and templates problem


cereal2nd
07-28-2010, 12:00 PM
hey,

i'm trying to write a custom product for my site, but for this to work i need to add a container like the announcement container to every single page ....

Now i created the admincp parts and i registered a hook (parse_templates) where i run the php code. But now i'm lost, where do i go from here? How do i get the ouput that i generated inside the hook on the screen? What do i have to do to get the output displayed inside the templates?

Retal
07-29-2010, 11:16 AM
Either via a $template_hook if possible or add a <vb:raw variable> to the template and preregister the variable in the hook.

cereal2nd
07-29-2010, 11:31 AM
Either via a $template_hook if possible or add a <vb:raw variable> to the template and preregister the variable in the hook.

any examples?

because i have no clue on how to start on it

Retal
07-29-2010, 11:46 AM
Take a look here

First Look at vBulletin 4 Template Variables (https://vborg.vbsupport.ru/showthread.php?t=217569)
Rendering templates and registering variables - a short guide (https://vborg.vbsupport.ru/showthread.php?t=228078)

What you want (space where notices are shown) is at the end of the template navbar.