Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#337 2007-01-26 07:07:22
- infusion
- Member
- Registered: 2005-08-04
- Posts: 19
Re: ign_password_protect
Just tried the ign_if_logged_in with the else statement. Nothing comes up at all now.
<txp:ign_if_logged_in privs="5"> <else />You are trying to access a password protected page. Please log in or sign up with us as by clicking <a href="SOME LOCATION" title="Subscribe">here</a>.<txp:ign_show_login show_logged="1" login_msg="LOGIN" />
</txp:ign_if_logged_in>
Last edited by infusion (2007-01-26 07:08:07)
Offline
#338 2007-01-26 13:45:54
- igner
- Plugin Author
- Registered: 2004-06-03
- Posts: 337
Re: ign_password_protect
infusion – I described how the default form is generated in this post, but that information should really be in the documentation as well. I should have an updated version with improved documentation (and a couple of other fixes) in the next day or two.
In the meantime, this is the code that renders the default login form:
<div class=‘login’> <p><span class=‘error’><txp:ign_error_msg >There was a problem logging in.</txp:ign_error_msg></span></p> <p><label>Name:<br /> <txp:ign_user_field /> </label><br /> <label>Password:<br /> <txp:ign_pass_field /> </label><br /> <label>Remember Me? <txp:ign_checkbox name=‘stay’ value=‘1’ /></label> <txp:ign_submit_field name=‘login’ value=‘Login’ /></p>
</div>
use <txp:ign_user_field />
, <txp:ign_pass_field />
, <txp:ign_checkbox name="stay" value="1" />
, and <txp:ign_submit_field name="login" value="Login" />
, along with traditional markup (labels, etc.), in your form to render the login form. My apologies that this wasn’t clear. Alternatively, there’s nothing that prevents using plain HTML markup to create the form as well. Bottom line is that I wanted to remove as much rendered code from the plugin, to allow for more flexible markup and easier localization (as I know many users have had to drastically hack previous versions to localized them).
And then my dog ate my badger, and the love was lost.
Offline
#339 2007-01-26 14:19:20
- igner
- Plugin Author
- Registered: 2004-06-03
- Posts: 337
Re: ign_password_protect
infusion wrote:
Just tried the ign_if_logged_in with the else statement. Nothing comes up at all now.
you need to use <txp:else />
not <else />
– that was a typo in the previous message. Again, sorry. I seem to be unfairly unleashing difficulties on you. If you’d like, I’d be happy to refund your purchase price.
And then my dog ate my badger, and the love was lost.
Offline
#340 2007-01-26 16:41:47
- infusion
- Member
- Registered: 2005-08-04
- Posts: 19
Re: ign_password_protect
haha…. don’t sweat it. It’s a great plugin but my infamiliarity with txp itself is the one that’s causing so much problems.
Offline
#341 2007-01-27 02:26:13
- melly
- New Member
- Registered: 2007-01-25
- Posts: 2
Re: ign_password_protect
igner, I’m getting this warning
Warning: Cannot modify header information – headers already sent by (output started at /home/virtual/site35/fst/var/www/html/pan/textpattern/textpattern/lib/txplib_db.php:84) in /home/virtual/site35/fst/var/www/html/pan/textpattern/textpattern/include/txp_auth.php on line 163
I’ve got the latest textpattern. Is the issue for the error somthing with my server, or having a long URL?
How do you set the changes from domain.com to www.domain.com?
And I have this error:
Warning: Can’t open file: ‘txp_lang.MYD’. (errno: 145) select name, data from txp_lang where lang=‘en-gb’ in /home/virtual/site35/fst/var/www/html/pan/textpattern/textpattern/lib/txplib_db.php on line 84
I’m abit of a newbie to textpattern.
Offline
#342 2007-01-27 13:57:14
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: ign_password_protect
melly
regarding your second warning; looks like you have a problem with (at least) one of your MySQL database tables. Could try repairing the txp_lang table using Rob’s rss_admin_db_manager plugin and see if that sorts out your problem.
Last edited by net-carver (2007-01-27 13:57:47)
— Steve
Offline
#343 2007-01-27 15:35:29
- guiguibonbon
- Member
- Registered: 2006-02-20
- Posts: 296
Re: ign_password_protect
I think I just found a bug. I just couldn’t manage to log in, then checked debugging, tried the sql querry, which returned no results. Went looking in txp source, and saw there’s an alternate for the usual password checking, with sql function old_password(). That does return a result in my case, I can now login. You should try to incorporate this in the plugin, as well as checking for both with and without the lower() function.
Offline
#344 2007-01-27 15:51:57
- igner
- Plugin Author
- Registered: 2004-06-03
- Posts: 337
Re: ign_password_protect
guigibonbon – what version of the plugin, and what version of txp? (and what version of mysql is running on the host?) But yes, I can see that being a problem, and I’ll have to build some failover logic in there. Good catch.
And then my dog ate my badger, and the love was lost.
Offline
#345 2007-01-27 15:54:32
- igner
- Plugin Author
- Registered: 2004-06-03
- Posts: 337
Re: ign_password_protect
melly – fix the database issue and I suspect that the problem will go away. For the most part, the headers ign_password_protect should be sent before any data is sent to the browser, but because the error you saw is part of the initial queries txp does to establish the environment, I suspect it’s send the error to the browser before the plugins are loaded. Let me know if you continue to have issues after the database is repaired, and I’ll dig into that further.
And then my dog ate my badger, and the love was lost.
Offline
#346 2007-01-27 16:10:59
- guiguibonbon
- Member
- Registered: 2006-02-20
- Posts: 296
Re: ign_password_protect
plugin v0.5, txp 4.0.3 (should update, i know), mysql 5
Offline
#347 2007-01-30 21:57:03
Re: ign_password_protect
Just upgraded to the newest beta 3, with txp 4.0.4.
I’m having the same problem I was having a few releases ago. The logout link doesn’t work and keeps me logged in. I’m using the tag <txp:ign_logout_link />
and when I click the link it generates, it does log me out and displays the login form. However, when I click on a password protected page again, it displays the content of the protected page instead of having a login form.
Offline
#348 2007-01-30 22:10:57
Re: ign_password_protect
LeeUmm
Most of the time I run with cookies turned off for my browser. I turn them on just long enough to log in, and then usually off again.
I have had the same experience you described above if I have logged in, turned cookies off, and then try to log out while the cookies are off.
fwiw
Mike
Offline