Password-protecting Movable Type entries

| 1 Comment
Arvind Satyanarayan created the Privacy and Protect plugins to password protect Movable Type entries. Privacy was for 4.X, but started having problems with 4.1 and seems to just not work with version 4.2. However, I noticed something about the PHP code that it generates in an entry that is useful for protecting your entries even when it isn't working:

<?php if($_COOKIE['entry2']) { ?>
        Thank you for signing in!

            If you can see this, you are either logged in or it is not working

<?php } else { ?>
        This is a private entry. Please sign in</a>
<?php } ?>
When an authenticated commenter signs in, they get a mt_commenter cookie. Merely checking for mt_commenter in a way similar to what's shown above would be enough to prevent the average person from viewing your content. Obviously, this isn't the most effective measure out of the box, as mt_commenter is created by any authenticator interface used by Movable Type, but it's a start.

I think I'll dig into this more and see if I can't create a simpler plugin that would support PHP and possibly JSP and ASP.NET.

1 Comment

Hi Mike,

I've been searching for a way to do this with 4.23 and found your post. Unfortunately it's not working for me. Have you made any progress on a a simplified plugin? Or any ideas that I can try to get the above code working.

When I add the code I do get "This is a private entry. Please sign in" but it displays even if I'm logged in.

Thanks,
Ron

Leave a comment

March 2010

Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      

Recent Entries

A window into the totalitarian mind of the left on freedom of religion
From Digg: Me: I'm not going to hold my breath waiting for the same liberal democrats who shriek about the…
Google's lossy compiler
Google's closure compiler service gets a little too frisky under ADVANCED_OPTIMIZATIONS. Original code: With advanced optimizations enabled, it was able…
The three purposes of the federal income tax law
Businesses will spend about 3.4 billion man-hours and individuals about 1.7 billion hours figuring out their taxes this year.…

Subscribe

Advertisements

OpenID accepted here Learn more about OpenID