Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#49 2005-08-09 20:20:50

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

Re: ign_password_protect

> no – by additional flexibility in output options, I was specifically referring to incorporating a variation >of “creativesplash’s hack”

oh, ok.

>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 ><txp:ign_show_login /> tag where you want the login form to appear. that should do the trick, if I’ve >understood you properly.

So the login form would have to appear in the center content. right? And once they are logged in they will just see the page content …they won’t see your “logged in as…” and a logout link?

I wanted to be able to put the login form in the right column because that is where I have all of my other widgets. And I do like being able to see “logged in as” and the “logout” link…but I would want those to appear in the right column too. I guess I’ll just use the hide option for now…but if you ever figure out how to password protect something in a different area of the page, that would be swell. :)

Actually maybe I can somehow use your plugin with the ptv_if plugin. I’ll have to look into that.

-june

Offline

#50 2005-08-09 20:30:52

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

Re: ign_password_protect

sorry – I forgot a <code>code</code> tag, so the second tag didn’t show up.

Look at my previous post again, then look at the following…

Example:
<code><div id=“right_col”> <txp:ign_show_login />
</div>
<div id=“center_col”>
<txp:ign_password_protect hide_login=“true”>
stuff you want hidden goes here
</txp:ign_password_protect>
</div>
</code>

Oversimplified, but that’ll get you what you want. Login form in right_col, protected content in center_col.

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


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

Offline

#51 2005-08-09 20:34:07

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

Re: ign_password_protect

oh, ok great! that looks like it should do the trick. I’ll let you know if it doesn’t.

thanks!

june

Offline

#52 2005-08-16 06:16:18

andjules
Member
From: toronto
Registered: 2004-10-20
Posts: 44

Re: ign_password_protect

ign_logged_user doesn’t seem to be working – after i log in, it continues to show “not logged in” message. I’m using a single <code><txp:ign_logged_user /></code> with no parameter

on my home page, I’m using <code><txp:ign_show_login /></code> and it is working fine, and when logged in, it shows what i’m hoping <code><txp:ign_logged_user /></code> will show on the other pages: user name & log out link

Am i using <code><txp:ign_logged_user /></code> correctly?

p.s. the <code><txp:ign_show_login /></code> tag is great on a home page, would be nice if it could accept a ‘forward’ tag, so that logging in could also take my users in to the ‘members only’ area…

Last edited by andjules (2005-08-16 06:25:37)

Offline

#53 2005-08-16 13:01:35

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

Re: ign_password_protect

@andjules – can you send me a link where this isn’t working for you? Just send it offlist (use the E-mail link at the left). It’s working fine at this end.

That’s an interesting thought on the forwarding…I don’t know if it’ll make it into the next release, but I’ll definitely see what I can do.


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

Offline

#54 2005-08-17 03:00:08

andjules
Member
From: toronto
Registered: 2004-10-20
Posts: 44

Re: ign_password_protect

link sent…
thanks for the support.
note to self: buy igner a beer (or 6 ;-)

Offline

#55 2005-08-22 07:56:06

Anton
Plugin Author
From: Alingsås, Sweden
Registered: 2004-11-16
Posts: 138
Website

Re: ign_password_protect

hi, any ETA for the 0.4 version..? i’m so eager to try it out..

also, do anyone have an idea of how to make just a selection of articles password protected? e.g if i want to have some articles subscribers-only and some not, how do i do it? all within the same section i mean. (override form..? but that destroys the listing/individual difference, doesn’t it?)

Offline

#56 2005-08-22 13:20:05

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

Re: ign_password_protect

Thats pretty simple…

<code><txp:ign_password_protect privs=“1,2,6” hide_login=“true”></code>Your article here<code></txp:ign_password_protect></code>

The above tags will allow users with priviliges 1,2 and 6 view the article. You can use it within articles,forms or page templates.

Put <code><txp:ign_show_login /></code> wherever you want the login form to appear. You can use other tags such as <code><txp:ign_logged_user /></code>, <code><txp:ign_usr_online></code> wherever you want.

Regards,
Vasanth


“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

#57 2005-08-22 13:20:23

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

Re: ign_password_protect

Hi,

So I have this plugin working for the most part. I just have one question. I was wondering if there is a way to display something when the user is not logged.

For instance, I have a main page for pw protected section. The content on the page is password protected. When they login they get something like “congratulations you’re logged in, here are some links you can go to.” But when they are not logged in nothing appears because all of the main content is pw protected.

I could add content before they pw protected stuff, but then that would also appear when they are logged in and I only want this other info to appear when they are not logged in.

I’m guessing I need some sort of if statement but I’m not sure how to do that.

any help would be great!

thanks!

june

Offline

#58 2005-08-22 13:42:01

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

Re: ign_password_protect

Right now the only way you can display a message is by using the <code>login_msg</code> attribute. And this message cannot contain whole content such as headings and paragraphs. This attribue does not support tags like <code><p></p></code>, <code><h2></h2></code> etc., It can contain only a few lines which is automatically wrapped inside <code><p></p></code> tags.

I was also pondering over this problem. It requires conditionals such as <code><txp:ign_if_not_logged></txp:ign_if_not_logged></code> or something like that.

Igner is working on a new version and hopefully he will implement this.


“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

#59 2005-08-22 13:57:17

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

Re: ign_password_protect

Ok, so <code><txp:ign_if_not_logged></code> doesn’t exist yet, right? If not, I would definitely like to see this feature added too.

Yeah, login_msg won’t really work for what I’m doing.

Thanks for the info!

-june

Offline

#60 2005-08-22 14:12:34

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

Re: ign_password_protect

@Anton – I might have a version to send out to testers later this week, but I don’t have a firm ETA at this point. I’m facing a couple other deadlines that I’ve got to focus on first. Regarding selectively protecting content, the most reliable method will be protecting the individual articles as needed / desired.

@June – No, there isn’t this conditional right now, and because of the way the current version works, it’s not really something that could be readily hacked in (or more accurately, hacking this into the current version would make a fairly inefficient plugin even more so).
It shouldn’t be too hard to implement with the revised processed in version 0.4; while the primary focus of 0.4 will be alternate user table support and a dramatically refined authentication process, I should be able to roll this in fairly readily. Now it’s just a matter of finding time to do the coding.


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

Offline

Board footer

Powered by FluxBB