Hi,
This is an interesting question, but unfortunately I don’t think its possible (yet) without touching the plug-in’s code. (I would eventually like to make this easier).
First, to make an additional ‘schedule option’ available you’ll probably want to edit event-organiser-edit.php (In particular the $reoccurrence_schedules array, which is used for the drop-down select).
Now the logic of generating occurrencies is in includes/event.php. Specifically: _eventorganiser_generate_occurrences().
That function receives schedule information (start, end, recurrence pattern, dates to include/exclude etc), and generates the occurrences, and returns that allowing with the passed schedule information. This function calls the filter eventorganiser_generate_occurrences, so you could replace the occurrences with those calculated from your own custom schedules. For that part, at least you don’t have to touch the core code.
Keep in mind that these custom schedules will not be recognised by most calendar applications. As such you’ll probably find that this breaks the ICAL feed. For this reason, it may be better to (in your eventorganiser_generate_occurrences callback), to set the schedule to ‘custom’ and set individual dates by using the ‘include’ key. (So it would be like you selected all the appropriate dates using the include/exclude datepicker – except done automatically).
Thank you for the replay, but how can I can include
easter_date ($ today), or similar
in the field “custom”???
This is a sample of my recurrences (variables are expresse in italian)
$oggi = mktime (0,0,0,date(“m”),date(“d”),date(“Y”));
$anno_data = date(“Y”,$oggi);
$pasqua = date(“Y-m-d”, easter_date($anno_data));
$pas_day = date(“d”, easter_date($anno_data));
$pas_mes = date(“m”, easter_date($anno_data));
$pas_ann = date(“Y”, easter_date($anno_data));
// ……. LUNEDI’ DI PASQUA +1 ………
function LunPasqua($anno_data){
$pasqua_lun = date(“Y-m-d”, mktime(0,0,0,$pas_mes,$pas_day+1,$pas_ann));
return $pasqua_lun;
}
// ……. LE PALME DI PASQUA -7 ………
function PalmePasqua($anno_data){
$pasqua_palme = date(“Y-m-d”, mktime(0,0,0,$pas_mes,$pas_day-7,$pas_ann));
return $pasqua_palme;
}
// ……. DOMENICA PRIMA DELLE PALME DI PASQUA -14 ………
function DomPalmePasqua($anno_data){
$pasqua_dom_prim_palme = date(“Y-m-d”, mktime(0,0,0,$pas_mes,$pas_day-14,$pas_ann));
return $pasqua_dom_prim_palme;
}
…