MyBB Community Forums

Full Version: How hooks work and where are hooks codes saved?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am searching the member_do_login_end hook which was in member.php page
$plugins->run_hooks("member_do_login_end");
where this member_do_login_end is saved in code and in which page?
These are on member.php on two instances , on line # 1108 and 1133.
(2011-12-17, 05:22 AM)deepak.vishwakarma Wrote: [ -> ]I am searching the member_do_login_end hook which was in member.php page
$plugins->run_hooks("member_do_login_end");
where this member_do_login_end is saved in code and in which page?

How hooks work and where are hooks codes saved?
Does no one on this community knows this?
the hooks are not "saved", the hooks used in active plugins are loaded on each MyBB page call when MyBB "includes" the plugin files. Then everytime a MyBB page encounters a "run_hooks" line it looks for the in-memory list of hooks as loaded by the "add_hook" lines in the plugin files.
(2011-12-23, 03:31 AM)pavemen Wrote: [ -> ]the hooks are not "saved", the hooks used in active plugins are loaded on each MyBB page call when MyBB "includes" the plugin files. Then everytime a MyBB page encounters a "run_hooks" line it looks for the in-memory list of hooks as loaded by the "add_hook" lines in the plugin files.

thank you so much for replying.
Where can i get list of all hooks?
I want to pass my questions or thread in url just like:
http://localhost/What-is-your-name
instead of::
http://localhost/mybb/showthread.php?tid=4&pid=4#pid4

I dont want to pass tid or pid in my urls but i want to pass question or what we call title

How can i do that?
There's already a plugin for that, it's called "Google SEO".

Nonetheless, a list of plugin hooks can be found here: [Wiki: MyBB_Plugin_Hooks] (Broken link, head over to docs.mybb.com instead)