Recent Topics

1 Oct 27, 2006 20:19    

I am using b2evolution 0.92, and am looking for a way to customize a skin so that I only display a certain category of posts at startup. I would like the other categories to be available in the normal way.

3 Nov 17, 2006 13:17

You ned to use stubfiles for this to work out.

Put this in the top of your stubfile :
$cat=xx // the number of your cat you want to show

4 Nov 29, 2006 02:53

Topanga wrote:

You ned to use stubfiles for this to work out.

Put this in the top of your stubfile :
$cat=xx // the number of your cat you want to show

Thanks for the suggestion Topanga, but when I go to do this I can not see any posts from any of my other categories. It only shows from the one I set the $cat=xx too.

Any suggestions on how I can get this to work? Also I'm using version 1.8.2.

5 Nov 29, 2006 08:18

Hi webjoker,

You might want to look at [url=http://forums.b2evolution.net/viewtopic.php?t=9307#46004]THIS[/url] (read the bit after the simple PHP line) as *I think* this might be what you want (your blog comes up with a default category, but ALL the other categories can be accessed from it, like a normal-looking blog). It's kind-of a "trick-a-roo" solution, but it does work. ;)

Hope this helps.

6 Dec 03, 2006 01:18

I looked over and I'm testing it out. I have multiple blogs and it looks like I would have to do this on all of them, and I was trying to keep away from so many files, but hey who knows.

So there is no way to change the default of showing all the posts from all the categories to only showing a certain categeory? I don't mind modifying some files. :)

Thanks for the suggestion stk.

7 Dec 05, 2006 04:39

Greetings,

Ok after looking over your post stk I came up with this solution that seems to be working for me at the moment.

I placed this code right above where you set the blog in the stub file.

if ($cat == ''){
$cat = '##'; // category you want to show
}

# First, select which blog you want to display here!

It allows me to set a certain category to show first, then your still able to select another category and have no restrictions. I'm not sure if the php code is valid, but I've been testing it on my blog and it seems to be working just fine. Just so people know I'm using version 1.8.2.

If the php code is not valid and someone knows how to make it valid, I would be more than happy to edit and fix my post.

Thanks again for your help, I don't think I would have got it unless you pointed me in that direction. :D

Update:
Well what I did is still working ok, but I have come across a problem. When I go to the archives, use the calendar, or do a serach it is sticking to the default category I put it to. Didn't think about that one. :) Well, back to the drawing board! ;)

8 Jan 07, 2007 01:22

It is not so good because if users will use search, for example, e.g. anything in non category context they still will see the default category Title and other things.
I think better is to define it on URI's basis - default only if they hit URI of the blog itself without any params.


if ($_SERVER['REQUEST_URI'] =='/the_blog') {
	$cat = ##;
}


Form is loading...