Recent Topics

1 Mar 13, 2009 15:39    

My b2evolution Version: 2.x

I have tried searching for this, perhaps I may not be using the right keywords. And I only began trying out b2evo for the very first time since last Sunday, so you know am a total n00b !

Anyway, I am looking to change the Title of the Comments section to say:

There are no comments yet !
There is 1 comment so far
There are 3 comments

I am guessing that the code I am looking for is in the index.main.php, Is this right ?

<?php
				// ------------------ FEEDBACK (COMMENTS/TRACKBACKS) INCLUDED HERE ------------------
				skin_include( '_item_feedback.inc.php', array(
						'before_section_title' => '<h3>',
						'after_section_title'  => '</h3>',
					) );
				// Note: You can customize the default item feedback by copying the generic
				// /skins/_item_feedback.inc.php file into the current skin folder.
				// ---------------------- END OF FEEDBACK (COMMENTS/TRACKBACKS) ---------------------
			?>

If so, how do I go about modifying it ?

2 Mar 13, 2009 19:57

jaffermaniar wrote:

My b2evolution Version: 2.x

I have tried searching for this, perhaps I may not be using the right keywords. And I only began trying out b2evo for the very first time since last Sunday, so you know am a total n00b !

Anyway, I am looking to change the Title of the Comments section to say:

There are no comments yet !
There is 1 comment so far
There are 3 comments

I am guessing that the code I am looking for is in the index.main.php, Is this right ?

<?php
				// ------------------ FEEDBACK (COMMENTS/TRACKBACKS) INCLUDED HERE ------------------
				skin_include( '_item_feedback.inc.php', array(
						'before_section_title' => '<h3>',
						'after_section_title'  => '</h3>',
					) );
				// Note: You can customize the default item feedback by copying the generic
				// /skins/_item_feedback.inc.php file into the current skin folder.
				// ---------------------- END OF FEEDBACK (COMMENTS/TRACKBACKS) ---------------------
			?>

If so, how do I go about modifying it ?

I'm not sure with this but try this (make backups first)

Open the following files:
page.main.php or page.inc.php
single.main.php or single.inc.php
posts.main.php or posts.inc.php

Look for something like this:


// Link to comments, trackbacks, etc.:
$Item->feedback_link( array(
		'type' 				=> 'feedbacks',
		'link_before' 		=> '<span class="feedback">',
		'link_after' 		=> '</span>',
		'link_text_zero' 	=> '#',
		'link_text_one' 	=> '#',
		'link_text_more' 	=> '#',
		'link_title' 		=> '#',
		'use_popup' 		=> false,
	) );

See those # signs? Just change it accordingly.

Reply back if it works ^_^ Haven't really touched it, I always leave it as-is and I'm using [url=http://disqus.com/]DISQUS[/url] for my blogs' comment system ;)

3 Mar 13, 2009 21:44

No, I have seen this solution earlier in the forums but this is not what I am looking for.

After studying the _item_feedback.inc.php file, I believe the solution lies in there.

I found this small line:

$type_list = array();
$disp_title = array();

Which I can modify it to:

$type_list = array();
$disp_title = array('text'=>'There are');

To show:

There are, 4 comments

The comma comes from the line further below:

echo $params['before_section_title'];
echo implode( ', ', $disp_title);
echo $params['after_section_title'];

I know this is a durty way. Can I create an if-statement when there is only one comment to say:

There is one comment so far

What is the parameter for comment-count ?

Thanks !

4 Mar 13, 2009 22:12

Actually Laibcoms has given the answer that does exactly what you've asked for. So how about a link to your blog where we can see exactly what you're talking about because it is possible you're talking about something we're not seeing. Of course, there ain't no reason you can't hack in another way to get 'er done if you're into it.

6 Mar 13, 2009 22:35

Okay yeah that's gonna take a little bit of editing to get done, but not what you did. The thing you did was add stuff to an array that it is going to add stuff to, which is where you're getting the comment from. The thing is you can have feedback of three different types, so the 'title' to that bit identifies all three types. One is comments, then trackbacks, and finally the now-gone pingbacks.

Try this instead and see if it is going more your way:

// Link to comments, trackbacks, etc.:
$Item->feedback_link( array(
        'type'                 => 'comments',


That'd be in the area that Laibcoms pointed out - obliviously eh? Anyway then you'll be more in-business along the lines you're after.

I think!

7 Mar 14, 2009 03:50

I got it !

And the solution was on the same lines of yours !

I played around with the following code between lines 88 and 90 of _item_feedback_inc.php:


if( $title = $Item->get_feedback_title( 'comments' ) )
        {
            $disp_title[] = $title;
        }

Which I now have it to read:

if( $title = $Item->get_feedback_title( 'comments', 
        T_('There are no comments yet'.'<br />'.'Be the first !'), 
        T_('There is 1 Comment so far'), 
'        There are %d comments') )
	{
		$disp_title[] = $title;
	}

@EdB Yes, I now understand I have to make changes to the Pingbacks chunk and Trackbacks chunk as well.

You guys are super duper !

Thank you so much ! :)

8 Mar 14, 2009 04:20

Hey if you have a brand new blog then don't waste your energy on the pingback section. b2evolution no longer even tries to have inbound/outbound pingbacks is the thing, but the code has to have it just in case you're upgrading from when pingbacking was part of b2evolution's way.

Just a little info for ya there, but really once you get your thing figured out maybe it's just as easy to keep it all looking clean eh?

9 Mar 14, 2009 04:40

Yep, Ed is right, don't worry about the pingback section. The only blog platform I know that still relies on pingback is blogger/blogspot (they don't like to implement trackback for some reason).

Secondly, between now to 2022*, browsers will support the new Anchor &lt;a&gt; attribute "ping" that goes like this:


<a ping href="http://b2evolution.net/">b2evolution</a>

Which will do the pinging for you. Firefox 3.1 Beta 3 already supports it, but it is currently turned-off (there's some bug). If I'm not mistaken, Opera 10 and Safari 4 are already testing it. Not sure with IE8, I don't know how to test 'ping', I rely only in reading dev news.

* 2022 is the target date for HTML5 to become a "Standard", with 2 Specifications (one for vendors [ie browsers] and another for webmasters [that way, we dont have to read stuff we dont really need since it is for vendors]), and APIs (yeah APIs within HTML :p )

But, other parts are already either semi-finalized or finalized like <aside>, <section>, <video>, <audio> (some, if not all, are being implemented for the next version of the major browsers, including IE8).


Form is loading...