Gossamer Forum
Quote Reply
Hooks
Hi,

Could someone please give me a list of all the hooks available in DBMan SQL 2.0.3.

Also, a plugin help section (like Links SQL has) would be most useful for DBMan SQL users!!!!

Thank you.

Simon.
Quote Reply
Re: [jai] Hooks In reply to
Have a look at: http://www.gossamer-threads.com/...orum.cgi?post=165965

TheStone.

B.
Quote Reply
Re: [TheStone] Hooks In reply to
Hi,

Sorry, what I meant is a list of the points in the main script that we can place hooks (e.g add_record, add_success, etc.) to divert to the plugin sub.

Thank you.

Simon.
Quote Reply
Re: [jai] Hooks In reply to
Hi,

I just wrote the new 2.1 manual, but it doesn't mention which hooks are supported. Who could answer this?

Jasper

http://www.bookings.org
Quote Reply
Re: [jaspercram] Hooks In reply to
Oops, I meant 'read' instead of 'wrote' in my previous post. Sorry for the confusion. Blush

BTW I am still looking for these hooks....... Unimpressed

http://www.bookings.org

Last edited by:

jaspercram: Oct 29, 2002, 3:15 AM
Quote Reply
Re: [jai] Hooks In reply to
Hi,

I read the following text in the online help:
Quote:
NAME
GT::Plugins::Profiler - analyze what hooks you have in a program.

SYNOPSIS
$GT::Plugins::PROFILE = 1;

DESCRIPTION
This module will create a hooks.cfg file that contains a perl dump of all the hooks found during execution of a program.

It seems that this might be a way to get a list with possible hooks. The only problem is, that I have no idea where to include that line... I tried a few places, but the hooks.cfg never appears.Frown But that might be because I am using mod_perl, so my scripts never end....

Hope someone manages to get this profiler to work and add the resulting list in this thread.

Bye, Jasper

BTW GT: if you build this nifty profiler, why did you not run it and publish the results somewhere?

http://www.bookings.org
Quote Reply
Re: [jai] Hooks In reply to
Dear GT people,

Can you please give us a list with hooks we can use? I really need to build plugins and it currently takes me about half a day to find out which name a hook has. Unsure I am currently looking for a hook for after the html for the search results is generated. I expected site_html_qsearch_results to work, but nothing seems to happen.... Frown

If someone else is interested, I found the following names:
  • auth_init
  • auth_valid_session
  • delete_records
  • login_form
  • modify_record
  • page
  • qsearch_results
  • search_results


Jasper

http://www.bookings.org
Quote Reply
Re: [jaspercram] Hooks In reply to
Hi,

You will find the hooks ( within Home.pm and Relation/Home.pm ) which is formated:

$COMPILE{subroutine_name} = <<'END_OF_SUB';
sub subroutine_name {
....
}
END_OF_SUB


TheStone.

B.
Quote Reply
Re: [TheStone] Hooks In reply to
According to TheStone in admin/Dbsql/Home.pm the hooks are formated as follows -
$COMPILE{subroutine_name} = <<'END_OF_SUB';
sub subroutine_name {
....
}
END_OF_SUB

which means the list we have all been waiting for should be -


home
view_file
download_file
signup_form
login_form
login
signup
log_off
add_form
add_record
add_success
add_multi_form
add_multi_records
add_multi_results
modify_search_form
modify_search_results
modify_form
modify_record
modify_success
modify_multi_records
modify_multi_results
delete_search_form
delete_search_results
delete_records
search_form
search_results
admin_form
admin_action
admin_inquire_user
admin_edit_user
admin_delete_user
admin_init_hash
admin_get_values
auth_logging
owner
error



In admin/Dbsql/Relation/Home.pm the format seems to be different -
$Dbsql::Home::COMPILE{subroutine_name} = <<'END_OF_SUB';
sub subroutine_name {
....
}
END_OF_SUB

and there are only 2 hooks -

qsearch_form
qsearch_results


I haven't tested all of the above hooks but maybe TheStone could confirm the list is correct.


Simon.
Quote Reply
Re: [TheStone] Hooks In reply to
Does that mean there is no hook for doing something with the HTML output after it is generated like site_html_search_results in Links SQL?

Jasper

http://www.bookings.org
Quote Reply
Re: [jai] Hooks In reply to
The CORRECT list of hooks can be found here -

http://gossamer-threads.com/...i?post=263007#263663