View Full Version : Plugin hook locations
cfish
06-20-2010, 03:50 PM
I would like to add a plugin using a hook location in the postbit_legacy template.
The code has been tested in place as a hack and works well.
BUT, when I go to Add New Plugin in AdminCP, the hook I want is not listed in the Hook Location drop-down. Am I missing something? :confused:
ChopSuey
06-20-2010, 03:56 PM
What have you named it? It should show.
cfish
06-20-2010, 05:35 PM
What have you named it? It should show.
I haven't got to the point of naming it yet. I want it located at postbit_userinfo_right_after_posts but the only postbit hook locations listed in the drop-down are those shown in this screen grab:
118645
In fact, I don't recognise those as being hook locations at all.
Sorry, this is my first attempt at a plugin and I seem to have stumbled at the first hurdle.
James Birkett
06-20-2010, 05:45 PM
postbit_userinfo_right_after_posts is a template hook I think?
$template_hook[postbit_userinfo_right_after_posts]
That's not a plugin hook, it's a template hook.
Boofo
06-20-2010, 06:04 PM
I haven't got to the point of naming it yet. I want it located at postbit_userinfo_right_after_posts but the only postbit hook locations listed in the drop-down are those shown in this screen grab:
118645
In fact, I don't recognise those as being hook locations at all.
Sorry, this is my first attempt at a plugin and I seem to have stumbled at the first hurdle.
That listing is for plugin hooks which are located in the vb files. Template hooks are located in the templates. Two totally different entities. James Birkett above gave you what you need for what you are trying to do.
cfish
06-20-2010, 06:38 PM
Ah, sorry, I've obviously misunderstood the process.
What I'm trying to do is to add some additional code at a template hook location. Could someone point me in the right direction or suggest an appropriate tutorial?
ChopSuey
06-24-2010, 01:04 PM
use the display_complete?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.