I am using my 'all' blog for my main page - I have sucessfully used the following code to limit which posts end up on the 'all' blog as some of my blog pages don't fit with the others:
if( isset($MainList) ) $MainList->display_if_empty(); // Display message if no post
if( isset($MainList) ) while( $Item = $MainList->get_item() )
{
if ($Item->get('main_cat_ID') != '62' )
if ($Item->get('main_cat_ID') != '63' )
if ($Item->get('main_cat_ID') != '59' )
if ($Item->get('main_cat_ID') != '52' )
if ($Item->get('main_cat_ID') != '53' )
if ($Item->get('main_cat_ID') != '54' )
if ($Item->get('main_cat_ID') != '55' ){
$MainList->date_if_changed();
?>
and another little } after the <?php }
Now what I want to do is something similar with my sidebar comments that I added to the page.
http://www.coldheartedtruth.com/
As you can clearly see... this is mainly a political blog with some 'hobby' blogs on the side, including an NFL blog and a "Rock Star INXS" blog. So I have prevented the categories from those blogs from appearing on the main blog.
But on the sidebar... where I post the latest comments... all you see (the day of the final INXS show) is comments from that blog... which I would like to only appear on that blog as it stifles political discussion.
Here is the code I use for the folder that is called from my main.php
<?php
if( !defined('DB_USER') ) die( 'Please, do not access this page directly.' );
$CommentList = & new CommentList( $blog, "'comment'", $show_statuses, '', '', 'DESC', '', 15 );
$CommentList->display_if_empty( '<div class="bComment"><p>'.T_('No comment yet...').'</p></div>' );
while( $Comment = $CommentList->get_next() )
{ // Loop through comments: ?>
<!-- ========== START of a COMMENT ========== -->
<a name="c<?php $Comment->ID() ?>"></a>
<div class="bCommentinclude">
<div class="bCommentText">
<b><?php $Comment->author( '', '', '', '', 'htmlbody', true) ?> writes:</b><br />
<?php $Comment->content() ?></a> <br>
<em>From - <a href="<?php $Comment->Item->permalink() ?>"><?php $Comment->Item->title( '', '', false ) ?></em><br><br>
</div>
</div>
<!-- ========== END of a COMMENT ========== -->
<?php
} // End of comment loop.
?>
I tried doing something similar - with the same code put in after then Get Next () ) - but that didn't appear to work...
Or is there something I can do in the _main.php?
<li id="meta"><?php echo T_('Comments'); ?>:
<ul><li><h4>
<?php // -------------------------- COMMENTS INCLUDED HERE -----------------------------
require( dirname(__FILE__).'/_lastcomments2.php' );
// -------------------------------- END OF COMMENTS ---------------------------------- ?>
</h4></a></li>
</ul>
</li>
Any Ideas??
I can't plainly see your sidebar because your web is still giving me a 403-Forbidden page. Are you blocking ISPs through your host that happen to shut me out, or maybe you have b2evolution.net in your local antispam list?