boardom Forum Index boardom
b2 message board
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Have different categories on different pages.

 
Post new topic   Reply to topic    boardom Forum Index -> How to ?
View previous topic :: View next topic  
Author Message
Carol



Joined: 22 Mar 2002
Posts: 5
Location: Sydney

PostPosted: Fri Mar 29, 2002 8:07 am    Post subject: Have different categories on different pages. Reply with quote

Ok, I'll just start off by telling you that I'm not very familiar with php and have just started using b2.

Is it possible to use b2 for more than the 'blog' section of the site? I'm trying to see if I can have different categories on different pages, so that I can use b2 when I want to update other sections of the site.

I want 2 categories for the 'blog' section and wants to show several entries on one page.

I want a separate category for each of the other sections, and for them to display one entry at a time.

Can I do that?
Back to top
View user's profile Send private message Visit poster's website
Toxicity555



Joined: 09 Feb 2002
Posts: 50
Location: USA

PostPosted: Fri Mar 29, 2002 1:40 pm    Post subject: Reply with quote

Definately. On my site I use b2 to manage my entire site. What I have done is syndicated updates into RSS so that they show up on my home page. From there, I have linked to the b2.php file and told it to display only certain categories. When i post a story, I use the <!--more--> function to add a teaser to the top of the story, which automatically links to the entire story. It works great. Hope this helps!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Carol



Joined: 22 Mar 2002
Posts: 5
Location: Sydney

PostPosted: Sat Mar 30, 2002 11:09 am    Post subject: Reply with quote

Yea, I sort of get what you mean. Can I have different layouts for each section?

And how do I do what you just said? I'm sorry but it's like staring into empty space when I look at the codes.
Back to top
View user's profile Send private message Visit poster's website
michel v
Site Admin


Joined: 25 Jan 2002
Posts: 799
Location: Corsica

PostPosted: Sun Mar 31, 2002 2:17 pm    Post subject: Reply with quote

Yes, you can have different layouts for different sections. Just create different templates: copy index.php or b2.php into a new file, and edit that new file, and you have a different template. Smile
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Junior



Joined: 23 Apr 2002
Posts: 6

PostPosted: Tue Apr 23, 2002 9:29 am    Post subject: Not a clue how to do this ? Reply with quote

Guys I'm real new to this b2 and amd strugglingto pick up Php along the way .. I want to have a number of seperate categories [news/events/reports/etc] but was wondering how to I config b2 so that users post to individual pages ?

Any help would be much appreciated.

Cheers
Junior
Back to top
View user's profile Send private message
Junior



Joined: 23 Apr 2002
Posts: 6

PostPosted: Tue Apr 23, 2002 5:42 pm    Post subject: Reply with quote

Ok I've looked thru the How-To Section on this board and I've tried the suggested solution in a number of other threads.

It doesn't work for me, B2 is running at http://www.cruiseirl.com/news/ I added the $cat=cat number code to the head of http://www.cruiseirl.com/news/events.php but it seems to take in all the postings.

Could some one please point me in the right direction

TIA

Junior
Back to top
View user's profile Send private message
Toxicity555



Joined: 09 Feb 2002
Posts: 50
Location: USA

PostPosted: Wed Apr 24, 2002 2:37 am    Post subject: Reply with quote

Can you post the first few lines of the code? That should help find the problem...
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Junior



Joined: 23 Apr 2002
Posts: 6

PostPosted: Wed Apr 24, 2002 9:28 am    Post subject: Reply with quote

Here's the start of the events page
Code:

<?php cat = 2; ?>
<?php /* Don't remove this line, it calls the b2 function files ! */  $blog=1; include ("blog.header.php"); ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">



I had it like this below and it didn't do anything either.
Code:

<?php /* Don't remove this line, it calls the b2 function files ! */  $cat=2; $blog=1; include ("blog.header.php"); ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
Back to top
View user's profile Send private message
Toxicity555



Joined: 09 Feb 2002
Posts: 50
Location: USA

PostPosted: Wed Apr 24, 2002 4:04 pm    Post subject: Reply with quote

<?php /* Don't remove this line, it calls the b2 function files ! */ $blog=1; $cat=2; include ("blog.header.php"); ?> Try moving the $cat statement after the blog statement, might help. I just tested it out again and it seems to still be working fine.
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
imeridian



Joined: 12 Feb 2002
Posts: 191

PostPosted: Thu Apr 25, 2002 7:58 am    Post subject: Reply with quote

<?php $cat = "-7+6"; ?>

is a way to "block" categories 6 and 7.

<?php $cat = "1 2 3"; ?>

will show only categories 1, 2, and 3.
Back to top
View user's profile Send private message Visit poster's website
Junior



Joined: 23 Apr 2002
Posts: 6

PostPosted: Thu Apr 25, 2002 9:37 am    Post subject: Reply with quote

Cheers people for all your help I'm indebted to you all for figuring that simple thing out for me !

Cheers again

Junior
Back to top
View user's profile Send private message
|DarkNoise|



Joined: 26 Nov 2003
Posts: 1

PostPosted: Wed Nov 26, 2003 7:39 am    Post subject: Reply with quote

k well we know now we can have various categories on each page, but what about having 2 categories in seperate parts of the page, eg a different category in a different cell of a table...

ive been trying to figure this out for days. say we state that $cat=1 then query the db can we change or clear and restate $cat=2 and re-query the db?
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    boardom Forum Index -> How to ? 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


Powered by phpBB 2 © 2001, 2002 phpBB Group