Is it possible to duplicate the random block so that it works, but only pulls stories from a single category? So that it works as well as the normal random function... or instead of the normal random function?
why is nothing ever easy?
url: http://www.pretendercentre.com/missingpieces/
php: 5.2.5 msql: 5.0.45-community
efic version: 3.4.3 latest patches: yes
bridges: none mods: challenges, displayword, beta-search
I bet it's fairly simple. You'll probably need to change this line in random.php:
$randomquery = dbquery(_STORYQUERY." ORDER BY rand( ) DESC LIMIT $limit");
Maybe try...
$randomquery = dbquery(_STORYQUERY." AND stories.catid = X ORDER BY rand( ) DESC LIMIT $limit");
Where X is the ID of the category in question.
To make it a separate block you just have to rename the blocks folder and change all the arrays like $blocks['random'] to a new name, as well as the .tpl outputs from {random}
Thanks so much Lyndsie, that worked a treat.
I will try looking at duplicating the block later and report back.
why is nothing ever easy?
url: http://www.pretendercentre.com/missingpieces/
php: 5.2.5 msql: 5.0.45-community
efic version: 3.4.3 latest patches: yes
bridges: none mods: challenges, displayword, beta-search
