Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#37 2005-07-18 04:26:09

creativesplash
Member
From: Coimbatore, India
Registered: 2005-01-19
Posts: 283
Website

Re: ign_password_protect

Thank you so much Igner. I’ll have a go at it and let you know how it went!

Edit: I just checked it out and it’s doing its job. Thanx again.

(I know I’ve burdened you enough) Still, I would like to request for a few more features..

1. Display the “logged in” users Real name

2. When clicking on a username (online users) is it possible to display a pop-up containing the users profile (username, real name, email and privilege)

I know its tough to do but any pointers will help.

Last edited by creativesplash (2005-07-18 05:14:53)


“Take a point, stretch it into a line, curl it into a circle, twist it into a sphere, and punch through the sphere.”

— Albert Einstein

Offline

#38 2005-08-02 17:45:12

creativesplash
Member
From: Coimbatore, India
Registered: 2005-01-19
Posts: 283
Website

Re: ign_password_protect

Hello again Jeremy,

I hacked your code so that it displays ONLY the logged in username….

Here’s the code..

<code>
function ign_logged_user($atts)
{ global $ign_user; extract(lAtts(array( ‘logged_msg’ => IGN_NOT_LOGGED_IN ), $atts)); $user= !empty($ign_user) ? graf($ign_user) : ‘’; return $user;
}
</code>

<p>The problem is that the username is automatically wrapped with a <code><p></p></code>. What I do to get rid of the <code><p></code> tags?</p>

Last edited by creativesplash (2005-08-02 17:46:28)


“Take a point, stretch it into a line, curl it into a circle, twist it into a sphere, and punch through the sphere.”

— Albert Einstein

Offline

#39 2005-08-02 18:46:12

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

Re: ign_password_protect

get rid of the graf() function and just return $ign_user. So it’d be:

<code>
$user = !empty($ign_user) ? $ign_user : ‘’;
</code>

I haven’t forgotten your other request(s) (the one above and providing a password reset mechanism for underprivileged users) – I’ve just been caught up on another project of late. Should have some time soon to work on it.

J


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

Offline

#40 2005-08-03 03:20:10

creativesplash
Member
From: Coimbatore, India
Registered: 2005-01-19
Posts: 283
Website

Re: ign_password_protect

I’m glad you remember my requests. Thank you!


“Take a point, stretch it into a line, curl it into a circle, twist it into a sphere, and punch through the sphere.”

— Albert Einstein

Offline

#41 2005-08-07 11:53:44

creativesplash
Member
From: Coimbatore, India
Registered: 2005-01-19
Posts: 283
Website

Re: ign_password_protect

Hello Jeremy,

I am facing yet another problem. I have multiple password protected posts for different previleges within a single page. For eg..

<code>
<body>
<txp:ign_password_protect privs=“21”>Article 1<txp:ign_password_protect>
<txp:ign_password_protect privs=“22”>Article 2<txp:ign_password_protect>
<txp:ign_password_protect privs=“23”>Article 3<txp:ign_password_protect>
</body>
</code>

If I logon with the privilege 21, I can see article 1. But Article 2 and 3 display their login forms simultaneously. i.e, Two login forms in the same page. I dont want the logged in user to see “login forms” once he has logged (even if there are other security zones in the same page). How do I do it?


“Take a point, stretch it into a line, curl it into a circle, twist it into a sphere, and punch through the sphere.”

— Albert Einstein

Offline

#42 2005-08-07 12:31:51

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

Re: ign_password_protect

<txp:ign_password_protect hide_login="true"> ought to do what you want.


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

Offline

#43 2005-08-08 13:48:30

june
Member
Registered: 2005-06-02
Posts: 47

Re: ign_password_protect

the download link for this plugin doesn’t seem to be working for me. can anyone send me this plugin?

thanks!

june

Offline

#44 2005-08-08 14:05:47

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

Re: ign_password_protect

sorry ‘bout that. links are fixed – you can get version 0.3b1 here

Working on a whole slew of improvements for version 0.4, including:

  • minimizing number of db queries
  • additional flexibility in output options
  • streamlined privilege verification for multiple items
  • optional alternate user database (to separate site users from admin users, with varying permissions)
  • admin preferences to set default error messages etc.
  • end-user password reset and user profile functionality (when using alternate database)

Last edited by igner (2005-08-09 14:47:36)


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

Offline

#45 2005-08-09 14:06:50

creativesplash
Member
From: Coimbatore, India
Registered: 2005-01-19
Posts: 283
Website

Re: ign_password_protect

Wow. Those are some really cool features. I’m looking forward for the next update.

<code><txp:ign_password_protect hide_login=“true”></code>
That worked super! Thanx!

Last edited by creativesplash (2005-08-09 14:56:07)


“Take a point, stretch it into a line, curl it into a circle, twist it into a sphere, and punch through the sphere.”

— Albert Einstein

Offline

#46 2005-08-09 14:51:32

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

Re: ign_password_protect

yeah, well let’s just hope I find the time to pull it off, and not break anything in the process :)


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

Offline

#47 2005-08-09 19:40:25

june
Member
Registered: 2005-06-02
Posts: 47

Re: ign_password_protect

Those additions do sound good. Is there a way to protect content that is not sandwiched in the ign_password_protect tag? Or is that what you referring to when you said “additional flexibility in output options”

I basically want to protect an entire section but I want the login form to appear in the right column. I have a three column layout. The password protect tag is in the right column so it can’t encompas the article tag in the center column of the page template.

any ideas?

thanks!

june

Offline

#48 2005-08-09 20:00:11

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

Re: ign_password_protect

no – by additional flexibility in output options, I was specifically referring to incorporating a variation of creativesplash’s hack earlier in this thread – in the case of <code><txp:ign_show_logged_user /></code> there will be a verbose mode, and a terse mode. The verbose mode will display “Logged in as: username” (with the message customizable in prefs), terse mode will simply display the username.

as for your immediate need: don’t put the password protect tag in the sidebar. use <code><txp:ign_password_protect hide_login=“true”>stuff to hide goes here</txp:ign_password_protect></code> to protect the stuff you want to hide, and use the <code><txp:ign_show_login /></code> tag where you want the login form to appear. that should do the trick, if I’ve understood you properly.

If not, let me know.

Last edited by igner (2005-08-09 20:27:09)


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

Offline

Board footer

Powered by FluxBB