[ Index ]
 

Code source de b2evolution 2.1.0-beta

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/blogs/plugins/ -> _test.plugin.php (sommaire)

This file implements the TEST plugin. For the most recent and complete Plugin API documentation see {@link Plugin} in ../evocore/_plugin.class.php.

Author: fplanque: Francois PLANQUE - {@link http://fplanque.net/}
Author: blueyed: Daniel HAHLER
Copyright: (c)2003-2007 by Francois PLANQUE - {@link http://fplanque.net/}
Version: $Id: _test.plugin.php,v 1.71 2007/06/24 17:48:40 personman2 Exp $
Poids: 865 lignes (24 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

test_plugin:: (41 méthodes):
  PluginInit()
  GetDefaultSettings()
  GetDefaultUserSettings()
  GetExtraEvents()
  GetCronJobs()
  ExecCronJob()
  AppendLoginRegisteredUser()
  GetDependencies()
  PluginUserSettingsUpdateAction()
  AdminEndHtmlHead()
  AdminAfterPageFooter()
  AdminDisplayToolbar()
  AdminDisplayEditorButton()
  AdminDisplayItemFormFieldset()
  SkinBeginHtmlHead()
  AdminBeforeItemEditCreate()
  AdminBeforeItemEditUpdate()
  AdminDisplayCommentFormFieldset()
  AdminAfterMenuInit()
  AdminToolAction()
  AdminToolPayload()
  AdminTabAction()
  AdminTabPayload()
  AdminBeginPayload()
  RenderItemAsHtml()
  RenderItemAsXml()
  RenderItemAsText()
  DisplayItemAsHtml()
  DisplayItemAsXml()
  DisplayItemAsText()
  FilterIpAddress()
  BeforeInstall()
  AfterInstall()
  BeforeUninstall()
  AfterUserRegistration()
  DisplayLoginFormFieldset()
  LoginAttempt()
  LoginAttemptNeedsRawPassword()
  AlternateAuthentication()
  DisplayValidateAccountFormFieldset()
  test_plugin_get_random()


Classe: test_plugin  - X-Ref

TEST Plugin

This plugin responds to virtually all possible plugin events :P

PluginInit( & $params )   X-Ref
Init

This gets called after a plugin has been registered/instantiated.

GetDefaultSettings( & $params )   X-Ref
Get the settings that the plugin can use.

Those settings are transfered into a Settings member object of the plugin
and can be edited in the backoffice (Settings / Plugins).

return: array

GetDefaultUserSettings()   X-Ref
User settings.

return: array

GetExtraEvents()   X-Ref
We trigger an extra event ourself (which we also provide ourselves).

return: array

GetCronJobs( & $params )   X-Ref
Define a test cron job


ExecCronJob( & $params )   X-Ref
Execute/Handle a test/sample cronjob.


AppendLoginRegisteredUser()   X-Ref
Deactive the plugin for the current request if the user wants it so.


GetDependencies()   X-Ref
Define some dependencies.

return: array

PluginUserSettingsUpdateAction()   X-Ref
Gets asked for, if user settings get updated.

We just add a note.


AdminEndHtmlHead( & $params )   X-Ref
Event handler: Called when ending the admin html head section.

param: array Associative array of parameters
return: boolean did we do something?

AdminAfterPageFooter( & $params )   X-Ref
Event handler: Called right after displaying the admin page footer.

param: array Associative array of parameters
return: boolean did we do something?

AdminDisplayToolbar( & $params )   X-Ref
Event handler: Called when displaying editor toolbars.

param: array Associative array of parameters
return: boolean did we display a toolbar?

AdminDisplayEditorButton( & $params )   X-Ref
Event handler: Called when displaying editor buttons.

param: array Associative array of parameters
return: boolean did we display ?

AdminDisplayItemFormFieldset( & $params )   X-Ref


SkinBeginHtmlHead()   X-Ref


AdminBeforeItemEditCreate( & $params )   X-Ref


AdminBeforeItemEditUpdate( & $params )   X-Ref


AdminDisplayCommentFormFieldset( & $params )   X-Ref


AdminAfterMenuInit()   X-Ref
Event handler: Gets invoked in /admin.php for every backoffice page after
the menu structure is build. You can use the {@link $AdminUI} object
to modify it.

This is the hook to register menu entries. See {@link register_menu_entry()}.


AdminToolAction( $params )   X-Ref
Event handler: Called when handling actions for the "Tools" menu.

Use {@link $Messages} to add Messages for the user.


AdminToolPayload( $params )   X-Ref
Event handler: Called when displaying the block in the "Tools" menu.


AdminTabAction()   X-Ref
Event handler: Method that gets invoked when our tab (?tab=plug_ID_X) is selected.

You should catch params (GET/POST) here and do actions (no output!).
Use {@link $Messages} to add messages for the user.


AdminTabPayload()   X-Ref
Event handler: Gets invoked when our tab is selected and should get displayed.


AdminBeginPayload()   X-Ref
Event handler: Gets invoked before the main payload in the backoffice.


RenderItemAsHtml( & $params )   X-Ref
Event handler: Called when rendering item/post contents as HTML.

Note: return value is ignored. You have to change $params['content'].


RenderItemAsXml( & $params )   X-Ref
Event handler: Called when rendering item/post contents as XML.

Note: return value is ignored. You have to change $params['content'].


RenderItemAsText( & $params )   X-Ref
Event handler: Called when rendering item/post contents as text.

Note: return value is ignored. You have to change $params['content'].


DisplayItemAsHtml( & $params )   X-Ref
Event handler: Called when displaying item/post contents as HTML.

Note: return value is ignored. You have to change $params['content'].


DisplayItemAsXml( & $params )   X-Ref
Event handler: Called when displaying item/post contents as XML.

Note: return value is ignored. You have to change $params['content'].


DisplayItemAsText( & $params )   X-Ref
Event handler: Called when displaying item/post contents as text.

Note: return value is ignored. You have to change $params['content'].


FilterIpAddress( & $params )   X-Ref
Wrap a to be displayed IP address.


BeforeInstall()   X-Ref
Event handler: Called before the plugin is installed.


AfterInstall()   X-Ref
Event handler: Called when the plugin has been installed.


BeforeUninstall()   X-Ref
Event handler: Called before the plugin is going to be un-installed.


AfterUserRegistration( $params )   X-Ref
Event handler: called when a new user has registered.


DisplayLoginFormFieldset( & $params )   X-Ref
Event handler: Called at the end of the "Login" form.


LoginAttempt()   X-Ref
Event handler: Called when a user tries to login.


LoginAttemptNeedsRawPassword()   X-Ref
Event handler: Do we need a raw password in {@link LoginAttempt()}?


AlternateAuthentication()   X-Ref
Automagically login every user as "demouser" who is not logged in and does not
try to currently.

To enable/test it, change the "if-0" check below to "if( 1 )".


DisplayValidateAccountFormFieldset( & $params )   X-Ref


test_plugin_get_random( & $params )   X-Ref
Gets provided as plugin event (and gets also used internally for demonstration).

param: array Associative array of parameters
return: integer



Généré le : Thu Nov 29 23:58:50 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics