Front page
Split forum twig
GuestBook Twig
Youtube RSS Xtscript
Paged RSS Xtscript
This sites css
Login
•
Signup
Home
»
Xtscript
»
blog
»
random blog post list entry
» View post
Graham
This will output a random blog post list entry
This is for version 2 blogs you can add your language settings etc into the blog function
<!--parser:xtscript--> var $blog=<xt:blog entries_per_page="999" display="5" version="2"/> get __xtblog_entry if not $__xtblog_entry var $last_post=call strrpos $haystack=$blog;$needle=xt_item var $random=call mt_rand $min=0; $max=($last_post-12) var $item_start=call strpos $haystack=$blog;$needle=xt_item;$offset=$random var $item_end=call strpos $haystack=$blog;$needle=/div;$offset=$item_start var $item=call substr $val=$blog;$start=($item_start-12);$length=($item_end-$item_start+17) print <div class="xt_blog_parent"> <div class="xt_list"> <div class="xt_blog_post_list">$item</div></div></div> else print $blog endif <!--/parser:xtscript-->
Here is the same code for a version 1 blog
<!--parser:xtscript--> var $blog=<xt:blog entries_per_page="999" display="5" version="1"/> get __xtblog_entry if not $__xtblog_entry var $last_post=call strrpos $haystack=$blog;$needle=xt_blog_title_link var $random=call mt_rand $min=0; $max=($last_post-10) var $item_start=call strpos $haystack=$blog;$needle=xt_blog_title_link;$offset=$random var $item_end=call strpos $haystack=$blog;$needle=</span><br />;$offset=$item_start var $item=call substr $val=$blog;$start=($item_start-10);$length=($item_end-$item_start+17) print <div class="xt_blog" id="xt_blog"> <div class="xt_blog_post_list">$item</div></div> else print $blog endif <!--/parser:xtscript-->
#
14-03-29 09:41 •
(1)
Home
»
Xtscript
»
blog
»
random blog post list entry
» View post
Online: Guests: 1
Publish your forum to the catalog
CLICK HERE
slottyslot
KMan2100
DemolitionMissions
VanossGaming
BadLipReading
TheOfficialNASCAR
Uploaded
Length
Views
Rating
||
••
1
••
Yahoo world news
BBC world news
Yahoo oddly enough
BBC science and enviroment news
Yahoo world news
Trump frequently announces he's halting strikes in Iran. But they keep happening
.description.
2026-08-02T20:09:09Z
Japan to announce Tokyo, Washington took joint action on yen, sources say
.description.
2026-08-02T19:59:53Z
Israeli strikes kill 18 in Gaza, minister says no deal to halt attacks
.description.
2026-08-02T19:44:31Z
1
2
Log in