Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#445 2007-09-15 17:25:53

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

Re: ign_password_protect

Hi,

the idea is simple. All I wanted was to show individual content to specific users after login. I tried this:

<txp:ign_password_protect remember=“0”>

<txp:asy_wondertag> <txp:article_custom category=”<txp:ign_logged_user />” /> </txp:asy_wondertag>

</txp:ign_password_protect>

I wanted to load articles from the category matching the login name but the ign_logged_user tag only shows me a logout link. What do I have to do to just get the username returned? Help would be greatly appreciated

Markus


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

visit me at visiongraphix

Offline

#446 2007-09-15 20:54:05

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

Re: ign_password_protect

@zoltandragon – I just had one of those “d’oh’ moments. You are correct that the logout link is broken in messy url mode, becuase the ? is hardcoded into the logout link. But there’s no reason I can’t handle that differently. I’ve been unbelievably swamped of late, but I’m hopeful that I can find some time to fix this in the near future.

@markus – if you’re using the 0.5 version, you can bend the logged_user output to your will using a form – by default ign_current_user1 looks for a form ‘current_user’ and if none exists, then it uses the following form to render the output:

<div class='active'>
 <p><txp:ign_user_info type="realname" /><br />
 <txp:ign_logout_link>Log out</txp:ign_logout_link></p>
</div>

It’ll also accept any form passed in using the form attribute. So, in your case, since all you want is the user name, then you’d create a form that only contains <txp:ign_user_info type="name" />. If you called the form “username_form”, then your code would be:

<txp:ign_password_protect remember=“0”>

<txp:asy_wondertag> <txp:article_custom category=”<txp:ign_current_user form="username_form" />” /> </txp:asy_wondertag>
</txp:ign_password_protect>

Make sense?

1 ign_logged_user has been renamed to ign_current_user, as I think that better reflects the function of the tag. However, ign_logged_user is currently an alias for ign_current_user, for backwards compatibility.

Last edited by igner (2007-09-15 21:04:54)


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

Offline

#447 2007-09-15 21:33:53

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

Re: ign_password_protect

I created a form like you said. Then added:

<txp:asy_wondertag>
<txp:article_custom allowoverride=“0” category=”<txp:ign_logged_user form=“current_user”/>” pgonly=“0” />
</txp:asy_wondertag>

but it is still not working the way it should. And I don’t understand the logic of the new 0.5 version. How du I get rid of the remember me functionality now that it is deprecated within <txp:ign_password_protect> ???

<txp:ign_logged_user form=“current_user”/> used seperately produces the right output.
Has anyone tried this before or does anyone know how to output content sensitive to the logged in user?

thx

Last edited by markusfalk (2007-09-15 22:44:55)


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

visit me at visiongraphix

Offline

#448 2007-09-16 05:24:24

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

Re: ign_password_protect

Try using <txp:article_custom category="username" /> without the wondertags. I think you’ll find that it still doesn’t work as you’d like / expect. You’ll need to re-work how you’re calling the data, but the asy_wondertag combo with the form will definitely take you in the right direction.


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

Offline

#449 2007-09-16 07:56:51

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

Re: ign_password_protect

I’ve already tried it that way but still nothing. Then I copied the exact output of the ign tag into the category attribute and it still doesn’t load the right content. It seems only the combination won’t output the right content.


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

visit me at visiongraphix

Offline

#450 2007-09-16 17:45:50

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

Re: ign_password_protect

Right – what I was trying to suggest is that you need to work it out using a static value for the category until you get the desired results, and then use the technique you were trying before (asy_wondertag + ign_current_user) to convert it to a dynamic process.


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

Offline

#451 2007-09-16 18:28:24

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

Re: ign_password_protect

I got ya … thats what I did and everything works fine until I combine it


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

visit me at visiongraphix

Offline

#452 2007-09-29 18:46:58

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

Re: ign_password_protect

for validation please remove the alt attribute added to the logout link


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

visit me at visiongraphix

Offline

#453 2007-10-02 04:54:19

((slimey))
Member
Registered: 2005-06-25
Posts: 26

Re: ign_password_protect

Hey hey all, this is a great plugin

Im using this plugin on my site but im getting a problem when a user navigates the site using IE and then goes to the password protected areas after they login and they start to navigate through the password protected pages For each page they have to login again. Im guessing its a cookie problem.

Works perfect in Firefox. So its just a stupid IE bug im using version 0.5b4 of this plugin. Can someone help?

Offline

#454 2007-10-02 05:00:54

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

Re: ign_password_protect

) wrote:

Hey hey all, this is a great plugin

Im using this plugin on my site but im getting a problem when a user navigates the site using IE and then goes to the password protected areas after they login and they start to navigate through the password protected pages For each page they have to login again. Im guessing its a cookie problem.

Works perfect in Firefox. So its just a stupid IE bug im using version 0.5b4 of this plugin. Can someone help?

what version of IE? 7, or earlier?


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

Offline

#455 2007-10-02 05:06:50

((slimey))
Member
Registered: 2005-06-25
Posts: 26

Re: ign_password_protect

Doesnt work in IE7 or 6 sorry knew i would forget a detail to fix the problem

Offline

#456 2007-10-03 12:41:19

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

Re: ign_password_protect

Has anyone found a way to lock away files while using this plugin because any user can just simply increment the id of the download link url and geht access to all files ???


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

visit me at visiongraphix

Offline

Board footer

Powered by FluxBB