1 the_kid_scareya Aug 29, 2005 20:21
3 the_kid_scareya Aug 29, 2005 21:53
I have a stub file called humor.php. The humor blog has its own category called "Default".
However, my index.php, which is under the Home blog has 4 categories (technology, sports, etc.), shows the posts from the Default category from the humor blog.
How do I get index.php to show just the 4 categories for the Home blog?
Thanks
4 personman Aug 29, 2005 22:19
I think index.php is showing your Blog All blog. Its blog id is 1. This is a special blog that shows all posts from all of your blogs. You need to create a new blog, put your 4 categories in it and have it displayed as the default blog on index.php.
5 the_kid_scareya Aug 29, 2005 23:01
can i use a stub file and rename it index.php?
<?php
$blog = 11; // select the blog that is your 'about' blog I take 5 in the example, because there are allreday 4 in the default b2e setting
$posts=''; // number of posts you want to display; on this contact/about me page, we only want 1 post
$skin = 'custom'; // Tell b2evolution you don't want to use evoSkins for this template:
$show_statuses = array(); // This setting retricts posts to those published, thus hiding drafts.
$linkblog = 4; // If you want to show a linkblog/blogroll with your favorite links/sites/whatever
$linkblog_cat = '16,17,18,19'; // This is the list of categories to restrict the linkblog to (cats will be displayed recursively)
$timestamp_min = ''; // we want to show posts that are published in the past
$timestamp_max = 'now'; // we don't want future posts to appear
require(dirname(__FILE__).'/b2evocore/_blog_main.php');
# Now, below you'll find the main template...
?>
6 personman Aug 29, 2005 23:08
can i use a stub file and rename it index.php?
Yes.
7 the_kid_scareya Aug 29, 2005 23:14
i was lookin at index.php
i know the categories num that i want on index.php (16-19)
whats the difference between recursive and non-recursive
# This is the list of categories to restrict the linkblog to (cats will be displayed recursively)
# Example: $linkblog_cat = '16,17,18,19';
$linkblog_cat = '';
# This is the array if categories to restrict the linkblog to (non recursive)
# Example: $linkblog_catsel = array(16,17,18,19 );
$linkblog_catsel = array( );
8 personman Aug 29, 2005 23:17
Wait, did you read [url=http://forums.b2evolution.net//viewtopic.php?p=24804#24804]this post[/url]? You shouldn't be using the blog all blog as the index unless you want it to show posts from all blogs.
Recursive means that if you create subcategories in one of those categories, the sub-cats will get shown, too.
9 the_kid_scareya Aug 29, 2005 23:21
oh ok...im gonna try that
10 edb Aug 29, 2005 23:23
Recursive is best explained with an example.
Lets say someone asks you to read a list. You do, and the list happens to be on the list. So what - you say it's name. You just read it like a normal person, which happens to not be recursive. Now, because you're a program, you read the list recursively. You get to the line where the list is on the list so you again begin to read the list. You silently curse at having to read the same list again, but you do it. Once again, you get to the exact same list on the list that you are reading because it was on the list you were reading. Now you RECURSE. Get it? Like one of those pictures of a mirror of a mirror of a mirror of a mirror...
Programically, "get the list of cats" gets re-done each time a cat is listed. That's how subcats get listed - the command "get the list of cats" is executed each time it it executed.
-------------
personman beat me to it, but I like my re-curse explanation so I'll post it anyway ;)
11 the_kid_scareya Aug 29, 2005 23:40
i got it....thanks....btw, thread resolved
Edit by EdB: resolved means lockable, and I'm glad you got it worked out.
I'm not sure I understand your quesiton. What is it that you want to do?