More wapka functions2

===============================================
=============================================== 

Tags for private messages:

Tags which allows you to display count of messages in inbox, outbox, trash or new messages.
Syntax of tag:
:pmcount-BOX:
Variable BOX can have one of 4 values:
in - InBox
out - OutBox
tr - Trash/deleted messages
new - New messages
Example: You have :pmcount-new: new messages.

You can also use :info: tag to display more attractive information about new private message.
Syntax of tag:
:info-pmnew:IS_VALUE::NO_VALUE:/info:
IS_VALUE - is displayed if user have 1 or more new messages. Can contains also %n% variable, which will be replaced for actual count of new PM
NO_VALUE - is displayed if user have no new message
Example:
:info-pmnew:You have %n% new private messages::No new private message at the moment:/info:

For access to private message box can be used tag in link URL.
Syntax of tag:
:pm: or :pm-BOX:
Alternative variable BOX can have one of 4 values:
in - Inbox
out - Outbox
tr - Trash
arch - Archive
new - Write new message

TIP: if you want to create link, to write new message with redefined user name use this URL tag: :pm-new(USER_NAME):
Or with redefined user name and text use this URL tag: :pm-new(USER_NAME@@TEXT):
===============================================
=============================================== 

Tags for friends function:

If you want to display informations about friends of your users use tag: :friends-FNC:
Variable FNC can containsone of following values:
-list - List of on-line friends
-ac - Total count of friends
-oc - Count of on-line friends
-act - Count of actived friends
-new - Count of new friend requests
-ref - Count of refused friends

Example: Actual count of your on-line friends is :friends-oc:

You can also use :info: tag to display more attractive information about friends.
Syntax of tag:
:info-FNC:IS_VALUE::NO_VALUE:/info:
FNC can have these values:
frnew - is displaying information about new friend on-line
fronl - is displaying information about all friends on-line
frreq - is displaying information about request of new friend
IS_VALUE - is displayed if is returned value 1 or more. Can contains also %n% variable, which will be replaced for actual count.
NO_VALUE - is displayed if is returned value 0
Example:
:info-fronl:You have %n% friends on-line::No friend on-line at the moment:/info:
===============================================
=============================================== 

Tags for statistics:

For statistics on your site you can use tag :stats:
Syntax of tag:
:stats-TYPE:
Variable TYPE can contains one of these values:
ru - count of registered users
lastlog-NN - list of last logged users (NN - max. count)
lastlog-NN-link - list of last logged users (NN - max. count) with link. After click on username will be displayed user profile
lastreg-NN - list of last registered users (NN - max. count)
lastreg-NN-link - list of last registered users (NN - max. count) with link. After click on username will be displayed user profile
todaylog-NN - list of today logged users (NN - max. count)
todaylog-NN-link - list of today logged users (NN - max. count) with link. After click on username will be displayed user profile
todayreg-NN - list of today registered users (NN - max. count)
todayreg-NN-link - list of today registered users (NN - max. count) with link. After click on username will be displayed user profile
users - list of on-line users
users-link - list of on-line users with link. After click on username will be displayed user profile
phones - list of on-line phones
country - list of on-line countries
olmc - number of the most users on-line (on-line record)
olmc-PARAM - number of the most users on-line for last day,week or month. Parameter PARAM can contains values t,w or m (t=today,w=week,m=month). Example: :stats-olmc-w:
olmd - date and time of the most users on-line
olmd-d - only date (without time) of the most users on-line
olmd-PARAM - date and time of the most users on-line for last day,week or month. Parameter PARAM can contains values t,w or m (t=today,w=week,m=month). Example: :stats-olmc-w:
usrloc - User name with his location (location is link)
usrloc-link - User name with his location (location and user name is link)
online - count of on-line users (same as function in edit site menu). This tag is not storing details about on-line record. So if you want to using also tag :stats-olmc/d:, use original on-line function from edit site menu
online-l - Count of logged on-line users
online-n - Count of nonlogged on-line users
online-NN - Count of on-line users on site ID: NN
ausers-NN - Most active users in forum (NN - max.count)
ausers-NN-link - Most active users in forum (NN - max.count) with link. After click on username will be displayed user profile

Example: Last logged users on this site: :br: :stats-lastlog-5:

For variables: lastlog, lastreg, todaylog, todayreg you can set NN also for more sites. Example:
:stats-lastlog-10: This will display records: 0,1,...,10
:stats-lastlog-10/2: This will display records: 11,12,...,20
:stats-lastlog-10/3-link: This will display records (links): 21,22,...,30
===============================================
=============================================== 

Elective tag for user statistics:

Tag :userstats: is designed for advanced users! For beginners is recommended to use tags from site "Tags for statistics".
Syntax of tag:
:userstats:PARAMETERS::LINE_FORMAT::DELIMITER:/userstats:
Parameters have following format:
Parameter1=value,parameter2=value,parameter3=value
Available parameters:
d - source database parameter.d parameter can have one of 6 values:
-ru: database of registered users
-oa: database of all actually on-line users
-ol: database of on-line users excluding anonym/unlogged users
-on: database of on-line users, only anonym/unlogged users
-fa: database of all friends
-fo: database of on-line friends
o - ordering parameter.o parameter can have one of 6 values (d=ru;oa;ol;on):
-n: order list by name
-dr: order list by date of registration
-dl: order list by date of last login
-cl: order list by count of logins
-cr: order list by count of credits
-t: order by time of last displayed site (only for on-line database: oa,ol)
l - limit parameter. l parameter can have numberic value (1 - 100). It is maximal count of lines for one site.
s - site parameter. This parameter is useful, if you want to separate list on more sites. For example if you want to display list with first 10 users set parameter l on 10 and parameter s on 1, if you want to display next 10 users (11-20) leave parameter l on 10 and parameter s set on 2.
a - Anonym name parameter. a parameter is available only for on-line database (d=oa).
n - No result text parameter. Set this parameter if you suppose, that you result can have no lines. For example if you displaying list of registered users for last hour.
tl - Login time limit parameter. This parameter must have numeric value in hours. With this parameter you can display list of users logged for last N hours. Parameter is available only for registered users database (d=ru)
tr - Registration time limit parameter. This parameter must have numeric value in hours. With this parameter you can display list of users registeres for last N hours. Parameter is available only for registered users database (d=ru)
wg - groups parameter. This parameter must have one or more (separated by space character) numeric values of group ID. Example: "wg=1 3 12". (d=ru;oa;ol;on)
ws - status parameter. This parameter must have one or more (separated by space character) numeric values of user status: 0=new user, 1=active user, 2=perm. blocked user, 3=temp. blocked user (d=ru;oa;ol;on)
wp - permission parameter. This parameter must have one or more (separated by space character) numeric values of admin/moderator permission: 1=usual user, 2=forum/chat moderator, 3=local admin, 4=global admin. (d=ru;oa;ol;on)
wc - credit parameter. This parameter must have two numeric values separated by hyphen. If wc parameter is set, then are displayed only users from credit interval n1-n2. For example, if you want to display users with more than 10 credits but with less than 100 credits set wc=10-100 (d=ru;oa;ol;on)
wl - location parameter. This parameter must have one or more (separated by space character) values of site/forum/chat ID, where in case of forum insert in front of forum ID character f and in case of chat insert c. Example: "wl=1 f3 c12".
df - date format parameter. With this parameter is possible set own time format for variables %rcdate% and %lcdate% (for example: df=j.m H:i)
ft - use this parameter, if you wanna display new,active or refused friends. Allowed values: act, ref, new. (d=fa;fo)
x - this parameter define special option for DELIMITER field. With value s (x=s) is DELIMITER field used as search field of users.
With value u (x=u) is DELIMITER field used as identifier of user name, especially if you wanna display data of selected user. (In case of d=fa or d=fo are displayed friends of selected user)
aau - anonym avatar URL parameter. Picture from this parameter will be used in case of anonym user in variable %picture% and %urlpicture%. Example: "aau=http://domain.com/picture.jpg". (d=oa,ol,on)

Only mandatory parameter is source database d. In case of not set others parameters will be used default values:
o: n
l: 50
s: 1
a: Anonym
n: NO_VALUE
tl: NO_VALUE(max time)
tr: NO_VALUE(max time)

For Line format can be used following variables:
%name% - User name
%tname% - User name (only text. No icons, no color, no picture)
%lname% - User name with link (link on profile or new private message form)
%location% - Location with link of user (if user is off-line will be displayed text "OFF-LINE" instead of link with location)
%tlocation% - Location without link, only text information
%akttime% - time different of aktual time and time of last visited site
%ipx% - IP adress in format 123.123.123.xxx
%ip% - IP adress of user
%country1% - Whole name of coutry
%country2% - abbreviation of country (2 letters)
%country3% - abbreviation of country (3 letters)
%flag% - Flag of country
%browser% - Browser of user
%ltime% - Last login time of user (hh:mm:ss)
%ldate% - Last login date of user (YYYY-MM-DD)
%lcdate% - Last login time of user (date format from df parameter)
%rtime% - Registration time of user (hh:mm:ss)
%rdate% - Registration date of user (YYYY-MM-DD)
%rcdate% - Registration date of user (date format from df parameter)
%clogin% - Count of logins
%picture% - Picture from profile
%urlpicture% - URL of picture from profile. This variable generate only URL, not whole picture code!!! It means, that must be used with HTML code. Example: <img src="%urlpicture%" alt="%tname%"/>
%groups% - Group/groups of user
%credit% - actual amount of credit
%prvar-N% - value from profile where N is variable ID. For example if you want to display information from ::var-1:: use %prvar-1%
%urlprofile% - URL to user profile. This variable generate only URL, not whole link code!!! It means, that must be used with HTML code. Example: <a href="%urlprofile%" > %name% </a>
%urlprcom% - URL to user profile comments. This variable generate only URL, not whole link code!!! It means, that must be used with HTML code. Example: <a href="%urlprcom%" > %name% </a>
%urlpchat%: - URL to the private chat with the user
%urlpm% - URL to send new private message to the user. This variable generate only URL, not whole link code!!! It means, that must be used with HTML code. Example: <a href="%urlpm%" > %name% </a>
%status% - user status (on-line/off-line)
%cprcom% - count of comments in profile
%urlfradd% - URL to add user as a friend. This variable generate only URL, not whole link code!!! It means, that must be used with HTML code. Example: <a href="%urlfradd%" > Add to my friends list </a>
%urlpopup% - URL to send new POP-UP message
%block_time% - Elapsed time of blocked user
%block_reason% - The reason, why was user temporarily blocked
%rights% - User rights (user,moderator,admin)
%sn% - Serial number of displayed row
%acc% - Link to activate new friend (d=fa;fo)
%ref% - Link to refuse friend (d=fa;fo)
%gfcount% - Displaying count of files in user's gallery.
%vote% - Displaying result of voting from profile

Line format can contains text,known values (%...%) or WML/xHTML tags

With Delimiter you can set text or WML/xHTML tags which will separate user records.

TIP: Set parameter l=0 if you want to display only count of lines from result. In this case is LINE_FORMAT and DELIMITER ignored

Examples:
Example 1: List of registered users ordered by name. Will be displayed only first 10 users. One line will contains user name and country flag.
Code example: :userstats:d=ru,o=n,l=10::%name% %flag%::<br/>:/userstats:
Result example:
Ann [FLAG]
Jane [FLAG]
John [FLAG]
Mike [FLAG]
...
Example 2: List of on-line users ordered by time of last visited site. In case of anonym user will be displayed text "non-logged user". One line will contains user name with link, browser and bold IP adress.
Code example: :userstats:d=oa,o=t,a=non-logged user::%lname% %browser% (<b>%ip%</b>)::<br/>:/userstats:
Result example:
Ann Nokia 6230 (123.12.123.12)
Sarah LG B2050 (234.23.234.23)
non-logged user Nokia E66 (111.22.111.22)
...
Example 3: List of users logged for last 24 hours ordered by date of last login. All users will be on one line separated by comma. In case of no user logged for last 24 hours will be displayed text "No user today".
Code example :userstats:d=ru,o=dl,n=No user today,tl=24::%name%::, :/userstats:
Result example:
John, Joe, Noe, Ann

Example 4: Searching users via elective tag
Code example:
<form method="get" action="site_100.xhtml">
<input type="text" name="get-search" value=":get-search:" />
<input type="submit" value="Search user" /></form>
:userstats:d=ru,x=s,n=user not found::%lname%:: :get-search: :/userstats:
Result is search form. Variable "get-search" is transferring input from user (minimal 2 characters are required) and result is list of searched users.

No comments:

Post a Comment