Get support from Xavier Media
It is currently Sun Dec 08, 2013 1:05 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Cookie protection behaviour
PostPosted: Tue Jan 08, 2008 2:38 pm 
Offline
Rookie (I'm probably spamming)
Rookie (I'm probably spamming)

Joined: Mon Jan 07, 2008 1:05 pm
Posts: 4
Points: 0
Hello,

I have installed the cookie password protection script in order to protect my blog. After modifying the settings.php file and included the line

<? include("protection.php"); ?>

at the beginning of my blog's skin.

I experience a strange behaviour:

1. First of all, the login form is displayed over the protected page (the protected page is visible)
2. There is no Submit or Login button. The message "Never link directly to this file, always link to the protected file!" is displayed.

See http://www.un-moment-a-partager.fr for details. (please use firefox; there are some errors when using Internet Explorer).

Thanks,
Doru


Report this post
Top
 Profile Send private message E-mail  
Reply with quote  
 Post subject: Re: Cookie protection behaviour
PostPosted: Tue Jan 08, 2008 7:13 pm 
Offline
XavierForum.com Admin
XavierForum.com Admin
Super VIP Member
Super VIP Member
User avatar

Joined: Tue Mar 15, 2005 4:37 pm
Posts: 1082
Location: Sweden
Points: 1500
The script wasn't actually created to be installed in a template so we've never tried to install it in a blog template before. The script is made to protect the actual PHP file and not the template files.

Yours,
Andreas

_________________
Xavier Media®
Join me at LinkedIn | Get your latest blog post in your signature you too


Report this post
Top
 Profile Send private message  
Reply with quote  
 Post subject: Re: Cookie protection behaviour
PostPosted: Tue Jan 08, 2008 8:15 pm 
Offline
XavierForum.com Moderator
XavierForum.com Moderator
Member
Member

Joined: Fri Jun 10, 2005 2:51 am
Posts: 110
Points: 0
If you want to protect a blog or any kind of site using a template system, you'd best create your own script so you can work around your site's design.
You can set up a database for usernames and passwords for each user, or if you want just one common login ID for everyone you can just include it in a file like in Cookie Password Protection. Then if you can use $_POST to see if what the enter used in the form matches the database/entry in the file and if so you can use something like session_register to create a session. Then in you common header file you can create an if statement that if(!session_is_registered(***)) you can use the header() location function to redirect them to the login page.

_________________
XMG Forum Moderator & Webmaster
Xavier Media™ Australia & New Zealand and Xavier Media™ Europe


Report this post
Top
 Profile Send private message  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Registered users: No registered users


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

Portal » Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
[
SEO MOD © 2007 StarTrekGuide ]