UBB.Dev
Posted By: ehm Limiting "post as event" posting - 03/22/2005 6:25 AM
I have many users who always click on the "posting as event" check mark on their regular posts.
I would like to keep this feature but only for some users (groups).
I could not find a way to limit it to show only for a determinaded groups or not to show to other groups.
Can it be done?
Posted By: scroungr Re: Limiting "post as event" posting - 03/22/2005 8:54 PM
Under Feature settings in the control panel under the General Tab is Allow Calendar Event Creation: which will allow users to create only private events through the calendar if set to Mod or Admin only and removes the add event option in the post screen.. but say you want to allow them to still create public events? well then in newpost.php

you would need to take

// ----------------------------------------------------
// Can they add an event to the calendar for this post?
if ( ($config['publicevents'] == 1 && $user['U_Status'] == "Administrator")
|| ($config['publicevents'] == 2 && ($user['U_Status'] == "Administrator" || $user['U_Status'] == "Moderator") )
|| ($config['publicevents'] == 3) ) {

and change it to


// ----------------------------------------------------
// Can they add an event to the calendar for this post?
if ( ($config['publicevents'] == 1 && $user['U_Status'] == "Administrator")
|| ($config['publicevents'] == 2 && ($user['U_Status'] == "Administrator" || $user['U_Status'] == "Moderator") )) {

whoch will take it out of the post screen except for admins and moderators..

now if you wanna limit it to a fourth option that enables it only for admins, mods, and certain groups you would have to write a little code...
Posted By: ehm Re: Limiting "post as event" posting - 03/23/2005 1:31 AM
Thank you scroungr
THat code you wrote will do the job
© UBB.Developers