We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Change event interval to 15 minutes | Forum

Volker
Volker Nov 16 '14
Hi, 


sometimes one could want the event start and end times to be in 15 minutes instead of 30 minutes steps, which is the default. 


To change this:


edit /ow_plugins/event/controllers/base.php


Search the lines: 


        for ( $hour = 0; $hour <= 23; $hour++ )        {            

$valuesArray[$hour . ':0'] = array('label' => $this->getTimeString($hour, '00'), 'hour' => $hour, 'minute' => 0);            

$valuesArray[$hour . ':30'] = array('label' => $this->getTimeString($hour, '30'), 'hour' => $hour, 'minute' => 30);       

}



Change to:


        for ( $hour = 0; $hour <= 23; $hour++ )        {            

$valuesArray[$hour . ':0'] = array('label' => $this->getTimeString($hour, '00'), 'hour' => $hour, 'minute' => 0);            

$valuesArray[$hour . ':15'] = array('label' => $this->getTimeString($hour, '15'), 'hour' => $hour, 'minute' => 15);            

$valuesArray[$hour . ':30'] = array('label' => $this->getTimeString($hour, '30'), 'hour' => $hour, 'minute' => 30);            

$valuesArray[$hour . ':45'] = array('label' => $this->getTimeString($hour, '45'), 'hour' => $hour, 'minute' => 45);        

}


And you're done. Make a note you possibly need to re-apply the change after an Oxwall or event plugin update, since it will possibly be overwritten. 

The Forum post is edited by Volker Nov 16 '14
Oxwall Software
Oxwall Software Nov 17 '14
Topic was moved from Events.
matt
matt Nov 17 '14
Thanks! Very useful :)