Recent Topics

1 Dec 08, 2007 16:27    

My b2evolution Version: 1.10.x

I have modified the _includecomments.php, so it now looks like this:


<ul>
<?php 
if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' ); 

$CommentList = & new CommentList( $blog, "'comment'", array('published'), '',    '',    'DESC',    '',    6 ); 
$CommentList->display_if_empty( '<div class="bComment"><p>'.T_('No comment yet...').'</p></div>' ); 

     
    while( $Comment = $CommentList->get_next() ) 
    {    // Loop through comments: 
        $Comment->get_Item();    ?> 
        <!-- ========== START of a COMMENT ========== --> 
        <a name="c<?php $Comment->ID() ?>"></a> 

			<li>			
            <?php $Comment->date() ?> - kl. <?php $Comment->time( 'H:i' ) ?> -
			<?php $Comment->Item->permanent_link('#title#') ?>
			</li>			

        <!-- ========== END of a COMMENT ========== --> 
        <?php  
    }    // End of comment loop. 
?>
</ul>

Is it possible to change the code, so when I click on tha Blogtitle, i will be sent to the newest comment, instead of just send to the top of the post ?

As always, any help are highly appricialted.

2 Dec 09, 2007 12:26

Got Link?

The thing is, the file you showed doesn't make post titles. It is *possible* to make post titles link to the comments, and possible to make the post title link to the "add a comment form", but you would have to edit _main.php to do it. Also, you would have to ask yourself if you want the title to link to the comments or comment form on multi-post pages, single post pages, or both.

A link to your blog will help!

3 Dec 10, 2007 09:15

Hi EdB

Thanks for your reply.

Okey, the thing is, I am good at HTML, but not good at PHP, and these days I find it difficult to find the time to learn :-/

You want a link to my blog - okey, but I am not sure that you reconize B2evo 8| (ofcause you can !)

Everything is in Danish, and you will find B2Evo camuflaged as a E-news paper B)

Down at the bottom, the collum to the left, I have a latest comments summary, and I would like the links to point to the new comment, instead of just the post.

Is it possible ?

The link is: www.skagensavis.dk

4 Dec 10, 2007 13:48

Try changing this line :

            <?php $Comment->Item->permanent_link('#title#') ?>

to this :

<?php		$Comment->permanent_link( $Comment->Item->title, '#', 'permalink_right' ); ?>

¥

5 Dec 10, 2007 14:21

So absolutely perfect !

Works perfect - thanks.


Form is loading...