PDA

View Full Version : SSL For Subscribers Only


maximux1
07-26-2006, 06:50 PM
I've just added a little enhancement to my 3.6, however this should work should as well with the 3.5 branch. It's really very simple and requires a template edit and a plugin.

Create a new plugin using the global_start hook.

ob_start();

if ($_SERVER["HTTPS"] == 'on') {
echo "on";
$ssl = ob_get_contents();
}
else {
}
ob_end_clean();

At the very top of headinclude template add this...

<if condition="$ssl == on">
<if condition="is_member_of($bbuserinfo, 55)"><!--change this to your subscriber group-->
<else />
<meta http-equiv="refresh" content="5;url=http://www.yourdomain.com/subscribe.php">
</if>
</if>

That's all.

This allows the user to briefly see that you do have SSL available but in 5 seconds redirects them to your subscriber page with more reasons to subscribe.

If the user is already a subscriber no redirection takes place.

Hope someone finds it useful.

max