Новости Joomla

0 Пользователей и 1 Гость просматривают эту тему.
  • 3 Ответов
  • 1928 Просмотров
*

sega

  • Захожу иногда
  • 272
  • 5 / 0
Была jooma 3.2.0, обновил до 3.2.3, в итоге при создании материала в поле дата создания и дата публикации стоит только 2014-03-10 хотя раньше было и время тоже. Куда оно подевалось?)))
и соответственно в базу записывается 10/03/2014 - 00:00
k2 2.6.7
обновление до k2 2.6.8 не помогает(
« Последнее редактирование: 10.03.2014, 22:53:09 от sega »
*

sega

  • Захожу иногда
  • 272
  • 5 / 0
Короче после долгих исканий методом научного тыка нашел причину:
libraries/cms/html/html.php
там функция calendar
ту функцию удалил, а вставил эту из предыдущей версии и время появилось
Код
	public static function calendar($value, $name, $id, $format = '%Y-%m-%d', $attribs = null)
{
static $done;

if ($done === null)
{
$done = array();
}

$attribs['class'] = isset($attribs['class'])? $attribs['class'] : 'input-medium';
$attribs['class'] = trim($attribs['class'] . ' hasTooltip');

$readonly = isset($attribs['readonly']) && $attribs['readonly'] == 'readonly';
$disabled = isset($attribs['disabled']) && $attribs['disabled'] == 'disabled';

if (is_array($attribs))
{
$attribs = JArrayHelper::toString($attribs);
}

static::_('bootstrap.tooltip');

if (!$readonly && !$disabled)
{
// Load the calendar behavior
static::_('behavior.calendar');

// Only display the triggers once for each control.
if (!in_array($id, $done))
{
$document = JFactory::getDocument();
$document
->addScriptDeclaration(
'window.addEvent(\'domready\', function() {Calendar.setup({
// Id of the input field
inputField: "' . $id . '",
// Format of the input field
ifFormat: "' . $format . '",
// Trigger for the calendar (button ID)
button: "' . $id . '_img",
// Alignment (defaults to "Bl")
align: "Tl",
singleClick: true,
firstDay: ' . JFactory::getLanguage()->getFirstDay(). '
});});'
);
$done[] = $id;
}

return '<div class="input-append"><input type="text" title="' . (0 !== (int) $value ? static::_('date', $value, null, null) : '')
. '" name="' . $name . '" id="' . $id . '" value="' . htmlspecialchars($value, ENT_COMPAT, 'UTF-8'). '" ' . $attribs . ' />'
. '<button type="button" class="btn" id="' . $id . '_img"><i class="icon-calendar"></i></button></div>';
}
else
{
return '<input type="text" title="' . (0 !== (int) $value ? static::_('date', $value, null, null) : '')
. '" value="' . (0 !== (int) $value ? static::_('date', $value, 'Y-m-d H:i:s', null) : ''). '" ' . $attribs
. ' /><input type="hidden" name="' . $name . '" id="' . $id . '" value="' . htmlspecialchars($value, ENT_COMPAT, 'UTF-8'). '" />';
}
}
*

Serg_

  • Захожу иногда
  • 168
  • 24 / 1
  • Skype: smile_bot (Запорожье)
Спасибо за правильное название темы и решение.
*

webstrike

  • Осваиваюсь на форуме
  • 43
  • 0 / 0
  • Разработка мультиязычных сайтов
Короче после долгих исканий методом научного тыка нашел причину:
libraries/cms/html/html.php
там функция calendar
ту функцию удалил, а вставил эту из предыдущей версии и время появилось
Код
	public static function calendar($value, $name, $id, $format = '%Y-%m-%d', $attribs = null)
{
static $done;

if ($done === null)
{
$done = array();
}

$attribs['class'] = isset($attribs['class'])? $attribs['class'] : 'input-medium';
$attribs['class'] = trim($attribs['class'] . ' hasTooltip');

$readonly = isset($attribs['readonly']) && $attribs['readonly'] == 'readonly';
$disabled = isset($attribs['disabled']) && $attribs['disabled'] == 'disabled';

if (is_array($attribs))
{
$attribs = JArrayHelper::toString($attribs);
}

static::_('bootstrap.tooltip');

if (!$readonly && !$disabled)
{
// Load the calendar behavior
static::_('behavior.calendar');

// Only display the triggers once for each control.
if (!in_array($id, $done))
{
$document = JFactory::getDocument();
$document
->addScriptDeclaration(
'window.addEvent(\'domready\', function() {Calendar.setup({
// Id of the input field
inputField: "' . $id . '",
// Format of the input field
ifFormat: "' . $format . '",
// Trigger for the calendar (button ID)
button: "' . $id . '_img",
// Alignment (defaults to "Bl")
align: "Tl",
singleClick: true,
firstDay: ' . JFactory::getLanguage()->getFirstDay(). '
});});'
);
$done[] = $id;
}

return '<div class="input-append"><input type="text" title="' . (0 !== (int) $value ? static::_('date', $value, null, null) : '')
. '" name="' . $name . '" id="' . $id . '" value="' . htmlspecialchars($value, ENT_COMPAT, 'UTF-8'). '" ' . $attribs . ' />'
. '<button type="button" class="btn" id="' . $id . '_img"><i class="icon-calendar"></i></button></div>';
}
else
{
return '<input type="text" title="' . (0 !== (int) $value ? static::_('date', $value, null, null) : '')
. '" value="' . (0 !== (int) $value ? static::_('date', $value, 'Y-m-d H:i:s', null) : ''). '" ' . $attribs
. ' /><input type="hidden" name="' . $name . '" id="' . $id . '" value="' . htmlspecialchars($value, ENT_COMPAT, 'UTF-8'). '" />';
}
}


Спасибо за направление. Я заменил файл HTML.php из архива и все заработало
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться
 

Автоматическая дата снятия с публикации материала

Автор kozhenevsky

Ответов: 10
Просмотров: 2906
Последний ответ 17.11.2023, 08:08:49
от Vastriet
Убрать ограничение в коротком описании при создании категории в k2

Автор p.g.

Ответов: 0
Просмотров: 1192
Последний ответ 13.10.2022, 09:51:35
от p.g.
Миграция Joomla k2 на вордпресс

Автор wishlight

Ответов: 9
Просмотров: 2303
Последний ответ 17.12.2021, 09:25:43
от stellagreen
Компонент Яндекс Карты для Joomla 3.x и 2.5.x с интеграцией с K2 и Zoo

Автор xdanru

Ответов: 8
Просмотров: 3125
Последний ответ 22.10.2021, 18:16:53
от yandex_hb
В Joomla! 3.9.1 в к2 не меняется порядок расположения материала

Автор sergspb

Ответов: 0
Просмотров: 517
Последний ответ 12.06.2021, 15:20:52
от sergspb