Hallo an alle,

ich wollte das Calendar-Modul um eine Kleinigkeit erweitern, brauche da aber mal ein bisschen Hilfe.

Der Plan:
Dem Event-Modul eine Checkbox extra geben.
Wenn gesetzt: SQL-Statement 1 ausführen
Wenn nicht gesetzt: SQL-Satement 2 ausführen.

in modules/calendar/Events.php möchte ich folgendes SQL-Statement beeinflussen:
Code:
$objEvents = $this->Database->prepare("SELECT *, (SELECT title FROM tl_calendar WHERE id=?) AS calendar, (SELECT name FROM tl_user WHERE id=author) author FROM tl_calendar_events WHERE pid=? AND ((startTime>=? AND startTime<=?) OR (endTime>=? AND endTime<=?) OR (startTime<=? AND endTime>=?) OR (recurring=1 AND (recurrences=0 OR repeatEnd>=?) AND startTime<=?))" . (!BE_USER_LOGGED_IN ? " AND (start='' OR start<?) AND (stop='' OR stop>?) AND published=1" : "") . " ORDER BY startTime")
										->execute($id, $id, $intStart, $intEnd, $intStart, $intEnd, $intStart, $intEnd, $intStart, $intEnd, $time, $time);


Was ich hinbekommen habe
-Neuen Modulordner "xcustom" angelegt
- Checkbox (Name = cal_recurring) erstellt
Code:
$GLOBALS['TL_DCA']['tl_module']['palettes']['eventlist']       = '{title_legend},name,headline,type;{config_legend},cal_calendar,cal_noSpan, cal_recurring,cal_format;{template_legend:hide},cal_template,cal_startDay;{protected_legend:hide},protected;{expert_legend:hide},guests,cssID,space';



$GLOBALS['TL_DCA']['tl_module']['fields']['cal_recurring'] = array
(
	'label'                   => &$GLOBALS['TL_LANG']['tl_module']['cal_recurring'],
	'exclude'                 => true,
	'inputType'               => 'checkbox'
);
Soweit so gut, nur wie komme ich jetzt von meinem "xcustom" Modul an die original "Events.php" ran?
Ich hab probiert, in der Datei xcustom/config/config.php
Code:
 $GLOBALS['FE_MOD']['events'] = 'EventsExt.php';
zu schreiben und dann xcustom/EventsExt.php anzulegen.

Aber jetzt kommt da nur eine gähnen leere Seite.

Oder noch mal in einem Satz:
Wie kann ich meine eigene Events.php nutzen, ohne die originale Datei anzufassen?