class CEngine extends CAuth

^ INDEX

Table of contents

fmod
AddFormError
AddRewriteRule
CEngine
CheckFormErrors
CreateCleanURL
DateConversion
DeleteCleanURL
DeleteFile
DeleteImage
DeletePhysicalFile
DeleteRewriteRule
DisplayEngineModuleParts
DisplayError
EngineInfo
EngineInitialize
ExecuteHook
FileError
GenerateFilename
GeneratePhysicalFile
GetThumbnailName
InsertCleanURL
InstallHooks
InstallSQL
LookUpCleanURL
PrintDebugText
PublicInitialize
ReadHtaccess
RedirectOnError
RequestLanguageVersions
RequestVariables
RetrieveModules
SaveTempData
SerializeObject
SetHook
SubmitFile
SubmitImage
UninstallHooks
UninstallSQL
UnserializeObject
WYSIWYGtoXHTML
WriteHtaccess

^ Top

fmod($x,$y)

^ Top

AddFormError($message)

Add form error to queue

string variable name

^ Top

AddRewriteRule($elementID,$type="showarticle.php?articleID",$prefix="",$suffix="")

Generate .htaccess file (with new rules) if $cleanurls is set to 2

integer $elementID ID of element
string $prefix string to prefix clean URL with
string $suffix string to suffix clean URL with

TO-DO:!!!! test whether syndication is enabled and section is part of the central website
if not return and do not create rule!!!

^ Top

CEngine()

absolutengine

Core engine class / base functions

Constructor
Set all variables

^ Top

CheckFormErrors()

Check for form errors (if manadatory fields have been filled)
unlimited number of parameters available, parameters should contain variable name
to check (e.g. title, sectionID, etc...)

mixed ,...

^ Top

CreateCleanURL($input)

Create clean URL based on input string

string $input string to create valid clean URL from

^ Top

DateConversion($adate,$direction=1)

Perform date conversion from custom date format (set in settings.php) to MySQL date format and back

string $adate date to be converted
integer $direction to DB = 1, to form = 2

^ Top

DeleteCleanURL($url)

Delete clean URL from clean URLs pool

^ Top

DeleteFile($file)

Delete a file

$file filename

^ Top

DeleteImage($file,$path)

Delete image and its thumbnail

string $file image filename

^ Top

DeletePhysicalFile($articleID)

DEPRECATED: from v1.71 DO NOT USE! This function is obsolete and will be deleted in next version

Deletes physical files from articles if $cleanurls set to 1
If you server support Apache mod_rewrite module, use $cleanurls=2 instead!

TO-DO:prepare some static URL schema use - $cleanurls=3 in future

^ Top

DeleteRewriteRule($elementID,$table="",$type="showarticle.php?articleID",$prefix="",$suffix="")

Delete rewrite rule for element

integer $elementID ID of element to be deleted
string $table table where to search for the filename, if empty article table is assumed
string $prefix string to prefix clean URL with
string $suffix string to suffix clean URL with

^ Top

DisplayEngineModuleParts()

Display parts of the pages (boxes) that should be added to the currently visited page
Modules are able to insert their parts (forms, boxes, DB listings) into other parts of the system

^ Top

DisplayError($errorcode=0,$stop=0,$moduledir="")

Display error message and optionally stop execution of the script

boolean $stop 0 to continue with script execution, otherwise 1 to stop/exit
string $required "title,sectionID" - comma delimited list of mandatory fields
string moduledir - when called from module, state module directory

^ Top

EngineInfo()

Display basic information about Absolut Engine

^ Top

EngineInitialize()

Initialize engine
Connect to database and select user language

^ Top

ExecuteHook()

Execute currently set hook

SEE: SetHook()

^ Top

FileError()

Check for file handling error and stop the script on failure

^ Top

GenerateFilename($filename,$path)

Generate filename for file upload purposes
if filename exists, add -X, where X is previous existinf file number

string $filename original filename
string $path filepath (relative to admin/ directory)

^ Top

GeneratePhysicalFile($articleID)

DEPRECATED: from v1.71 DO NOT USE! This function is obsolete and will be deleted in next version

Genereates physical files from articles if $cleanurls set to 1
If you server support Apache mod_rewrite module, use $cleanurls=2 instead!

TO-DO:prepare some static URL schema use - $cleanurls=3 in future

^ Top

GetThumbnailName($file)

Create thumbnail name from image name

string $file image name

^ Top

InsertCleanURL($url)

Insert clean URL in clean URLs pool

^ Top

InstallHooks($moduledir="")

Install hooks for the module entered, if no module, then core hooks ???

string module module directory

^ Top

InstallSQL($moduledir="")

Install system.sql for the module entered, if no module, then core system.sql

string module module directory

^ Top

LookUpCleanURL($url)

Look into clean URLs pool to check if URL exists

^ Top

PrintDebugText($text)

Print debug text

$text message to be printed

^ Top

PublicInitialize()

^ Top

ReadHtaccess()

Open and read .htaccess file for further processing by AddRewriteRule, DeleteRewriteRule etc.
if $cleanurls is set to 2

^ Top

RedirectOnError($objectID)

Redirect user on error back to form page (e.g. missing form field etc.)

integer $objectID ID of temporary object to put into URL

^ Top

RequestLanguageVersions()

Create array of system message translations available

^ Top

RequestVariables($mode=0)

^ Top

RetrieveModules($requestedmodules="")

BUGGY - memery being exhausted sometimes when using:
$text[$i]=strtolower($text[$i]);
HACK for the strtolower

UNFINISHED: Post-processing - double breaks are converted to paragraphs
$text=str_replace('

','

',$text);
paragraph counting is done to ensure both opening and closing tags are present

Searches for modules available in the system
if empty, then traverse the module directory to fetch all modules

array $requestedmodules requested modules for (un)installation (directory name)

TO-DO:@todo: complete paragraph counting with stack and jumps

^ Top

SaveTempData($tempstring)

Save temporary data to table temporary

string $tempstring temporary data

^ Top

SerializeObject($object)

Serialize object for saving to database
used for keeping serialized copy of object for checking errors
when form error is encountered, use header to send back

^ Top

SetHook($hook)

Set hook

string $hook hook to set

^ Top

SubmitFile($file,$filenametmp,$size)

Upload file

string $file original filename of the file to be uploaded
string $filenametmp temporary filename created by server during upload
integer $size size in bytes for maxsize check

^ Top

SubmitImage($file,$filenametmp,$filetype,$size,$path="")

Upload image, create thumbnail from image

string $file original filename of the file to be uploaded
string $filenametmp temporary filename created by server during upload
string $filetype filetype of image (GIF/PNG/JPEG)
integer $size size in bytes for maxsize check

^ Top

UninstallHooks($moduledir="")

Uninstall hooks for the module entered, if no module, then core hooks ???

string module module directory

^ Top

UninstallSQL($moduledir="")

Uninstall database tables for the module entered, if no module, then core tables

string module module directory

^ Top

UnserializeObject($object)

Serialize object for saving to database
used for keeping serialized copy of object for checking errors
when form error is encountered, use header to send back

^ Top

WYSIWYGtoXHTML($text)

Cleans up the HTML code created by WYSIWYG editor (Richt text editor)
Tries to make the code XHTML 1.0 Strict (web standards compliant)

^ Top

WriteHtaccess()

Write content to and close .htaccess file
if $cleanurls is set to 2

^ Top