By Ignacio on Wednesday, 22 July 2015
Posted in General Issues
Likes 0
Views 774
Votes 0
Hello,

I would like to moderate events by category and not by profile type.

For example:

Profile type A can post events in category (One) without moderation but, if the event is posted in the other category (Two) it should be moderated.

Can it be done?

Thank you!
Couldn't find the option, meanwhile I've added to /components/com_easysocial/controllers/events.php at at line 581:

if ($category->id == 18 ) { 
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->update($db->quoteName('#__social_clusters'))->set($db->quoteName('state') . ' = 2')->where($db->quoteName('alias') . ' = ' . $db->quote($event->alias));
$db->setQuery($query);
$result = $db->execute();
}


18 being the category I would like to moderate.

It works for now, what's you opinion?

As always thank you very much!

Love stackideas
·
Wednesday, 22 July 2015 11:21
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Ignacio,

I would prefer to add the code in this file instead: ../administrator/components/com_easysocial/models/events.php in line 901:
From this:

if ($my->isSiteAdmin() || !$my->getAccess()->get('events.moderate')) {
$event->state = SOCIAL_CLUSTER_PUBLISHED;
}


To this:

if (($my->isSiteAdmin() || !$my->getAccess()->get('events.moderate')) && $event->category_id != 18) {
$event->state = SOCIAL_CLUSTER_PUBLISHED;
}


Please give it a try.
·
Wednesday, 22 July 2015 13:24
·
0 Likes
·
0 Votes
·
0 Comments
·
Thank you so much!!

Your support quality stands without equal!

·
Wednesday, 22 July 2015 14:29
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Ignacio,

You're welcome.
·
Wednesday, 22 July 2015 15:42
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post