The idea is, letting normal members post public events for all to see, but still avoiding the abusive members abuse this feature.
Basically, if the option is turned on, all new public events will be added to a moderation queue, similar to the way new attachments and posts are moderated.
Each moderator will then be able to approve public events in a special place in his Mod CP.
A link is added there, see the screen shot in the zip file for more info.
That's all I think there is to this.
To install this hack, download the attached zip, extract it, and upload install_modqueuecal.php to your admin folder. Then go to it in your browser, and follow all the instructions that will be presented to you.
The install script will run two queries. One will add a field to your calendar_events table, and the other will add the new admin option.
Uninstall procedure is also avaiable.
A demo of the validating screen can be found in the zip file.
By the way, moderation is bypassed for mods and admins, so they can post without having to validate the events.
Not sure if this will work on versions prior to 2.2.0, but I don't expect any problems with it.
That's it I think.
Feedback is welcomed as always!
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
I got a problem with this hack... it works good, but today a user submitted an Event with HTML code in it, and the HTML didn't work.... Can you guys check it out? Submit an event with HTML, and see if after the approval, the HTML is working?
Firefly, did you ever get a chance to add email notification? What would be cool is, when someone submits an event, the admin gets an email with a link, and just by clicking on the link, the event is approved.
Installed this and it all appears to be working fine on 2.2.5. jamesdasher is right, the code appears in the file twice. I added the code before the first reference. I warn everyone to make sure when they copy and paste the code to be added to manually remove PHP code from the commented lines, for some reason it is written in them?! Anyway, thanks for this hack - just what I needed!
Invalid SQL: SELECT
eventdate,allowsmilies,username,event,subject,cale ndar_events.userid,public,visible
// Moderation Queue for Calendar Events (v1.0)
FROM calendar_events, user
WHERE eventid = 7 AND
calendar_events.userid = user.userid
mysql error: You have an error in your SQL syntax near '/ Moderation
Queue for Calendar Events (v1.0)
' at line 2
mysql error number: 1064
...Anyone have any ideas what's up? Thanks in advance. :squareeyed:
Having problems with this hack again after my upgrade...
Quote:
Invalid SQL: SELECT
eventdate,allowsmilies,username,event,subject,cale ndar_events.userid,public,visible
// Moderation Queue for Calendar Events (v1.0)
FROM calendar_events, user
WHERE eventid = 30 AND
calendar_events.userid = user.userid
mysql error: You have an error in your SQL syntax near '/ Moderation
Queue for Calendar Events (v1.0)
FROM calendar_events, user
' at line 2
mysql error number: 1064
...Getting that when viewing an event on the Calendar. Anyone able to help? Thanks in advance.
OK nevermind, I looked at that quote 10 times and it wasn't until I posted it here I realised I had a comment in the middle of a query. Seems to be working 100% now!