Вы не вошли.
Страницы 1
Хотел бы узнать как можно сделать превью фоток, как реализовано тут http://www.kibra.ru/post/bouncy_bill_mo … rettyPhoto
В новости к примеру у меня 10 фоток, при нажатии на одну из них, в сплывающем окне появиться фото и переходом в перед или назад..
Похожее что то есть вот тут ещё http://templates.ngcms.ru/kino/0035-sha … enist.html
Вне форума
http://sitesource.ru/stati/skript-galerei-prettyphoto/ вот твой вариант
жизнь бьёт ключом......,ну иногда и гайкой.....
Хаки и Скрипты| Бесплатные шаблоны NGCMS
На Районе - Шахтинск Украшение Windows
Вне форума
ООО... точно нужно, пойду подключать ))))
Вне форума
Также возник вопрос по превью. Строю такую конструкцию:
{% if (p.xfields.images.count > 0) %}
<a href="{{ p.xfields.images.entries[0].url }}" class="iLoad" title="{{ news.title }}" onmouseover="$(this).find('.fentry_bg_screen1').stop().fadeIn(); $(this).find('.fentry_plus_screen1').stop().fadeIn();" onmouseout="$(this).find('.fentry_bg_screen1').fadeOut();$(this).find('.fentry_plus_screen1').fadeOut();">
<img src="{{ p.xfields.images.entries[0].purl }}" border="0" alt="{{ news.title }}" /></a>
{% else %}
{% if (p.xfields.images.count < 1) %}
<a href="{{ p.xfields.storyimages.entries[0].url }}" class="iLoad" title="{{ news.title }}" onmouseover="$(this).find('.fentry_bg_screen1').stop().fadeIn(); $(this).find('.fentry_plus_screen1').stop().fadeIn();" onmouseout="$(this).find('.fentry_bg_screen1').fadeOut();$(this).find('.fentry_plus_screen1').fadeOut();">
<img src="{{ p.xfields.storyimages.entries[0].purl }}" border="0" alt="{{ news.title }}" /></a>
{% else %}
{% if (p.xfields.storyimages.count < 1) and (p.xfields.images.count < 1)%}
<img src="{{ tpl_url }}/img/img-none.jpg" border="0" alt="{{ news.title }}"> />
{% else %}
{% endif %}
{% endif %}
{% endif %}Все работает, только не выводит превью (img-none.jpg). Что я сделал не так?
Задумано так:
1. Если есть превью(xfields.images) - вывести его;
2. Если нет превью - вывести картинку новости (xfields.storyimages);
3. Если нет превью и картинки новости - вывести заглушку (img-none.jpg).
Последний пункт не работает.
Отредактировано phoboss (2015-04-09 20:45:27)
Вне форума
зачем так сложно?
{% if (p.xfields.images.count < 1) %}
<img src="{{ tpl_url }}/img/img-none.jpg" />
{% else %}
<a href="{{ p.xfields.images.entries[0].url }}" class="iLoad" title="{{ news.title }}" onmouseover="$(this).find('.fentry_bg_screen1').stop().fadeIn(); $(this).find('.fentry_plus_screen1').stop().fadeIn();" onmouseout="$(this).find('.fentry_bg_screen1').fadeOut();$(this).find('.fentry_plus_screen1').fadeOut();">
<img src="{{ p.xfields.images.entries[0].purl }}" /></a>
{% else %}
<a href="{{ p.xfields.images.entries[1].url }}" class="iLoad" title="{{ news.title }}" onmouseover="$(this).find('.fentry_bg_screen1').stop().fadeIn(); $(this).find('.fentry_plus_screen1').stop().fadeIn();" onmouseout="$(this).find('.fentry_bg_screen1').fadeOut();$(this).find('.fentry_plus_screen1').fadeOut();">
<img src="{{ p.xfields.images.entries[1].purl }}" /></a>
{% endif %}путь до картинки проверь в папке твой шаблон/img/img-none.jpg
Отредактировано irbees2008 (2015-04-09 21:21:03)
жизнь бьёт ключом......,ну иногда и гайкой.....
Хаки и Скрипты| Бесплатные шаблоны NGCMS
На Районе - Шахтинск Украшение Windows
Вне форума
Возникает такая беда ![]()
NGCMS Runtime exception: Twig_Error_Syntax
Unexpected tag name "else" (expecting closing tag for the "if" tag defined near line 12)Вопрос снят. Переделал в таком виде. Все работает. Теперь заморочусь выводом превью видео ютуба ![]()
{% if (p.xfields.images.count > 0) %}
<a href="{{ p.xfields.images.entries[0].url }}" class="iLoad" title="{{ news.title }}" onmouseover="$(this).find('.fentry_bg_screen1').stop().fadeIn(); $(this).find('.fentry_plus_screen1').stop().fadeIn();" onmouseout="$(this).find('.fentry_bg_screen1').fadeOut();$(this).find('.fentry_plus_screen1').fadeOut();">
<img src="{{ p.xfields.images.entries[0].purl }}" border="0" alt="{{ news.title }}" /></a>
{% else %}
{% if (p.xfields.storyimages.count < 1) and (p.xfields.images.count < 1)%}
<img src="{{ tpl_url }}/img/img-none.jpg" border="0" alt="{{ news.title }}">
{% else %}
{% if (p.xfields.images.count < 1) %}
<a href="{{ p.xfields.storyimages.entries[0].url }}" class="iLoad" title="{{ news.title }}" onmouseover="$(this).find('.fentry_bg_screen1').stop().fadeIn(); $(this).find('.fentry_plus_screen1').stop().fadeIn();" onmouseout="$(this).find('.fentry_bg_screen1').fadeOut();$(this).find('.fentry_plus_screen1').fadeOut();">
<img src="{{ p.xfields.storyimages.entries[0].purl }}" border="0" alt="{{ news.title }}" /></a>
{% else %}
{% endif %}
{% endif %}
{% endif %}Отредактировано phoboss (2015-04-10 10:33:41)
Вне форума
Страницы 1
[ Сгенерировано за 0.030 сек, 7 запросов выполнено - Использовано памяти: 555.24 Кбайт (Пик: 576.24 Кбайт) ]