From adc61f2d583082c3cc9f430ac27c23dbd2c8172d Mon Sep 17 00:00:00 2001 From: rt Date: Wed, 30 Oct 2019 08:33:15 +0000 Subject: [PATCH] Update 'fancytokens.php' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changed format of date and texts Résumé des changements 31: $e_start_date = $dao->start_date; 32: - $label = 'Registration Page: '.$e_title.' on '.$e_start_date.' (id: '.$e_id.') :: Events'; 33: + $label = 'Registration Page: '.$e_title.' '.$e_start_date.' (id: '.$e_id.') :: Events'; 34: $key = 'communitynews.event_registrationpage___'.$e_id ; 502: $sql = "SELECT e.id , e.summary, e.title, e.registration_link_text, 503: - date_format( e.start_date, '%W %b %e at %l:%i %p' ) as start_date , 504: + date_format( e.start_date, '%d/%m/%Y à %Hh%i' ) as start_date , 505: if( e.is_online_registration = 1 AND 553: } 554: - $tmp_event_html = $tmp_event_html."\n

".$e_title." on ". 555: + $tmp_event_html = $tmp_event_html."\n

".$e_title." ". 556: $e_start_date.$register_html.$summary_html; 576: $sql = "SELECT e.id , e.summary, e.title, e.registration_link_text, 577: - date_format( e.start_date, '%W %b %e at %l:%i %p' ) as start_date , 578: + date_format( e.start_date, '%d/%m/%Y à %Hh%i' ) as start_date , 579: if( e.is_online_registration = 1 AND 627: } 628: - $tmp_event_html = $tmp_event_html."\n

".$e_title." on ". 629: + $tmp_event_html = $tmp_event_html."\n

".$e_title." ". 630: $e_start_date.$register_html.$summary_html; --- fancytokens.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fancytokens.php b/fancytokens.php index 44d40af..bfcd6d9 100644 --- a/fancytokens.php +++ b/fancytokens.php @@ -29,7 +29,7 @@ function fancytokens_civicrm_tokens( &$tokens ){ $e_id = $dao->id; $e_title = $dao->title; $e_start_date = $dao->start_date; - $label = 'Registration Page: '.$e_title.' on '.$e_start_date.' (id: '.$e_id.') :: Events'; + $label = 'Registration Page: '.$e_title.' '.$e_start_date.' (id: '.$e_id.') :: Events'; $key = 'communitynews.event_registrationpage___'.$e_id ; $tokens['communitynews'][$key] = $label; @@ -499,7 +499,7 @@ $protocol = $isSecure ? 'https://' : 'http://'; if( is_numeric( $date_number) && ( $date_unit == 'day' || $date_unit == 'week' || $date_unit == 'month' )){ // get event data $sql = "SELECT e.id , e.summary, e.title, e.registration_link_text, - date_format( e.start_date, '%W %b %e at %l:%i %p' ) as start_date , + date_format( e.start_date, '%d/%m/%Y à %Hh%i' ) as start_date , if( e.is_online_registration = 1 AND ( e.registration_end_date is null || now() <= e.registration_end_date ) AND ( e.registration_start_date is null || now() >= e.registration_start_date ), '1', '0') as @@ -549,7 +549,7 @@ $protocol = $isSecure ? 'https://' : 'http://'; $summary_html = ""; } - $tmp_event_html = $tmp_event_html."\n

".$e_title." on ". + $tmp_event_html = $tmp_event_html."\n

".$e_title." ". $e_start_date.$register_html.$summary_html; } $dao->free(); @@ -571,7 +571,7 @@ $protocol = $isSecure ? 'https://' : 'http://'; if( is_numeric( $token_event_id) ){ // get event data $sql = "SELECT e.id , e.summary, e.title, e.registration_link_text, - date_format( e.start_date, '%W %b %e at %l:%i %p' ) as start_date , + date_format( e.start_date, '%d/%m/%Y à %Hh%i' ) as start_date , if( e.is_online_registration = 1 AND ( e.registration_end_date is null || now() <= e.registration_end_date ) AND ( e.registration_start_date is null || now() >= e.registration_start_date ), '1', '0') as @@ -621,7 +621,7 @@ $protocol = $isSecure ? 'https://' : 'http://'; $summary_html = ""; } - $tmp_event_html = $tmp_event_html."\n

".$e_title." on ". + $tmp_event_html = $tmp_event_html."\n

".$e_title." ". $e_start_date.$register_html.$summary_html; } $dao->free();