Recent Topics

1 Dec 30, 2010 01:43    

My b2evolution Version:

Is there any way to remove the disp=comments page, whilst still allowing commenting on posts? Nobody can visit the disp=comments page from anywhere on my site, but it still shows up in search results, and I just want to remove it from view altogether.

Sorry if this has been asked and answered, couldn't find it via a search in the forums.

Thanks in advance!

2 Mar 23, 2011 08:56

Does anybody have any answers to this? I've tried a number of ideas but still nothing has worked.

3 Mar 27, 2011 05:52

Use .htaccess to send 404 response if requested URI matches disp=comments

4 Mar 27, 2011 08:15

Ah, I'd been trying redirects, but had completely (stupidly) forgotten about 404s. Is there a way to get the b2evo 404 page to appear? I've never done 404s before manually but all the tutorials on the net show is how to direct to a file: would I just do a condition where it points to the 404 skin file?

I've used b2evo for a while and I'm guessing that wouldn't work properly...

5 Mar 27, 2011 15:55

Redirect to ?disp=404 ;)

6 Mar 28, 2011 09:52

Thanks. I'm still struggling to find a decent tutorial (that isn't just a generic 404 one) but in the meantime: I'm guessing that if I just delete the skin file, b2evo will throw up errors of its own? This is one of those things I just wish I could turn off in the backend... I really don't need a whole page of comments, just the comments to appear on the posts themselves.

7 Mar 28, 2011 17:55

Edit the file /inc/_blog_main.inc.php line 606 and add the following

switch( $disp )
{
	//case 'subs':
	//case 'arcdir':
	//case 'catdir':
	case 'comments':
		$disp = '404'; // Display 404 Not found page
}

if( !empty($disp_handlers[$disp]) )

You can disable some other disp types, just uncomment them or add new.

8 Mar 29, 2011 07:52

There is no line 606 (note I'm using 3.3.2) in that file. Can you tell me where specifically to add it?

Thanks so much for the help!

9 Mar 29, 2011 18:52

Add the code I wrote above this line of code

if( !empty($disp_handlers[$disp]) )


You should see it near the end of the file, use search

10 Mar 30, 2011 00:46

I get the following errors, along with needing to re-upload the file when I delete the added code:

Warning: preg_match() [function.preg-match]: Unknown modifier '¤' in public_html/inc/_blog_main.inc.php on line 125

Warning: Cannot modify header information - headers already sent by (output started at /home/schoolof/public_html/inc/_blog_main.inc.php:120) in /public_html/inc/skins/_skin.funcs.php on line 602

Warning: Cannot modify header information - headers already sent by (output started at public_html/inc/_blog_main.inc.php:120) in /home/schoolof/public_html/inc/_core/_template.funcs.php on line 59

11 Mar 30, 2011 00:56

Get a new code editor. The one you're using is obviously butchering line endings, or changing the character encoding, or something weird.

12 Mar 30, 2011 01:21

You can safely replace all occurrences of '¤' with '~'

I don't know why devs decided to use that weird character that can't be typed on a standard keyboard.

13 Mar 30, 2011 02:33

Perfect! Thanks so much, it all works now :)


Form is loading...