Wapka.org Tags & function (Aug 2, 2019)

Tags:
Tag code is useful for dynamic website. You can use this tag in any wapka function.
:VAR(SITE_NAME); - To get your website name. e.g. qikmob.tk
:VAR(PAGE_NAME); - To get page name e.g. index
:VAR(PAGE_ID); - To get page id e.g. 63387
:VAR(PAGE_TYPE); - To get page content type (default = text/html)
:VAR(USER_NAME); - To get logged user name e.g. Admin
:VAR(USER_ID); - To get logged user id e.g. 12345
:VAR(USER_EMAIL); - To get logged user email
:VAR(USER_IP); - To get user IP address
:VAR(USER_AGENT); - To get http user agent string
:VAR(BROWSER); - To get browser name e.g. Chrome
:VAR(SCHEME); - To get url scheme e.g. http
:VAR(HOST); - To get http host
:VAR(URL); - To get full url or Uniform Resource Locator
:VAR(URI); - To get Uniform Resource Identifier
:VAR(URL_QUERY); - To get query string
:VAR(HTTP_METHOD); - HTTP request method
:VAR(HTTP_REFERER); - To get http referer
Helper function:
You can use helper function with tag codes. Helper function is very useful for data processing.
:GET(name); - To get http get data use similar tag
:POST(name); - To get http post data you can use similar tag
:COOKIE(name); - To get http cookie data you can use similar tag
:REQUEST(name); - To get data form request data
:VAR(NEW).VALUE(var value).DEFINE(name); - Variable is used for store data. You can use this function to define variable. You can also redefine variable - :GET(id).TRIM.INT.DEFINE(ID); then you can use :VAR(ID); to get value. You can use variable later by using :VAR(name);
DEFAULT(value) - Set a default value for a tag or variable. Usage - :POST(data).DEFAULT(value); when data not set empty then use default value.
ENCODE(html or url or base64) - encode data in html or url or base64 format. Encode user input to prevent XSS attack :GET(name).ENCODE(html);
DECODE(html or url or base64) - decode html or url or base64 encoded data
LOWER - convert all character lower case. If you want to make user name lower case you can use :VAR(USER_NAME).LOWER; or :GET(name).LOWER;
You can use it with any tag.
UPPER - convert all character to upper case
TRIM - Strip whitespace from tags.
LENGTH - To get length of data
INT - To make sure data is numeric
NULL - If you want to call a function and hide result use this at the end. :GET(data).NULL; show nothing
PLUS(numeric value) - Math function.
MINUS(numeric value) - Math function
DIVIDE(numeric value) - Math function
MULTIPLY(numeric value) - Math function
Math function usage: - To calculate data you can use math function. Example usage: :GET(id).INT.PLUS(100); , :VAR(key).PLUS(100).PLUS(100).DIVIDE(2);
Tags:
You can use bbcode to write forum/blog post
[b]This is bold text[/b]
[i]This is italic text[/i]
[code]This is pre-formatted text[/code]
[quote]This is a quote[/quote]
[quote="Obama"]This is a quote by a specific person[/quote]
[size=30]This text's size is set at 30%[/size]
[s]This text has a strikethrough[/s]
[u]This text is underlined.[/u]
[center]This text is centered[/center]
[color=red]This is red text[/color]
[email]someone@somewhere.com[/email]
[email=someone@somewhere.com]An e-mail link[/email]
[url]http://www.google.com/[/url]
[url=http://www.google.com/]Visite Google.com![/url]
[img]http://i.imgur.com/WqYEO.jpg[/img]
[url=http://en.wikipedia.org/wiki/Ninja][img]http://i.imgur.com/8d7Yu.jpg[/img][/url] - Image with link
This is an unordered list:
[list]
[*]list item #1
[*]list item #2
[*]list item #3
[/list]
This is an ordered (numbered) list:
[list=1]
[*]list item #1
[*]list item #2
[*][b]bold list item[/b] #3
[/list]
This is an ordered (alpha) list:
[list=a]
[*]list item #1
[*]list item #2
[*][b]bold list item[/b] #3
[/list]
Youtube video
[youtube]http://youtu.be/DabwEqsWWiA[/youtube]
[youtube]http://www.youtube.com/watch?v=DabwEqsWWiA[/youtube]
Login Form
Code:

Login user redirect to:

Language settings:
Login error:
Account inactive:
Temporary blocked:
Account blocked:
Login success:

Place item After:

Item will be visible for:

Note:
Tags: %notify% Show message on error or success
Registration Form
Code:

Spam word (for username and email):

Registerd user redirect to

Language settings:
Registration error:
Username invalid:
Invalid email:
Password error:
Username error:
Email error:
Password not match:
Registration success:

Place item After:

Item will be visible for:

Note:
Tags: %notify% Show message on error or success

You can get extra data from user.

To input extra data set input name="var-<variable name>"   Example:
If you want to get user country name from user you can set input like -
HTML: <input type="text" name="var-country" />
Variable name must be a..z 0..9_ (1-20 character)
Maximum 20 extra input allowed
New user list:
Configaration (ini text):
Enter codes:
Header
Footer
User not foud:

Place item After:

Item will be visible for:

Tags:
Parameters:
id - set User id. You can set many user id (id = 1, 2, 3, 4)
username - set user name
email - set user email
status - all, active, inactive, blocked
search - set a key word to search user
page - set page number
order - List order (asc or desc)
orderby - Ordering key (id or username or regdate)
url - required only for paging
lang_(next or prev or last or first) - If you want to show your own text in paging use like lang_next = Next Page
Tags (for code):
%id% - get user id
%username% - get username
%regdate% - User registration date
%email% - get user email
%status% - user status
%var(extra_data)% - Extra saved user data
%logincount% - user total successful login count
%logindate% - Last login date
%regip% - User ip when user registerd account
%loginagent% - Http user agent when user login

Tags (for header & footer):
%count% - Number of user showing
%pagenum% - Total page number
%total% - Total user number
:PAGING(%prev% %num% %next%); - this is pagination tag.
New user profile:
Configaration (ini text):
Enter codes:
User not foud:

Place item After:

Item will be visible for:

Tags:
Parameters:
id - set User id (you can use tag like :VAR(USER_ID);)
username - set user name)
email - set user email
status - all, active, inactive, blocked
Tags (for code):
%id% - get user id
%username% - get username
%regdate% - User registration date
%email% - get user email
%status% - user status
%var(extra_data)% - Extra saved user data
%logincount% - user total successful login count
%logindate% - Last login date
%regip% - User ip when user registerd account
%loginagent% - Http user agent
New message sender:
Configaration (ini text):
Enter codes:

Place item After:

Item will be visible for:

Tags:
Parameters:
For MESSAGE you must set receiver userid or username or email using tag code or variable
userid - set receiver userid (you can use tag like :GET(userid);)
username - set receiver user name (:GET(username);)
email - set receiver email
min_length - set minimum message length (default 20 character)
max_length - maximum message length (maximum 2000 character default 1000)
Tags:
%notify% - show notification
New message list:
Configaration (ini text):
Enter codes:
Header
Footer
Empty message

Place item After:

Item will be visible for:

Tags:
Parameters:
userid, username - set which user message you want to display (you can use tag like :GET(userid).INT;)
limit - set message display limit (max 50)
type - message display from (inbox or outbox, by default show from both)
page - set optional page number (you can use tag like :GET(page).INT.DEFAULT(1);)
order - message display order (asc, desc)
url - set url for pagination
status - set message status (read or unread) you can use status = unread to make notification system
Tags:
%id% - get message id
%sender_id%, %receiver_id% - get sender and receiver userid
%sender_name%, %receiver_name% - get sender and receiver username
%sender_avatar%, %receiver_avatar% - to get gravatar
%sender_email%, %receiver_email% - get sender and receiver email
%type% - message in (inbox or outbox)
%msg%, %msg(500)% - to get full message or number of character
%date%, %date(AGO)%, %date(Y-m-d H:i:s)% - message sending date.
%status% - message status (read, unread)
%delete% - link to delete
Tags (for header and footer):
%total% - total message number
%count% - number of message displaying
%pagenum% - Total page number
:PAGING(%first% %prev% %num% %next% %last%); - Pagination

New Folder list:
Configaration (ini text):
Enter codes:
Header
Footer
Folder empty

Place item After:

Item will be visible for:

Tags:
Parameters:
dir - set dir id (0 for root directory)
id - set folder id (you can use many folderid like: folderid = 1, 2, 5, 100)
name - set folder name
limit - set optional folder display limit (max 100)
page - set optional page number (you can use tag like :GET(page).INT.DEFAULT(1);)
orderby - folder order key (id or name)
order - display order (asc or desc)
url - require only for pagination (set page url to use in pagination)
lang_(next, prev, first, last) - set pagination text (lang_next = Next page)
Tags (for codes):
%id% - Get folder id
%name% - folder name.
%dir% - get directory id.
%filenum% - Number of files in folder
%size% - folder size.
Tags (for header & footer):
%total% - Total folder number
%count% - Folder display number
%pagenum% - Total page number
:PAGING(%first% %prev% %num% %next% %last%); - set pagination like this
New File list:
Configaration (ini text):
Enter codes:
Header
Footer
File not found

Place item After:

Item will be visible for:

Tags:
Parameters:
id - set File id (you can use tag like :GET(fileid).INT;)
userid - set user ID
limit - set file display limit (max 30)
page - set optional page number (you can use tag like :GET(page).INT.DEFAULT(1);)
orderby - sorting key id, name, size, date
order - order (asc or desc)
dir - set file folder id
status - public or private file
search - search file by keyword
name - set file name
format - set file type or extention

Tags (codes):
%id% - get file id
%name% - get file name
%size%- File size
%date% - File upload date
%thumb% - File thumbnail link
%format% - File format
%userid% - File uploader id
%username% - File uploader username
%dir% - Folder id
%dirname% - Folder name
%status% - File status (public or private)
%var(variable)% - Extra saved data
%download_link% - file download link
%delete_file% - file delete (owner & admin can delete file)

Tags for header & footer:
%count% - Number of file displaying
%total% - Total file number
%pagenum% - Total page number
:PAGING(%first% %prev% %num% %next% %last%); - Pagination
New File viewer:
Configaration (ini text):
Enter codes:
File not found

Place item After:

Item will be visible for:

Tags:
Parameters:
id - set File id (you can use tag like :GET(fileid).INT;)
userid - set user ID
status - public or private file
name - set file name

Tags (codes):
%id% - get file id
%name% - get file name
%size%- File size
%date% - File upload date
%thumb% - File thumbnail link
%format% - File format
%userid% - File uploader id
%username% - File uploader username
%dir% - Folder id
%dirname% - Folder name
%status% - File status (public or private)
%var(variable)% - Extra saved data
%download_link% - file download link
%delete_file% - file delete (owner & admin can delete file)
New Forum list:
Configaration (ini text):
Enter codes:
Header
Footer
No forum found:

Place item After:

Item will be visible for:

Tags:
Parameters:
id - set forum id (you can set many forum id like: id = 1, 2, 5, 100)
name - set forum name
limit - set optional forum display limit (max 100)
page - set optional page number (you can use tag like :GET(page).INT.DEFAULT(1);)
orderby - forum order key (id or name)
order - display order (asc or desc)
url - require only for pagination (set page url to use in pagination)
lang_(next, prev, first, last) - set pagination text (lang_next = Next page)
Tags (for codes):
%id% - Get forum id
%name% - forum name.
%postnum% - Number of posts
Tags (for header & footer):
%total% - Total folder number
%count% - Forum display number
%pagenum% - Total page number
:PAGING(%first% %prev% %num% %next% %last%); - set pagination like this
New Forum list:
Configaration (ini text):
Enter codes:
Header
Footer
No forum found:

Place item After:

Item will be visible for:

Tags:
Parameters:
id - set forum id (you can set many forum id like: id = 1, 2, 5, 100)
name - set forum name
limit - set optional forum display limit (max 100)
page - set optional page number (you can use tag like :GET(page).INT.DEFAULT(1);)
orderby - forum order key (id or name)
order - display order (asc or desc)
url - require only for pagination (set page url to use in pagination)
lang_(next, prev, first, last) - set pagination text (lang_next = Next page)
Tags (for codes):
%id% - Get forum id
%name% - forum name.
%postnum% - Number of posts
Tags (for header & footer):
%total% - Total folder number
%count% - Forum display number
%pagenum% - Total page number
:PAGING(%first% %prev% %num% %next% %last%); - set pagination like this
New post creator:
Configaration (ini text):
Enter codes:

Place item After:

Item will be visible for:

Tags:
Parameters:
For POSTS you must set forumid
forumid - set forum id (you can use tag or variable)
status - set new post status (published, draft, inreview)
Tags:%notify% - show notification
New post list:
Configaration (ini text):
Enter codes:
Header
Footer
No post found

Place item After:

Item will be visible for:

Tags:
Parameters:
id - set post id (you can use multiple post id or tag code or variable)
title - set post title
userid - you can set userid to get all post created by a user
forumid - set forum id to get post by category
limit - set post display limit (max 20)
page - set page number (you can use tag like :GET(page).INT;)
order - set disply order (asc or desc)
orderby - Sort post by key (id, title, created)
status - published, in review, draft, trash or all
search - search posts using keyword

Tags:
%id% - get post id
%title% - get post title
%text% - post content
%text(100)% - to get number of post character
%userid% - post creator id
%username% - post creator username
%created% - Post creation date
%modified% - Post modification date
%forumid% - Forum id
%views% - Post view count
%comments% - Post comment count
%delete% - to delete post (admin & creator can delete)
%forumname% - forum name
%status% - post status (published, draft, in review, trash)
%var(variable)% - Extra saved data
Tags (for header & footer):
%count% - Number of posts
%total% - Total posts number
%pagenum% - Total page number
:PAGING(%first% %prev% %num% %next% %last%); - Pagination
New post viewer:
Configaration (ini text):
Enter codes:
No post found

Place item After:

Item will be visible for:

Tags:
Parameters:
id - set post id
title - set post title
userid - you can set userid to get post created by a user
forumid - set forum id to get post by category
status - published, in review, draft, trash or all

Tags:
%id% - get post id
%title% - get post title
%text% - post content
%text(100)% - to get number of post character
%userid% - post creator id
%username% - post creator username
%created% - Post creation date
%modified% - Post modification date
%forumid% - Forum id
%views% - Post view count
%comments% - Post comment count
%delete% - to delete post (admin & creator can delete)
%forumname% - forum name
%status% - post status (published, draft, in review, trash)
%var(variable)% - Extra saved data
New comment:
Configaration (ini text):
Enter codes:

Place item After:

Item will be visible for:

Tags:
Parameters:
You can use this function to added comment system in any page, forum, posts.
pid - set a ID (you can use page id, file id, forum id or post id. Example :VAR(PAGE_ID);)
name - commenter name (for non logged user)
status - comment status (approved or inreview, default approved)
email - email of non logged user (if you allow guest comment)
min_length - set minimum comment length (default 20 character)
max_length - maximum comment length (maximum 1000 character default 300)
tags:
%notify% - show notification
New comment list:
Configaration (ini text):
Enter codes:
Header
Footer
No comment found

Place item After:

Item will be visible for:

Tags:
Parameters:
pid - set pid to get comment (you can use tag or variable)
userid - set User id ( use 0 for guest comment)
limit - set comment display limit (max 50)
status - set comment type approved, inreview, all (default approved)
page - set optional page number (you can use tag like :GET(page);)
order - comment display order (asc for old first, desc for new first)
lang_(next or prev or first or last) - language for pagination
url - url for pagination
Tags:
%id% - get comment id
%comment% - to get comment text
%date% - comment date & time
%username% - get user name
%ip% - get commenter ip
%userid% - get user id (0 for guest)
%email% - get user email
Tags (for header & footer):
%total% - total comment number
%count% - comment showing
%pagenum% - total page number
:PAGING(%prev% %next%); - pagination