2 edb Feb 24, 2007 22:51
![](http://www.gravatar.com/avatar/0fe550b854775b91d77fe0cb45e4101b?size=80&default=https%3A%2F%2Fforums.b2evolution.net%2Fmedia%2Fshared%2Fglobal%2Favatars%2Fdefault_avatar_unknown.jpg%3Fmtime%3D1659823855)
will try it soon, thanks a lot!
p.s.: got version 1.9.2
Thank you very much.
I did it today and it worked like a charm.
Very nice work!
For future reference a blog can be hidden by a password:
in inc/_main.inc.php about line 360
change
if( !isset($login_required) )
{
$login_required = false;
}
to
if( $blog == "2")
{
$login_required = true;
}
else{$login_required = false;}
where the blog number is the number of the blog you want protected. You can also remove link in admin.
it's strange no one has mentioned maintanence mode.. afaik no one can reach the blog in maintenance mode also
Cool I'll check that out
Well I would if I could find how to invoke maintenance mode?? Can you direct me to the option tilqicom?
crack open basic.config.php and set
$maintenance_mode = 1;
Ah! :) Won't that do all the blogs though?
Hello.
I just ran across this thread.
Although I haven't tried this, it is good to know that the maintenance mode option exists because it can be done in software like Mambo.
I guess if it applies to all of the blogs, I'd think a condition statement can be added to apply to selected blogs.
Chose the blog you want hidden '2' and something like this maybe?
if($blog == "2")
{
$maintenance_mode = 1;;
}
else{$maintenance_mode = 0;}
maintenance mode is way deep. It'll lock you out of your back office as well.
:) Hi Guys,
My suggestion is you must have the ability and content for this.
Thanks for sharing
*my crap removed
Easier: in the main php of the blog we will make private (for example blog2.php) we write:
$login_required = TRUE;
The ease of doing this depends on how many categories you have in the blog you want to make private. Even though we think of posts as being in a blog with a category, the database stores them as attached to a category which happens to be assigned to a blog. So you're going to need a list of all the category numbers for the blog in question. Then via phpmyadmin something like this should get it done for you:
NNN is each main category ID for the posts you want to hide. So like a post in 5 cats will be hidden by doing the query to the main cat for that post.
Backup your database first! To test if it's working you'll have to either log out of your blog or visit your site in a different browser and see if posts are "going away" after each time you do the query. BTW since you didn't pick a version I figured it must be 192 and came up with a query that'll work for that release. Or at least I think it'll work!