View Full Version : hook location not in plugin manager
ageurtse
01-10-2010, 02:31 PM
i have found a hook location in template memberaction_dropdown called {vb:raw template_hook.memberaction_dropdown_items}
but i can't find it back in the plugin manager, where is it or how can i add this hook location in the plugin manager.
Lynne
01-10-2010, 02:52 PM
template_hooks are different than regular hooks. template_hooks are for inserting html into them from a plugin, like:
$template_hook['memberaction_dropdown_items'] .= 'Some html here.';
BBR-APBT
01-10-2010, 02:53 PM
That is a template hook. It is not meant to be in the plugin manager.
The hooks in the plugin manager are for adding code to the core vbulletin files with out actually editing the files.
ageurtse
01-10-2010, 04:46 PM
Oke and where do i put this extra html data. I thought i do it by plugin but which one does it.
Can i use somthing lik forum start or something like that. In there i file THE template hook witheet html
Lynne
01-10-2010, 05:08 PM
You need to pick a plugin that is eval prior to the template being evaled. You can try forumhome_start and see if it works for you. It really depends on what page you are doing this on.
ageurtse
01-10-2010, 06:09 PM
i wish to add a extra icon to the members popup thing.
where you could go to the members page and pm and that kind of stuff.
i try some plugin hook locations.
Lynne
01-10-2010, 06:12 PM
The members popup things on *what* page? They show up on several pages. You need to access a hook that is used when that particular popup is being rendered. For instance, if you were adding it to the posts on the showthread page, you would use the postbit_display_complete hook since that hook is accessed when the individual posts are being rendered. You need to do similar for wherever else you are wanting to add this.
ageurtse
01-10-2010, 06:46 PM
It must be displayed on every page, where you can click on a
members name.
Lynne
01-10-2010, 09:12 PM
You are going to need several plugins then.
BBR-APBT
01-10-2010, 09:14 PM
Take a look at my Useful links modification in my profile and see how I did it.
ageurtse
01-11-2010, 06:24 PM
i have found a hook location which works but now i have a new problem.
this is what i do but the template variables don't work when they called from within a plugin.
is there a way to inject these variables into the template.
the tekst "show attachments" is displayed at the left side in the members drop down menu
hook location is forumhome_start
this is my code
$template_hook['memberaction_dropdown_items'] .= '
<li class="left">
<a href="{vb:link member, {vb:raw memberinfo}}&tab=AJGattach">
<img src="{vb:stylevar imgdir_siteicons}/profile.png" alt="" />
show attachments
</a>
</li>
';
Paul M
01-11-2010, 08:44 PM
You cannot put template syntax into template hooks in that manner.
Think of it as like using the php echo command, and build the output you want as a string.
ageurtse
01-12-2010, 05:05 AM
Oke that i can do.
ageurtse
01-13-2010, 05:49 PM
i still have a problem
i made a plugin which create a temple and output its content to a hook location
this is the plugin code
$templater = vB_Template::create('add extra field to popupbox');
$template_hook['memberaction_dropdown_items'] .= $templater->render();
this is my template
<li class="left">
<a href="{vb:link member, {vb:raw memberinfo}}&tab=AJGattach">
<img src="{vb:stylevar imgdir_siteicons}/profile.png" alt="" />
show attachments
</a>
</li>
now think this part isn't working {vb:raw memberinfo},this should get the userid from where whe hit the right mouse button.
why isn't it getting the members id.
BBR-APBT
01-13-2010, 05:51 PM
I do believe you have to add
$global memberinfo
at the top of your plugin.
ageurtse
01-13-2010, 06:29 PM
In the plugin? I think
Lynne
01-13-2010, 06:33 PM
You need tor register the variable memberinfo for use in your template.
BBR-APBT
01-13-2010, 06:40 PM
You need tor register the variable memberinfo for use in your template.
Yeah that too, I totally over looked that.
iDCamps
01-04-2011, 05:42 PM
What hook did you end up using for this?
I can't get memberinfo to be a global in any of the hooks I've tried so far.
Thanks.
wolfe
06-22-2013, 11:24 AM
you can add it to "template_render_output" plugin will show on all needed popups :)
when also using the template hook $template_hook['memberaction_dropdown_items'] =
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.