CuteNews

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> categories
chiipss
post Aug 9 2012, 10:37 PM
Post #1


Newbie
*

Group: Members
Posts: 1
Joined: 9-August 12
Member No.: 78,791



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.
Go to the top of the page
 
+Quote Post
Support_Team
post Oct 9 2012, 12:00 PM
Post #2


Advanced Member
***

Group: Admin
Posts: 263
Joined: 17-January 12
Member No.: 74,486



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,

Support_Team
Go to the top of the page
 
+Quote Post

Fast ReplyReply to this topicStart new topic

 



RSS Lo-Fi Version Time is now: 18th May 2013 - 04:10 PM