PDA

View Full Version : Hooks postbit_start and postbit_end


aileron79
01-24-2011, 05:12 AM
Hi!

In the postbit and postbit_legacy templates the hooks postbit_start and postbit_end are mentioned. But when creating a new plugin, I cannot select these hooks from the dropdown.

Why?

Do I have to add them manually to the hooks_vbulletin.xml file?

Other question: Which hook do I have to use and which value in which array do I need to change to prevent a particular post from being displayed? I tried postbit_display_start and postbit_display_end but at that stage the array has already been read, I can change the content of a posting but not if it is displayed or not.

Any suggestions? Thanks in advance!

Yellow Slider
01-24-2011, 10:14 AM
Template hooks - hooks that are inside templates.
Plugin hooks - hooks that are inside core php files.
In order to add something to the postbit_end template hook, you would want to create a new plugin using postbit_display_complete hook location, and add your own content to $template_hook['postbit_end'].

As for your second question, you could add an if statement to the postbit template, something like this:

<vb:if condition="$postinfo['postid'] == X">
POSTBIT CODE
</vb:if>