Table of Contents |
Developers Guide This section describes all the hooks available in Gossamer Links. ... |
Name: | search_results |
PRE Input: | none |
POST Input: | HASH REF: On success: tags required for search_results.html template. On failure: tags required for search_failure.html template. |
Triggered On: | search.cgi being run with query=something being passed in. |
Description: | This hook is run whenever a search is run, and it generates a list of search results that will be sent to the success or failure templates depending on whether error => 'message' is a key in the hash that is returned. |
Name: | site_html_search_results |
PRE Input: | HASH REF: link_results => html formatted list of matching links, category_results => html formatted list of matching links, link_hits => total number of links matched cat_hits => total number of categories matched next => a formatted html toolbar or empty if not that many results term => a url escaped version of what the user searched for |
POST Input: | SCALAR: Fully formatted HTML page. |
Triggered On: | search.cgi being run with some results being found. |
Description: | This hook generates a fully formatted html page. |
Name: | site_html_search_failure |
PRE Input: | HASH REF: error => formatted error message string of why no results were found term => a url escaped version of what the user searched for |
POST Input: | SCALAR: Fully formatted HTML page. |
Triggered On: | search.cgi being run with no results being found. |
Description: | This hook generates a fully formatted html page. |
Name: | user_add_link |
PRE Input: | none |
POST Input: | HASH REF: On success: tags required for add_success.html template. On failure: tags required for add_failure.html template. |
Triggered On: | add.cgi being run with add=something being passed in. |
Description: | This hook is run whenever the add_form is submitted, and it adds a link to the Links table, and emails the administrator that a link is awaiting validation. If you want to hook into whenever a link is added, from the admin, or from the user side, see add_link. |
Name: | site_html_add_success |
PRE Input: | HASH REF: A complete hash ref of the new link that was added which includes all columns defined in the Links table, plus: Category => a newline separted string of Category Names that this link was added too. |
POST Input: | SCALAR: Fully formatted HTML page. |
Triggered On: | add.cgi being run and the link being successfully added. |
Description: | This hook generates a fully formatted html page. |
Name: | site_html_add_failure |
PRE Input: | HASH REF: error => formatted error message string of why link could not be added Category => a select list/hidden field for use in category form. |
POST Input: | SCALAR: Fully formatted HTML page showing search results. |
Triggered On: | add.cgi being run, with errors in the submission. |
Description: | This hook generates a fully formatted html page. |
Name: | user_modify_link |
PRE Input: | none |
POST Input: | HASH REF: On success: tags required for modify_success.html template. On failure: tags required for modify_failure.html template. |
Triggered On: | modify.cgi being run with modify=something being passed in. |
Description: | This hook is run whenever the modify_form is submitted, and it either changes a link in the Links table, or records the change awaiting validation. |
Name: | site_html_modify_success |
PRE Input: | HASH REF: A complete hash ref of the new link that was changed which includes all columns defined in the Links table, plus: Category => a newline separted string of Category Names that this link was placed in. |
POST Input: | SCALAR: Fully formatted HTML page. |
Triggered On: | modify.cgi being run and the link being successfully changed. |
Description: | This hook generates a fully formatted html page. |
Name: | site_html_modify_failure |
PRE Input: | HASH REF: error => formatted error message string of why link could not be added Category => a select list/hidden field for use in category form. |
POST Input: | SCALAR: Fully formatted HTML page showing search results. |
Triggered On: | modify.cgi being run, with errors in the submission. |
Description: | This hook generates a fully formatted html page. |
Table of Contents |
|