Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#16 2008-02-03 11:17:53
- FireFusion
- Member

- Registered: 2005-05-10
- Posts: 698
Re: rvm_privileged v0.4
Ah. It works on regular articles but not sticky.
How can I get it working on sticky articles?
I have single sticky articles displaying in section lists.
Last edited by FireFusion (2008-02-03 11:20:45)
Offline
Re: rvm_privileged v0.4
Upgrade to TXP 4.0.6
Offline
#18 2008-02-03 11:56:28
- FireFusion
- Member

- Registered: 2005-05-10
- Posts: 698
Re: rvm_privileged v0.4
I did before installing this plugin. It’s very strange. The code works on all other pages except sticky articles in article list mode. However if I output just the <txp:article_id /> tag it displays the ID. As soon as it’s in that tag it doesn’t output an ID on those sticky pages.
Also if I go to that sticky article in single article mode it does work again.
mysite.com/section/ <—- Doesn’t display ID
mysite.com/section/sticky-title/ <—- Does display
Last edited by FireFusion (2008-02-03 11:57:14)
Offline
Re: rvm_privileged v0.4
I tried to use <txp:rvm_if_privileged /> around a zem_contact_reborn form. It doesn’t show the form. What am I doing wrong?
Offline
Re: rvm_privileged v0.4
Robin, can you open a separate topic for this, since it’s not related to this plugin.
typeshige, are you using TXP 4.0.6 and are you logged in? Also look at the tag trace to see what’s happening.
Offline
Re: rvm_privileged v0.4
rudd:
I took a look at the page source and it looks like its not processing txp tags between rvm_if_priviledged only the plain HTML.
Is this because I’m using rvm_if_priviledged inside another txp tag (my plugin)?
If so, is there anything I can do about it besides taking it out of the plugin?
Thanks in advance!
Last edited by typeshige (2008-02-06 08:19:54)
Offline
Re: rvm_privileged v0.4
This is what I ended up doing but I’m not sure its correct.
I suspected txp can’t do a triple pass for tags, so I examined the code in the rvm_priviledged plugin and used this little bit in my own plugin to tell me if I’m logged in or not:
Snippet from one of my functions:
static $ili = 0;
if ($ili === 0) $ili = is_logged_in();
return ($ili) ? ‘<txp:zem_contact to=“xxxxxxx” label=”“ form=“page-feedback” />’ : ‘’;
This has worked, but I’m not sure I copied all the right bits from your plugin… First of all, I’ve seen the three =‘s before, but I’m not exactly sure what that means (deep comparisons?)… so I’m just accepting the fact that its correct. (If you know the technical term for it, I’d love to study that more.)
Then, in the form, “page-feedback”, I use asy_wondertag to set default values in my form from <txp:rvm_privileged_user /> like:
<txp:asy_wondertag><txp:zem_contact_email label=”“ name=“email” required=“0” default=”<txp:rvm_privileged_user type=“email” />” /></txp:asy_wondertag>
So far this all works, but seems kludgy. If you have a moment, please let me know how this sounds and if there is a better way to do this.
Offline
Re: rvm_privileged v0.4
Why don’t you simply do:
<txp:rvm_if_privileged>
<txp:zem_contact to="xxxxxxx" label="" form="page-feedback" />
</txp:rvm_if_privileged>
Offline
Re: rvm_privileged v0.4
I tried that, but when I do, my html source looks like this:
stuff before rvm_if_priviledged…
<txp:zem_contact to=“xxxxxxx” label=”“ form=“page-feedback” />
stuff afterwards…
it’s spitting up the txp tag without processing it to the browser.
It sounds like I wasn’t clear, so I’ll try to explain again.. :) From my page there is plugin I wrote that handles the meat of my page. Towards the end of that plugin, it has a feedback form that I tried to wrap around rvm_if_priviledged. since it looks like you can’t embed a txp tag inside a txp tag inside a txp tag, I thought I’d keep the functionality of rvm_if_priviledged by reusing what i thought was the relevant parts directly in my plugin function and remove one tag from the loop. That has been the only way I’ve been able to get it to work so far, but I welcome suggestions to make it work like you mentioned.
ruud wrote:
Why don’t you simply do:
<txp:rvm_if_privileged>
<txp:zem_contact to="xxxxxxx" label="" form="page-feedback" />
</txp:rvm_if_privileged>
Offline
Re: rvm_privileged v0.4
Oops, download version 0.2 of my plugin (see opening post). I forgot to parse the output of the if_privileged container. That’s fixed now.
Last edited by ruud (2008-02-06 17:54:06)
Offline
Re: rvm_privileged v0.4
ruud wrote:
Oops, download version 0.2 of my plugin (see opening post). I forgot to parse the output of the if_privileged container. That’s fixed now.
Thanks! This works perfectly!
Offline
#27 2008-02-06 20:21:11
- mapu
- Member

- From: Munich, Germany
- Registered: 2004-03-16
- Posts: 141
Re: rvm_privileged v0.4
With TXP 4.0.6 and this plugin a dream comes true for me :)
Offline
Re: rvm_privileged v0.4
Share your dream, mapu!
I haven’t tested this one yet, but I’m thinking about this: to create a section that’s only accesible by privileged users (that is, logged in on the admin side) to preview drafts articles (using <txp:article status="1" />) in the context of the site, so authors can easily view how the article is going to be seen once it has been published.
Last edited by maniqui (2008-03-28 19:44:16)
Offline
Re: rvm_privileged v0.4
I want to implement a minimalist login/logoff feature. It’s probably beyond the scope of this plugin, but I was hoping for some pointers on how it might be done at the most basic level.
Thanks,
Shige
Offline
Re: rvm_privileged v0.4
logoff is equivalent to deleting the txp_login_public cookie.
login requires you to check username/password against the txp_user table and setting the txp_login_public cookie.
Look at the ‘/textpattern/include/txp_auth.php’ file for inspiration ;)
Offline