Admin create events, Guests get ReadOnly

How would I implement a way where by a simple passcode is required to allow write access to the events. If the passcode isn’t entered then they just get the ability to view the events, but not edit them?


These work OK;

scheduler.attachEvent("onBeforeDrag", other_block); scheduler.attachEvent("onDblClick", other_block);
and stop the user from editing an existing event or moving an event. But nothing stops them from creating a new event, ie: the user can double click an EMPTY cell, and the lightbox appears. Apparently this here isn’t a blocking function?

		scheduler.attachEvent("onCellDblClick", other_block);



Have a solution. I used some code samples from the Joomla plugin, and wrapped it up in PHP to check the GET variable.

<?php if(!isset($_GET["user"]) || $_GET["user"] != "password") echo "scheduler.config.dblclick_create = false; scheduler.config.drag_create= false; scheduler.config.readonly_form = true; scheduler.attachEvent('onClick',function(id){ scheduler.showLightbox(id); return false; }); scheduler.attachEvent('onBeforeDrag',function(){return false;});"; ?>;