Recent Topics

1 Apr 13, 2012 02:05    

My b2evolution Version: 4.1.x

Hello: :)

Is there a code that can be added to a few private blogs as an extra measure to hide the blog page? The current feature is okay for a few blogs in the back but I'm thinking of one instance where it would be beneficial not to show a page at all, but to have a white page would be preferable to non-members if someone were to access the blog. Is this possible to accomplish?

Maybe in the next update (if it isn't much trouble) a toggle switch could be an option for those who are looking for this feature. I can see this being handy for lawyers, medical, or for anyone where there might be sensitivity within a blog. If the blog can't be whited out, maybe within the post write-up to have an option? Dunno.

T.

2 Apr 20, 2012 12:22

Tosca wrote:

My b2evolution Version: 4.1.x
Is there a code that can be added to a few private blogs as an extra measure to hide the blog page?

Hello Tosca :)

I do not give a "clean" solution as a toggle switch in the blogs settings section.
But I suppose you could try the following (tested) :

* in the skin subdir that you use for the blog(s) to be hidden copy the file "_html_header.inc.php" from the main skin subdir.

* in this file replace (near the top of file):


global $xmlsrv_url;

* with :


global $xmlsrv_url;
global $blog;

if( !is_logged_in() )
{
	if( $blog == '5' )
	{
		die();
	};
};

* do not forget to adapt the blog number to your case
* of course the default blog should have a skin which allows login !
* of course again, anyone having a login could still see the page with the "nothing to display" message if not a member.

(Note : I am interested to know how to detect that a logged visitor is a member of the current blog.)

I hope that it helps.
regards.
Jacques

3 Apr 21, 2012 01:27

Hi and thank you. I'll work on this on and see how it works, I'll let you know in a couple of days. :)

(Note : I am interested to know how to detect that a logged visitor is a member of the current blog.)

Yeah, me too! It would be helpful, especially for private blogs.


Form is loading...