vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Can't find correct hook (https://vborg.vbsupport.ru/showthread.php?t=268333)

XLCR GODFATHER 08-10-2011 08:27 PM

Can't find correct hook
 
1 Attachment(s)
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
Code:

$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 [DATE]1313045447[/DATE] at [TIME]1313045447[/TIME] ---------------

BTW Thank You Sherif.

--------------- Added [DATE]1313048130[/DATE] at [TIME]1313048130[/TIME] ---------------

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

Quote:

Originally Posted by XLCR GODFATHER (Post 2232124)
Updated to include the hook you provided
Code:

$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 [DATE]1313045447[/DATE] at [TIME]1313045447[/TIME] ---------------

BTW Thank You Sherif.

--------------- Added [DATE]1313048130[/DATE] at [TIME]1313048130[/TIME] ---------------

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

Code:

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.


All times are GMT. The time now is 11:39 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02922 seconds
  • Memory Usage 1,727KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete