Appendix E. PostNuke API


The PostNuke API, or pnAPI, is a collection of functions that allows developers to access and manage low-level content in an abstract and reusable manner. While primarily aimed at module developers, the pnAPI can also be useful to advanced theme and hack developers. The functions are listed below with a short description. Browse to docs.postnuke.com for more information on the pnAPI.

pnBlockGetInfo Returns an array containing block information.

pnBlockLoad Loads a block from a module or core.

pnBlockShow Returns the output of the block display function.

pnConfigDelVar Deletes a configuration variable.

pnConfigGetVar Acquires a configuration variable.

pnConfigSetVar Sets a configuration variable.

pnDBGetConn Returns an array of database connection values.

pnDBGetTables Returns an array of database table information.

pnDBInit Initializes a database connection.

pnExceptionFree Resets the current exception status.

pnExceptionId Returns the current exception identifier.

pnExceptionMajor Determines the exception state and provides the exception type is applicable.

pnExceptionSet Raises an exception with supplied value.

pnExceptionValue Returns the exception value as an object.

pnGetBaseURI Acquires the base URI, the path of the URL.

pnGetBaseURL Acquires the base URL for the site.

pnGetStatusMsg Returns the last status message posted.

pnInit Initializes the includes, sessions, database connections, and system configuration required to run PostNuke.

pnModAPIFunc Executes a module API function.

pnModAPILoad Loads the extra functions of the module API.

pnModAvailable Confirms the availability of a given module.

pnModCallHooks Calls each hook operation for a module.

pnModDBInfoLoad Loads a module's database table information.

pnModDelVar Deletes a module variable.

pnModFunc Executes a module function.

pnModGetAdminMods Returns an array of modules with administrative components.

pnModGetIDFromName Acquires a module's id given its name.

pnModGetInfo Returns an array containing module information.

pnModGetName Returns the name of the current top-level module.

pnModGetUserMods Returns an array of modules with user interfaces.

pnModGetVar Acquires a module variable.

pnModLoad Loads a module into PostNuke.

pnModRegisterHook Registers a new hook function.

pnModSetVar Sets a module-specific variable.

pnModUnregisterHook Removes a hook function.

pnModURL Returns a URL string for a specific module function.

pnRedirect Sets the HTTP header to redirect to another page.

pnSecAddSchema Creates a new component security schema.

pnSecAuthAction Determines whether a particular level of access is allowed.

pnSessionDelVar Deletes a session variable.

pnSessionGetVar Acquires a session variable.

pnSessionInit Initializes a new or current user session.

pnSessionSetup Creates variables required for persistent user sessions.

pnSessionSetVar Sets a session variable.

pnThemeLoad Loads the display theme and sets any needed global variables.

pnUserGetLang Returns the name of the current language.

pnUserGetTheme Returns the name of the current theme.

pnUserGetVar Acquires a user variable.

pnUserLoggedIn Determines whether a user is logged in.

pnUserLogIn Logs user in to PostNuke.

pnUserLogOut Logs user out of PostNuke.

pnUserSetVar Sets a user-specific variable.

pnUserValidateVar Authenticates a user variable.

pnVarCensor Removes censored words from supplied arguments.

pnVarCleanFromInput Removes escaped characters and HTML tags from supplied arguments.

pnVarPrepForDisplay Adds appropriate escaped characters for supplied arguments.

pnVarPrepForOS Formats path arguments for the operating system.

pnVarPrepForStore Escapes characters for supplied arguments.

pnVarPrepHTMLDisplay Prepares arguments for display based on HTML tag restrictions.

pnVarValidate Authenticates a variable.



    PostNuke Content Management
    PostNuke Content Management
    ISBN: 0672326868
    EAN: 2147483647
    Year: 2003
    Pages: 207
    Authors: Kevin Hatch

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net