Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Blog Module /

Discuss the Blog Module.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Forum Login to Comment on Blog


Go to End


6 Posts   4003 Views

Avatar
Clairmont

Community Member, 3 Posts

22 May 2009 at 12:56am

I've done a search and came across one post that described the steps to take to require login to forum username for blog commenting:

http://silverstripe.org/archive/show/159269

I did as it suggested, adding the PageComment::set_comments_require_login(true); line to the bottom of my /mysite/_config.php, but when I reload the file to my server, my entire install gets borked. Thinking I was using the wrong _config.php, I also added it to the empty /blog/_config.php, but ended with the same issue. If I could get some help with what I could be doing wrong here, it would be appreciated.

My main direction I'm wanting to use silverstripe is to have a unified login for the site, where the members are users of the 'site' and not necessarily just the forums. Being able to require login for comment is a step in that direction, and I don't foresee any other needs beyond that at this stage. Possibly I'd like to take it into the direction similar to what the poster in the linked post was wanting as well: showing the avatars within the comments as well.

Thanks for putting together a great CMS.

Avatar
Willr

Forum Moderator, 5523 Posts

22 May 2009 at 1:06pm

my entire install gets borked

Can you explain the error? Perhaps put the site into devmode to get the full error message. It could be as simple as a typo.

But yes that method should still work - we have it running for californiawomen.org. Blog commenting is locked down to members just by adding that 1 line.

Avatar
Clairmont

Community Member, 3 Posts

22 May 2009 at 3:37pm

Fatal error: Call to undefined method PageComment::set_comments_require_login() in /usr/home/webpage/public_html/test/mysite/_config.php on line 28

Is the error I'm getting once I upload and refresh. This installation is running on a subdomain, and therefore is running on a directory below the main site, as I'm just using one of my sites as a testbed. I didn't think that would effect the installation, but I might be mistaken.

Avatar
Willr

Forum Moderator, 5523 Posts

22 May 2009 at 3:53pm

I think it is PageCommentInterface::set_comments_require_login(true); not PageComment::set_comments_require_login()

Avatar
Clairmont

Community Member, 3 Posts

27 May 2009 at 4:33pm

Thank you very much, willr, that worked perfectly.

Avatar
helenclarko

Community Member, 166 Posts

2 May 2013 at 3:42pm

Hey all,

Just a quick question.

Does PageCommentInterface::set_comments_require_login(true) remove the RECAPTCHA code?

I haven't yet found an easy solution to remove the RECAPTCHA codes from comment entry.

Thanks,
-helenclarko