Recent Topics

1 Jun 15, 2007 06:46    

My b2evolution Version: 1.9.x

I want it to say "Leave A Comment" instead and I'd also like a little more space between that text link and the Permalink text link right before it. How could I do this?

2 Jun 15, 2007 07:02

/inc/MODEL/items/_item.class.php
line 1610

if( $zero == '#' ) $zero = T_('Leave a comment');

jj.

3 Jun 15, 2007 08:16

If you do it from your skins/yourskin/_main.php file you won't lose your modification when you upgrade. Almost every function in your _main.php file can be fed customizing information. In this case you want to customize where it says something like

<?php $Item->feedback_link( 'comments', '' ) // Link to comments ?>


http://doc.b2evolution.net/v-1-9/evocore/Item.html#methodfeedback_link is a technical page about the function, so all you have to do is feed the function something for each parameter in the order it wants them.

The first parameter is "type" and the second is "before".

<?php $Item->feedback_link( 'comments', '&nbsp;' ) // Link to comments ?>


I guess it could have been ' ' for the second, but in the end it's a space either way. The third parameter is "after" so we'll have it but leave it blank.

<?php $Item->feedback_link( 'comments', '&nbsp;', '' ) // Link to comments ?>


Then comes the stuff you'll want to change - the text you get depending on how many comments.

<?php $Item->feedback_link( 'comments', '&nbsp;', '', 'Leave a comment', 'Leave a comment', 'Leave a comment'  ) // Link to comments ?>


Now it will say "Leave a comment" no matter how many comments you have.

4 Jun 15, 2007 08:20

Nice... learned me somethin'.

How would you ensure that the image which precedes the link remains? For example, if you add parameters for edit_link, as so:

		$Item->edit_link( ' &bull; ', '', 'Edit this post', 'Edit this post' ); // Link to backoffice for editing

the little mini-icon which precedes the 'Edit this post' link disappears...

jj.

5 Jun 16, 2007 06:37

Thank you both very much! With the help of this forum I'm tweakin' my blog up quite nicely.

6 Jun 16, 2007 07:11

jibberjab wrote:

... How would you ensure that the image which precedes the link remains? For example, if you add parameters for edit_link ...

A wee bit off-topic, but so what. In this case I wouldn't ensure that the image stays. Check out http://doc.b2evolution.net/v-1-10/__filesource/fsource_evocore__blogsincMODELitems_item.class.php.html#a1831 and you'll see that in this case if you don't use '#' for that parameter then you won't get the little edit icon. Line 1843 is the big wazoo of the moment. That's for v1.10* by the way.

Unfortunately not every function is as tweakable as all others, and sometimes you'll find functions that seem to do a similar job having a completely different set of parameters driving them. Bummer eh?

7 Jun 16, 2007 08:37

$Item->edit_link( ' &middot; ' , '' , get_icon( 'edit', 'imgtag' ).' edit this post', 'edit this post'  ); // Link to backoffice for editing

;)

¥


Form is loading...