Plotalot Variables

You can make use of the following variables in any text or query.

%%J_USER_ID%% The id of the currently logged on user
%%J_USER_NAME%% The name of the current user
%%J_USER_USERNAME%% The login/screen name of the current user
%%J_USER_EMAIL%% The email address of the current user
%%J_ROOT_URI%% The URI of the current site, e.g. http://www.mysite.com/
%%J_ROOT_PATH%% The file system path of the current site, e.g. G:\xampp\htdocs\test
%%J_CURRENT_DATE%% The current date as YYYY-MM-DD, retrieved using Joomla's date functions.
%%Pn%% Any number of Plugin Variables. These are defined by an upper case 'P' followed by a number. For example P0, P1 ... P9, P10, P11, etc.
%%Pn=default value%% Plugin variables can have default values.

Plotalot resolves variables before executing queries. For example:

SELECT `name`, `username` FROM `#__users` WHERE `id` = '%%J_USER_ID%%'

In the back end, this will retrieve the name and username for the currently logged on administrator. In the front end it retrieves the name and username for the currently logged on user.