Recent Topics

1 Dec 15, 2009 13:39    

My b2evolution Version:

I'm using the blog as a kind of intranet. So all new posts should be put by default as protected. Something to do with protect the users from themself. ;)

Is there a simple way i can do this? Of must i change the 'web-files' somewhere?

3 Dec 28, 2009 17:25

Not really. :oops:

I've tried to figure out how to protect it (took me a long time to get a recent Bopit). But the only plugin i get is to protect posts. If i'm not wrong, this is standard in the blog, no?

I want just a way that posters can't forget to protect their posts.
Or maybe a general protection on the blog? I tried the figure out the stub-file from the other topic. But i don't think that i use stubs...

Any suggestion?

4 Dec 28, 2009 17:32

sam2kb: what does it have to do with post status and login requirement ?

branoni:Which version are you using?
there used to be a feature for setting default post status to protected, draft etc. in 2.x series.however it has been deprecated due to several reasons.

see this and below: http://forums.b2evolution.net/viewtopic.php?p=98923#98923

5 Dec 28, 2009 19:00

There are at least 2 methods of protecting all posts by either
- installing an AM Protected plugin (not supported by developer)
- adding $login_required = true; to the stub file (index.php, blog2.php, blog3.php or any other)

By the way this will make private not only posts, but the whole blogs. I guess this is what you need.

6 Dec 28, 2009 20:05

My bad! For a moment there, i ve mixed 'private' posts with 'protected'.

Of course login requirement solves it! as protected posts are for members only.sorry for the misunderstanding.

In addition, you can hide posts visibility via css by the use of .skin_wrapper_loggedin and .skin_wrapper_anonymous classes.Which i do not recommend, i m just sayin.

7 Apr 28, 2010 17:56

sam2kb wrote:

- adding $login_required = true; to the stub file (index.php, blog2.php, blog3.php or any other)

For one or the other reason, this doesn't work anymore. :$
Since yesterday, he won't take my user anymore. When i remove the login_required, it works fine...

Any help... ;)

8 May 26, 2010 09:30

i think i get what you are getting at..

You and your users know that you can set posts "protected" however you are concerned they might forget to select it...

I kinda have same situation and made a dirty hack to make sure they always select protected.. just thought you may be interested

crack open your ../skins_adm/_html.footer.inc.php and add the below lines just before </body>

	<script type="text/javascript">
	jQuery(document).ready(function() {
jQuery('#itemform_visibility input').parent().css("display", "none")
//hide all post status radio buttons
jQuery('#itemform_visibility input[value="protected"]').parent().css("display", "inherit")
//show only "protected"
jQuery('input[value="protected"]').attr('checked', true);
//check the protected 
										});
</script>

Remember this hack is easily overridable, it's just to make sure the user does not forget to make that selection


Form is loading...