Mtop

Welcome to mtop

Join the forum, it's quick and easy

Mtop

Welcome to mtop

Mtop

Would you like to react to this message? Create an account in a few clicks or log in to continue.
Mtop

Welcome to mtop forum tel your adia for wapmaster servicer earn post your problam in site bulding or hosting i hope on this method we can impro our knowledge for better benifat get from sites


    tags for file and filelist

    avatar
    Admin
    Admin


    Posts : 3
    Join date : 2011-08-21

    tags for file and filelist Empty tags for file and filelist

    Post  Admin Tue Aug 23, 2011 11:53 am

    Tags for files:
To create link on file for download use tag:
:file-FILE_ID:
Example: :file-1:
Note: ID of every uploaded file you can find in file manager

Tags displaying informations about file:
Tag syntax:
:fstat-FUNCTION-FILE_ID:
Variable FUNCTION can have following values:
name - File name
dl - Total count of downloads
dltoday - Today count of downloads
added - Date of file upload
last - Date of last file download
browser - Name of last browser, which downloaded file
user - Name of last user, which downloaded file
size - File size
uploader - Name of user, who uploaded file (if file was uploaded by File Uploader function)
dirname - Directory name (instead of FILE_ID use directory name)
Example: File size is: :fstat-size-1:

Tags displaying informations about last uploaded file by user
Tag syntax:
:fustat-FUNCTION:
Variable function can have following values:
user - Name of user which added file
size - File size
name - File name
date - Date of file upload

Tag displaying summary informations about files:
Tag syntax:
:ftstat-FUNCTION:
Variable FUNCTION can have following values:
count - Count of all uploaded files
size - Size of all uploaded files
dl - Count of downloads of all files
dlsize - Total traffic.
maxupl - actual maximal size of file

Elective tag for files:
Tag :filelist: is designed for advanced users! For beginners is recommended to use above tags.
Syntax of tag:
:filelist: PARAMETERS :: LINE_FORMAT :: DELIMITER :/filelist:
Parameters have following format:
Parameter1=value,parameter2=value,parameter3=value
Available parameters:
o - ordering parameter. o parameter can has 5 values:
- n : order list by file name
- s : order list by file size (the biggest first)
- d : order list by count of downloads
- tl : order list by last download time (last downloaded first)
- tu : order list by time or upload (new first)
d - directory parameter. This parameter must have one or more (separated by space character) values of directory ID. If you want to display files from User upload directory skip this parameter
If you want to display files from User gallery, use directory ID " g " (d=g)
l - limit parameter. l parameter can have numeric value (1 - 50). It is maximal count of lines (files) 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 files set parameter l on 10 and parameter s on 1, if you want to display next 10 files (11-20) leave parameter l on 10 and parameter s set on 2.
n - No value parameter. This parameter contain's text, whis is displayed, if no file is not displayed.
credit - this parameter define, how many credits will be increased or decreased from users account for download of file (credit=-10)
ucredit - this parameter define, how many credits will be increased or decreased from users account of user, who uloaded file (ucredit=10)
nc - set value of this parameter to 1 ( nc=1 ) if you don't wanna update counters of file when is downloaded (useful for picture previews)
tu - With this parameter is possible to display files uploaded for last XX hours. For example tu=5 displays only files uploaded for last 5 hours.
dc - default comment parameter. Value from this parameter will be used instead of %comment% if %comment% is empty
x - this parameter define special option for DELIMITER field.
- With value s (x=s) is DELIMITER field used as search field of files.
- With value u (x=u) is DELIMITER field used as field, where you can set user name. With this option you can display files uploaded by selected user
- With value i (x=i) is DELIMITER field used as field, where you can set File ID (from %file_id%). With this option you can display only one selected file

Default values of parameter (if it's not set):
o : n
d : [User uploads]
l : 20
s : 1

For Line parameter can be used following variables:
%name% - File name
%lname% - File name (link)
%url% - URL of file, must be used with<a>xHTML code. Example:<a href="%url%">%name%</a>
%size% - Size of file
%count% - Count of downloads
%time_added% - Time, when file was uploaded (DD.MM.YYYY HH:MM:SS)
%time_downl% - Time, when file was last time downloaded (DD.MM.YYYY HH:MM:SS)
%user_upl% - User, who uploaded file
%luser_upl% - User, who uploaded file (link)
%user_last% - User, who last time downloaded file
%luser_last% - User, who last time downloaded file (link)
%comment% - comment of file
%file_id% - File ID
%file_type% - Content-type of the file
%wcode% - WCODE code
%del% - Create link to remove file uploaded by user. Only owner(uploader) or moderator(with edit profile permission) can remove file and only files from gallery (d=g) is possible to remove with this link!
%del-SiteID% Same as %del%, but user will be redirected to SiteID, when file is removed
%var-ID% Text variable
%var-ID(f=FUNCTION)% File variable. Function f can contains these values: img, link, url, id ( img is file in IMG HTML code, link is file in A HTML code, url is URL of the file, id is file ID from file manager)
%sn% - Serial number of displayed row

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

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

Example:
:filelist:o=s, d=1 2 5, n=no files available::<b>%lname%</b><br/>Size: %size%::<hr/>:/filelist:

Example 2 (simple gallery):
1. Add File uploader with Directory: [x] User gallery
2. Add tag :filelist: d=g,x=u :: %lname% %del-0% :: :get-user: :/filelist: (user is redirected to the homepage if remove file)
3. Into the autocontent of your profile add code: <a href="site_ID.xhtml?get-user=:getid-profile::admin-hash-amp:">Gallery&lt/a>
4. That's all, but make sure, that :filelist: from point 2. is in same site ID, as site_ID.xhtml from point 3.!

Tips:
1. Use parameter l=0 if you wanna display count of files instead of the list.
1. Use parameter l=-1 if you wanna display total size of files instead of the list.

IMPORTANT: Make sure, that you own all rights and licences to publish uploaded files, otherwise your site can be blocked by admin according to Wapka.Mobi terms of service
More advanced functions


      Current date/time is Fri Apr 19, 2024 4:02 am