$tt->assign('standard_date_control', $r_date); $tt->parse('NEWDATE'); $new_ui_date = $tt->text('NEWDATE'); $tt->assign('standard_time_control', $r_time); $tt->parse('NEWTIME'); $new_ui_time = $tt->text('NEWTIME'); //new template for date $tt->assign('input_resource', $new_ui_date); $tt->assign('mode', 'date'); $tt->parse('NEWRESOURCE'); $R['input_date_short'] = $tt->text('NEWRESOURCE'); // new template for datetime $tt->assign('input_resource', $new_ui_date . $new_ui_time); $defmode = $uidt_cfg['combined'] && !$admintools ? 'datetime-combined' : 'datetime'; $tt->assign('mode', $defmode); $tt->parse('NEWRESOURCE'); $R['input_date'] = $tt->text('NEWRESOURCE'); // new template for combined datetime element (used for demopage in admin tools) $tt->assign('mode', 'datetime-combined'); $tt->parse('NEWRESOURCE'); if ($ui_date && $ui_time) { $R['input_date_combined'] = $tt->text('NEWRESOURCE'); } // template for new input field $tt->parse('NEWINPUT'); $ui_input_tpl = 'var ui_input = \'' . str_replace(array("'", "\n", "\r"), array("\\'", '', ''), $tt->text('NEWINPUT')) . '\';'; if ($ui_input_tpl) { cot_rc_embed($ui_input_tpl); } } }
<?php /* ==================== [BEGIN_COT_EXT] Hooks=header.main Tags=header.tpl:{HEADER_HEAD} [END_COT_EXT] ==================== */ /** * Dynamic head resources for search * * @package Search * @copyright (c) Cotonti Team * @license https://github.com/Cotonti/Cotonti/blob/master/License.txt */ defined('COT_CODE') or die('Wrong URL'); if (!empty($highlight) && $cfg['jquery']) { $search_embed = '$(document).ready(function() {$("body").each(function() {'; $highlight = explode(' ', $highlight); foreach ($highlight as $key => $value) { $search_embed .= '$.highlight(this, "' . mb_strtoupper($value) . '");'; } $search_embed .= '});});'; cot_rc_embed($search_embed); }