Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Make texpattern self aware when I am commenting on my own blog?
How do I make textpattern self aware when I am commenting on my own blog so I don’t have to enter in my name and email?
Wordpress does this and I’m sure there has to be a plugin for txp.
Art Rogue – Fine Art Photography
Offline
Re: Make texpattern self aware when I am commenting on my own blog?
You can use rvm_privileged, a plugin which has a set of if/else conditionals. Then, you can do:
<txp:rvm_if_privileged name="mattmikulla">
...some input type="hidden" prefilled with your name and email...
<txp:else />
... the txp tags (name and email) for comments, which will output the input fields for your visitors
</txp:rvm_if_privileged>
... the rest of the comment form code... the textarea, the preview/submit buttons...
Offline
Re: Make texpattern self aware when I am commenting on my own blog?
maniqui provided a great example, but I just wanted to expand on it for others who may have multiple authors or users:
<txp:rvm_if_privileged> <input type="hidden" name="name" id="name" value="<txp:rvm_privileged_user />" /> <input type="hidden" name="email" id="email" value="<txp:rvm_privileged_user type="email" />" /> <txp:else /> <input type="text" name="name" id="name" /> <input type="text" name="email" id="email" /> </txp:rvm_if_privileged> ... the rest of the comment form code... the textarea, the preview/submit buttons...
Offline
#4 2008-08-29 05:14:06
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: Make texpattern self aware when I am commenting on my own blog?
Amit
Shouldn’t these…
<input type="hidden" name="name" id="name" value="<txp:rvm_privileged_user />" />
<input type="hidden" name="email" id="email" value="<txp:rvm_privileged_user type="email" />" />
…be single quoted for the new tag parser to do its thing; like this…
<input type="hidden" name="name" id="name" value='<txp:rvm_privileged_user />' />
<input type="hidden" name="email" id="email" value='<txp:rvm_privileged_user type="email" />' />
…??
— Steve
Offline
Re: Make texpattern self aware when I am commenting on my own blog?
net-carver wrote:
…be single quoted for the new tag parser to do its thing; like this…
Are you still sleeping net-carver? :P Wake up, wake up and put on some makeup. Yeah, I’m sleepyhead too :D
Back from offtopic, to the great answer: No, it is only XHTML, not Textpattern tag. <input.* />
!= <txp:.*/>
.
Offline
#6 2008-08-29 05:21:52
- net-carver
- Archived Plugin Author
- Registered: 2006-03-08
- Posts: 1,648
Re: Make texpattern self aware when I am commenting on my own blog?
Doh!
— Steve
Offline