Keyword

Use Joomla Registration or another database field to restrict/enable commenting

  • GoHost4U.com
  • GoHost4U.com's Avatar Topic Author
  • Offline
  • New Member
More
14 years 1 week ago #82611 by GoHost4U.com
Hi
Is it possible to change the check done to enable commenting for either everyone or registered users to look at the Joomla registration field such as jos_users/block where 1 = no commenting allowed and 0 = commenting allowed.

Thanks

Mark

Please Log in or Create an account to join the conversation.

More
14 years 1 week ago #82612 by Simon Wells
Hi Mark,

Of course, anything is possible if you got the coding skills.

So, if the user is logged in, then commenting is enabled.
If the user is not logged in, then display prompt to login/register with K2 Login module.

Is that the kind of thing?

Simon
K2 Support

Please Log in or Create an account to join the conversation.

  • GoHost4U.com
  • GoHost4U.com's Avatar Topic Author
  • Offline
  • New Member
More
14 years 1 week ago #82613 by GoHost4U.com
Hi and thanks for the reply...

Yes this is the sort of thing I was thinking...at the moment I think K2 looks at jos_k2_users/group to see if there is a "1"..is that correct?

Can it look at jos_users/block to see if there is a "0" instead?

Cheers Mark

Please Log in or Create an account to join the conversation.

More
14 years 1 week ago #82614 by Simon Wells
In the K2 item comment template, a test can be added to check if the user is logged in.
If not, no comment form but a link to a login/register page

Modifications have to be made in components/com_k2/templates/default/item_comments_form.php
I would recommend that you copy the default folder and rename to something else, creating another K2 template, such as "test". this "test" template can then be set in the category for testing purposes, without affect the core template.

The attached file contains code which I have just tested on K2Joom.com.

This function is 100% working.

Simon
K2 Support
Attachments:

Please Log in or Create an account to join the conversation.

  • GoHost4U.com
  • GoHost4U.com's Avatar Topic Author
  • Offline
  • New Member
More
14 years 1 week ago #82615 by GoHost4U.com
I really appreciate your help but this wont solve my problem.

When people use the Chronoform to register they can log in but because they use the Chronoform to register this does not write all the data to the jos_k2_users table. So when you log in K2 does not think you are "registered"

In parameters you can set Global setting for comments to Disabled, Enabled for everyone or Enabled for registered users.

I still want to restrict the commenting to Registered users BUT using the "block" field in the job_users table and NOT the "group" field in the jos_K2_users table which it does by default.

So where does the check happen for Global setting for comments to Disabled, Enabled for everyone or Enabled for registered users. I think if I change this it will solve my issue.

Cheers again

Mark

Please Log in or Create an account to join the conversation.

More
14 years 1 week ago #82616 by Simon Wells
I use chrono on k2joom for registration, this link shows its working.

Feel free to test it, register and see if that confirms it.

Simon
K2 Support

GoHost4U.com said:I really appreciate your help but this wont solve my problem.
When people use the Chronoform to register they can log in but because they use the Chronoform to register this does not write all the data to the jos_k2_users table. So when you log in K2 does not think you are "registered"

In parameters you can set Global setting for comments to Disabled, Enabled for everyone or Enabled for registered users.

I still want to restrict the commenting to Registered users BUT using the "block" field in the job_users table and NOT the "group" field in the jos_K2_users table which it does by default.

So where does the check happen for Global setting for comments to Disabled, Enabled for everyone or Enabled for registered users. I think if I change this it will solve my issue.

Cheers again

Mark

Please Log in or Create an account to join the conversation.

More
14 years 1 week ago #82617 by Simon Wells
I use chrono for registration on K2Joom, this link is working.

feel free to register to test it.

Simon
K2 Support

GoHost4U.com said:I really appreciate your help but this wont solve my problem.
When people use the Chronoform to register they can log in but because they use the Chronoform to register this does not write all the data to the jos_k2_users table. So when you log in K2 does not think you are "registered"

In parameters you can set Global setting for comments to Disabled, Enabled for everyone or Enabled for registered users.

I still want to restrict the commenting to Registered users BUT using the "block" field in the job_users table and NOT the "group" field in the jos_K2_users table which it does by default.

So where does the check happen for Global setting for comments to Disabled, Enabled for everyone or Enabled for registered users. I think if I change this it will solve my issue.

Cheers again

Mark

Please Log in or Create an account to join the conversation.

  • GoHost4U.com
  • GoHost4U.com's Avatar Topic Author
  • Offline
  • New Member
More
14 years 1 week ago #82618 by GoHost4U.com
Hi

I get ...

The website at k2joom.com contains elements from the site bbb.bugafadsaj.com, which appears to host malware - software that can hurt your computer or otherwise operate without your consent. Just visiting a site that contains malware can infect your computer.

But that aside you use AlphaRegistration...when i go to register on your site the link is k2joom.com/index.php?option=com_alpharegistration&task=register

Cheers

Mark

K2Joom said:I use chrono for registration on K2Joom, this link is working.
feel free to register to test it.

Simon
K2 Support

GoHost4U.com said:I really appreciate your help but this wont solve my problem. When people use the Chronoform to register they can log in but because they use the Chronoform to register this does not write all the data to the jos_k2_users table. So when you log in K2 does not think you are "registered"

In parameters you can set Global setting for comments to Disabled, Enabled for everyone or Enabled for registered users.

I still want to restrict the commenting to Registered users BUT using the "block" field in the job_users table and NOT the "group" field in the jos_K2_users table which it does by default.

So where does the check happen for Global setting for comments to Disabled, Enabled for everyone or Enabled for registered users. I think if I change this it will solve my issue.

Cheers again

Mark

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum