Recent Topics

1 Sep 20, 2005 20:32    

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??

2 Sep 20, 2005 20:36

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?

3 Sep 20, 2005 20:45

I did have 2 ISPs blocked... I unblocked them. Try again.

4 Sep 20, 2005 20:55

That did it! I think I'm a "12.blah" lately. I'm on a dialup so it changes. I'll take a look at your issue and see if I can figure something out.

EDIT: The problem is going to be how comments are stored in the database. Comments are tied to a post_ID, and posts are tied to a category, and categories are tied to a blog. Since you're using a category list already we might be able to tinker at that level, but it'll (of course) be something you'll have to remember each time you add a category. Oh and upgrade! v10 is like so-o-o 2004... ;)


Form is loading...