Main menu

Forum


× Help Forum English

[Already in Roadmap] Repeating Event over Period with Registration Period

  • dafreeze01
  • Autore della discussione
  • New Member
  • New Member
Di più
12 Anni 10 Mesi fa - 12 Anni 10 Mesi fa #3290 da dafreeze01
Hi,

is it possible to add a new Feature? My Case:

I'm giving a curse every week on same day and time in a period.
The Users should be able to register for every single event, but only from a specified time before event, to a specified time to event.

Example:

Course every week on Saturday, 14:00-15:00
Registration for event opens 1 week before event start and goes until 2 hours before event start.

The Registration closes, if the event is full and if the time is not right.

Thanks for reply.
Ultima Modifica 12 Anni 10 Mesi fa da Lyr!C.

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • Lyr!C
  • Avatar di Lyr!C
  • Administrator
  • Administrator
  • Lead Developer
Di più
12 Anni 10 Mesi fa #3295 da Lyr!C
Hello,

This is already in the Roadmap : www.joomlic.com/forum/icagenda-announcem...e-in-future-versions

;-)

Latest version : iCagenda 4.0.2
We recommend every user to keep iCagenda updated.
Don't forget to have your Joomla!™ up-to-date!

Do you like iCagenda?
I would appreciate if you could take 5 minutes to post a review on JED (Joomla Extensions Directory) .

File allegato:

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • dafreeze01
  • Autore della discussione
  • New Member
  • New Member
Di più
12 Anni 10 Mesi fa #3299 da dafreeze01
Ok...nice to here about.
Maybe i can help you a littlebit with coding. Got some things working:

Reg start and end time/date relative to event in Year/Month/Day/Hour/Minute
is simply saved as param
for the repeating event (in my case every week) i did add a sql row (daysOfWeek) and recoded the event table
$start = new DateTime($startdate);

if(is_array( $array['daysOfWeek'])){
	$weekdays = $array['daysOfWeek'];
	$array['daysOfWeek'] = implode(",",$weekdays);
}else{
	$weekdays = explode(",",$array['daysOfWeek']);
}

$tempWeekDays = array(
    'Sunday',
    'Monday',
    'Tuesday',
    'Wednesday',
    'Thursday',
    'Friday',
    'Saturday',
);
if($weekdays == NULL) $weekdays= array(0,1,2,3,4,5,6);


foreach($weekdays as $weekday){
	
	if (class_exists('DateInterval')) {
		$temp = $start;
		$temp->modify("+1 ".$tempWeekDays[$weekday]);
		// Create array with all dates of the period - php 5.3

		$date_interval = new DateInterval("P7D");
 
		$end = new DateTime($enddate);

		// Retourne toutes les dates.
		$perioddates[] = new DatePeriod($temp, $date_interval, $end);
		$out = array();

	} else {
		
		// Create array with all dates of the period - php 5.2
		if (($startdate != $nodate) && ($enddate != $nodate)) {
			$temp = $start;
			$temp->modify("+1 ".$tempWeekDays[$weekday]);	//$end = new DateTime(date("Y-m-d H:i",strtotime("+0 day", strtotime($enddate))));
			
			$end = new DateTime($enddate);
			while($start < $end) {
				$out[] = $start->format('Y-m-d H:i');
				$temp->modify('+7 day');
			}
			
		}
		echo("PHP5.2");

	}
}
// Prépare serialize.
if (!empty($perioddates) && is_array($perioddates)) {

	foreach($perioddates as $pd) 
		foreach($pd as $dt) {
			$out[] = (
				$dt->format('Y-m-d H:i')
			);
	}	
}
sort($out);

// Serialize les dates de la période.
if (($startdate != $nodate) && ($enddate != $nodate)) {
	$array['period'] = serialize($out);


		$ctrl=unserialize($array['period']);
		if(is_array($ctrl)){
			$period=unserialize($array['period']);
			dump($period,"array");
		}else{
			$period=$this->getPeriod($array['period']);
			dump($period,"noarray");
		}
		rsort($period);
		$array['period']=serialize($period);
} else {
	$array['period']='';
}

I'm coding on version 2.1.2, so some things or not on latest state

Si prega Accedi o Crea un account a partecipare alla conversazione.

  • dafreeze01
  • Autore della discussione
  • New Member
  • New Member
Di più
12 Anni 10 Mesi fa #3300 da dafreeze01
a nice thing would be, if you could choose, if the event dates are in a list to choose in which you can register, or you make a list where every date is a "new" event....

Si prega Accedi o Crea un account a partecipare alla conversazione.

Moderatori: Lyr!C
Tempo creazione pagina: 0.056 secondi

Follow Us

Create your Joomla templates with Template Creator CK

acymailing logo new