logo
Home XtGem- Templates- XtScript- bottom

Paged content functions

From html only
Advanced users only
To create paged content on your sites there are some special function codes
To start the paged area use a code block containing
<!--parser:xt_pagination-->
A paged content break is defined using this code.
(you can have as many paged content blocks as you wish)
<!--parser:xt_page_split-->
To close the paged area use
<!--/parser:xt_pagination-->
Great care must be taken to ensure your paging functions and paged content are correctly placed within your main pages containers Xt script custom paging scripts can also be used with the paging function
Use custom paging
script
Use standard paging

Example
This is above the paged area so it will appear on all pages This text is in the first (default) paged block and will show when your page first loads
Any type of Xtgem building tool block , html code , javascript , Xtscript or widget can be used to construct your paged content blocks
United States Mozilla
1234
This is below the paged area so it will also appear on all pages

xtscript image rating

Cookie controlled random sequence image display with xtcat rating widget
Image rating xtscript
Back to posts
Comments:
[2016-07-20] Jjna9Y1r1kr :

What's it take to become a sublime exednuopr of prose like yourself?

[2015-09-18] free wallpapers :
[2015-07-23] Graham :

testing

[2015-05-04] tda :

<!--parser:xtscript-->

settings

var \$path=/myimages
var \$filter=.
var \$user=YOUR XTCAT USERNAME
var \$key=YOUR XTCAT KEY
var \$stars = 5
var \$interval=Day
var \$text1=Total Average Rating
var \$text2=Not Yet Rated. Be The First.
var \$text3=Your Rating
var \$text4=Out Of
var \$text5=Total Votes
var \$button1= Rate It!
var \$cookie
name = rndimg
var \$cookie_expire = 2419200

script

var \$list=<xt:filelist sorttype="name" sortdir="asc" folder="\$path" template="|.filename." perpage="" filter="\$filter"/>|
var \$number=<xt:filelist sorttype="name" sortdir="asc" folder="\$path" template="*" per_page="" filter="\$filter"/>
var \$number=call strlen \$val=\$number
var \$cookie=call cookie::get \$name=\$cookie_name;\$default=0
if \$cookie
goto @loop3
endif
@loop1
var \$cookie=call mt_rand \$min=1;\$max=\$number
var \$cookie=.\$cookie.
var \$count=1
@loop2
var \$rand=call mt_rand \$min=1;\$max=\$number
var \$used=call strpos \$haystack=.\$cookie;\$needle=.\$rand.
if \$used
goto @loop2
endif
var \$cookie=\$cookie\$rand.
var \$count=\(\$count+1)
if \$count < \$number
goto @loop2
endif
var \$cookie=\$cookie\$number
call cookie::set \$name=\$cookie_name; \$val=\$cookie;\$expire=\$cookie_expire;\$force_current=1
@loop3
var \$check_start=call strrpos \$haystack=\$cookie;\$needle=.;
var \$check=call substr \$val=\$cookie;\$start=\(\$check_start+1);
if not \$check==\$number
call cookie::set \$name=\$cookie_name; \$val=0;\$expire=-1;\$force_current=1
goto @loop1
endif
var \$num_end= call strpos \$haystack=\$cookie;\$needle=.;\$offset=1
var \$num=call substr \$val=\$cookie;\$start=1;\$length=\(\$num_end-1)
var \$length= call strrpos \$haystack=\$cookie;\$needle=.;
var \$cookie=call substr \$val=\$cookie;\$start=\$num_end;\$length=\(\$length-\$num_end+1)
var \$cookie=\$cookie\$num.\$number
call cookie::set \$name=\$cookie_name; \$val=\$cookie;\$expire=\$cookie_expire;\$force_current=1
var \$offset=1
var \$entry_count=1
@loop4
var \$entry_end= call strpos \$haystack=\$list;\$needle=|;\$offset=\$offset
if \$entry_count < \$num
var \$entry_count=\(\$entry_count+1)
var \$offset=\(\$entry_end+1)
goto @loop4
endif
var \$entry=call substr \$val=\$list;\$start=\$offset;\$length=\(\$entry_end-\$offset)
var \$call=call crc32 \$val=\$key\$entry

output

var \$template=.filenamebaseparsed. <br /><img style='max-width:100%' src='.fileurl.' alt='.file_name.' /><br /><xt:widget tool="Ratings" interval="\$interval" call="\$call" key="\$key" xtuser="\$user" stars="\$stars" text1="\$text1" text2="\$text2" text3="\$text3" text4="\$text4" text5="\$text5" button1="\$button1" id="xt.c.a.t." />
var \$template=call htmlspecialchars \$val=\$template
var \$output=<xt:filelist folder="\$path" template="\$template" filter="\$entry"/>
print <div style="text-align:center;margin:1em 0">\$output</div>
<!--/parser:xtscript-->

[2015-02-03] Honesty :

komai

[2014-08-08] alii :

Snd

[2014-05-28] Rohitprjapat :

Haw are you

[2017-04-04] WSdXSrQZ :

These topics are so cofisunng but this helped me get the job done.

[2014-05-12] Makayla :

אתר בנושא הזמנות לאירועים,הזמנות לחתונה מעוצבות,הזמנות לבת מצווה,הזמנות לבת מצווה מומלץ ביותר!
<a href="http://www.kiwibox.com/industriou137/blog" >Makayla</a>

[2014-02-18] yudha_m0teng :

helo prend

[2014-01-14] Edmundas :

Good job! nice pics btw 8)

[2014-01-12] rajiv :

Sir, need Most rated IMAGE.... and "next" text as "skip"...

[2014-01-12] Graham :

I cannot really do any stats I cannot get the data
the next and reset buttons are not in the script
The button is just a link back to the page to make it reload you can add it your self

[2014-01-12] rajiv :

Awesome sir, COOL :)


Powered by XtGem
About us Contact Forum top