[ Index ]
 

Code source de GeekLog 1.4.1

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

/system/ -> lib-custom.php (sommaire)

(pas de description)

Poids: 523 lignes (20 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 12 fonctions

  phpblock_showrights()
  CUSTOM_runScheduledTask()
  CUSTOM_loginErrorHandler()
  CUSTOM_templateSetVars()
  CUSTOM_userCreate()
  CUSTOM_userDelete()
  CUSTOM_userDisplay()
  CUSTOM_userEdit()
  CUSTOM_userSave()
  CUSTOM_userForm()
  CUSTOM_userCheck()
  CUSTOM_showBlocks()

Fonctions
Fonctions qui ne font pas partie d'une Classe:

phpblock_showrights()   X-Ref
Sample PHP Block function

this is a sample function used by a PHP block.  This will show the rights that
a user has in the "What you have access to" block.


CUSTOM_runScheduledTask()   X-Ref
Include any code in this function that will be called by the internal CRON API
The interval between runs is determined by $_CONF['cron_schedule_interval']


CUSTOM_loginErrorHandler($msg='')   X-Ref
Example of custom function that can be used to handle a login error.
Only active with custom registration mode enabled
Used if you have a custom front page and need to trap and reformat any error messages
This example redirects to the front page with a extra passed variable plus the message
Note: Message could be a string but in this case maps to $MESSAGE[81] as a default - edit in language file


CUSTOM_templateSetVars($templatename, &$template)   X-Ref
Include any code in this function to add custom template variables.
Initially, this function is only called in the COM_siteHeader function to set
header.thtml variables


CUSTOM_userCreate($uid)   X-Ref
Pas de description

CUSTOM_userDelete($uid)   X-Ref
Pas de description

CUSTOM_userDisplay($uid)   X-Ref
Pas de description

CUSTOM_userEdit($uid)   X-Ref
Pas de description

CUSTOM_userSave($uid)   X-Ref
Pas de description

CUSTOM_userForm($msg = '')   X-Ref
Main Form used for Custom membership when member is registering

Note: Requires a file custom/memberdetail.thtml in every theme that is
installed on the site!

param: string  $msg    an error message to display or the word 'new'
return: string          HTML for the registration form

CUSTOM_userCheck($username, $email)   X-Ref
Check if it's okay to create a new user.

Geeklog is about to create a new user with the given username and email
address. This is the custom code's last chance to prevent that,
e.g. to check if all required data has been entered.

param: string  $username   username that Geeklog would use for the new user* @param    string  $email      email address of that user
return: string              an error message or an empty string for "OK"

CUSTOM_showBlocks($showblocks)   X-Ref
Custom function to retrieve and return a formatted list of blocks
Can be used when calling COM_siteHeader or COM_siteFooter

Example:
1: Setup an array of blocks to display
2: Call COM_siteHeader or COM_siteFooter

$myblocks = array( 'site_menu', 'site_news', 'poll_block' );

COM_siteHeader( array( 'CUSTOM_showBlocks', $myblocks )) ;
COM_siteFooter( true, array( 'CUSTOM_showBlocks', $myblocks ));

param: array   $showblocks    An array of block names to retrieve and format
return: string                 Formated HTML containing site footer and optionally right blocks



Généré le : Wed Nov 21 12:27:40 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics