1 gcasanova Feb 04, 2007 17:47
3 gcasanova Feb 05, 2007 13:03
Thanks Topanga but I must ask you to excuse my ignorance and tell me where should I put that code into.
Best Regards
4 topanga Feb 05, 2007 16:24
in _main.php
Look for the first line, and just add the second line
5 bit Feb 28, 2007 00:34
Topanga wrote:
if( isset($MainList) ) while( $Item = & $MainList->get_item() ) { if( $blog == 1 and in_array( $Item->main_cat_ID, array( 5, 98, 191, 312, 311, 171, 176) ) ) continue; ?>
That looks incredibly awkward to me. Could you please explain what all those numbers mean?
Thanx in advance,
Sebastián
6 topanga Feb 28, 2007 08:33
They are just category numbers
7 bit Feb 28, 2007 19:03
Topanga wrote:
They are just category numbers
Sorry for bothering again, but --does this mean that you must alter that code every time you add or delete a category?
8 topanga Feb 28, 2007 23:46
And how many times do you add a category in your linkblog ?
To me that amount seems very limited
9 bit Mar 01, 2007 21:32
Topanga wrote:
And how many times do you add a category in your linkblog ?
To me that amount seems very limited
You're right, of course. But now --how do I know which are the numbers for each category? The interface doesn't show them.
10 edb Apr 27, 2007 00:09
Go to your Categories tab, select your linkblog, and run your mouse over each category name. The cat_ID will show up at the bottom of your browser window because it's part of the link.
11 kallewirsch Apr 27, 2007 11:22
General question on this issue: Why do you hide blogs by category? (cf. http://forums.b2evolution.net/viewtopic.php?t=3591 also)
If someone creates a new cat on the hidden blog, you have to update your array of hidden cats.
So why not looking up the ID of the blog the current item belongs to and exclude by blog ID like this:
$excluded_blog_ID = array(2,11,42); // can be put in a config file?
// Define List of blogs to be excluded from blog all
if ($blog == 1 && in_array($Item->blog_ID,$excluded_blog_ID ) == true){
// if we are on blog all and the blog ID of the current
// item is on the exclusion list do nothing
}
else { //otherwise show item
// put the normal stuff here
}// close bracket before END OF POSTS bracket
(note: I'm not a programmer, please don't blame me for weird code ;) )
12 edb Apr 27, 2007 17:51
Because posts aren't in blogs - they're in cats and cats are in blogs. If you think about it a bit it'll make sense. Else how could you post something in multiple blogs?