Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#481 2007-12-27 22:28:59

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: ign_password_protect

if you’re looking for version 0.5b4 its on the very first page of this thread. first post near the bottom.

Last edited by iblastoff (2007-12-27 22:29:14)

Offline

#482 2007-12-27 22:34:25

spacewalk
Member
Registered: 2007-12-18
Posts: 11

Re: ign_password_protect

The author of ign_password_protect gives the current download link in this forum post.

Let us know if you get anything happening.

As I said in an earlier post, Dale seems to have gotten it working, to judge by the original post that started me down this whole path.

I got in touch with Dale privately before Christmas. He said he would try to answer the question here soon, but he hasn’t done it yet.

draganbabic wrote:

Does anyone know where can I get the usable version of this plugin? I have the ign_password_protect v0.4.2d and it doesn’t seem to work properly (I can’t get it to output the currently logged user’s username from <txp:ign_logged_user display=“name” /> or <txp:ign_user_info type=“name”>).

What I’m trying to achieve is literally this (#478 from this thread).

Offline

#483 2007-12-27 22:46:46

draganbabic
Member
From: Novi Sad, Serbia
Registered: 2006-09-27
Posts: 118
Website

Re: ign_password_protect

I can’t install any of those plugins, textpattern says “badly formed or missing plugin code”. Anyway I have gotten it working by altering the plugin’s source code (the version I have) like so:

//-----------------------------------------------
	//displays logged-in user
	function ign_logged_user($atts)
	{
		global $ign_user, $ign_err;

extract(lAtts(array( ‘logged_msg’ => IGN_NOT_LOGGED_IN, ‘display’ => ‘name’, ‘alt’ => IGN_LOGOUT_LINK, ‘verbose’ => false, ‘greeting’ => gtxt(‘logged_in_as’) ), $atts));

if ( !$ign_err ) { list($c_userid,$c_privs,$c_realname,$cookie_hash) = split(‘,’,$_COOKIE[‘ign_login’]); $u_display = (strtolower($display) == ‘realname’) ? $c_realname : $c_userid; $user= ($verbose) ? graf(gTxt(‘logged_in_as’).’ ‘.$u_display.br.’<a href=”?logout=1” alt=”’.$alt.’” title=”’.$alt.’”>’.gTxt(‘logout’).’</a>’) : ‘’.$u_display.’‘; return $user; return “<a href=’”.$_SERVER[‘REQUEST_URI’].”?logout=1’>Log Out</a>”; } else { return graf($logged_msg); } }

I have no idea what I did since I am not a programmer, but it works now with asy_wondertag (I use this to display appropriate article for logged in client: <txp:asy_wondertag><txp:article form=“someForm” clientsname=”<txp:ign_logged_user display=“name”>” limit=“1” /></txp:asy_wondertag> [of course the clientsname custom field matches the client’s username for clarity]). Hope this helps, I don’t have a log out link now, but at least it’s working.

Offline

#484 2007-12-27 23:17:10

spacewalk
Member
Registered: 2007-12-18
Posts: 11

Re: ign_password_protect

I had no problem installing 0.5b4. Are you sure you copied the entire plugin file? It would be nice if you were using the same version the rest of us are.

I haven’t had time yet to compare your changes to the original source (presumably 0.4bxx).

Still hoping to hear from Dale on this. I think he got results without re-writing the plugin.

Thanks.

draganbabic wrote:

I can’t install any of those plugins, textpattern says “badly formed or missing plugin code”. Anyway I have gotten it working by altering the plugin’s source code (the version I have) like so:

//-----------------------------------------------
	//displays logged-in user
	function ign_logged_user($atts)
	{
		global $ign_user, $ign_err;

extract(lAtts(array( ‘logged_msg’ => IGN_NOT_LOGGED_IN, ‘display’ => ‘name’, ‘alt’ => IGN_LOGOUT_LINK, ‘verbose’ => false, ‘greeting’ => gtxt(‘logged_in_as’) ), $atts));

if ( !$ign_err ) { list($c_userid,$c_privs,$c_realname,$cookie_hash) = split(‘,’,$_COOKIE[‘ign_login’]); $u_display = (strtolower($display) == ‘realname’) ? $c_realname : $c_userid; $user= ($verbose) ? graf(gTxt(‘logged_in_as’).’ ‘.$u_display.br.’<a href=”?logout=1” alt=”’.$alt.’” title=”’.$alt.’”>’.gTxt(‘logout’).’</a>’) : ‘’.$u_display.’‘; return $user; return “<a href=’”.$_SERVER[‘REQUEST_URI’].”?logout=1’>Log Out</a>”; } else { return graf($logged_msg); } }

I have no idea what I did since I am not a programmer, but it works now with asy_wondertag (I use this to display appropriate article for logged in client: <txp:asy_wondertag><txp:article form=“someForm” clientsname=”<txp:ign_logged_user display=“name”>” limit=“1” /></txp:asy_wondertag> [of course the clientsname custom field matches the client’s username for clarity]). Hope this helps, I don’t have a log out link now, but at least it’s working.

Offline

#485 2008-01-05 09:19:45

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: ign_password_protect

Having some issues with the display of errors if a login form is incorrectly entered. The form works fine, just no errors are visible. Full code below, error code is this:

<txp:ign_error_msg>
<ul class="memError">
<li><txp:ign_error_msg /></li>
</ul></txp:ign_error_msg>
<fieldset>
	<txp:ign_error_msg><ul class="memError">
	  <li><txp:ign_error_msg /></li>
	</ul></txp:ign_error_msg>
	<legend>Login</legend>
	<label for="p_userid" accesskey="l">Login Name: </label>
	<txp:ign_user_field size=25 /><br />
	<label for="p_password" accesskey="p">Password: </label>
	<txp:ign_pass_field size=25 /><br />
	<label for="remember">Remember Me?</label>
	<txp:ign_checkbox name="stay" value="1" /><br />
	<label for="Submit"></label>
	<txp:hide><txp:ign_submit_field name="login" class="button" value="Login" /></txp:hide>
	<div class="buttons">
		<button type="submit" name="login" value="Login" class="positive"><img src="/images/14.png" alt="" />Login</button>
	</div>
</fieldset>

Offline

#486 2008-01-13 13:50:13

markusfalk
Member
Registered: 2007-08-16
Posts: 57
Website

Re: ign_password_protect

still working with this plugin and still finding it great :-) is there any progress with the protection of files ?

thanks again … great work


I sometimes destructively reverse engineer my own work and the only help is this forum.

visit me at visiongraphix

Offline

#487 2008-01-15 16:21:00

igner
Plugin Author
Registered: 2004-06-03
Posts: 337

Re: ign_password_protect

catching up – apparently I missed a notification email and didn’t realize folks were busy chatting here :)

@variaas – I haven’t looked at SVN in a long time. Assuming 4.0.6 rolls out with that functionality, it should be easy enough to deal with it.

@jstubbs – um, I can’t say what’d happen if you wrap a tag in itself…which is what you’re doing above. What are you trying to accomplish there?

@markusfalk – actually, I’m almost there on the file_download protection. have to sort out a few behavioral oddities, but should be ready for testing in the next few days (i.e. by June).


And then my dog ate my badger, and the love was lost.

Offline

#488 2008-01-17 21:32:57

renobird
Member
From: Gainesville, Florida
Registered: 2005-03-02
Posts: 786
Website

Re: ign_password_protect

Hello All,

I’m trying to find a way to set the current section to “members” on successful login.

I currently have a login form in the left column that displays on all pages.
I’d like to keep it that way, instead of showing a login form when you attempt to access protected content.

Any suggestions would be much appreciated.


Tom

Offline

#489 2008-01-17 21:46:11

igner
Plugin Author
Registered: 2004-06-03
Posts: 337

Re: ign_password_protect

Tom – I haven’t stumbled across an elegant solution for passing on a new section on login, but it is something I’m actively looking at. In in the interim, it is possible to protect content without displaying a login – keep the login form in the sidebar, and use <txp:ign_if_logged_in><txp:/else></txp:ign_if_logged_in> around the content you want to protect, and use the else clause to display some sort of warning messge.

Alternatively, you could use it in some form with asy_wondertag perhaps…


And then my dog ate my badger, and the love was lost.

Offline

#490 2008-01-17 21:49:16

renobird
Member
From: Gainesville, Florida
Registered: 2005-03-02
Posts: 786
Website

Re: ign_password_protect

Thanks Igner,

Currently I’m kind of doing exactly what you suggested. It’s really the “redirect” feature that I need.
I’m super excited to hear you are working on it. Not that this plugin is totally sick already…but that would send it over the top.

)

EDIT: Igner, maybe there’s someone else out there with a giant brain that could assist?
Those with giant brain…I call you to action!

Tom

Last edited by renobird (2008-01-17 21:53:02)

Offline

#491 2008-02-08 23:39:31

alannie
Member
From: Minnesota, USA
Registered: 2005-09-15
Posts: 150

Re: ign_password_protect

Hi, I have run into an issue that seems to have something to do with my web host configuration. I am able to get a very basic stripped-down ign_password_protect (0.5b4) form to work on an installation with one web host, but with another one (Pair Networks) I am not able to get the exact same code to work on two different installations. I’m using the same version of TXP on all three.

When I first load the test page, it displays the login form with an error message of “There was a problem logging in.” Even though I’ve not yet tried to log in. Then if I try to log in, it keeps giving me that same error message.

I even set up a test section with all other txp code stripped out and it is not working. The exact same code works fine on the first web host.

Here are the config details of the nonworking setup:

PHP version: 5.2.5
GD Image Library: version bundled (2.0.34 compatible), supported formats: GIF, JPG, PNG
Server Local Time: 2008-02-08 18:27:21
MySQL: 5.0.45-log
Locale: en_US.UTF-8
Server: Apache/2.2.4
Apache version: Apache/2.2.4
PHP Server API: apache2handler
RFC 2616 headers: 
Server OS: FreeBSD 6.2-RELEASE-p1

And here are the details of the working setup:

PHP version: 4.4.7
Register globals: 1
GD Image Library: version 2.0 or higher, supported formats: GIF, JPG, PNG
Server Local Time: 2008-02-08 15:27:56
MySQL: 4.1.12-max-log
Locale: en_US.UTF-8
Server: Apache
PHP Server API: cgi
RFC 2616 headers: 
Server OS: Linux 2.6.18.2-grsec

Any ideas??

Offline

#492 2008-02-09 00:19:50

alannie
Member
From: Minnesota, USA
Registered: 2005-09-15
Posts: 150

Re: ign_password_protect

I finally figured it out. It was the .htaccess file. I had put in user authentication and commented out only part of it (doh!). When I commented out all of it, the form worked. If anyone’s got themselves into the same mess, here’s the stuff I commented out:

# AuthUserFile   /path/to/homebrewed/password/file
# AuthName     "Homebrewed Login"
# AuthType       Basic
# <Limit GET POST PUT>
# require valid-user
# </Limit>

Offline

Board footer

Powered by FluxBB