Zikula: A Flexible Open Source Content Management System
home | forum | international support | contact us

Docs for page pnMod.php

Procedural File: pnMod.php

Source Location: /pnMod.php

Classes:



Page Details:

Zikula Application Framework



Tags:

version:  $Id: pnMod.php 24383 2008-06-12 14:15:02Z markwest $
copyright:  (c) 2001, Zikula Development Team
link:  http://www.zikula.org
license:  GNU/GPL








pnModAPIFunc [line 621]

mixed pnModAPIFunc( 'modname' $modname, ['type' $type = 'user'], ['func' $func = 'main'], ['args' $args = array()])

run a module API function



Tags:

author:  Robert Gasch
author:  Jim McDonald <jim@mcdee.net>
link:  http://www.mcdee.net


Parameters

'modname'   $modname   the name of the module
'type'   $type   the type of function to run
'func'   $func   the specific function to run
'args'   $args   the arguments to pass to the function
[ Top ]



pnModAPILoad [line 518]

string pnModAPILoad( 'name' $modname, ['type' $type = 'user'], ['force' $force = false])

load an API module



Tags:

return:  name of module loaded, or false on failure
author:  Robert Gasch


Parameters

'name'   $modname   the name of the module
'type'   $type   the type of functions to load
'force'   $force   determines to load Module even if module isn't active
[ Top ]



pnModAvailable [line 862]

bool pnModAvailable( ['modname' $modname = null])

see if a module is available



Tags:

return:  true if the module is available, false if not
author:  Jim McDonald <jim@mcdee.net>
link:  http://www.mcdee.net


Parameters

'modname'   $modname   the name of the module
[ Top ]



pnModCallHooks [line 1013]

mixed pnModCallHooks( 'hookobject' $hookobject, 'hookaction' $hookaction, 'hookid' $hookid, ['extrainfo' $extrainfo = array()], ['implode' $implode = true])

carry out hook operations for module



Tags:

return:  string output from GUI hooks, extrainfo array for API hooks
author:  Jim McDonald <jim@mcdee.net>
link:  http://www.mcdee.net


Parameters

'hookobject'   $hookobject   the object the hook is called for - one of 'item', 'category' or 'module'
'hookaction'   $hookaction   the action the hook is called for - one of 'new', 'create', 'modify', 'update', 'delete', 'transform', 'display', 'modifyconfig', 'updateconfig'
'hookid'   $hookid   the id of the object the hook is called for (module-specific)
'extrainfo'   $extrainfo   extra information for the hook, dependent on hookaction
'implode'   $implode   implode collapses all display hooks into a single string - default to true for compatability with .7x
[ Top ]



pnModDBInfoLoad [line 445]

bool pnModDBInfoLoad( 'name' $modname, ['directory' $directory = ''], ['force' $force = false])

load datbase definition for a module



Tags:

return:  true if successful, false otherwise
author:  Jim McDonald <jim@mcdee.net>
link:  http://www.mcdee.net


Parameters

'name'   $modname   the name of the module to load database definition for
'directory'   $directory   directory that module is in (if known)
'force'   $force   force table information to be reloaded
[ Top ]



pnModDelVar [line 225]

bool pnModDelVar( 'modname' $modname, ['name' $name = ''])

pnModDelVar

Delete a module variables. If the optional name parameter is not supplied all variables for the module 'modname' are deleted




Tags:

return:  true if successful, false otherwise
author:  Jim McDonald <jim@mcdee.net>
link:  http://www.mcdee.net


Parameters

'modname'   $modname   the name of the module
'name'   $name   the name of the variable (optional)
[ Top ]



pnModFunc [line 605]

mixed pnModFunc( 'modname' $modname, ['type' $type = 'user'], ['func' $func = 'main'], ['args' $args = array()])

run a module function



Tags:

author:  Robert Gasch
author:  Jim McDonald <jim@mcdee.net>
link:  http://www.mcdee.net


Parameters

'modname'   $modname   the name of the module
'type'   $type   the type of function to run
'func'   $func   the specific function to run
'args'   $args   the arguments to pass to the function
[ Top ]



pnModGetAdminMods [line 374]

array pnModGetAdminMods( )

get list of administration modules



Tags:

return:  array of module information arrays
author:  Robert Gasch
author:  Jim McDonald <jim@mcdee.net>
link:  http://www.mcdee.net


[ Top ]



pnModGetAllMods [line 417]

array pnModGetAllMods( )

get list of all modules



Tags:

return:  array of module information arrays
author:  Mark West <mark@markwest.me.uk>
link:  http://www.markwest.me.uk


[ Top ]



pnModGetBaseDir [line 1195]

string pnModGetBaseDir( [$modname $modname = ''])

Get the base directory for a module

Example: If the webroot is located at /var/www/html and the module name is Template and is found in the modules directory then this function would return /var/www/html/modules/Template

If the Template module was located in the system directory then this function would return /var/www/html/system/Template

This allows you to say: include(pnModGetBaseDir() . '/includes/private_functions.php');




Tags:

return:  - the path from the root directory to the specified module.
author:  Chris Miller


Parameters

$modname   $modname   - name of module to that you want the base directory of.
[ Top ]



pnModGetIDFromName [line 271]

int pnModGetIDFromName( 'module' $module)

pnModGetIDFromName - get module ID given its name



Tags:

return:  module ID
author:  Jim McDonald <jim@mcdee.net>
link:  http://www.mcdee.net


Parameters

'module'   $module   the name of the module
[ Top ]



pnModGetInfo [line 325]

mixed pnModGetInfo( 'id' $modid)

get information on module

return array of module information or false if core ( id = 0 )




Tags:

return:  module information array or false
author:  Jim McDonald <jim@mcdee.net>
link:  http://www.mcdee.net


Parameters

'id'   $modid   module ID
[ Top ]



pnModGetName [line 893]

string pnModGetName( )

get name of current top-level module



Tags:

return:  the name of the current top-level module, false if not in a module
author:  Jim McDonald <jim@mcdee.net>
link:  http://www.mcdee.net


[ Top ]



pnModGetTypeMods [line 387]

array pnModGetTypeMods( ['type' $type = 'user'])

get list of modules by module type



Tags:

return:  array of module information arrays
author:  Jim McDonald <jim@mcdee.net>
author:  Robert Gasch


Parameters

'type'   $type   the module type to get (either 'user' or 'admin') (optional) (default='user')
[ Top ]



pnModGetUserMods [line 361]

array pnModGetUserMods( )

get list of user modules



Tags:

return:  array of module information arrays
author:  Robert Gasch
author:  Jim McDonald <jim@mcdee.net>
link:  http://www.mcdee.net


[ Top ]



pnModGetVar [line 93]

if pnModGetVar( 'modname' $modname, ['name' $name = ''], ['default' $default = false])

pnModGetVar - get a module variable

if the name parameter is included then function returns the module variable value. if the name parameter is ommitted then function returns a multi dimentional array of the keys and values for the module vars.




Tags:

return:  the name parameter is included then function returns string - module variable value if the name parameter is ommitted then function returns array - multi dimentional array of the keys and values for the module vars.
author:  Jim McDonald <jim@mcdee.net>


Parameters

'modname'   $modname   the name of the module
'name'   $name   the name of the variable
'default'   $default   the value to return if the requested modvar is not set
[ Top ]



pnModIsHooked [line 1087]

bool pnModIsHooked( 'tmodule' $tmodule, 'smodule' $smodule)

Determine if a module is hooked by another module



Tags:

return:  true if the current module is hooked by the target module, false otherwise
author:  Mark West (mark@markwest.me.uk)
link:  http://www.markwest.me.uk


Parameters

'tmodule'   $tmodule   the target module
'smodule'   $smodule   the source module - default the current top most module
[ Top ]



pnModLangLoad [line 1128]

void pnModLangLoad( modname $modname, [type $type = 'user'], [api $api = false])

pnModLangLoad loads the language files for a module



Tags:

author:  Mark West
link:  http://www.markwest.me.uk


Parameters

modname   $modname   - name of the module
type   $type   - type of the language file to load e.g. user, admin
api   $api   - load api lang file or gui lang file
[ Top ]



pnModLoad [line 502]

string pnModLoad( 'name' $modname, ['type' $type = 'user'], ['force' $force = false])

load a module



Tags:

return:  name of module loaded, or false on failure
author:  Robert Gasch


Parameters

'name'   $modname   the name of the module
'type'   $type   the type of functions to load
'force'   $force   determines to load Module even if module isn't active
[ Top ]



pnModRegisterHook [line 944]

bool pnModRegisterHook( 'hookobject' $hookobject, 'hookaction' $hookaction, 'hookarea' $hookarea, 'hookmodule' $hookmodule, 'hooktype' $hooktype, 'hookfunc' $hookfunc)

register a hook function



Tags:

return:  true if successful, false otherwise
author:  Jim McDonald <jim@mcdee.net>
link:  http://www.mcdee.net


Parameters

'hookobject'   $hookobject   the hook object
'hookaction'   $hookaction   the hook action
'hookarea'   $hookarea   the area of the hook (either 'GUI' or 'API')
'hookmodule'   $hookmodule   name of the hook module
'hooktype'   $hooktype   name of the hook type
'hookfunc'   $hookfunc   name of the hook function
[ Top ]



pnModSetVar [line 152]

bool pnModSetVar( 'modname' $modname, 'name' $name, ['value' $value = ''])

pnModSetVar - set a module variable



Tags:

return:  true if successful, false otherwise
author:  Jim McDonald <jim@mcdee.net>
link:  http://www.mcdee.net


Parameters

'modname'   $modname   the name of the module
'name'   $name   the name of the variable
'value'   $value   the value of the variable
[ Top ]



pnModSetVars [line 205]

bool pnModSetVars( 'modname' $modname, 'vars' $vars)

pnModSetVars - set multiple module variables



Tags:

return:  true if successful, false otherwise


Parameters

'modname'   $modname   the name of the module
'vars'   $vars   an associative array of varnames/varvalues.
[ Top ]



pnModUnregisterHook [line 977]

bool pnModUnregisterHook( 'hookobject' $hookobject, 'hookaction' $hookaction, 'hookarea' $hookarea, 'hookmodule' $hookmodule, 'hooktype' $hooktype, 'hookfunc' $hookfunc)

unregister a hook function



Tags:

return:  true if successful, false otherwise
author:  Jim McDonald <jim@mcdee.net>
link:  http://www.mcdee.net


Parameters

'hookobject'   $hookobject   the hook object
'hookaction'   $hookaction   the hook action
'hookarea'   $hookarea   the area of the hook (either 'GUI' or 'API')
'hookmodule'   $hookmodule   name of the hook module
'hooktype'   $hooktype   name of the hook type
'hookfunc'   $hookfunc   name of the hook function
[ Top ]



pnModURL [line 724]

sting pnModURL( 'modname' $modname, ['type' $type = 'user'], ['func' $func = 'main'], ['args' $args = array()], ['ssl' $ssl = null], ['fragment' $fragment = null], ['fqurl' $fqurl = null])

generate a module function URL

if the module is non-API compliant (type 1) then a) $func is ignored. b) $type=admin will generate admin.php?module=... and $type=user will generate index.php?name=...




Tags:

return:  absolute URL for call
author:  Jim McDonald <jim@mcdee.net>
link:  http://www.mcdee.net


Parameters

'modname'   $modname   the name of the module
'type'   $type   the type of function to run
'func'   $func   the specific function to run
'args'   $args   the array of arguments to put on the URL
'ssl'   $ssl   set to constant null,true,false $ssl = true not $ssl = 'true' null - leave the current status untouched, true - create a ssl url, false - create a non-ssl url
'fragment'   $fragment   the framgment to target within the URL
'fqurl'   $fqurl   Fully Qualified URL. True to get full URL, eg for Redirect, else gets root-relative path unless SSL
[ Top ]



pnModVarExists [line 50]

true pnModVarExists( 'modname' $modname, 'name' $name)

pnModVarExists - check to see if a module variable is set



Tags:

return:  if the variable exists in the database, false if not
author:  Chris Miller


Parameters

'modname'   $modname   the name of the module
'name'   $name   the name of the variable
[ Top ]


Packages:

Files:

Classes: