PDA

View Full Version : Can't find correct hook


XLCR GODFATHER
08-10-2011, 08:27 PM
Please help I am writing a plugin to add some information to member profiles to show in the attached location but I can't find the correct hook. This area is shows for custom profile field categories and it appears that if you edit the memberinfo_block_profilefield template information will show but on every custom profile field category tab you click on. I cant find an existing variable to segregate the data so it only shows in 1 or the other category and I really am not sure how to establish my on variable for if a tab is clicked so I am probably going to merge the 2 categories into 1. I am running in debug mode on my test site but it gives a pretty big list. I have tried the ones that seem logical but no luck. Can anyone help me?
I have gotten other plugins to show where I want them by registering, rendering and caching templates but this one is driving me nuts...

Lynne
08-11-2011, 01:36 AM
On your test site where you are writing this, go into debug mode (there is an article on how to do this) and then the list of all available hooks for that page will be listed on the bottom right. See if those work. You can usually narrow it down by knowing when the code needs to be processed.

XLCR GODFATHER
08-11-2011, 04:58 AM
Thank you lynne. I have tried that but it still is not working, I cant figure this one out and is driving me nuts. That was why I hoped with the attached image someone might point me at the correct hook so I can make sure it is not something else wrong.

Badshah93
08-11-2011, 05:06 AM
right hook for this is "member_complete"

But whats your php code ?

XLCR GODFATHER
08-11-2011, 05:50 AM
Updated to include the hook you provided
$templater = vB_Template::create('codinfo');
$template_hook[member_complete] .= $templater->render();

Yes, I also Cached the template
Template only contains simple html to display some images

Am I missing anything?

--------------- Added 1313045447 at 1313045447 ---------------

BTW Thank You Sherif.

--------------- Added 1313048130 at 1313048130 ---------------

I can see via debug mode that the template is being called but it is not rendering anywhere on the profile let alone where I want it to render. I have even tried adding {vb:raw codinfo} to the template I want it attached to.

Badshah93
08-11-2011, 07:28 AM
Updated to include the hook you provided
$templater = vB_Template::create('codinfo');
$template_hook[member_complete] .= $templater->render();

Yes, I also Cached the template
Template only contains simple html to display some images

Am I missing anything?

--------------- Added 1313045447 at 1313045447 ---------------

BTW Thank You Sherif.

--------------- Added 1313048130 at 1313048130 ---------------

I can see via debug mode that the template is being called but it is not rendering anywhere on the profile let alone where I want it to render. I have even tried adding {vb:raw codinfo} to the template I want it attached to.



member_complete is a plugin hook not template hook..

I would suggest you to refer this article

https://vborg.vbsupport.ru/showthread.php?t=265971

XLCR GODFATHER
08-11-2011, 01:38 PM
Perfect! Thank you. now it makes more sense. This will open up for me to do what I wanted.