1996
HTML & templates / Re: to rejetto about templates
« on: October 05, 2007, 08:52:11 AM »
to use "?offset=10&limit=20"
in tpl, you find [folder] section as default template
[folder]
<tr><td>%new% %protected% <a href="%item-url%"?offset=10&limit=20"><img src="/~img_folder" /> <b>%item-name%</b></a>%comment%<td align=center><i>folder</i><td align=right>%item-modified%<td align=right>%item-dl-count%
"offset" is the first file who will appear 0=first
"limit " is number of total files
"?offset=0&limit=5" define files 1 to 6
"?offset=6&limit=5" define files 6 to 11
and ....
into a scrîpt somes variable are initiate deb=0 increment=limit_defined
[folder]
<tr><td>%new% %protected% <a href="%item-url%"?offset=deb&limit=increment"><img src="/~img_folder" /> <b>%item-name%</b></a>%comment%<td align=center><i>folder</i><td align=right>%item-modified%<td align=right>%item-dl-count%
with two button like
<a name=preview onclick=preview()>PRE</a>
associate with
function preview() {deb=deb-increment; if (deb<0) {deb=0}; return}
<a name=preview onclick=nextview()>NEXT</a>
associate with
function nextview() {deb=deb+increment; if (deb>%number%) {deb=deb-increment}; return}
i don't know how to export the value corresponding to %number% in javascript , must be tested..
Post your tests an results
thanks
in tpl, you find [folder] section as default template
[folder]
<tr><td>%new% %protected% <a href="%item-url%"?offset=10&limit=20"><img src="/~img_folder" /> <b>%item-name%</b></a>%comment%<td align=center><i>folder</i><td align=right>%item-modified%<td align=right>%item-dl-count%
"offset" is the first file who will appear 0=first
"limit " is number of total files
"?offset=0&limit=5" define files 1 to 6
"?offset=6&limit=5" define files 6 to 11
and ....
into a scrîpt somes variable are initiate deb=0 increment=limit_defined
[folder]
<tr><td>%new% %protected% <a href="%item-url%"?offset=deb&limit=increment"><img src="/~img_folder" /> <b>%item-name%</b></a>%comment%<td align=center><i>folder</i><td align=right>%item-modified%<td align=right>%item-dl-count%
with two button like
<a name=preview onclick=preview()>PRE</a>
associate with
function preview() {deb=deb-increment; if (deb<0) {deb=0}; return}
<a name=preview onclick=nextview()>NEXT</a>
associate with
function nextview() {deb=deb+increment; if (deb>%number%) {deb=deb-increment}; return}
i don't know how to export the value corresponding to %number% in javascript , must be tested..
Post your tests an results
thanks