1 (edited by 2008-08-21 19:56:30)

Topic: [HACK] Random Category

$matches[1] show news from a random category.
$matches[1] John/Will
$matches[1]StealthEye
$matches[1] 1.3.6 - * (no incompatibility reported yet)
$matches[1] Make a page which shows news from 1 category, picked out of a list of different categories.
$matches[1]


<?php
if (empty($subaction)) {
  $numbers = array(x,xx,xxx,x,xx,xxx,x,xx,xxx);
  $random = $numbers[rand(0,count($numbers)-1)];
  $category= $random;
}

$template = "your-template";
$number = "xxx";
include("cutenews/show_news.php");
?>

Use the above instead of your standard CN include code.

This could be useful for some people ".handle_img_tag($matches[1].$matches[3], false)."

$matches[1] is where you input the category ids.  Might not work with subcategories but you can always try.