Archived : Techno Babble

This is the archived version of my b2evolution code blog.
If you require any help regarding b2evolution then
visit it's support forums

You can find my current blogs here
Code : {@link : WafflesOn}
Personal : {@link : InnerVisions}

« Add fields to your postsDo you captcha your target audience? »

Protect your blogs

Posted on 4th Dec 2008 in : Plugins & Widgets

I hear you knocking

There's been many a request on the b2evolution forums for a way to make blogs so that they can only be seen by members. The usual response has been "hack this file and then make sure that you make posts as protected" .... which is great and stuff, but it's hardly "friendly" when you have several blogs that need protecting and you also want a tad more than "are they logged in?". Soooooo, I made a plugin to do it for me ;)

How does it work?

It's dead simple really, first go grab the plugin from BOPIT, unzip it, upload it, meander into admin and install it .... that was the hard part. For any blog that you wish to protect just put am:protected in the blog notes field and press save ...... and that's it! Instant protected blog ;)

What happens now?

From now on when a visitor tries to reach any blog marked as protected they'll automatically be redirected to the login screen with a message of your choice being displayed to them to explain why. If a registered user tries to reach a protected blog that they're not a member of, they'll get sent back to your homepage ... or whatever you slapped into your $baseurl ... but you chose that.

As well as taking care of the visitors / non-members for you this plugin will also automatically change any posts created, or edited, with a status of "published" to "protected" if it's in a protected blog , just to be sure to be sure ;)

I'm sure you'll let me know if it doesn't work,
¥

Page archived : 10th Dec 2009
 

X