Buy Now
Sign in

Moderation in the Frontpage

rgoncalves , April 08 2009, 08:32
rgoncalves 7
April 08 2009, 08:32 #29200
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
(8.21 KiB)
1523 Downloads/Views
(24.05 KiB)
1582 Downloads/Views
admin 33
April 15 2009, 05:43 #29825
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!

cruxe 2
June 21 2009, 17:26 #35298
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 7
June 25 2009, 05:25 #35620
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)
(1.65 KiB)
1592 Downloads/Views
(12.56 KiB)
1467 Downloads/Views
(36.49 KiB)
1513 Downloads/Views
cruxe 2
June 26 2009, 11:20 #35757
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 3
July 13 2009, 06:55 #36941
Thanks guys, this is just what I was looking for 8)
bertmeelberg 8
November 17 2009, 10:34 #43321
This is exactly what I need, thanks for this modification.
Hope this will be part of the next update.
Regards, Bert
rgoncalves 7
June 02 2010, 07:04 #52040
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.



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 ( but I believe it should also apply to the original chronocomments code.
Maxvn 15
June 16 2010, 04:47 #53016
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 7
June 16 2010, 04:53 #53017
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 7
July 27 2010, 23:58 #55098
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)
$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;