Forum Index
RegisterSearchFAQMemberlistUsergroupsLog in
Problem 2 category in one page

 
Reply to topic    Forum Index » Bugs and errors View previous topic
View next topic
Problem 2 category in one page
Author Message
krzysiekk



Joined: 25 Nov 2007
Posts: 3

Post Problem 2 category in one page Reply with quote
Hi I have problem

I want include 2 category on one page but different space..

when I include show me error:

Code:
Warning: Cannot modify header information - headers already sent by (output started at /users/k****/www/at*****.org/admin/inc/show.news.php:235) in /users/k*****/www/at******.org/admin/show_news.php on line 1


please help me
Wed Sep 24, 2008 11:52 am View user's profile Send private message
Guest








Please login to hide the ads.

Partyism



Joined: 25 Sep 2007
Posts: 301

Post Reply with quote
what is your include code?!
Wed Sep 24, 2008 12:37 pm View user's profile Send private message
krzysiekk



Joined: 25 Nov 2007
Posts: 3

Post Reply with quote
<?
$number = '10';
$template = 'Default';
$category = '1';
include('admin/show_news.php');?>

and

<?
$number = '2';
$category = '7';
$template = 'Default3';
include('admin/show_news.php');?>
Wed Sep 24, 2008 12:48 pm View user's profile Send private message
Partyism



Joined: 25 Sep 2007
Posts: 301

Post Reply with quote
<?PHP
$number = '10';
$template = 'Default';
$category = '1';
include($cutepath.'/show_news.php');
?>

and

<?PHP
$static['number'] = '2';
$static['category'] = '7';
$static['template'] = 'Default3';
include('admin/show_news.php');?

>
Wed Sep 24, 2008 1:51 pm View user's profile Send private message
nam



Joined: 23 Dec 2006
Posts: 141

Post I am pazzled with templates Reply with quote
Dear Partyism,

I am very much puzzled with the template and the way they are used in CNR. I have posted a number of questions on this forum but no one answer.

I followed the way you've posted the include code above, it works fine in the index page, but when click on to view the full news, the Default template is used for all the posts regardless of their category.

What do you suggest to solve it?

And next question is: when you create a category, there you can also specify the template for it, but practically it has no impact and Default template is used instead. So what is the need of it?

To be brief, I have different templates for different categories, but can’t manage to practically use them for the related categories.

Thanks in advance for your any help.
Wed Sep 24, 2008 3:59 pm View user's profile Send private message
pollawat88



Joined: 29 Mar 2007
Posts: 10

Post Re: I am pazzled with templates Reply with quote
nam wrote:
Dear Partyism,

I am very much puzzled with the template and the way they are used in CNR. I have posted a number of questions on this forum but no one answer.

I followed the way you've posted the include code above, it works fine in the index page, but when click on to view the full news, the Default template is used for all the posts regardless of their category.

What do you suggest to solve it?

And next question is: when you create a category, there you can also specify the template for it, but practically it has no impact and Default template is used instead. So what is the need of it?

To be brief, I have different templates for different categories, but can’t manage to practically use them for the related categories.

Thanks in advance for your any help.


when u added news or edited news ,u had to chose the template what u like before
Thu Sep 25, 2008 12:50 am View user's profile Send private message
Partyism



Joined: 25 Sep 2007
Posts: 301

Post Reply with quote
yo nam,

Check my website http://www.partyism.nl It has the same as you wanted. Four includes on the frontpage all working in different templates/styles.
When you include your news you have to set a template. So if you whant to show your related news in a different template for example: create a template "related"

Include your related news as followed

<?PHP
$static['number'] = '5';
$static['category'] = '1,2,3,4,5,6';
$static['template'] = 'related';
include('admin/show_news.php');
?>

ps what is your website?
Thu Sep 25, 2008 10:50 am View user's profile Send private message
Partyism



Joined: 25 Sep 2007
Posts: 301

Post Reply with quote
also make sure that in your admin section -> manage categories you set the template at your wish
Thu Sep 25, 2008 12:33 pm View user's profile Send private message
krzysiekk



Joined: 25 Nov 2007
Posts: 3

Post Reply with quote
still not working...
Thu Sep 25, 2008 6:54 pm View user's profile Send private message
Partyism



Joined: 25 Sep 2007
Posts: 301

Post Reply with quote
it should. What is your website again?!
Fri Sep 26, 2008 7:52 am View user's profile Send private message
scottdallas



Joined: 04 May 2006
Posts: 2027
Location: US

Post Reply with quote
Are you still getting the same errors? We might need to see some code to figure out what the problem is cause Partyism gave a very accurate idea of what to do and it works fine. Are you including head.php at the top of your website and all (necessary) pages within?

_________________
www.scodal.com is an example of cnr as a social forum - www.scottdizzle.com is an example of cnr as a personal website to share whatever cool stuff i feel like. i have another, but it's nsfw. pm me Wink
Fri Oct 10, 2008 7:38 pm View user's profile Send private message Visit poster's website AIM Address
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.