Topic: categories

hey ...

i was trying to just edit the example2.php file that comes with cutenews.

i wanted to have it display just one category one a different template.


i put in the following on the indented line.


<?php

    /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      Here we decide what page to include
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */

    if($_POST['do'] == "search" or $_GET['dosearch'] == "yes"){ $subaction = "search"; $dosearch = "yes"; include("login/search.php"); }
    elseif($_GET['do'] == "archives"){ include("login/show_archives.php"); }
    elseif($_GET['do'] == "stats"){ echo"You can download the stats addon and include it here to show how many news, comments ... you have"; /* include("login/stats.php"); */ }
    elseif($_GET['do'] == "hours")$number=10;$template="hours";$category=5;include("login/show_news.php"); }
    else{ include("login/show_news.php");}

    ?>

let me know if you have a way to make it work.
thanks.

Re: categories

The sign "{" is missed

Change this script
elseif($_GET['do'] == "hours")$number=10;$template="hours";$category=5;include("login/show_news.php"); }

to the following:
elseif($_GET['do'] == "hours"){$number=10;$template="hours";$category=5;include("login/show_news.php"); }

Best regards,
CN Support team