1 (edited by 2011-07-06 18:35:19)

Topic: [HACK] List Categories

Name: List categories
Author: unknown
CuteNews Compatibility: 1.3.6 - * (no incompatibility reported yet)
Description: Add a list of categories on your site. Each category will link articles from that category.

make a file. Call it "list_cats.php" and put it in the CuteNews root directory.
<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'><?PHP
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */

// If it is set to FALSE, the categories wont be displayed
// after a visitor click some category to see the news from it
  $display_categories_when_showing_news = TRUE;
$display_news_under_list = TRUE;

/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  Main Part (Do not edit below)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
$cutepath =  __FILE__;
$cutepath = preg_replace( "'\\\list_cats\.php'", "", $cutepath);
$cutepath = preg_replace( "'/list_cats\.php'", "", $cutepath);


if(($show_cat != "" and $display_categories_when_showing_news == TRUE) or $show_cat == ""){
    $cat_lines = file("$cutepath/data/category.db.php") or die("Can not open $cutepath/data/category.db.php");
    foreach($cat_lines as $cat_line){
        $cat_arr = explode("|", $cat_line);
        echo "[url=]{$cat_arr[1]}[/url]
if(isset($_GET['show_cat']) && preg_match('/^[1-9]{1}[0-9]{0,}$/', $_GET['show_cat'] && $display_news_under_list)){
    $category = $show_cat;
After making this file, add the following code so the list of categories may appear on your site

include( 'path_to_cutenews/list_cats.php' );

now use the following code for your CN include code if you don't want a list of articles in  the chosen category to appear under the category list, but shown instead of regualr news.

if(isset($_GET['show_cat']) && preg_match('/^[1-9]{1}[0-9]{0,}$/', $_GET['show_cat']))
$category = $_GET['show_cat'];

and change the value from true to false.

$display_categories_when_showing_news = TRUE;

Re: [HACK] List Categories

Name: Excluding categories from the list
Author: FUNimations
CuteNews Compatibility: 1.3.6 - * (no incompatibility reported yet)
Description: In case you want to keep 1 or more categories secret.
Requirements: List categories
in list_cats.php find

$cat_arr = explode("|", $cat_line);

When excluding 1 category add below

if( $cat_arr[0] == # ) continue;

where # must be the category ID

When excluding more then 1 category add below

if( in_array( $cat_arr[0], array( #,#, ) ) ) continue;

where #,#, must be replaced by the category ID's

Re: [HACK] List Categories

Hans Henry from Pasadena was looking for feared business plan

Benjamin Porter found the answer to a search query feared business plan



essay gre writing
essays on the book fahrenheit 451
graphic designer business plan
gotong royong english essay
hamlet paper research
essay on importance of speaking the truth
essays on morality of war
essay question about manifest destiny
essay of my last duchess
essay soccer game
free academic writing sample
essay on cognitive development theory
free apartment rental business plan
games to make homework fun
essay cars should be banned from the centres of big cities
give me a sample of an essay
functional resume for line cook
fresher resume for hr jobs
example descriptive essay ocean
guide writing critical lens essay
famous book reviewers
expository editor services ca
essay writing on maxima
grade 6 essay topics
ginger online proofreading
example cover letter science journal submission
essay on everglades national park
font for university essay
essay on the effect of climate change on food production
free sample of construction resume
essay topic the boss
free cover letter for quotation
essay on role of media
essay weekly communion with the occasional elbow
functional resume for custodian
finance analyst cover letter examples
head mechanic resume
fashion stylist internship cover letter
format of 5 paragraph essay
essay on legalism and confucianism
essayer conjugation present
example of a research paper on history
essays on odysseus homecoming
free argumentative essays death penalty
essay using paltry
free car lot business plan
functional resume editors
font for research papers
good english thesis topics
essay on our green world
essay on barack obama and mitt romney
freakonomics chapter 6 thesis
essay on how i spent my summer vacation for class 5th
essay about proposition 30
essay on why smoking is good
essay spanish american war 1898
format for emailing cover letter and resume
examples of five paragraph argumentative essay
free download resume formats in ms word
example of research paper on short stories
essay about my pet animal dog
essay example introduction
essay by definition
health care director cover letter
for someone do my homework
ets toefl speaking topics pdf
essay on favorite place in the world
essay on rites of passage
give thanks essay ces studies iv723 vom9 filmbay icv 730 ebooks 04w mj u77 txt
essays on animal farm napoleon
free essays for twelfth night
essay writing for kids my best friend
future shopping malls image essay
free internet essay
han china and rome comparison essay
essay about power of money
free sample executive cover letter mentioning i am african american
hamlet revenge essays free
fiber optics resume
government essay editing site
guidelines essay outline
essay on lal bahadur shastri in english
example of a research paper written in third person
example of apa format of reference
extended essay appendix sample

write my research paper
buy essays online
essay writing service

essay about smoking in public places
essay history of western art
free essay geometry in architecture
essay on cristmas day
essay contrast transitions
frankenstein villain essay
free business plan powerpoint template
essay on save energy save money