Ryzom Account Management System  1.0
Static Public Member Functions
Helpers Class Reference

Helper class for more site specific functions. More...

Static Public Member Functions

static loadTemplate ($template, $vars=array(), $returnHTML=false)
 workhorse of the website, it loads the template and shows it or returns th html.
static create_folders ()
 creates the folders that are needed for smarty.
static check_if_game_client ()
 check if the http request is sent ingame or not.
static handle_language ()
 Handles the language specific aspect.
static outputTime ($time, $str=1)
 Time output function for handling the time display.
static check_login_ingame ()
 Auto login function for ingame use.

Detailed Description

Helper class for more site specific functions.

Author:
Daan Janssens, mentored by Matthew Lagoe

Member Function Documentation

static check_if_game_client ( ) [static]

check if the http request is sent ingame or not.

Returns:
returns true in case it's sent ingame, else false is returned.
static check_login_ingame ( ) [static]

Auto login function for ingame use.

This function will allow users who access the website ingame, to log in without entering the username and password. It uses the COOKIE entry in the open_ring db. it checks if the cookie sent by the http request matches the one in the db. This cookie in the db is changed everytime the user relogs.

Returns:
returns "FALSE" if the cookies didn't match, else it returns an array with the user's id and name.
static create_folders ( ) [static]

creates the folders that are needed for smarty.

Todo:
for the drupal module it might be possible that drupal_mkdir needs to be used instead of mkdir, also this should be in the install.php instead.
static handle_language ( ) [static]

Handles the language specific aspect.

The language can be changed by setting the $_GET['Language'] & $_GET['setLang'] together. This will also change the language entry of the user in the db. Cookies are also being used in case the user isn't logged in.

Returns:
returns the parsed content of the language .ini file related to the users language setting.
static loadTemplate ( template,
vars = array (),
returnHTML = false 
) [static]

workhorse of the website, it loads the template and shows it or returns th html.

it uses smarty to load the $template, but before displaying the template it will pass the $vars to smarty. Also based on your language settings a matching array of words & sentences for that page will be loaded. In case the $returnHTML parameter is set to true, it will return the html instead of displaying the template.

Parameters:
$templatethe name of the template(page) that we want to load.
$varsan array of variables that should be loaded by smarty before displaying or returning the html.
$returnHTML(default=false) if set to true, the html that should have been displayed, will be returned.
Returns:
in case $returnHTML=true, it returns the html of the template being loaded.
static outputTime ( time,
str = 1 
) [static]

Time output function for handling the time display.

Returns:
returns the time in the format specified in the $TIME_FORMAT global variable.

The documentation for this class was generated from the following file:
 All Data Structures Files Functions Variables