>> YANA 4 PHP Framework >> Docs For Class plugin_default_library

Class plugin_default_library

Description

Default library for common functions

This plugin is important. It provides functionality that might be usefull for other plugins.

  • access: public

Located in /plugins/default_library/plugin_default_library.php

Plugin
   |
   --plugin_default_library
Method Summary

Methods

Clear Server Template-Cache
boolean clear_server_cache (
array $ARGS
)
List of parameters:
Name Type Description
$ARGS array array of params passed to the function
Description:

this function does not expect any arguments

  • access: public
Create a microsummary for a page
boolean get_microsummary (
array $ARGS
)
List of parameters:
Name Type Description
$ARGS array array of params passed to the function
Description:

Technical notes:

parameters taken:

  • string id identifies summary to get

Note: this function terminates program execution.

Semantic description:

"Microsummaries" are a Firefox 2.0 feature that allows users to create dynamic bookmark titles that automatically updates when the content of the bookmarked page changes.

Have a look at what microsummaries can be:

  • the numbers of downloads of a file on a download site
  • the latest news on a news page
  • current number of unread e-mail in the inbox of a webmail service
  • current total of donations to a project
  • the date of latest updates on a database
  • the latest submission to a guestbook or forum
  • the number of visitors currently online in a chat room
  • the latest stock values aso.

Examples of usage:

  1. Setting a microsummary from a plugin:
    1. Microsummary::set($this->name'Summary text');
  2. Retrieving a microsummary in a plugin:
    1. $microsummary Microsummary::get($this->name);
  3. To indicate that a microsummary exists for your plugin add this as the last line in your plugin constructor
    1. Microsummary::publish($this->name);
  4. Calling a microsummary from a browser:
    1. index.php?action=get_microsummary&target=guestbook
    (where 'guestbook' is the name of the plugin)

  • access: public
Create graphical visitor counter
boolean graphic_counter (
array $ARGS
)
List of parameters:
Name Type Description
$ARGS array array of params passed to the function
Description:

Note: This function ends the program.

parameters taken:

  • string id
  • string target

  • access: public
Create preview message
boolean preview (
array $ARGS
)
List of parameters:
Name Type Description
$ARGS array array of params passed to the function
Description:

Note: this function ends the program

parameters taken:

  • string eintraege text to be previewed

  • access: public
Test if a string matches the corresponding CAPTCHA
boolean security_check_image (
array $ARGS
)
List of parameters:
Name Type Description
$ARGS array array of params passed to the function
Description:

parameters taken:

  • int security_image_index index of image to display
  • string security_image text to compare with CAPTCHA

  • access: public
Create CAPTCHA-image
boolean security_get_image (
array $ARGS
)
List of parameters:
Name Type Description
$ARGS array array of params passed to the function
Description:

parameters taken:

  • int security_image_index index of image to display

  • access: public
Show Sitemap
boolean sitemap (
array $ARGS
)
List of parameters:
Name Type Description
$ARGS array array of params passed to the function
Description:

this function does not expect any arguments

  • access: public
inherited from base classes

Inherited From Plugin

Documentation generated on Sun, 11 Mar 2007 15:02:53 +0100 by phpDocumentor 1.3.1

yana author: Thomas MeyerHomepage: www.yanaframework.net