Main menu

Forum


× Help Forum English

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

  • dafreeze01
  • Topic Author
  • New Member
  • New Member
More
11 years 2 weeks ago - 11 years 2 weeks ago #3290 by 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.
Last edit: 11 years 2 weeks ago by Lyr!C.

Please Log in or Create an account to join the conversation.

  • Lyr!C
  • Lyr!C's Avatar
  • Administrator
  • Administrator
  • Lead Developer
More
11 years 2 weeks ago #3295 by Lyr!C
Hello,

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

;-)

Latest version : iCagenda 3.9.3
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 Attachment:

Please Log in or Create an account to join the conversation.

  • dafreeze01
  • Topic Author
  • New Member
  • New Member
More
11 years 2 weeks ago #3299 by 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

Please Log in or Create an account to join the conversation.

  • dafreeze01
  • Topic Author
  • New Member
  • New Member
More
11 years 2 weeks ago #3300 by 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....

Please Log in or Create an account to join the conversation.

Moderators: Lyr!C
Time to create page: 0.214 seconds

Follow Us

Create your Joomla templates with Template Creator CK

acymailing logo new