MyBB Community Forums

Full Version: [F] Edit event
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
If you change the status of an existing event from private to public (or the other way around) this change isn't applied to this event.
In template "calendar_editevent", find:
				<input type="checkbox" class="checkbox" name=thread value="1"{$privatecheck} /><span class="smalltext">{$lang->private_option}</span><br />
Replace with:
				<input type="checkbox" class="checkbox" name="private" value="1"{$privatecheck} /><span class="smalltext">{$lang->private_option}</span><br />

Does that work? Smile
Heh, looks like someone copied over code :p
It's working if you turn a public event into a private event. It's not working if you want to turn a private event into a public one.
Are you sure it's not your browser caching the checkmark?
Yes, I am. I even disabled caching and another user experienced the same after changing the template.
Fix: Open the file inc/datahandlers/event.php and search for:
if(isset($event['private']))
{
	$this->event_update_data['private'] = intval($event['private']);
}
Replace with:
if(isset($event['private']))
{
	$this->event_update_data['private'] = 1;
}
else
{
	$this->event_update_data['private'] = 0;
}
Thank you for your bug report.

This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated.
Actually that is not the correct fix.

It works the way DennisTT said, but it has to be updated on all the themes, if you applied it to the Default Templates and you are using another one the problem will persist. Try saving it to Global Templates.

I tested and works without altering the datahandler, just modify the template from:
                <input type="checkbox" class="checkbox" name=thread value="1"{$privatecheck} /><span class="smalltext">{$lang->private_option}</span><br />

To:
                <input type="checkbox" class="checkbox" name="private" value={$privatecheck} /><span class="smalltext">{$lang->private_option}</span><br />

And double-check it's actually being saved (return to the template and see if the change was indeed saved).