Posts: 52
Threads: 5
Joined: May 2010
2010-06-09, 05:47:04
(This post was last modified: 2010-06-09, 05:48:08 by pesegolsson.)
Use this php file to protect a page with easy.
Put this file in ur theme folder.
In PAGES ->PAGE OPTIONS choose TEMPLATE:protectedpage.php
To change password for ur page change in protectedpage.php this:
$password = "admin";
After u have logged in the page content is showen. (the page done PAGES).
Posts: 9
Threads: 2
Joined: Jul 2010
Good one
I don't think ill use it anytime soon though
Posts: 65
Threads: 7
Joined: Apr 2010
Thanks for share
but password after, not see to display content..
Posts: 104
Threads: 15
Joined: Oct 2009
Question:
I'm using a site stat script that the owner still wants to use, but doesn't want visitors to see anymore. The script uses a template to be viewed. It is not entered as content, but is included in the sidebar as a component. How do I use this plug-in to set it up so that the stats appear after the proper password has been entered?
Thanks.
homershines
Posts: 29
Threads: 2
Joined: Jul 2011
Hi maxpop,
thanks for the script.
You gave the idea to find my own fast solution.
bydey
Posts: 5
Threads: 1
Joined: Nov 2011
Cool man you are great.
I was looking for this
Posts: 29
Threads: 2
Joined: Jul 2011
dey Wrote:Hi maxpop,
thanks for the script.
You gave the idea to find my own fast solution.
bydey
Hi again,
it's done.
Code:
$passwd = "nolimit";
if (return_page_slug()=='xx') $passwd ='xx';
if (return_page_slug()=='protecttest') $passwd ='protect';
.....
if ((isset($_POST["passwd"]) && ($_POST["passwd"]=="$passwd"))or $passwd=='nolimit') {
?>
<!-- START OF HIDDEN HTML - PLACE YOUR CONTENT HERE -->
<?php get_page_content(); ?>
The main diefference is that I can handle more individual user groups. It's for my gallery where I want to show pictures which I don't want to see as public.
bydey