Forums

Moderation in the Frontpage

rgoncalves 08 Apr, 2009
At present the only possible moderation in the FrontPage is to unpublished already publish comments, but in my case I wanted to moderate all comments and thought that to go to the backend to do it is a waste of time.
In fact, in my opinion, this should came in built in as default
I’m not in favor of hacks but in this case there was no other alternative😟

I just downloaded the ChronoComments today, please see modified attached files

basically I modified the plugin file and 3 files in the component
I attached both original and modified files so you can see how I did it.

the end result is that if you are a user under the 'unpublish' rights you'll see all comments (published and unpublished). The unpublished one will have a [UNPUBLISH] tag and a publish bottom, so you will be able to do it all from the frontpagešŸ™‚

Looking forward to ear your feedback
Max_admin 15 Apr, 2009
Hi rgoncalves,

Thank you very much for sharing this, I'm happy you solved this issue, I will add it to the next release, I was not active at the Comments forums in the past few days because I was very busy with major Chronoforms releases, now and after we are almost done from upgrading Chronoforms, I will move to ChronoComments and include all enhancements/fixes!

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
cruxe 21 Jun, 2009
This feature is great and one of most important when I look for a comment/guestbook system, because I don't want the person who moderate the messages to have access in backend and don't want the messages to be auto published.
But there is other function that misses from frontpage. That's the hability to delete/remove comments.
I think there should be some more options in parameters:
-Who can publish messages in frontend
-Who can reply to messages in frontend (I changed code so only moderator can post reply)
-Who can delete messages in frontend
-If no one have access to voting, voting system should not appear.

That is my sugestionsšŸ™‚
rgoncalves 25 Jun, 2009
I made a few changes more to the component (the same files once again) to add the following features:
* a new delete bt
* enabled ajax in both (un)publish and delete bts, so everything looks a lot nicer
* centralized the few new words that I had to include in my last changes and now to the language file
* optimization of the JRequests in the frontend component for better security against SQL injections

For the time being the permissions used for all these are the ā€˜unpublish’ rights. I don’t really want to start changing too much

Hope this is useful, and that they can be included in the next release so everyone can use them.
I attached the new files, with the original and older versions so the more curious ones can check where the changes were made.(you can use WinMerge to compare them)
cruxe 26 Jun, 2009
Nice work! Thank you!

Hope this features would be included in next releasešŸ™‚

Only one note: the files you posted don't have copyright notice...
samatt 13 Jul, 2009
Thanks guys, this is just what I was looking for 8)
bertmeelberg 17 Nov, 2009
This is exactly what I need, thanks for this modification.
Hope this will be part of the next update.
Regards, Bert
rgoncalves 02 Jun, 2010
Unfortunately the new version is taking too long to come out, so I would like to tell people about a minor extra thing they could be fixing.

File:

plugins/content/ChronoComments.php


Line:

14


Find:
function plgContentChronocomments( &$row, &$params, $page=0 )
{

Add the following line right after:
if (!$row->id) return true;


This error is only noticeable when debug is turned on, but don’t forget that it is always there making invalid calls to your database no matter if you have debug on or not.

Therefore I would recommend to update it.

I’m still waiting feedback from my post regarding this (http://www.chronoengine.com/forums.html?cont=posts&f=17&t=18192) but I believe it should also apply to the original chronocomments code.
Maxvn 16 Jun, 2010
Very nice hack, that's what i'm looking for. Thanks for sharing.

Do you have any demo version? so i can look at before i start hack for my website.
rgoncalves 16 Jun, 2010
unfortunately I do not have in any application that can be accessed from the internet, but I have this changes running for 1yr now and everything runs smoothly
rgoncalves 27 Jul, 2010
One thing I noticed just recently is that chronocomments will always output code to your pages regardless if comments are enabled for the current article/section/category.
So I just added a very small code to avoid that 

File: /plugins/content/chronocomments.php
Line: 25 (aprox depends on teh version you are using)
Find:
$session =& JFactory::getSession();

Add bellow:
if((!in_array($row->sectionid, (array)$configs->get('comment_sections'))) && (!in_array($row->catid, (array)$configs->get('comment_categories'))) && (!in_array($row->id, (array)$configs->get('comment_articles'))))
{
	return true;
}
This topic is locked and no more replies can be posted.