- Posts: 15
COMMUNITY FORUM
- Forum
- K2 Community Forum
- English K2 Community
- Use Joomla Registration or another database field to restrict/enable commenting
Use Joomla Registration or another database field to restrict/enable commenting
- GoHost4U.com
- Topic Author
- Offline
- New Member
Less
More
14 years 7 months ago #82611
by GoHost4U.com
Use Joomla Registration or another database field to restrict/enable commenting was created 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
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.
- Simon Wells
- Offline
- Platinum Member
Less
More
- Posts: 955
14 years 7 months ago #82612
by Simon Wells
Replied by Simon Wells on topic Use Joomla Registration or another database field to restrict/enable commenting
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
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
- Topic Author
- Offline
- New Member
Less
More
- Posts: 15
14 years 7 months ago #82613
by GoHost4U.com
Replied by GoHost4U.com on topic Use Joomla Registration or another database field to restrict/enable commenting
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
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.
- Simon Wells
- Offline
- Platinum Member
Less
More
- Posts: 955
14 years 7 months ago #82614
by Simon Wells
Replied by Simon Wells on topic Use Joomla Registration or another database field to restrict/enable commenting
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
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
Please Log in or Create an account to join the conversation.
- GoHost4U.com
- Topic Author
- Offline
- New Member
Less
More
- Posts: 15
14 years 7 months ago #82615
by GoHost4U.com
Replied by GoHost4U.com on topic Use Joomla Registration or another database field to restrict/enable commenting
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
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.
- Simon Wells
- Offline
- Platinum Member
Less
More
- Posts: 955
14 years 7 months ago #82616
by Simon Wells
Replied by Simon Wells on topic Use Joomla Registration or another database field to restrict/enable commenting
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
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.
- Simon Wells
- Offline
- Platinum Member
Less
More
- Posts: 955
14 years 7 months ago #82617
by Simon Wells
Replied by Simon Wells on topic Use Joomla Registration or another database field to restrict/enable commenting
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
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
- Topic Author
- Offline
- New Member
Less
More
- Posts: 15
14 years 7 months ago #82618
by GoHost4U.com
Replied by GoHost4U.com on topic Use Joomla Registration or another database field to restrict/enable commenting
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
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.
- Forum
- K2 Community Forum
- English K2 Community
- Use Joomla Registration or another database field to restrict/enable commenting