Main menu

Forum


× Help Forum English

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

  • dafreeze01
  • Topic Author
  • Junior Member
  • Junior Member
More
13 years 7 months ago - 13 years 7 months 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: 13 years 7 months 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
13 years 7 months 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 4.0.17 Joomla! 4 > Joomla! 6
We recommend every user to keep iCagenda updated.
Support for iCagenda version 3.9 (the final version compatible with Joomla 3) ended on October 13, 2026
Extended security support for the iCagenda PRO 3.9 version until October 13, 2027 (to benefit from this extended support, you must have a Pro subscription: www.joomlic.com/extensions/icagenda)
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
  • Junior Member
  • Junior Member
More
13 years 7 months 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
  • Junior Member
  • Junior Member
More
13 years 7 months 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.073 seconds

Follow Us

Create your Joomla templates with Template Creator CK

acymailing logo new