maxgmm

maxgmm

С нами с 24 февраля 2018; Место в рейтинге пользователей: #1706
maxgmm
29 мая 2023, 09:36
0
Да спасибо разобрался дополниьельное поле было написанно в феноме это не понравилось
maxgmm
18 апреля 2023, 00:18
0
it-stroyka.ru/

код PDO page выдает ошибку после пагинации Array что не так

[[!pdoPage?

&element=`getTickets`
&tpl=`tpl.tickets.post`
&includeTVs=`tel,gorod,cena,vadelit,map,phototik,photo1`
&limit=`10`
&ajaxMode=`scroll`
&includeContent=`1`

]] [[!+page.nav]]
maxgmm
21 декабря 2022, 06:09
0
нЕ РАБОТАЕТ в тикет коментариях РЕЙТИНГ И ИЗБРАНОЕ можете подсказать почему svoy.life/profile/
maxgmm
21 декабря 2022, 01:36
0
Все понял прав небыло!
maxgmm
21 декабря 2022, 01:18
0
Подскажите а как можно отсортировать по рейтингу SimpleRating
maxgmm
19 декабря 2022, 13:07
0
Подскажите картинке почему-то не загружаются svoy.life/profile
maxgmm
19 декабря 2022, 13:05
0
Подскажите плиз почему картинка не загружается?
maxgmm
06 декабря 2022, 13:16
0
Добрый а подскажите плиз как сделать, чтобы у easyComm публиковалось сообщение без перезагрузки страницы
maxgmm
25 ноября 2022, 05:10
0
Подскажите в каких таблицах какие значения создовать чтобы по ссылке все работало?
maxgmm
11 августа 2022, 21:56
0
Сделал такое решение

Вставил в шаблон
[[!ideas?
&tpl=`tpl.ideas.tpl`
&user_id=`[[!+modx.user.id]]`
 ]]
Изменил снипет
<?php
/** @var modX $modx */
/** @var array $scriptProperties */
/** @var ideas $ideas */
$ideas = $modx->getService('ideas', 'ideas', MODX_CORE_PATH . 'components/ideas/model/', $scriptProperties);
if (!$ideas) {
    $modx->log(modX::LOG_LEVEL_ERROR, '[ideas] Could not load ideas class!');
    return '';
}

$allow_jquery_modal = $modx->getOption('ideas_allow_jquery_modal', null, true);
if($allow_jquery_modal){
    $modx->regClientCSS(MODX_ASSETS_URL . 'components/ideas/css/jquery.modal.min.css');
    $modx->regClientScript(MODX_ASSETS_URL. 'components/ideas/js/jquery.modal.min.js');

    $modx->regClientCSS(MODX_ASSETS_URL . 'components/ideas/lib/iziToast.css');
    $modx->regClientScript(MODX_ASSETS_URL. 'components/ideas/lib/iziToast.min.js');

}

$js_frontend = $modx->getOption('ideas_frontend_js', null, MODX_ASSETS_URL.'components/ideas/js/default.js');
if(!empty($js_frontend)){
    $modx->regClientScript($js_frontend);
}


$css_frontend = $modx->getOption('ideas_frontend_css', null, MODX_ASSETS_URL.'components/ideas/css/default.css');
if(!empty($css_frontend)){
    $modx->regClientCSS($css_frontend);
}

$limit = $modx->getOption('limit', $scriptProperties, 20);
$sortby = $modx->getOption('sortby', $scriptProperties, 'createdon');
$sortdir = $modx->getOption('sortdir', $scriptProperties, 'asc');
$tpl = $modx->getOption('tpl', $scriptProperties, 'tpl.ideas.tpl');
$resource = $modx->getOption('resource_id', $scriptProperties, false);
$user = $modx->getOption('user_id', $scriptProperties, false);
 

$pdoFetch = $modx->getService('pdoFetch');
$pdo = $modx->getService('pdoTools');

$types = $pdoFetch->getCollection(
    'ideasType',
    array('active' => 1),
    array(
        'sortby' => 'rank',
        'sortdir' => 'asc',
    )
);



if(count($types) > 0){
    foreach($types as $key => $type){
        $postFilter = array();
        $postFilter['active'] = 1;
        $postFilter['type'] = $type['id'];
        if($resource){
            $postFilter['resource_id'] = $resource;
        }
       
         if($user){
            $postFilter['user_id'] = $user;
        }
        
       
        
        if($type['only_context'] == 1){
            $postFilter['context_key'] = $modx->resource->get('context_key');
        }
        

        $types[$key]['posts'] = $pdoFetch->getCollection(
            'ideasPost',
            $postFilter, //where array
            array(
                'sortby' => $sortby,
                'sortdir' => $sortdir,
                'leftJoin' => array(
                    'Status' => array(
                        'class' => 'ideasStatus',
                        'on' => 'ideasPost.status = Status.id'
                    ),
                    'Type' => array(
                        'class' => 'ideasType',
                        
                        'on' => 'ideasPost.type = Type.id'
                    ),
                ),
                'select' => array(
                    'ideasPost' => '*',
                    'Status' => 'Status.name as status_name',
                    'Type' => 'Type.name as type_name, Type.id as type_id'
                ),

                'limit' => $limit
            )
        );



    }


    return $pdo->getChunk($tpl, array('data' => $types));
}else{
    $modx->log(modX::LOG_LEVEL_ERROR, '[ideas] type not found');
}
maxgmm
11 августа 2022, 21:02
0
В операционке это круто, я имею введу на сайте типа как вконтакте
maxgmm
11 августа 2022, 19:33
0
Нужен фильтр с условием что будет показываться только автору и администраторам
maxgmm
11 августа 2022, 17:26
0
Подскажите как сделать чтобы идеи показывались только пользователю и админам?
maxgmm
11 августа 2022, 17:02
0
А есть возможность реализовать всплывающие уведомления о сообщениях?
maxgmm
09 августа 2022, 00:50
0
А как сделать ajax
maxgmm
08 августа 2022, 06:29
0
Подскажите как сделать чтобы сообщения сразу отправлялись администратору без выбора пользователя и был открыт чат с ним
maxgmm
19 июля 2022, 11:38
0
все разобрался msOptionsPrice2 был установлен