Forum Index
RegisterSearchFAQMemberlistUsergroupsLog in
Showing Mulitple Categories

 
Reply to topic    Forum Index » Bugs and errors View previous topic
View next topic
Showing Mulitple Categories
Author Message
SolidSnake2003



Joined: 31 Jul 2007
Posts: 54

Post Showing Mulitple Categories Reply with quote
Im having problems displaying mulitple categories for an include. I included the master category for one section, but when I tested it, it shows all categories

<?PHP
$number = '5';
$category = '2';
$template = 'home_news';
include("........./admin/show_news.php");
?>
Wed Feb 20, 2008 1:54 pm View user's profile Send private message
Guest








Please login to hide the ads.

scottdallas



Joined: 04 May 2006
Posts: 1843
Location: US

Post Reply with quote
well you only have '2' specified.. but you're saying even when you specify '2' it shows more than that category? does it do it on any other categories or just 2? i remember people having trouble with category 2 and 12.. maybe it's just something with the ID

_________________
www.scottdizzle.com uses cnr Smile
last update: 07-22-08: 8:30 pm
Thu Feb 21, 2008 5:53 am View user's profile Send private message Visit poster's website AIM Address
Mania



Joined: 03 Feb 2007
Posts: 106

Post Re: Showing Mulitple Categories Reply with quote
SolidSnake2003 wrote:
Im having problems displaying mulitple categories for an include. I included the master category for one section, but when I tested it, it shows all categories

<?PHP
$number = '5';
$category = '2';
$template = 'home_news';
include("........./admin/show_news.php");
?>

1, this include is not recommended
Code:
 include("........./admin/show_news.php");

that is correct include
Code:
include $cutepath.'/show_news.php';

Read Me please
2. for your problem with category
just replace this in /inc



show.news.php.zip
 Description:
fix the showing multiply Category in show news

Download
 Filename:  show.news.php.zip
 Filesize:  3.03 KB
 Downloaded:  29 Time(s)

Thu Feb 21, 2008 9:35 am View user's profile Send private message
SolidSnake2003



Joined: 31 Jul 2007
Posts: 54

Post Reply with quote
scottdallas wrote:
well you only have '2' specified.. but you're saying even when you specify '2' it shows more than that category? does it do it on any other categories or just 2? i remember people having trouble with category 2 and 12.. maybe it's just something with the ID


Yes thats exactly right

What it is, 2 is the master category for news, and Ive got different categories as Sub-Categories of that, but when I run the test page, its showing news from another category that Ive checked, and its not a sub-category of the main news
Thu Feb 21, 2008 11:25 am View user's profile Send private message
scottdallas



Joined: 04 May 2006
Posts: 1843
Location: US

Post Reply with quote
There's been so many threads on strange category issues.. it's hard to tell where yours lies. #2 seems to be the most common category to mess up.. or maybe not but I'm just going from my memory here.

So, my recommendation (which isn't really fixing it, just what I would do so I didn't go insane) would be to try creating a new category for 'News' and put all your sub-categories under it.. then change the category in your pages, reupload, and forget about it. I say that cause I know it's kinda annoying to have the id #'s for categories all wacko numbers but sometimes it's just too hard to avoid, that's why it's great we can +/- them up and down now.

_________________
www.scottdizzle.com uses cnr Smile
last update: 07-22-08: 8:30 pm
Sat Feb 23, 2008 12:39 pm View user's profile Send private message Visit poster's website AIM Address
SolidSnake2003



Joined: 31 Jul 2007
Posts: 54

Post Re: Showing Mulitple Categories Reply with quote
Mania wrote:
SolidSnake2003 wrote:
Im having problems displaying mulitple categories for an include. I included the master category for one section, but when I tested it, it shows all categories

<?PHP
$number = '5';
$category = '2';
$template = 'home_news';
include("........./admin/show_news.php");
?>

1, this include is not recommended
Code:
 include("........./admin/show_news.php");

that is correct include
Code:
include $cutepath.'/show_news.php';

Read Me please
2. for your problem with category
just replace this in /inc


I downloaded your file, but its not working for me. Its including the news, but Ive specified the categories, but its still showing news that is not in the specified categories

This is the include Im using

<?PHP
$number = 3;
$category = '1,4,5,6,7,8,9,10,11,12,13,14,15';
$template=home_news;
include $cutepath.'/show_news.php';
?>

Ive just tried including 1 which is the main category, and 4-15 is its subcategories
Sat Feb 23, 2008 12:41 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    Forum Index » Bugs and errors All times are GMT + 1 Hour
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum



Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Music Lyrics.