Anonymous Comments

Hi, How can I disable anonymous comments in all sections. Comments should be allowed only for registered members. pls help. Thanks.

Quote · 27 Jul 2009

Disable Anonymous Comments

 

Open templates/base/scripts/BxBaseCmtsView.php and replace lines 278 to 284 which is the following:


Old code:

 

return '
<div class="cmt-post-reply">
<div class="cmt-reply-head">
<a href="#" onclick="' . $this->_sJsObjName . '.toggleReply(this, \'0\'); return false;">' . _t('_Add Your Comment') . '</a>
</div>
' . $this->_getFormBox() . '
</div>';

 

 

New code(added code is green):

 
if ( !( $logged['member'] = member_auth( 0, false ) ) )        
return '<div> <a href="'.$site['url'].'/join.php" target="_self">'. _t('_RegComments') .'</a></div>';
else

 

return '     
<div class="cmt-post-reply">
<div class="cmt-reply-head">
<a href="#" onclick="' . $this->_sJsObjName . '.toggleReply(this, \'0\'); return false;">' . _t('_Add Your Comment') . '</a>
</div>
' . $this->_getFormBox() . '
</div>';

 
Now you notice I added a new language constant to new code: _RegComments
Login as admin and add a new language string where _RegComments = Register to comment

or whatever you think is best.

Quote · 27 Jul 2009

You know what the next question will be OKWeb... How do I change the order the comments appear in? 

 

Do you want to tell him or should I?  You've done so good with this so far I don't want to interfere with your run on it.

Quote · 27 Jul 2009

Its working great. Thank you very much for the clearly given instructions. I would be very grateful if one of you could answer for the next question which is supposed to be asked. Thanks in advance

Quote · 27 Jul 2009

You know what the next question will be OKWeb... How do I change the order the comments appear in?

Do you want to tell him or should I?  You've done so good with this so far I don't want to interfere with your run on it.

Okay that you respond to it, I don't have the solution in front of me right now ratherSmile

Quote · 27 Jul 2009

Ok, here is the other item that most want for their comments, to make the newest appear at the top of the list and the oldest at the bottom:

 

Open  inc/classes/BxDolCmtsQuery.php

 

Locate:

 

ORDER BY `c`.`cmt_time` ASC

 

Replace with

 

ORDER BY `c`.`cmt_time` DESC

 

Save the file and your done.

Quote · 27 Jul 2009

Thanks to both of you  Okweb  and  Mydatery.

Quote · 27 Jul 2009

Thank you very much Okweb  and  Mydatery. Have a great day! :)

Quote · 28 Jul 2009

Thanks guys,Works perfect.

Quote · 28 Jul 2009

 

Thanks guys,Works perfect.

 

Thanks to both of you  Okweb  and  Mydatery.

 

Thank you very much Okweb  and  Mydatery. Have a great day! :)

 

 You guys are welcome, it was really our pleasure to tag team ya all!

 

Quote · 28 Jul 2009
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.