Recent Topics

1 Mar 07, 2008 02:59    

My b2evolution Version: 1.10.x

How do I edit the add comment form? I need to remove the field of website (url field). Another thing, if have submitted a comment, how do I make it back to the main blog page instead of the same adding comment page?

Thanks

I am using 2.4 with evopress

2 Mar 07, 2008 03:00

It seems like I have chosen a wrong version on the top. It is 2.4

3 Mar 07, 2008 03:25

In your skins folder you will see a php file called
_item_comment_form.inc.php

Att app line 107 you will find

		$Form->text( 'o', $comment_author_url, 40, T_('Website'), '<br />'.T_('Your URL will be displayed.'), 100, 'bComment' )

Removing that should remove the url input.

Remember to back up original files.

Post moved to Templates, Skins etc

4 Mar 07, 2008 03:30

Yeah something funny happens when you pick 2.* - every now and then it decides to pretend you picked 1.10.* for some reason. That's one of the reasons it is ALWAYS a good idea to include your link in either your profile or sig file or the body of your message.

So those fields will be found in ... lemme look ... skins/_item_comment_form.inc.php or maybe skins/yourskin/_item_comment_form.inc.php depending on if the second file exists or not. Look around line 100 or so, but then again that may be way off because I have this bad habit of hacking the hell out of my files :)

5 Mar 07, 2008 03:36

Thanks, then one more thing, if have submitted a comment, how do I make it back to the main blog page instead of the same adding comment page?

6 Mar 07, 2008 03:38

um... click on a link to the blog's main page?

7 Mar 07, 2008 03:40

I mean, once the form been submitted, it will bouce back to the same page. I want it to go to the main home page of the blog itself. Possible?

8 Mar 07, 2008 04:10

You will have to over-ride the $redirect_to parameter in the file that makes the comments happen. Probably the same file yah? Actually you might be able to just blank out the redirect and reach that goal, and by blank it out I mean make it be equal to '' or "nothing in between a pair of single quotes". Sorry but I don't have the file open at the moment so can't give you better details than that.

Hope it helps!

9 Mar 07, 2008 04:17

$Form->hidden( 'redirect_to',
// Make sure we get back to the right page (on the right domain)
// fplanque>> TODO: check if we can use the permalink instead but we must check that application wide,
// that is to say: check with the comments in a pop-up etc...
url_rel_to_same_host(regenerate_url( '', '', $Blog->get('blogurl'), '&' ), $htsrv_url) );

10 Mar 07, 2008 04:18

I just posted the coding you mention, taken from _item_comment_form.inc.php file.

11 Mar 07, 2008 04:19

like this:
url_rel_to_same_host(regenerate_url( '', '', '', ''), $htsrv_url) );

me: confuse :(

12 Mar 07, 2008 11:34

How about :

$Form->hidden( 'redirect_to',
// Make sure we get back to the right page (on the right domain)
// fplanque>> TODO: check if we can use the permalink instead but we must check that application wide,
// that is to say: check with the comments in a pop-up etc...
url_rel_to_same_host( $Blog->get('blogurl'), $htsrv_url) );

¥

13 Mar 07, 2008 18:03

Great, it works. Thanks a lot. You guys are so smart! I am learning a lot here.


Form is loading...