@ -186,7 +186,7 @@ class Unicalendar
//получаем данные всех документов из заданной рубрики циклом, формируем строку JSON
foreach ( $results as $k=>$v )
{
$uni_data .= "{ \"date\": \"".pretty_date(strftime('%Y-%m-%d %H:%M:%S', $v['document_published']))."\", \"expire_date\": \"".pretty_date(strftime('%Y-%m-%d %H:%M:%S', $v['document_expire']))."\", \"title\": \"".$v['document_title']."\", \"image\": \"".strstr(get_document_field($v['Id'], $uca_img_field), '|', true)."\", \"description\": \"".rtrim(mb_substr(preg_replace('|[\s]+|s', ' ', strip_tags(get_document_field($v['Id'], $uca_dsc_field))), 0, 255, 'UTF-8'), "!,.-").$ellipsis."\", \"location\": \"".mb_substr(preg_replace('|[\s]+|s', ' ', strip_tags(get_document_field($v['Id'], $uca_place_field))), 0, 300, 'UTF-8')."\", \"url\": \"".$v['document_alias']."\" },";
$uni_data .= "{ \"date\": \"".pretty_date(strftime('%Y-%m-%d %H:%M:%S', $v['document_published']))."\", \"expire_date\": \"".pretty_date(strftime('%Y-%m-%d %H:%M:%S', $v['document_expire']))."\", \"title\": \"".$v['document_title']."\", \"image\": \"".strstr(get_document_field($v['Id'], $uca_img_field), '|', true)."\", \"description\": \"".rtrim(mb_substr(preg_replace('|[\s]+|su ', ' ', strip_tags(get_document_field($v['Id'], $uca_dsc_field))), 0, 255, 'UTF-8'), "!,.-").$ellipsis."\", \"location\": \"".mb_substr(preg_replace('|[\s]+|su ', ' ', strip_tags(get_document_field($v['Id'], $uca_place_field))), 0, 300, 'UTF-8')."\", \"url\": \"".$v['document_alias']."\" },";
$rubric_count .= $v['Id']." OR Id=";
}
$js_data_files = "$(function(){"."var data".$uca_id." = [".$uni_data."]; $(\"#eventCalendar".$uca_id."\").eventCalendar({jsonData: data".$uca_id.", jsonDateFormat: \"human\", startWeekOnMonday: ".$uca_day.", eventsScrollable: ".$uca_scroll.", openEventInNewWindow: ".$uca_link.", dateFormat: \"".$uca_dfrm."\", showDescription: ".$uca_descript.", eventsLimit: ".$uca_events_limit.", locales: {locale: \"".$uca_locale."\", txt_noEvents: \"".$uca_no_events."\", txt_SpecificEvents_prev: \"\", txt_SpecificEvents_after: \"".$uca_real_events."\", txt_NextEvents: \"".$uca_next_events."\", txt_GoToEventUrl: \"".$uca_look_events."\", moment: {\"months\" : ".$uca_months_events.", \"monthsShort\" : ".$uca_monshort_events.", \"weekdays\" : ".$uca_weekdays_events.", \"weekdaysShort\" : ".$uca_wdayshort_events.", \"weekdaysMin\" : ".$uca_wdaymin_events."}}});});";
@ -230,7 +230,7 @@ class Unicalendar
//получаем данные выбранных документов из заданной рубрики циклом, формируем строку JSON
foreach ( $results as $k=>$v )
{
$uni_data .= "{ \"date\": \"".pretty_date(strftime('%Y-%m-%d %H:%M:%S', $v['document_published']))."\", \"expire_date\": \"".pretty_date(strftime('%Y-%m-%d %H:%M:%S', $v['document_expire']))."\", \"title\": \"".$v['document_title']."\", \"image\": \"".strstr(get_document_field($v['Id'], $uca_img_field), '|', true)."\", \"description\": \"".rtrim(mb_substr(preg_replace('|[\s]+|s', ' ', strip_tags(get_document_field($v['Id'], $uca_dsc_field))), 0, 255, 'UTF-8'), "!,.-").$ellipsis."\", \"location\": \"".mb_substr(preg_replace('|[\s]+|s', ' ', strip_tags(get_document_field($v['Id'], $uca_place_field))), 0, 300, 'UTF-8')."\", \"url\": \"".$v['document_alias']."\" },";
$uni_data .= "{ \"date\": \"".pretty_date(strftime('%Y-%m-%d %H:%M:%S', $v['document_published']))."\", \"expire_date\": \"".pretty_date(strftime('%Y-%m-%d %H:%M:%S', $v['document_expire']))."\", \"title\": \"".$v['document_title']."\", \"image\": \"".strstr(get_document_field($v['Id'], $uca_img_field), '|', true)."\", \"description\": \"".rtrim(mb_substr(preg_replace('|[\s]+|su ', ' ', strip_tags(get_document_field($v['Id'], $uca_dsc_field))), 0, 255, 'UTF-8'), "!,.-").$ellipsis."\", \"location\": \"".mb_substr(preg_replace('|[\s]+|su ', ' ', strip_tags(get_document_field($v['Id'], $uca_place_field))), 0, 300, 'UTF-8')."\", \"url\": \"".$v['document_alias']."\" },";
$rubric_count .= $v['Id'].",";
}
$js_data_files = "$(function(){"."var data".$uca_id." = [".$uni_data."]; $(\"#eventCalendar".$uca_id."\").eventCalendar({jsonData: data".$uca_id.", jsonDateFormat: \"human\", startWeekOnMonday: ".$uca_day.", eventsScrollable: ".$uca_scroll.", openEventInNewWindow: ".$uca_link.", dateFormat: \"".$uca_dfrm."\", showDescription: ".$uca_descript.", eventsLimit: ".$uca_events_limit.", locales: {locale: \"".$uca_locale."\", txt_noEvents: \"".$uca_no_events."\", txt_SpecificEvents_prev: \"\", txt_SpecificEvents_after: \"".$uca_real_events."\", txt_NextEvents: \"".$uca_next_events."\", txt_GoToEventUrl: \"".$uca_look_events."\", moment: {\"months\" : ".$uca_months_events.", \"monthsShort\" : ".$uca_monshort_events.", \"weekdays\" : ".$uca_weekdays_events.", \"weekdaysShort\" : ".$uca_wdayshort_events.", \"weekdaysMin\" : ".$uca_wdaymin_events."}}});});";
@ -383,7 +383,7 @@ class Unicalendar
//получаем данные всех документов из заданной рубрики циклом, формируем строку JSON
foreach ( $results as $k=>$v )
{
$uni_data .= "{ \"date\": \"".pretty_date(strftime('%Y-%m-%d %H:%M:%S', $v['document_published']))."\", \"expire_date\": \"".pretty_date(strftime('%Y-%m-%d %H:%M:%S', $v['document_expire']))."\", \"title\": \"".$v['document_title']."\", \"image\": \"".strstr(get_document_field($v['Id'], $uca_img_field), '|', true)."\", \"description\": \"".rtrim(mb_substr(preg_replace('|[\s]+|s', ' ', strip_tags(get_document_field($v['Id'], $uca_dsc_field))), 0, 255, 'UTF-8'), "!,.-").$ellipsis."\", \"location\": \"".mb_substr(preg_replace('|[\s]+|s', ' ', strip_tags(get_document_field($v['Id'], $uca_place_field))), 0, 300, 'UTF-8')."\", \"url\": \"".$v['document_alias']."\" },";
$uni_data .= "{ \"date\": \"".pretty_date(strftime('%Y-%m-%d %H:%M:%S', $v['document_published']))."\", \"expire_date\": \"".pretty_date(strftime('%Y-%m-%d %H:%M:%S', $v['document_expire']))."\", \"title\": \"".$v['document_title']."\", \"image\": \"".strstr(get_document_field($v['Id'], $uca_img_field), '|', true)."\", \"description\": \"".rtrim(mb_substr(preg_replace('|[\s]+|su ', ' ', strip_tags(get_document_field($v['Id'], $uca_dsc_field))), 0, 255, 'UTF-8'), "!,.-").$ellipsis."\", \"location\": \"".mb_substr(preg_replace('|[\s]+|su ', ' ', strip_tags(get_document_field($v['Id'], $uca_place_field))), 0, 300, 'UTF-8')."\", \"url\": \"".$v['document_alias']."\" },";
$rubric_count .= $v['Id']." OR Id=";
}
$js_data_files = "$(function(){"."var data".$unicalendar_id." = [".$uni_data."]; $(\"#eventCalendar".$unicalendar_id."\").eventCalendar({jsonData: data".$unicalendar_id.", jsonDateFormat: \"human\", startWeekOnMonday: ".$uca_day.", eventsScrollable: ".$uca_scroll.", openEventInNewWindow: ".$uca_link.", dateFormat: \"".$uca_dfrm."\", showDescription: ".$uca_descript.", eventsLimit: ".$uca_events_limit.", locales: {locale: \"".$uca_locale."\", txt_noEvents: \"".$uca_no_events."\", txt_SpecificEvents_prev: \"\", txt_SpecificEvents_after: \"".$uca_real_events."\", txt_NextEvents: \"".$uca_next_events."\", txt_GoToEventUrl: \"".$uca_look_events."\", moment: {\"months\" : ".$uca_months_events.", \"monthsShort\" : ".$uca_monshort_events.", \"weekdays\" : ".$uca_weekdays_events.", \"weekdaysShort\" : ".$uca_wdayshort_events.", \"weekdaysMin\" : ".$uca_wdaymin_events."}}});});";
@ -427,7 +427,7 @@ class Unicalendar
//получаем данные выбранных документов из заданной рубрики циклом, формируем строку JSON
foreach ( $results as $k=>$v )
{
$uni_data .= "{ \"date\": \"".pretty_date(strftime('%Y-%m-%d %H:%M:%S', $v['document_published']))."\", \"expire_date\": \"".pretty_date(strftime('%Y-%m-%d %H:%M:%S', $v['document_expire']))."\", \"title\": \"".$v['document_title']."\", \"image\": \"".strstr(get_document_field($v['Id'], $uca_img_field), '|', true)."\", \"description\": \"".rtrim(mb_substr(preg_replace('|[\s]+|s', ' ', strip_tags(get_document_field($v['Id'], $uca_dsc_field))), 0, 255, 'UTF-8'), "!,.-").$ellipsis."\", \"location\": \"".mb_substr(preg_replace('|[\s]+|s', ' ', strip_tags(get_document_field($v['Id'], $uca_place_field))), 0, 300, 'UTF-8')."\", \"url\": \"".$v['document_alias']."\" },";
$uni_data .= "{ \"date\": \"".pretty_date(strftime('%Y-%m-%d %H:%M:%S', $v['document_published']))."\", \"expire_date\": \"".pretty_date(strftime('%Y-%m-%d %H:%M:%S', $v['document_expire']))."\", \"title\": \"".$v['document_title']."\", \"image\": \"".strstr(get_document_field($v['Id'], $uca_img_field), '|', true)."\", \"description\": \"".rtrim(mb_substr(preg_replace('|[\s]+|su ', ' ', strip_tags(get_document_field($v['Id'], $uca_dsc_field))), 0, 255, 'UTF-8'), "!,.-").$ellipsis."\", \"location\": \"".mb_substr(preg_replace('|[\s]+|su ', ' ', strip_tags(get_document_field($v['Id'], $uca_place_field))), 0, 300, 'UTF-8')."\", \"url\": \"".$v['document_alias']."\" },";
$rubric_count .= $v['Id'].",";
}
$js_data_files = "$(function(){"."var data".$unicalendar_id." = [".$uni_data."]; $(\"#eventCalendar".$unicalendar_id."\").eventCalendar({jsonData: data".$unicalendar_id.", jsonDateFormat: \"human\", startWeekOnMonday: ".$uca_day.", eventsScrollable: ".$uca_scroll.", openEventInNewWindow: ".$uca_link.", dateFormat: \"".$uca_dfrm."\", showDescription: ".$uca_descript.", eventsLimit: ".$uca_events_limit.", locales: {locale: \"".$uca_locale."\", txt_noEvents: \"".$uca_no_events."\", txt_SpecificEvents_prev: \"\", txt_SpecificEvents_after: \"".$uca_real_events."\", txt_NextEvents: \"".$uca_next_events."\", txt_GoToEventUrl: \"".$uca_look_events."\", moment: {\"months\" : ".$uca_months_events.", \"monthsShort\" : ".$uca_monshort_events.", \"weekdays\" : ".$uca_weekdays_events.", \"weekdaysShort\" : ".$uca_wdayshort_events.", \"weekdaysMin\" : ".$uca_wdaymin_events."}}});});";