fix for fields functions names and temp-fix for groups-fields CKEditor
This commit is contained in:
@@ -466,6 +466,13 @@ $(document).ready(function(){ldelim}
|
||||
<col width="250">
|
||||
<col>
|
||||
<tbody>
|
||||
{if $document->count_groups > 1}
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
window.CKEDITOR_BASEPATH='/lib/redactor/ckeditor/';
|
||||
//]]></script>
|
||||
<script type="text/javascript" src="/lib/redactor/ckeditor/ckeditor.js?t={$CKEDITOR_TIMESTAMP}"></script>
|
||||
{/if}
|
||||
{if $document->fields}
|
||||
{foreach from=$document->fields item=document_field_group}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
// Код (Codemirror)
|
||||
function get_field_code ($field_value, $action, $field_id=0, $tpl='', $tpl_empty=0, &$maxlength='', $document_fields=array(), $rubric_id=0, $default='', $_tpl=null)
|
||||
function get_field_code_large ($field_value, $action, $field_id=0, $tpl='', $tpl_empty=0, &$maxlength='', $document_fields=array(), $rubric_id=0, $default='', $_tpl=null)
|
||||
{
|
||||
global $AVE_Template;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
// Код (Codemirror)
|
||||
function get_field_code_small ($field_value, $action, $field_id=0, $tpl='', $tpl_empty=0, &$maxlength='', $document_fields=array(), $rubric_id=0, $default='', $_tpl=null)
|
||||
function get_field_code_small($field_value, $action, $field_id=0, $tpl='', $tpl_empty=0, &$maxlength='', $document_fields=array(), $rubric_id=0, $default='', $_tpl=null)
|
||||
{
|
||||
global $AVE_Template;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
// Дата (TimeStamp)
|
||||
function get_field_date($field_value, $action, $field_id=0, $tpl='', $tpl_empty=0, &$maxlength=null, $document_fields=array(), $rubric_id=0, $default=null, $_tpl=null)
|
||||
function get_field_date_unix_time($field_value, $action, $field_id=0, $tpl='', $tpl_empty=0, &$maxlength=null, $document_fields=array(), $rubric_id=0, $default=null, $_tpl=null)
|
||||
{
|
||||
global $AVE_Template;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
// Документ из рубрики
|
||||
function get_field_doc_from_rub_all($field_value, $action, $field_id=0, $tpl='', $tpl_empty=0, &$maxlength=null, $document_fields=array(), $rubric_id=0, $default=null, $_tpl=null)
|
||||
function get_field_doc_from_rub_list($field_value, $action, $field_id=0, $tpl='', $tpl_empty=0, &$maxlength=null, $document_fields=array(), $rubric_id=0, $default=null, $_tpl=null)
|
||||
{
|
||||
global $AVE_DB, $AVE_Template;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
// Документ из рубрики
|
||||
function get_field_doc_from_rub($field_value, $action, $field_id=0, $tpl='', $tpl_empty=0, &$maxlength=null, $document_fields=array(), $rubric_id=0, $default=null, $_tpl=null)
|
||||
function get_field_doc_from_rub_tree($field_value, $action, $field_id=0, $tpl='', $tpl_empty=0, &$maxlength=null, $document_fields=array(), $rubric_id=0, $default=null, $_tpl=null)
|
||||
{
|
||||
global $AVE_DB, $AVE_Template;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
// Ссылка
|
||||
function get_field_link($field_value, $action, $field_id=0, $tpl='', $tpl_empty=0, &$maxlength=null, $document_fields=array(), $rubric_id=0, $default=null, $_tpl=null)
|
||||
function get_field_doc_link($field_value, $action, $field_id=0, $tpl='', $tpl_empty=0, &$maxlength=null, $document_fields=array(), $rubric_id=0, $default=null, $_tpl=null)
|
||||
{
|
||||
global $AVE_Template;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* Teasers
|
||||
*/
|
||||
function get_field_teasers($field_value, $action, $field_id=0, $tpl='', $tpl_empty=0, &$maxlength = '', $doc_fields=array(), $rubric_id=0, $default='', $_tpl=null)
|
||||
function get_field_docrubtizer($field_value, $action, $field_id=0, $tpl='', $tpl_empty=0, &$maxlength = '', $doc_fields=array(), $rubric_id=0, $default='', $_tpl=null)
|
||||
{
|
||||
global $AVE_DB, $AVE_Template;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
// Загрузить файл
|
||||
function get_field_download($field_value, $action, $field_id=0, $tpl='', $tpl_empty=0, &$maxlength=null, $document_fields=array(), $rubric_id=0, $default=null){
|
||||
function get_field_download_file_button($field_value, $action, $field_id=0, $tpl='', $tpl_empty=0, &$maxlength=null, $document_fields=array(), $rubric_id=0, $default=null){
|
||||
|
||||
global $AVE_Template;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
// Изображение (Каскад)
|
||||
function get_field_image_multi($field_value, $action, $field_id=0, $tpl='', $tpl_empty=0, &$maxlength=null, $document_fields=array(), $rubric_id=0, $default=null, $_tpl=null)
|
||||
function get_field_image_cascade($field_value, $action, $field_id=0, $tpl='', $tpl_empty=0, &$maxlength=null, $document_fields=array(), $rubric_id=0, $default=null, $_tpl=null)
|
||||
{
|
||||
|
||||
global $AVE_Template, $img_pixel;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
// Многострочное
|
||||
function get_field_multi_line($field_value, $action, $field_id=0, $tpl='', $tpl_empty=0, &$maxlength=null, $document_fields=array(), $rubric_id=0, $default=null, $_tpl = null)
|
||||
function get_field_multi_line_large($field_value, $action, $field_id=0, $tpl='', $tpl_empty=0, &$maxlength=null, $document_fields=array(), $rubric_id=0, $default=null, $_tpl = null)
|
||||
{
|
||||
global $AVE_Template;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
// Многострочное (Упрощенное)
|
||||
function get_field_multi_line_simple($field_value, $action, $field_id=0, $tpl='', $tpl_empty=0, &$maxlength=null, $document_fields=array(), $rubric_id=0, $default=null, $_tpl=null)
|
||||
function get_field_multi_line_medium($field_value, $action, $field_id=0, $tpl='', $tpl_empty=0, &$maxlength=null, $document_fields=array(), $rubric_id=0, $default=null, $_tpl=null)
|
||||
{
|
||||
global $AVE_Template;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
// Многострочное (Слим)
|
||||
function get_field_multi_line_slim($field_value, $action, $field_id=0, $tpl='', $tpl_empty=0, &$maxlength=null, $document_fields=array(), $rubric_id=0, $default=null, $_tpl=null)
|
||||
function get_field_multi_line_small($field_value, $action, $field_id=0, $tpl='', $tpl_empty=0, &$maxlength=null, $document_fields=array(), $rubric_id=0, $default=null, $_tpl=null)
|
||||
{
|
||||
global $AVE_Template;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
|
||||
function get_field_doc_files($field_value, $action, $field_id=0, $tpl='', $tpl_empty=0, &$maxlength=null, $document_fields=array(), $rubric_id=0, $default=null){
|
||||
function get_field_multi_links_three_parameter($field_value, $action, $field_id=0, $tpl='', $tpl_empty=0, &$maxlength=null, $document_fields=array(), $rubric_id=0, $default=null){
|
||||
|
||||
global $AVE_Template;
|
||||
|
||||
@@ -47,13 +47,13 @@
|
||||
if (is_string($v)) {
|
||||
$list_item = explode('|', $v);
|
||||
|
||||
// ✅ ИСПРАВЛЕНИЕ КАВЫЧЕК: Декодируем сущности из БД, затем экранируем для HTML (но без одинарных кавычек)
|
||||
// ИСПРАВЛЕНИЕ КАВЫЧЕК: Декодируем сущности из БД, затем экранируем для HTML (но без одинарных кавычек)
|
||||
$list[$k]['name'] = (isset($list_item[0])) ? htmlspecialchars(html_entity_decode($list_item[0], ENT_QUOTES), ENT_NOQUOTES) : '';
|
||||
$list[$k]['descr'] = (isset($list_item[1])) ? htmlspecialchars(html_entity_decode($list_item[1], ENT_QUOTES), ENT_NOQUOTES) : '';
|
||||
$list[$k]['url'] = (isset($list_item[2])) ? htmlspecialchars(html_entity_decode($list_item[2], ENT_QUOTES), ENT_NOQUOTES) : '';
|
||||
} else {
|
||||
// Если данные приходят в виде ассоциативного массива (новый формат)
|
||||
// ✅ ИСПРАВЛЕНИЕ КАВЫЧЕК
|
||||
// ИСПРАВЛЕНИЕ КАВЫЧЕК
|
||||
$list[$k]['name'] = (isset($v['name'])) ? htmlspecialchars(html_entity_decode($v['name'], ENT_QUOTES), ENT_NOQUOTES) : '';
|
||||
$list[$k]['descr'] = (isset($v['descr'])) ? htmlspecialchars(html_entity_decode($v['descr'], ENT_QUOTES), ENT_NOQUOTES) : '';
|
||||
$list[$k]['url'] = (isset($v['url'])) ? htmlspecialchars(html_entity_decode($v['url'], ENT_QUOTES), ENT_NOQUOTES) : '';
|
||||
@@ -70,7 +70,7 @@
|
||||
{
|
||||
$list_item = explode('|', $v);
|
||||
|
||||
// ✅ ИСПРАВЛЕНИЕ КАВЫЧЕК
|
||||
// ИСПРАВЛЕНИЕ КАВЫЧЕК
|
||||
$list[$k]['name'] = (isset($list_item[0])) ? htmlspecialchars(html_entity_decode($list_item[0], ENT_QUOTES), ENT_NOQUOTES) : '';
|
||||
$list[$k]['descr'] = (isset($list_item[1])) ? htmlspecialchars(html_entity_decode($list_item[1], ENT_QUOTES), ENT_NOQUOTES) : '';
|
||||
$list[$k]['url'] = (isset($list_item[2])) ? htmlspecialchars(html_entity_decode($list_item[2], ENT_QUOTES), ENT_NOQUOTES) : '';
|
||||
@@ -235,7 +235,7 @@
|
||||
if (!empty($field_value_new))
|
||||
{
|
||||
$serialized_value = @serialize($field_value_new);
|
||||
// ✅ ИСПРАВЛЕНИЕ SQL-ОШИБКИ: Экранируем сериализованные данные для корректной вставки в базу данных
|
||||
// Экранируем сериализованные данные для корректной вставки в базу данных
|
||||
return addslashes($serialized_value);
|
||||
}
|
||||
else
|
||||
@@ -259,13 +259,13 @@
|
||||
if (is_string($v)) {
|
||||
$list_item = explode('|', $v);
|
||||
|
||||
// ✅ ИСПРАВЛЕНИЕ КАВЫЧЕК
|
||||
// ИСПРАВЛЕНИЕ КАВЫЧЕК
|
||||
$list[$k]['name'] = (isset($list_item[0])) ? htmlspecialchars(html_entity_decode($list_item[0], ENT_QUOTES), ENT_NOQUOTES) : '';
|
||||
$list[$k]['descr'] = (isset($list_item[1])) ? htmlspecialchars(html_entity_decode($list_item[1], ENT_QUOTES), ENT_NOQUOTES) : '';
|
||||
$list[$k]['url'] = (isset($list_item[2])) ? htmlspecialchars(html_entity_decode($list_item[2], ENT_QUOTES), ENT_NOQUOTES) : '';
|
||||
} else {
|
||||
// Если данные приходят в виде ассоциативного массива (новый формат)
|
||||
// ✅ ИСПРАВЛЕНИЕ КАВЫЧЕК
|
||||
// ИСПРАВЛЕНИЕ КАВЫЧЕК
|
||||
$list[$k]['name'] = (isset($v['name'])) ? htmlspecialchars(html_entity_decode($v['name'], ENT_QUOTES), ENT_NOQUOTES) : '';
|
||||
$list[$k]['descr'] = (isset($v['descr'])) ? htmlspecialchars(html_entity_decode($v['descr'], ENT_QUOTES), ENT_NOQUOTES) : '';
|
||||
$list[$k]['url'] = (isset($v['url'])) ? htmlspecialchars(html_entity_decode($v['url'], ENT_QUOTES), ENT_NOQUOTES) : '';
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
// Мульти лист
|
||||
|
||||
function get_field_multi_links($field_value, $action, $field_id=0, $tpl='', $tpl_empty=0, &$maxlength=null, $document_fields=array(), $rubric_id=0, $default=null, $_tpl=null){
|
||||
function get_field_multi_links_two_parameter($field_value, $action, $field_id=0, $tpl='', $tpl_empty=0, &$maxlength=null, $document_fields=array(), $rubric_id=0, $default=null, $_tpl=null){
|
||||
|
||||
global $AVE_Template;
|
||||
global $AVE_DB;
|
||||
|
||||
@@ -11,10 +11,10 @@
|
||||
*/
|
||||
|
||||
// Мульти лист
|
||||
function get_field_multi_list_single($field_value, $action, $field_id=0, $tpl='', $tpl_empty=0, &$maxlength=null, $document_fields=array(), $rubric_id=0, $default=null, $_tpl=null)
|
||||
function get_field_multi_list_one_parameter($field_value, $action, $field_id=0, $tpl='', $tpl_empty=0, &$maxlength=null, $document_fields=array(), $rubric_id=0, $default=null, $_tpl=null)
|
||||
{
|
||||
global $AVE_Template;
|
||||
global $AVE_DB; // Объявляем глобальный объект базы данных, если он нужен для других полей
|
||||
global $AVE_DB;
|
||||
|
||||
$fld_dir = dirname(__FILE__) . '/';
|
||||
$tpl_dir = $fld_dir . 'tpl/';
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*/
|
||||
|
||||
// Мульти лист
|
||||
function get_field_multi_list_triple($field_value, $action, $field_id=0, $tpl='', $tpl_empty=0, &$maxlength=null, $document_fields=array(), $rubric_id=0, $default=null, $_tpl=null)
|
||||
function get_field_multi_list_three_parameter($field_value, $action, $field_id=0, $tpl='', $tpl_empty=0, &$maxlength=null, $document_fields=array(), $rubric_id=0, $default=null, $_tpl=null)
|
||||
{
|
||||
global $AVE_Template;
|
||||
global $AVE_DB;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
// Мульти лист
|
||||
function get_field_multi_list($field_value, $action, $field_id=0, $tpl='', $tpl_empty=0, &$maxlength=null, $document_fields=array(), $rubric_id=0, $default=null, $_tpl=null)
|
||||
function get_field_multi_list_two_parameter($field_value, $action, $field_id=0, $tpl='', $tpl_empty=0, &$maxlength=null, $document_fields=array(), $rubric_id=0, $default=null, $_tpl=null)
|
||||
{
|
||||
global $AVE_Template;
|
||||
global $AVE_DB;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
// Шаблоны рубрик
|
||||
function get_field_rubrics($field_value, $action, $field_id = 0, $tpl = '', $tpl_empty = 0, &$maxlength = null, $document_fields = array(), $rubric_id = 0, $default = null)
|
||||
function get_field_rubrics_templates_id($field_value, $action, $field_id = 0, $tpl = '', $tpl_empty = 0, &$maxlength = null, $document_fields = array(), $rubric_id = 0, $default = null)
|
||||
{
|
||||
global $AVE_DB, $AVE_Template;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
// Однострочное числовое
|
||||
function get_field_single_line_numeric ($field_value, $action, $field_id = 0, $tpl = '', $tpl_empty = 0, &$maxlength = null, $document_fields = array(), $rubric_id = 0, $default = null, $_tpl = null)
|
||||
function get_field_single_line_numeric_one($field_value, $action, $field_id = 0, $tpl = '', $tpl_empty = 0, &$maxlength = null, $document_fields = array(), $rubric_id = 0, $default = null, $_tpl = null)
|
||||
{
|
||||
global $AVE_Template;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
// Однострочное числовое (Три значения)
|
||||
function get_field_single_line_numeric_three ($field_value, $action, $field_id = 0, $tpl = '', $tpl_empty = 0, &$maxlength = null, $document_fields = array(), $rubric_id = 0, $default = null, $_tpl=null)
|
||||
function get_field_single_line_numeric_three($field_value, $action, $field_id = 0, $tpl = '', $tpl_empty = 0, &$maxlength = null, $document_fields = array(), $rubric_id = 0, $default = null, $_tpl=null)
|
||||
{
|
||||
global $AVE_Template;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
// Однострочное
|
||||
function get_field_single_line ($field_value, $action, $field_id = 0, $tpl = '', $tpl_empty = 0, &$maxlength = null, $document_fields = array(), $rubric_id = 0, $default = null, $_tpl = null)
|
||||
function get_field_single_line_string($field_value, $action, $field_id = 0, $tpl = '', $tpl_empty = 0, &$maxlength = null, $document_fields = array(), $rubric_id = 0, $default = null, $_tpl = null)
|
||||
{
|
||||
global $AVE_Template;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
// Tags
|
||||
function get_field_tags ($field_value, $action, $field_id = 0, $tpl = '', $tpl_empty = 0, &$maxlength = null, $document_fields = array(), $rubric_id = 0, $default = null, $_tpl = null)
|
||||
function get_field_tags($field_value, $action, $field_id = 0, $tpl = '', $tpl_empty = 0, &$maxlength = null, $document_fields = array(), $rubric_id = 0, $default = null, $_tpl = null)
|
||||
{
|
||||
global $AVE_DB, $AVE_Template;
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
*/
|
||||
|
||||
// YouTube
|
||||
function get_field_youtube($field_value, $action, $field_id = 0, $tpl = '', $tpl_empty = 0, &$maxlength = null, $document_fields = array(), $rubric_id = 0, $default = null, $_tpl=null)
|
||||
function get_field_youtube_video($field_value, $action, $field_id = 0, $tpl = '', $tpl_empty = 0, &$maxlength = null, $document_fields = array(), $rubric_id = 0, $default = null, $_tpl=null)
|
||||
{
|
||||
global $AVE_Template;
|
||||
|
||||
|
||||
@@ -254,8 +254,8 @@ INSERT INTO `%%PRFX%%_navigation_items` VALUES
|
||||
(1,1,1,'/','Главная','','_self','','','','','0','1','0','1');#inst#
|
||||
|
||||
INSERT INTO `%%PRFX%%_rubric_fields` VALUES
|
||||
(1, 1, 0, 'header', 'Заголовок', 'single_line', '0', '1', '', '0', '', '', ''),
|
||||
(2, 1, 0, 'text', 'Текст', 'multi_line', '0', '2', '', '0', '', '', '');#inst#
|
||||
(1, 1, 0, 'header', 'Заголовок', 'single_line_string', '0', '1', '', '0', '', '', ''),
|
||||
(2, 1, 0, 'text', 'Текст', 'multi_line_large', '0', '2', '', '0', '', '', '');#inst#
|
||||
|
||||
INSERT INTO `%%PRFX%%_rubric_permissions` VALUES
|
||||
(1, 1, 1, 'alles'),
|
||||
|
||||
Reference in New Issue
Block a user