![]() |
Member Profile Hook Location
Hey guys,
I've written a little plugin to calculate some stats about a users posting. I'd like to add these new stats to the "Statistics" tab on the members profile page. So, added the variables to the 'memberinfo_block_statistics' template but can't seem to get it to work for the life of me. Any idea what hook I need to use for that to work? Have tried a bunch including 'member_complete' and 'profile_complete' but non seem to work. My plugin does the right calculations as I can print out the stats from within the plugin, they just never seem to show up in my templates. Cheers. |
How about member_build_blocks_start? Take a look at the member.php page and see all the hooks in there, don't just randomly pick one from the drop-down (profile hooks are from a complete different page).
|
Hmmm, OK. The hooks on the member.php page are....
member_start member_start_fetch_user member_execute_start member_build_blocks_start member_complete Tried all of those and no dice. As I said, I've added the variables to be outputted into the 'memberinfo_block_statistics' template. It has a template hook called 'profile_stats_first' right at the start of it which was why I was using the profile hooks. |
Are you sure it's the hooks that aren't working and not the code?
|
Righto, I put an echo in the plugin to print out the new stat. Using member_build_blocks_start, I see the stat at the top of the page but not in the Statistics tab like it should be.
So, I assume the plugin is being executed but the code I have in the template is not working then? Here's the code quickly.... Plugin PHP Code:
PHP Code:
|
In your template, try calling it $GLOBALS[thread_average] instead.
|
Bingo! That works wonderfully now. Cheers Lynne!
|
All times are GMT. The time now is 12:19 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|