These global variables will be set and available to your plugin.

global $addonRelativeCode

A relative path to your plugin code.

This variable can be used to accurately point to files in your addon that need to be accessed from a browser.

Style Sheets

global $page,$addonRelativeCode;
$page->head .= '<link rel="stylesheet" type="text/css" href="'.$addonRelativeCode.'/style.css'.'" />';

Images

global $addonRelativeCode;
echo '<img src="'.$addonRelativeCode.'/image.png" />';

global $addonPathCode

An absolute path to your plugin code.

Similar to $addonRelativeCode, $addonPathCode gives you a path to the directory where your addon code resides. $addonPathCode, however, is an absolute path. eg /var/www/gpeasy/data/_addondata/addon_name

global $addonPathData

$addonPathData gives you an absolute path to a writable folder within the /data folder specific to your addon.

Note: To save files in the /data folder, you should use the static method gpFiles::Save($file,$contents) where $file is the absolute path of the file you want to save and $contents is the string you want saved in $file.

global $addonRelativeData

A relative path to the data directory specific to your addon.

News

Typesetter 5.1
8/12/2017

Typesetter 5.0.1 is now available for download. 5.1 includes bug fixes, UI/UX improvements, ... Read More

Over 8 Times Faster Than Wordpress
5/3/2016

We've known for a long time that Typesetter is fast. It's something we take pride ... Read More

More News

HH-Support

Company located in T├│rshavn, Faroe Islands. * Webpage Design * ReadSpeaker Distribution Partner * Consultant & Provider of a wide range of programs for visually impaired ...

Find out more about our Provider Spotlight

Log In

  Register