By Laurent on Thursday, 23 June 2016
Posted in Technical Issues
Replies 3
Likes 0
Views 375
Votes 0
On default installation ES, there are ACL rules to moderate events creation (events.moderate) and group creation (groups.moderate). How is it possible to create new rules to moderate photo upload for exemple ? Where are stored the rule files and how is it possible to create new rule files ?
For exemple, I need to moderate "modification event" or "upload new photo", and I just need to set correspondent state to value 2 (pending approval), how can I do please ?
Thank you
Hey there,

I am sorry for the delay of this reply,

Unfortunately that was not possible to create new rules to moderate photo upload at this point of time is because the current system only have moderation for event and group, the current moderation action do not available for photo yet.

If you really want to achieve this, you might have to do modify a lot of file to make this work :
- Create a new Easysocial photo pending listing page from backend (include approve/reject/delete function), so that your moderator can approve/reject or delete it from backend.

- Add a new rule file for your photo moderation

- Upload photo function is under this controller file, you have to add the proper checking in this file update the photo state to pending value if photo moderation setting is enable
JoomlaFolder\components\com_easysocial\controllers\photos.php
LINE 268 uploadStory function


- Also you also need to update the SQL if the photo under moderation, this photo stream shouldn't appear on dashboard or group/event page.
JoomlaFolder\administrator\components\com_easysocial\models\stream.php
LINE 789 getClusterStreamData function
LINE 1330 getStreamData function


- Need to update the SQL here if the photo under moderation, it shouldn't show on the album page as well.
JoomlaFolder\administrator\components\com_easysocial\models\photos.php
LINE 378 getPhotos function
·
Friday, 01 July 2016 11:25
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Laurent,

To create new rules, you need to perform the following items:

1. Create a new ACL rule file and install it in EasySocial

2. Apply the necessary codes respectively to apply your hacks.
·
Thursday, 23 June 2016 21:37
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello,
to apply the necessary code in my new file, i need to see the existing files, where can i find them please (which path is it) ?
·
Friday, 01 July 2016 01:19
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post