Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-07-24 20:09:43

lvl
New Member
Registered: 2008-07-24
Posts: 2

Restrict comments to logged-in users

Is there a way to restrict comments to only logged-in users? I’ve seen the method of using a plug in to only show the comments form to logged-in users, but I would also like them to be able to comment without having to fill in the name/email fields, so the comment form would automatically know who was making the comment. Is this a possibility?

Offline

#2 2008-07-24 21:01:55

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Restrict comments to logged-in users

Wrap the comment form tags inside an rvm_if_privileged tag (see my rvm_if_privileged plugin).

Offline

#3 2008-07-24 21:03:46

lvl
New Member
Registered: 2008-07-24
Posts: 2

Re: Restrict comments to logged-in users

As I mentioned, I’m aware of that method, but I would like the comments to automatically be attributed to the person who is logged-in, without them having to complete any name/email fields. Is that possible?

Offline

#4 2008-07-24 21:25:15

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Restrict comments to logged-in users

Instead of using the normal form fields for Name and Email, you could use hidden form fields and fill them automatically using the <txp:rvm_privileged_user /> tag (also part of that same plugin).

Offline

#5 2008-07-25 08:15:12

smacks
Member
Registered: 2008-07-24
Posts: 12

Re: Restrict comments to logged-in users

ruud, can you please elaborate? I’m also trying the same thing, infact after putting those tags in the comment form, there is no way for new comments to be added. It neither shows a login, or logout link and there is no add comment link either. How can I do this?
Smacks

Offline

#6 2008-07-25 09:02:50

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Restrict comments to logged-in users

My plugin works only if a user is logged in on the admin side, so if you’re not logged in there, everything enclosed in the if_privileged tag is not shown to the user.

Offline

#7 2008-07-25 12:14:22

smacks
Member
Registered: 2008-07-24
Posts: 12

Re: Restrict comments to logged-in users

Cant I create users and allow them to login through the website itself instead of taking them through the admin site?

In my case,

I am trying to create a blog in which members who are preselected outside the web
They are then provided with a login,
Which they may use to come online to my blog and comment on the individual items they have bought from me.

How can I do this without giving them access to the admin site?
Smacks

Offline

#8 2008-07-25 12:37:41

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Restrict comments to logged-in users

smacks

Have a look at this thread.

Offline

Board footer

Powered by FluxBB