Geeklog
[ class tree: Geeklog ] [ index: Geeklog ] [ all elements ]

Procedural File: lib-custom.php

Source Location: /system/lib-custom.php



Page Details:









CUSTOM_loginErrorHandler [line 102]

void CUSTOM_loginErrorHandler( [ $msg = ''])

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




Parameters

   $msg  
[ Top ]



CUSTOM_runScheduledTask [line 90]

void CUSTOM_runScheduledTask( )

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']




[ Top ]



CUSTOM_showBlocks [line 433]

string CUSTOM_showBlocks( array $showblocks)

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 ));




Tags:

return:  Formated HTML containing site footer and optionally right blocks


Parameters

array   $showblocks   An array of block names to retrieve and format
[ Top ]



CUSTOM_templateSetVars [line 141]

void CUSTOM_templateSetVars( string $templatename, object $template)

Include any code in this function to add custom template variables.

Called from within Geeklog for:

  • 'header' (site header)
  • 'footer' (site footer)
  • 'storytext', 'featuredstorytext', 'archivestorytext' (story templates)
  • 'story' (story submission)
  • 'comment' (comment submission form)
  • 'registration' (user registration form)
  • 'contact' (email user form)
  • 'emailstory' (email story to a friend)
  • 'loginblock' (login form in the side bar)
  • 'loginform' (login form in the content area)
  • 'search' (advanced search form; simple search is usually part of 'header')
This function is called whenever PLG_templateSetVars is called, i.e. in addition to the templates listed here, it may also be called from plugins.




Tags:



Parameters

string   $templatename   name of the template, e.g. 'header'
object   $template   the template class object
[ Top ]



CUSTOM_userCheck [line 400]

mixed CUSTOM_userCheck( string $username, [ $email = ''])

Geeklog is about to create a new user or edit an existing user.

This is the custom code's last chance to do any form validation, e.g. to check if all required data has been entered.




Tags:

return:  Returns an empty string if no issues found validating user account form If a validation test fails, return both a message and code > usercreate needs a string and usersettings saveuser() needs a message number The message number will map to the GLOBALS $MESSAGE define in the site language files By default $MESSAGE[400] will appear if a non-numeric is returned to usersettings.php - saveuser function


Parameters

string   $username   username that Geeklog would use for the new user* @param string $email email address of that user
   $email  
[ Top ]



CUSTOM_userCreate [line 194]

boolean CUSTOM_userCreate( int $uid, [boolean $batchImport = false])

Called when user is first created Create any new records in additional tables you may have added Update any fields in the core GL tables for this user as needed



Tags:

return:  true on success, otherwise false


Parameters

int   $uid   user id - record already exists at this point
boolean   $batchImport   true during Batch User Import (admin/user.php)
[ Top ]



CUSTOM_userDelete [line 234]

void CUSTOM_userDelete( $uid)



Parameters

   $uid  
[ Top ]



CUSTOM_userDisplay [line 245]

void CUSTOM_userDisplay( $uid)



Parameters

   $uid  
[ Top ]



CUSTOM_userEdit [line 272]

void CUSTOM_userEdit( $uid)



Parameters

   $uid  
[ Top ]



CUSTOM_userForm [line 324]

string CUSTOM_userForm( [string $msg = ''])

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!




Tags:

return:  HTML for the registration form


Parameters

string   $msg   an error message to display or the word 'new'
[ Top ]



CUSTOM_userSave [line 298]

void CUSTOM_userSave( $uid)



Parameters

   $uid  
[ Top ]



phpblock_showrights [line 62]

void phpblock_showrights( )

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.




[ Top ]



Documentation generated on Sun, 02 Oct 2016 07:51:24 +0000 by phpDocumentor 1.4.3