Вячеслав Варов

Вячеслав Варов

С нами с 06 сентября 2016; Место в рейтинге пользователей: #231
Вячеслав Варов
11 января 2017, 23:16
0
Сделал так:
{set $rows = json_decode($_modx->resource.proServices, true)}
{foreach $rows as $row}
{if $row.srvLink != ''}
<a class="div-usl w-inline-block" href="{$row.srvLink}">
{else}
<a class="div-usl w-inline-block" data-ix="open-lb-zvonok">
{/if}
        <div class="div-usl-block">
          <div class="div-usl2">
            <div class="name-usl">{$row.srvName}</div>
            <div class="cena-usl">— от {$row.Price} руб./час</div>
            <div class="tb-link-usl">Посмотреть →</div>
          </div>
        </div>
        <img class="img-usl" src="{$row.srvImage:phpthumbof=`w=400&h=400&zc=1`}">
      </a>
{/foreach}
но не работает phpthumbof, вижу что сделал не правильно, а как правильно?
Вячеслав Варов
05 января 2017, 00:03
0
Да не это вот с вчерашнеготдня все началось, пришлось восстановить все файлы за одров ремня а дамп базы данных был новее и вот началась котовасия
Вячеслав Варов
05 января 2017, 00:02
0
При этом файл ошибок на 1,5мб за одни сутки…
Вячеслав Варов
04 января 2017, 23:54
0
При этом если кэш почистить ошибка на время пропадает
Вячеслав Варов
04 января 2017, 23:49
0
А эти самые пути может как-то можно изменить не изменяя системные файлы таким образом? Просто если оно сломалось тотнаверняка должен быть и обратный путь
Вячеслав Варов
16 декабря 2016, 14:57
0
Разобрался, нужно выводить так:
{if $_modx->resource.boleznID != ''}
	<h3 class="priem-list-title">Лечение заболеваний:</h3>
	<ul class="priem-list-block w-list-unstyled">
	  [[pdoResources?
	  &parents=`17`
	  &resources=`[[*boleznID]]`
	  &tpl=`@INLINE <li class="priem-list-item"><a href="[[~[[+id]]]]">[[+pagetitle]]</a></li>``
	  ]]
	</ul>
	{/if}
Вячеслав Варов
16 декабря 2016, 14:46
0
Если добавлять вызов pdoResources так:
[[*boleznID:!empty=`[[!pdoResources?
	  &parents=`17`
	  &resources=`[[*boleznID]]`
	  &tpl=`@INLINE <li class="priem-list-item"><a href="[[~[[+id]]]]">[[+pagetitle]]</a>
	  </li>`
	  ]]`]]
то появляется запись вида: Array
(
    [id] => 64
    [type] => document
    [contentType] => text/html
    [pagetitle] => Остеохондроз
    [longtitle] => 
    [description] => 
    [alias] => osteoxondroz
    [link_attributes] => 
    [published] => 1
    [pub_date] => 0
    [unpub_date] => 0
    [parent] => 17
    [isfolder] => 0
    [introtext] => 
    [richtext] => 1
    [template] => 17
    [menuindex] => 0
    [searchable] => 1
    [cacheable] => 1
    [createdby] => 1
    [createdon] => 1481883855
    [editedby] => 1
    [editedon] => 1481883875
    [deleted] => 0
    [deletedon] => 0
    [deletedby] => 0
    [publishedon] => 1481205180
    [publishedby] => 1
    [menutitle] => 
    [donthit] => 0
    [privateweb] => 0
    [privatemgr] => 0
    [content_dispo] => 0
    [hidemenu] => 1
    [class_key] => modDocument
    [context_key] => web
    [content_type] => 1
    [uri] => base-knowlige/osteoxondroz.html
    [uri_override] => 0
    [hide_children_in_tree] => 0
    [show_in_tree] => 1
    [properties] => 
    [idx] => 1
    [link] => 
)
Как я понял он не видит шаблон вывода
Вячеслав Варов
13 декабря 2016, 17:28
0
Все выводится, прошу прощения, в css шрифт был белый :/
Вячеслав Варов
13 декабря 2016, 16:21
0
посмотрите внимательнее, я вызываю с &includeContent=`1`
Вячеслав Варов
12 декабря 2016, 11:25
0
Спасибо. С самого начала на группы разбить при помощи modx.ru/vopros-otvet/info/2916/ и уже эти результаты отбирать по where, это возможно?
Вячеслав Варов
12 декабря 2016, 08:43
0
А как сделать, чтобы сперва выводились все ресурсы? А потом по клику на букву фильтровались? Можно ли отключить фильтр по клику на кнопку «ВСЕ»?
Не совсем понятно как еще можно вывести букву по которой фильтруется… Тут modx.ru/vopros-otvet/info/2916/ за вывод букв отвечает переменная $char, но я не понимаю откуда эта переменная взялась.
Вячеслав Варов
28 ноября 2016, 06:39
0
В вызове снипета pdoRecources добавьте &hideContainers=`1`
при этом родителя нужно ставить, «бабушку или дедушку:))»
Вячеслав Варов
31 октября 2016, 22:34
0
вывел с помощью getImageList
Вячеслав Варов
02 октября 2016, 18:09
0
Спасибо! Работает! Прошу прощения, промахнулся мимо стрелки, это можно как-то изменить?
Вячеслав Варов
07 сентября 2016, 14:58
0
&where=`[«EventDate >= NOW()»]` работает! Спасибо!
Вячеслав Варов
07 сентября 2016, 08:34
0
0.0002420: pdoTools loaded
0.0002859: xPDO query object created
0.0012629: Included list of tvs: EventDate, EventImage
0.0004771: leftJoined modTemplateVarResource as TVeventdate
0.0004280: leftJoined modTemplateVarResource as TVeventimage
0.0006812: Added selection of modResource: SQL_CALC_FOUND_ROWS `id`, `type`, `contentType`, `pagetitle`, `longtitle`, `description`, `alias`, `link_attributes`, `published`, `pub_date`, `unpub_date`, `parent`, `isfolder`, `introtext`, `content`, `richtext`, `template`, `menuindex`, `searchable`, `cacheable`, `createdby`, `createdon`, `editedby`, `editedon`, `deleted`, `deletedon`, `deletedby`, `publishedon`, `publishedby`, `menutitle`, `donthit`, `privateweb`, `privatemgr`, `content_dispo`, `hidemenu`, `class_key`, `context_key`, `content_type`, `uri`, `uri_override`, `hide_children_in_tree`, `show_in_tree`, `properties`
0.0000188: Added selection of modTemplateVarResource: IFNULL(`value`, '') AS `tv.EventDate`
0.0000150: Added selection of modTemplateVarResource: IFNULL(`value`, '') AS `tv.EventImage`
0.0000629: Replaced TV conditions
0.0007839: Processed additional conditions
0.0015960: Added where condition: 0=TVEventDate.value >= NOW(), modResource.parent:IN(8,9,17,18,19), modResource.published=1, modResource.deleted=0
0.0000360: Replaced TV conditions
0.0002081: Sorted by modResource.publishedon, DESC
0.0000081: Limited to 4444, offset 0
0.0010068: SQL prepared "SELECT SQL_CALC_FOUND_ROWS `modResource`.`id`, `modResource`.`type`, `modResource`.`contentType`, `modResource`.`pagetitle`, `modResource`.`longtitle`, `modResource`.`description`, `modResource`.`alias`, `modResource`.`link_attributes`, `modResource`.`published`, `modResource`.`pub_date`, `modResource`.`unpub_date`, `modResource`.`parent`, `modResource`.`isfolder`, `modResource`.`introtext`, `modResource`.`content`, `modResource`.`richtext`, `modResource`.`template`, `modResource`.`menuindex`, `modResource`.`searchable`, `modResource`.`cacheable`, `modResource`.`createdby`, `modResource`.`createdon`, `modResource`.`editedby`, `modResource`.`editedon`, `modResource`.`deleted`, `modResource`.`deletedon`, `modResource`.`deletedby`, `modResource`.`publishedon`, `modResource`.`publishedby`, `modResource`.`menutitle`, `modResource`.`donthit`, `modResource`.`privateweb`, `modResource`.`privatemgr`, `modResource`.`content_dispo`, `modResource`.`hidemenu`, `modResource`.`class_key`, `modResource`.`context_key`, `modResource`.`content_type`, `modResource`.`uri`, `modResource`.`uri_override`, `modResource`.`hide_children_in_tree`, `modResource`.`show_in_tree`, `modResource`.`properties`, IFNULL(`TVeventdate`.`value`, '') AS `tv.EventDate`, IFNULL(`TVeventimage`.`value`, '') AS `tv.EventImage` FROM `modx_site_content` AS `modResource` LEFT JOIN `modx_site_tmplvar_contentvalues` `TVeventdate` ON `TVeventdate`.`contentid` = `modResource`.`id` AND `TVeventdate`.`tmplvarid` = 10 LEFT JOIN `modx_site_tmplvar_contentvalues` `TVeventimage` ON `TVeventimage`.`contentid` = `modResource`.`id` AND `TVeventimage`.`tmplvarid` = 8 WHERE  ( TVEventDate.value >= NOW() AND `modResource`.`parent` IN (8,9,17,18,19) AND `modResource`.`published` = 1 AND `modResource`.`deleted` = 0 )  ORDER BY modResource.publishedon DESC LIMIT 4444 "
0.0007062: Could not process query, error #1054: Unknown column 'TVEventDate.value' in 'where clause'
0.0071490: Total time
6 553 600: Memory usage
Вячеслав Варов
07 сентября 2016, 08:07
0
снипет now:
<?php
echo date("Y-m-j" ." ". "H:m:s");
это в шаблоне:
[[pdoResources?
		&parents=`8`
		&tpl=`ImmediateEvent`
		&includeTVs=`1`
		&includeContent=`1`
		&includeTVs=`EventImage, EventDate`
		&processTVs=`1`
		&tvFilters=`EventDate>>[[!now]]`
		&limit=`4444`
		]]
не выводится вообще ничего:(

Log:

0.0002301: pdoTools loaded
0.0000410: xPDO query object created
0.0000560: Added TVs filters
0.0004961: Included list of tvs: EventDate, EventImage
0.0004060: leftJoined modTemplateVarResource as TVeventdate
0.0003622: leftJoined modTemplateVarResource as TVeventimage
0.0007551: Added selection of modResource: SQL_CALC_FOUND_ROWS `id`, `type`, `contentType`, `pagetitle`, `longtitle`, `description`, `alias`, `link_attributes`, `published`, `pub_date`, `unpub_date`, `parent`, `isfolder`, `introtext`, `content`, `richtext`, `template`, `menuindex`, `searchable`, `cacheable`, `createdby`, `createdon`, `editedby`, `editedon`, `deleted`, `deletedon`, `deletedby`, `publishedon`, `publishedby`, `menutitle`, `donthit`, `privateweb`, `privatemgr`, `content_dispo`, `hidemenu`, `class_key`, `context_key`, `content_type`, `uri`, `uri_override`, `hide_children_in_tree`, `show_in_tree`, `properties`
0.0000181: Added selection of modTemplateVarResource: IFNULL(`value`, '') AS `tv.EventDate`
0.0000150: Added selection of modTemplateVarResource: IFNULL(`value`, '') AS `tv.EventImage`
0.0000730: Replaced TV conditions
0.0006220: Processed additional conditions
0.0011730: Added where condition: 0=`TVeventdate`.`value` > '2016-09-7 08:09:27', modResource.parent:IN(8,9,17,18,19), modResource.published=1, modResource.deleted=0
0.0000448: Replaced TV conditions
0.0001941: Sorted by modResource.publishedon, DESC
0.0000060: Limited to 4444, offset 0
0.0003991: SQL prepared "SELECT SQL_CALC_FOUND_ROWS `modResource`.`id`, `modResource`.`type`, `modResource`.`contentType`, `modResource`.`pagetitle`, `modResource`.`longtitle`, `modResource`.`description`, `modResource`.`alias`, `modResource`.`link_attributes`, `modResource`.`published`, `modResource`.`pub_date`, `modResource`.`unpub_date`, `modResource`.`parent`, `modResource`.`isfolder`, `modResource`.`introtext`, `modResource`.`content`, `modResource`.`richtext`, `modResource`.`template`, `modResource`.`menuindex`, `modResource`.`searchable`, `modResource`.`cacheable`, `modResource`.`createdby`, `modResource`.`createdon`, `modResource`.`editedby`, `modResource`.`editedon`, `modResource`.`deleted`, `modResource`.`deletedon`, `modResource`.`deletedby`, `modResource`.`publishedon`, `modResource`.`publishedby`, `modResource`.`menutitle`, `modResource`.`donthit`, `modResource`.`privateweb`, `modResource`.`privatemgr`, `modResource`.`content_dispo`, `modResource`.`hidemenu`, `modResource`.`class_key`, `modResource`.`context_key`, `modResource`.`content_type`, `modResource`.`uri`, `modResource`.`uri_override`, `modResource`.`hide_children_in_tree`, `modResource`.`show_in_tree`, `modResource`.`properties`, IFNULL(`TVeventdate`.`value`, '') AS `tv.EventDate`, IFNULL(`TVeventimage`.`value`, '') AS `tv.EventImage` FROM `modx_site_content` AS `modResource` LEFT JOIN `modx_site_tmplvar_contentvalues` `TVeventdate` ON `TVeventdate`.`contentid` = `modResource`.`id` AND `TVeventdate`.`tmplvarid` = 10 LEFT JOIN `modx_site_tmplvar_contentvalues` `TVeventimage` ON `TVeventimage`.`contentid` = `modResource`.`id` AND `TVeventimage`.`tmplvarid` = 8 WHERE  ( `TVeventdate`.`value` > '2016-09-7 08:09:27' AND `modResource`.`parent` IN (8,9,17,18,19) AND `modResource`.`published` = 1 AND `modResource`.`deleted` = 0 )  ORDER BY modResource.publishedon DESC LIMIT 4444 "
0.0010450: SQL executed
0.0000930: Total rows: 0
0.0000150: Rows fetched
0.0000219: Prepared and processed TVs
0.0000010: Returning processed chunks
0.0055571: Total time
7 602 176: Memory usage