Plugins > HooksSimilar to Wordpress, gpEasy has implemented plugin hooks in the form of Actions and Filters. The primary difference between Actions and Filters is in the data that is passed to the handling functions. Below are two examples to illustrate the difference: $data = gpPlugin::Filter('ExampleFilter',array($data)); gpPlugin::Action('ExampleAction'); As you can see from the ExampleFilter, the $data variable is passed to the filter allowing plugins to modify the content of $data. Actions do not receive data directly. Below is a list of active hooks. Please post requests for new hooks in the gpEasy forum. You can also find a list of hooks and version information at http://gpeasy.com/Plugin_Hooks. Actions
edit_layout_cmd = Add your own custom layout command in admin area edit_layout_mid = Can be used to add content or perform an action mid way through the display of the layout editing window edit_layout_end = Similar to previous, but called at the end of the layout editing window FileUploaded = File was uploaded contact_form_pre_captcha = If want to put something above the Captcha box. GenerateContent_Admin = add to all pages in case a user adds a gallery GetHead = CAlled when Getting Header for HTML Filters
WhichPage = Return the name of the page being requested based on $_SERVER['REQUEST_URI'], May also redirect the reque contact_form_check = if returns false, send mail is canceled. InlineEdit_Scripts = Used to add/modify the javascript files that are sent to the browser for inline editing Inline Edit_Scripts = Used to add/modify the javascript files that are sent to the browser for inline editing GetDefaultContent = Get the default content for the specified content type SectionTypes = Return list of section types available (you can add your own for plugin) SaveSection = Save your section type of not a default one (if return false then save fails) GetExtra = Adds Extra contents to Extra area Html_Output = Last change to manipulate html data for call to gp_html_output AntiSpam_Form = If you want to add your own extra stuff below a contact form against spam AntiSpam_Check = To validate your own antispam data, if false returned the check failed. GetContent_After = Gets called after the content has been send, so you can add your own stuff. edit_layout_cmd = Add your own custom layout command in admin area edit_layout_mid = Can be used to add content or perform an action mid way through the display of the layout editing window edit_layout_end = Similar to previous, but called at the end of the layout editing window FileUploaded = File was uploaded contact_form_pre_captcha = If want to put something above the Captcha box. GenerateContent_Admin = add to all pages in case a user adds a gallery GetHead = CAlled when Getting Header for HTML |
|