Manifesto User Manual 6.02
About Hooks
Hook: admin
This hook governs whether or not the module can be administered through the Admin Interface. A file named [module].inc must be present in the /mods/[module]/admin_includes directory.
- Sort Order: No
- Allows Include File: No
- Allows Function Call: No
- Adds Navigation Link: No
- Link can be replaced by CSS image: No
- Allows Restriction Function: No
- Called in: admin.inc
- Call method: Loop through and include [module].inc file
- Receives parameters: None
- Modifies object properties: No
- Creates output: No
Hook: editor
This hook governs whether or not the module can be administered through the Editor Interface. A file named [module].inc must be present in the /mods/[module]/editor_includes directory.
- Sort Order: No
- Allows Include File: No
- Allows Function Call: No
- Adds Navigation Link: No
- Link can be replaced by CSS image: No
- Allows Restriction Function: No
- Called in: editor.inc
- Call method: Loop through and include [module].inc file
- Receives parameters: None
- Modifies object properties: No
- Creates output: No
Hook: toprow
This hook allows modules to add items to the toprow menu navigation. It may consist of simple link text (automatically linked to the default module homepage), or an include file that constructs multiple navigation links in the proper format.
- Sort Order: Yes
- Allows Include File: Yes
- Allows Function Call: No
- Adds Navigation Link: Yes
- Link can be replaced by CSS image: Yes
- Allows Restriction Function: Yes
- Called in: components/toprow.inc and some module boxes that mimic toprow navigation
- Call method: Include include_file or create link with link text
- Receives parameters: None
- Modifies object properties: No
- Creates output: Yes
Hook: publish
This hook allows modules to add items to the secondary navigation bar, for public publishing. It consists of simple link text which automatically links to /mod/[module]/index.php?function=edit&id=0.
- Sort Order: Yes
- Allows Include File: No
- Allows Function Call: No
- Adds Navigation Link: Yes
- Link can be replaced by CSS image: Yes
- Allows Restriction Function: Yes
- Called in: components/toprow.inc
- Call method: Include include_file or create link with link text
- Receives parameters: None
- Modifies object properties: No
- Creates output: Yes
Hook: leftbar
This hook allows modules to add items to the global left-hand sidebar, if present. It uses a user-specified include file to build a modulebox suitable for the sidebar.
- Sort Order: Yes
- Allows Include File: Yes
- Allows Function Call: No
- Adds Navigation Link: No
- Link can be replaced by CSS image: No
- Allows Restriction Function: Yes
- Called in: leftbar.inc
- Call method: Include include_file
- Receives parameters: None
- Modifies object properties: No
- Creates output: Yes
Hook: rightbar
This hook allows modules to add items to the global right-hand sidebar, if present. It uses a user-specified include file to build a module box suitable for the sidebar.
- Sort Order: Yes
- Allows Include File: Yes
- Allows Function Call: No
- Adds Navigation Link: No
- Link can be replaced by CSS image: No
- Allows Restriction Function: Yes
- Called in: rightbar.inc
- Call method: Include include_file
- Receives parameters: None
- Modifies object properties: No
- Creates output: Yes
Hook: sidebar
- Sort Order: Yes
- Allows Include File: Yes
- Allows Function Call: No
- Adds Navigation Link: No
- Link can be replaced by CSS image: No
- Allows Restriction Function: Yes
- Called in: leftbar.inc or rightbar.inc
- Call method: Include include_file
- Receives parameters: None
- Modifies object properties: No
- Creates output: Yes
Hook: homepage
This hook allows modules to add items to the main column of the home page. It uses a user-specified include file to build a modulebox suitable for the sidebar.
- Sort Order: Yes
- Allows Include File: Yes
- Allows Function Call: No
- Adds Navigation Link: No
- Link can be replaced by CSS image: No
- Allows Restriction Function: Yes
- Called in: home.inc
- Call method: Include include_file
- Receives parameters: None
- Modifies object properties: No
- Creates output: Yes
Hook: userlisting
This hook allows modules to add items to the list of user contributions on the user's display page. It uses a user-specified include file to query the database and build a TableListing table of the output.
- Sort Order: Yes
- Allows Include File: Yes
- Allows Function Call: No
- Adds Navigation Link: No
- Link can be replaced by CSS image: No
- Allows Restriction Function: Yes
- Called in: User->display()
- Call method: Include include_file
- Receives parameters: None
- Modifies object properties: No
- Creates output: Yes
Hook: homepage_bottom
This hook allows modules to add items or perform actions on the bottom of the home page (and only the home page). Useful for including information only on the home page, or for running a script only when the home page is loaded.
- Sort Order: Yes
- Allows Include File: Yes
- Allows Function Call: Yes
- Adds Navigation Link: No
- Link can be replaced by CSS image: No
- Allows Restriction Function: Yes
- Called in: home.inc
- Call method: Include include_file, or execute function
- Receives parameters: None
- Modifies object properties: No
- Creates output: Yes (optionally)
Hook: toolbar
This hook allows modules to add items to the toolbar section (above the content) on an object's display page.
- Sort Order: Yes
- Allows Include File: No
- Allows Function Call: Yes
- Adds Navigation Link: No
- Link can be replaced by CSS image: No
- Allows Restriction Function: Yes
- Called in: [object]_display.inc
- Call method: Execute function
- Receives parameters: Content object reference
- Modifies object properties: No
- Creates output: Yes
Hook: onupdate
This hook allows modules to process and modify an object being updated before it gets saved to the database. While it is capable of simply modifying an object's properties, if any onupdate function returns false, object updating will immediately cease, and the database will not be updated. You may want an onupdate script to echo an explanation before returning false.
- Sort Order: Yes
- Allows Include File: No
- Allows Function Call: Yes
- Adds Navigation Link: No
- Link can be replaced by CSS image: No
- Allows Restriction Function: Yes
- Called in: [object]->display()
- Call method: Execute function
- Receives parameters: Content object reference
- Modifies object properties: Yes
- Creates output: Yes
