logo
Home XtGem- Templates- XtScript- bottom

Paged rss feed xtscript function

This Xtscript function adds
to the standard XtGem rss reader
The pagination is created using XtGem pagination Blocks in the Xtscript
So Xtscript custom pagination can also be used
Css colors are for demo purposes only

Yahoo world news

Main CSS class names

You can change these in the scripts if you wish
xt_feed = outer container (purple)
xt_feed_select = feed selector container (blue)
xt_feed_title = feed title (red)
xt_feed_inner = inner container (yellow)
xt_feed_item = (cyan) added via template
xt_pagination = pagination container (green)

Settings Xtscript

must go above the main Xtscript

Main Xtscript

Must go below the settings Xtscript

Time ago xtscript/javascript

Must go below the main Xtscript
For "time ago" conversion to work
.pubDate. must be wrapped in a element named pubdate in the $template variable

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 :)