Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#631 2008-09-03 19:12:46
- dreamer
- Member
- Registered: 2007-06-08
- Posts: 242
Re: ign_password_protect
igner wrote:
No, a user with priveleges set to NONE cannot log into the admin area. More accurately, a user with priveleges set to none can technically log in, but there are no areas that a user with privs set to none can see, so it’s effectively the same thing.
You can EITHER explicitly allow user with Privs NONE access by including 0 in the privs string, or leave off the privs string entirely. That effectively says “Allow any valid user / password combo access to this content”
actually, i think it has something to do with my Firefox 3 browser on my desktop instead. I just tried logging into the password area on Windows Safari and IE6 and both worked fine. I have cookies enabled under my Privacy tab under Tools so it’s not that….at least I dont’ think it is.
It also worked fine in FF3 on my laptop.
Thoughts?
PS. I tried logging in using various users with various privileges and none could work on FF3 desktop.
Last edited by dreamer (2008-09-03 19:34:27)
Offline
#632 2008-09-08 19:49:57
- dreamer
- Member
- Registered: 2007-06-08
- Posts: 242
Re: ign_password_protect
For whatever reason, I no longer have this issue.
New question:
I’m trying to get the site to return to another part of the site upon logging out. I can’t seem to make sense of the directions for the return_path attribute. Can someone clarify how this is to be done;
This is what my code looks like;
<txp:ign_if_logged_in privs="0,1,2,3,4,5,6">
<txp:ign_show_login show_logged="1" remember="1" />
<txp:ign_logout_link>return_path="http://www.mydomain.com"</txp:ign_logout_link>
<txp:file_download_list form="files" label="Downloads" limit="999" sort="filename desc" wraptag="ul" />
<txp:else />
<txp:ign_show_login />
</txp:ign_if_logged_in>
Last edited by dreamer (2008-09-08 19:54:26)
Offline
#633 2008-09-09 20:43:57
- igner
- Plugin Author

- Registered: 2004-06-03
- Posts: 337
Re: ign_password_protect
dreamer – the correct syntax would be:
<txp:ign_logout_link return_path="http://www.mydomain.com"> Text for the logout link </txp:ign_logout_link>
or if you want to use the default logout link text, you can use it as a self-closing tag:
<txp:ign_logout_link return_path="http://www.mydomain.com" />
Relative paths will also work.
Please note that as of right now, the return_path must be on the local site in order to actually log the user out. It’s on my todo list to change that behaviour and allow redirects offsite as well.
And then my dog ate my badger, and the love was lost.
Offline
#634 2008-09-09 21:44:56
- dreamer
- Member
- Registered: 2007-06-08
- Posts: 242
Re: ign_password_protect
Igner- I implemented that syntax. However, for some reason, it logs out to the login page as opposed to a designated page/url that is on the site itself.
I suppose this is better than what I had before, which was that it would log me out and direct me to the homepage.
Thoughts?
Offline
#635 2008-09-10 19:14:14
- igner
- Plugin Author

- Registered: 2004-06-03
- Posts: 337
Re: ign_password_protect
yeah, I think you’re the first one to actually use the return_path attribute, and that you discovered an undocumented feature.
You can fix this by finding the following line (around line 1588):
if(!empty($return_path)) list($return_path) = explode('?', $_SERVER['REQUEST_URI']);
and replace with:
list($return_path) = (!empty($return_path)) ? explode('?', $return_path) : explode(?', $_SERVER['REQUEST_URI']);
That should solve the problem for you.
And then my dog ate my badger, and the love was lost.
Offline
#636 2008-09-10 19:26:25
Re: ign_password_protect
igner, sorry to ask you for a lot, but just occurred to me – would it be possible to have a multi-select option in the next or future version? Something like the articles tab. Thing is, I have hundreds of users, and would like to select all the users who have registered but never logged in. Its a bit of a pain manually.
Offline
#637 2008-09-10 20:27:25
- igner
- Plugin Author

- Registered: 2004-06-03
- Posts: 337
Re: ign_password_protect
I’ll see what I can do. In the meantime, what are you trying to accomplish? if you want, email me (use the email link); it might be something I you could do in a pinch with a query using smd_query or phpmyadmin.
And then my dog ate my badger, and the love was lost.
Offline
#638 2008-09-10 21:04:16
Re: ign_password_protect
That’s nice of you to offer. Its late here so I will leave an email for another time – have to be up early :-)
Basically I have about 50 registered users who have never logged in. Some spammers among them. Essentially I would like to select all of those users, and then delete them. Something like the “articles” tab, where one can select multiple articles and then choose to change category/section etc.
I guess I could use phpMyAdmin for this, but it would be nice to do it directly from the plugin extension tab.
Offline
#639 2008-09-11 01:48:18
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: ign_password_protect
igner wrote:
and replace with:
list($return_path) = (!empty($return_path)) ? explode('?', $return_path) : explode(?', $_SERVER['REQUEST_URI']);That should solve the problem for you.
I think there’s a missing single-quote just before the second question-mark. How about this instead?…
list($return_path) = (!empty($return_path)) ? explode('?', $return_path) : explode('?', $_SERVER['REQUEST_URI']);
— Steve
Offline
#640 2008-09-11 17:43:08
- igner
- Plugin Author

- Registered: 2004-06-03
- Posts: 337
Re: ign_password_protect
Yup, thanks for catching that, Steve.
And then my dog ate my badger, and the love was lost.
Offline
#641 2008-09-13 06:41:57
- idoremus
- Member

- From: NW United States
- Registered: 2008-04-16
- Posts: 19
Re: ign_password_protect
I also have the Firefox issue with getting kicked out with every page refresh. tried to switch to the alternate DB with no luck. Are there any workarounds you would suggest?
Edit: Here is some more information. I am able to stay logged-in using Safari on both Mac. and Win. (not the most popular browser). Firefox, both 2 and 3 (both mac. and Win.) and IE version 6 do not keep my login session from page to page.
I have tried the hacks mentioned earlier in this forum but don’t know if the version I am using (0.5b9) has already been patched. In particular changing:
$d = explode('.', $_SERVER['HTTP_HOST']);
$domain = '.'.join('.', array_slice($d, -2, 2));
to
$domain = $_SERVER['HTTP_HOST'];
breaks my build.
I also would like to have my “default” page load on log out. It was mentioned that someone used a php page redirect to go to a secure page:
<txp:ign_if_logged_in>
<txp:php>header(‘Location: ‘.hu);</txp:php>
</txp:ign_if_logged_in>
is there a similar hack for what I am trying to do?
Thanks for all the hard work, Ian
Last edited by idoremus (2008-09-14 22:16:58)
Offline
#642 2008-09-16 05:05:46
- idoremus
- Member

- From: NW United States
- Registered: 2008-04-16
- Posts: 19
Re: ign_password_protect
If anyone is following along, I fixed my second problem by using this code:
<txp:ign_if_logged_in>
<p>Private content...</p>
<txp:else />
<txp:php>
header( 'Location: http://www.yoursite.com/index.php') ;
<txp:php>
</txp:ign_if_logged_in>
Offline
#643 2008-09-17 17:08:41
- idoremus
- Member

- From: NW United States
- Registered: 2008-04-16
- Posts: 19
Re: ign_password_protect
My Firefox bug has been fixed. Steve and Jeremy were able to tweak my install to make it work. I am told that a new release will be available soon with the fix. I really appreciate all the help they gave me in getting my site up and going.
~Ian
Offline
#644 2008-09-17 21:35:24
- idoremus
- Member

- From: NW United States
- Registered: 2008-04-16
- Posts: 19
Re: ign_password_protect
Does anyone know how to style the default form for <txp:ign_current_user /> ? I read and used the suggestions in this post #614 to change my login form. Now I would like to take the breaks out and change the text link to a submit button in this form.
Offline
#645 2008-09-18 00:37:27
- igner
- Plugin Author

- Registered: 2004-06-03
- Posts: 337
Re: ign_password_protect
Just to follow up – Ian’s issue was related to using an IP address for a site under development, and would apply to a limited subset of users. And a fix WILL be forthcoming.
Ian – current_user uses a TXP form to render (though there is a fallback coded into the plugin). Here’s the existing form:
<div class='active'>
<p><txp:ign_user_info type="realname" /><br />
<txp:ign_logout_link>Log out</txp:ign_logout_link></p>
</div>
Just create a form with the structure you want / need and any CSS hooks you might desire. Save it as ‘current_user’, or name it something more meaningful to you, and use the form attribute e.g. <txp:ign_current_user form="my_current_user_form_name" />
And then my dog ate my badger, and the love was lost.
Offline