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

Dinamitt

  • Осваиваюсь на форуме
  • 38
  • 0 / 0
Подключил и вывел на сайте карусель контента на jQuery. Вроде работает  :laugh:
Можете пжлста подсказать или указать в каком направлении копать, чтобы в этом слайдере выводить модуль (например последние группы из easysocial)/  нашел файлик, который выводит эти группы, копирую и вставляю его... но просто белый экран и все. В консоле нет ни каких ошибок. Я конечно понимаю, что не так все просто.... но может можно как то вставлять вывод php файла в код?

Вот слайдер понравился Circular Content Carousel
Спойлер
[свернуть]
*

kern.USR

  • Давно я тут
  • 827
  • 68 / 1
Re: Вставить модуль в слайдер
« Ответ #1 : 07.02.2018, 19:37:21 »
копирую и вставляю его
Эммм... куда втавляете? Вам переделать нужно шаблон модуля под слайдер.
А то, что вы пишите - каша полная.
Объясните по порядку. Как и куда вы подключили слайдер. Как вы пытались предать список групп в слайдер?
*

Dinamitt

  • Осваиваюсь на форуме
  • 38
  • 0 / 0
Re: Вставить модуль в слайдер
« Ответ #2 : 07.02.2018, 20:00:35 »
Представляю какую вы сейчас ересь прочитаете  ;D
Зашел в папку с модулем

Потом в папку tmpl и выбрал файл card, farebug отправил меня в этот файлик.



Скопировал его содержимое (по разному, разные части пробовал) и вставил в HTML код вывода слайдера.

Вод пример файла card
Код
<?php
/**
* @package      EasySocial
* [member=126442]copyright[/member]    Copyright (C) 2010 - 2016 Stack Ideas Sdn Bhd. All rights reserved.
* @license      GNU/GPL, see LICENSE.php
* EasySocial is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
defined('_JEXEC') or die('Unauthorized Access');
?>
<div id="es" class="mod-es mod-es-groups <?php echo $lib->getSuffix();?>">
    <?php foreach ($groups as $group) { ?>
        <div class="mod-card mod-card--no-avatar-holder">
            <div class="mod-card__cover-wrap">
                <div style="background-image : url(<?php echo $group->getCover()?>);
                background-position : <?php echo $group->getCoverPosition();?>" class="mod-card__cover">
                </div>
            </div>   
            <div class="mod-card__context">
                <?php if ($params->get('display_avatar', true)) { ?>
                    <div class="mod-card__avatar-holder">
                        <div class="mod-card__avatar">
                            <?php echo $lib->html('avatar.cluster', $group, 'md'); ?>
                        </div>
                    </div>
                <?php } ?>
                <a class="es-card__title" href="<?php echo $group->getPermalink();?>"><?php echo $group->getName();?></a>
               
                <?php if ($params->get('display_category', true)) { ?>
                    <div class="es-card__meta">
                        <a href="<?php echo $group->getCategory()->getPermalink(); ?>" alt="<?php echo $lib->html('string.escape', $group->getCategory()->get('title'));?>">
                            <?php echo $lib->html('string.escape', $group->getCategory()->get('title'));?>
                        </a>
                    </div>
                <?php } ?>

                <?php if ($params->get('display_member_counter', true)) { ?>
                    <div class="es-card__meta">
                       <?php echo JText::sprintf(ES::string()->computeNoun('MOD_EASYSOCIAL_GROUPS_MEMBERS_COUNT', $group->getTotalMembers()), $group->getTotalMembers()); ?>
                    </div>
                <?php } ?>
               
                <?php if ($params->get('display_actions', true) && !$group->isMember()) { ?>
                    <div class="mod-es-action">
                        <?php echo $lib->html('group.action', $group); ?>
                    </div>
                <?php } ?>
            </div>
        </div>
    <?php } ?>
    <div class="mod-es-action">
        <a href="<?php echo ESR::groups();?>" class="btn btn-es-default-o btn-sm"><?php echo JText::_('MOD_EASYSOCIAL_GROUPS_ALL_GROUP'); ?></a>
    </div>
</div>

И вставил туда, где написано 5555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555

Код
{source} <!DOCTYPE html>
<html lang="en">
    <head>
        <title>Circular Content Carousel with jQuery</title>
        <meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="Circular Content Carousel with jQuery" />
        <meta name="keywords" content="jquery, conent slider, content carousel, circular, expanding, sliding, css3" />
        <meta name="author" content="Codrops" />
        <link rel="shortcut icon" href="../favicon.ico">
        <link rel="stylesheet" type="text/css" href="css/demo.css" />
        <link rel="stylesheet" type="text/css" href="css/style.css" />
        <link rel="stylesheet" type="text/css" href="css/jquery.jscrollpane.css" media="all" />
        <link href='http://fonts.googleapis.com/css?family=PT+Sans+Narrow&v1' rel='stylesheet' type='text/css' />
        <link href='http://fonts.googleapis.com/css?family=Coustard:900' rel='stylesheet' type='text/css' />
        <link href='http://fonts.googleapis.com/css?family=Rochester' rel='stylesheet' type='text/css' />
    </head>
    <body>
        <div class="container">
            <div class="header">
                <a href="http://tympanus.net/Tutorials/PortfolioImageNavigation/"><span>&laquo; Previous Demo: </span>Portfolio Image Navigation</a>
                <span class="right_ab">
                    <a href="http://cyberella74.deviantart.com/art/Archigraphs-Animals-Icons-139629985" target="_blank">Animal Icons by Cyberella</a>
                    <a href="http://tympanus.net/codrops/2011/08/16/circular-content-carousel/"><strong>back to the Codrops post</strong></a>
                </span>
            </div>
            <h1>Circular Content Carousel<span>with jQuery</span></h1>
            <div id="ca-container" class="ca-container">
                <div class="ca-wrapper">
                    <div class="ca-item ca-item-1">
                        <div class="ca-item-main">
                            <div class="ca-icon"></div>
                            <h3>Stop11111111111 factory farming</h3>
                            <h4>
                                <span class="ca-quote">&ldquo;</span>
                                <span>5555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555
</span>
                            </h4>
                                <a href="#" class="ca-more">more...</a>
                        </div>
                        <div class="ca-content-wrapper">
                            <div class="ca-content">
                                <h6>Animals are not commodities</h6>
                                <a href="#" class="ca-close">close</a>
                                <div class="ca-content-text">
                                    <p>I am so happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now.</p>
                                    <p>When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the trickling stream;</p>
                                    <p>She packed her seven versalia, put her initial into the belt and made herself on the way.</p>
                                </div>
                                <ul>
                                    <li><a href="#">Read more</a></li>
                                    <li><a href="#">Share this</a></li>
                                    <li><a href="#">Become a member</a></li>
                                    <li><a href="#">Donate</a></li>
                                </ul>
                            </div>
                        </div>
                    </div>
                    <div class="ca-item ca-item-2">
                        <div class="ca-item-main">
                            <div class="ca-icon"></div>
                            <h3>Respect Life &amp; Rights</h3>
                            <h4>
                                <span class="ca-quote">&ldquo;</span>
                                <span>I hold that the more helpless a creature, the more entitled it is to protection by man from the cruelty of man.</span>
                            </h4>
                                <a href="#" class="ca-more">more...</a>
                        </div>
                        <div class="ca-content-wrapper">
                            <div class="ca-content">
                                <h6>Would you eat your dog?</h6>
                                <a href="#" class="ca-close">close</a>
                                <div class="ca-content-text">
                                    <p>I am so happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now.</p>
                                    <p>When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the trickling stream;</p>
                                    <p>She packed her seven versalia, put her initial into the belt and made herself on the way.</p>
                                </div>
                                <ul>
                                    <li><a href="#">Read more</a></li>
                                    <li><a href="#">Share this</a></li>
                                    <li><a href="#">Become a member</a></li>
                                    <li><a href="#">Donate</a></li>
                                </ul>
                            </div>
                        </div>
                    </div>
                    <div class="ca-item ca-item-3">
                        <div class="ca-item-main">
                            <div class="ca-icon"></div>
                            <h3>Become 100% meat-free</h3>
                            <h4>
                                <span class="ca-quote">&ldquo;</span>
                                <span>I feel that spiritual progress does demand at some stage that we should cease to kill our fellow creatures for the satisfaction of our bodily wants.</span>
                            </h4>
                                <a href="#" class="ca-more">more...</a>
                        </div>
                        <div class="ca-content-wrapper">
                            <div class="ca-content">
                                <h6>You can change the world</h6>
                                <a href="#" class="ca-close">close</a>
                                <div class="ca-content-text">
                                    <p>I am so happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now.</p>
                                    <p>When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the trickling stream;</p>
                                    <p>She packed her seven versalia, put her initial into the belt and made herself on the way.</p>
                                </div>
                                <ul>
                                    <li><a href="#">Read more</a></li>
                                    <li><a href="#">Share this</a></li>
                                    <li><a href="#">Become a member</a></li>
                                    <li><a href="#">Donate</a></li>
                                </ul>
                            </div>
                        </div>
                    </div>
                    <div class="ca-item ca-item-4">
                        <div class="ca-item-main">
                            <div class="ca-icon"></div>
                            <h3>Make a difference</h3>
                            <h4>
                                <span class="ca-quote">&ldquo;</span>
                                <span>A man is but the product of his thoughts what he thinks, he becomes.</span>
                            </h4>
                                <a href="#" class="ca-more">more...</a>
                        </div>
                        <div class="ca-content-wrapper">
                            <div class="ca-content">
                                <h6>Think globally, act locally</h6>
                                <a href="#" class="ca-close">close</a>
                                <div class="ca-content-text">
                                    <p>I am so happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now.</p>
                                    <p>When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the trickling stream;</p>
                                    <p>She packed her seven versalia, put her initial into the belt and made herself on the way.</p>
                                </div>
                                <ul>
                                    <li><a href="#">Read more</a></li>
                                    <li><a href="#">Share this</a></li>
                                    <li><a href="#">Become a member</a></li>
                                    <li><a href="#">Donate</a></li>
                                </ul>
                            </div>
                        </div>
                    </div>
                    <div class="ca-item ca-item-5">
                        <div class="ca-item-main">
                            <div class="ca-icon"></div>
                            <h3>Say no to killing</h3>
                            <h4>
                                <span class="ca-quote">&ldquo;</span>
                                <span>A weak man is just by accident. A strong but non-violent man is unjust by accident.</span>
                            </h4>
                                <a href="#" class="ca-more">more...</a>
                        </div>
                        <div class="ca-content-wrapper">
                            <div class="ca-content">
                                <h6>Animals have rights, too!</h6>
                                <a href="#" class="ca-close">close</a>
                                <div class="ca-content-text">
                                    <p>I am so happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now.</p>
                                    <p>When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the trickling stream;</p>
                                    <p>She packed her seven versalia, put her initial into the belt and made herself on the way.</p>
                                </div>
                                <ul>
                                    <li><a href="#">Read more</a></li>
                                    <li><a href="#">Share this</a></li>
                                    <li><a href="#">Become a member</a></li>
                                    <li><a href="#">Donate</a></li>
                                </ul>
                            </div>
                        </div>
                    </div>
                    <div class="ca-item ca-item-6">
                        <div class="ca-item-main">
                            <div class="ca-icon"></div>
                            <h3>Don't believe the lies</h3>
                            <h4>
                                <span class="ca-quote">&ldquo;</span>
                                <span>An error does not become truth by reason of multiplied propagation, nor does truth become error because nobody sees it.</span>
                            </h4>
                                <a href="#" class="ca-more">more...</a>
                        </div>
                        <div class="ca-content-wrapper">
                            <div class="ca-content">
                                <h6>How essential is meat?</h6>
                                <a href="#" class="ca-close">close</a>
                                <div class="ca-content-text">
                                    <p>I am so happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now.</p>
                                    <p>When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the trickling stream;</p>
                                    <p>She packed her seven versalia, put her initial into the belt and made herself on the way.</p>
                                </div>
                                <ul>
                                    <li><a href="#">Read more</a></li>
                                    <li><a href="#">Share this</a></li>
                                    <li><a href="#">Become a member</a></li>
                                    <li><a href="#">Donate</a></li>
                                </ul>
                            </div>
                        </div>
                    </div>
                    <div class="ca-item ca-item-7">
                        <div class="ca-item-main">
                            <div class="ca-icon"></div>
                            <h3>Save the planet</h3>
                            <h4>
                                <span class="ca-quote">&ldquo;</span>
                                <span>A small body of determined spirits fired by an unquenchable faith in their mission can alter the course of history.</span>
                            </h4>
                                <a href="#" class="ca-more">more...</a>
                        </div>
                        <div class="ca-content-wrapper">
                            <div class="ca-content">
                                <h6>Collateral damage?</h6>
                                <a href="#" class="ca-close">close</a>
                                <div class="ca-content-text">
                                    <p>I am so happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now.</p>
                                    <p>When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the trickling stream;</p>
                                    <p>She packed her seven versalia, put her initial into the belt and made herself on the way.</p>
                                </div>
                                <ul>
                                    <li><a href="#">Read more</a></li>
                                    <li><a href="#">Share this</a></li>
                                    <li><a href="#">Become a member</a></li>
                                    <li><a href="#">Donate</a></li>
                                </ul>
                            </div>
                        </div>
                    </div>
                    <div class="ca-item ca-item-8">
                        <div class="ca-item-main">
                            <div class="ca-icon"></div>
                            <h3>It's time to move on</h3>
                            <h4>
                                <span class="ca-quote">&ldquo;</span>
                                <span>A nation's culture resides in the hearts and in the soul of its people.</span>
                            </h4>
                                <a href="#" class="ca-more">more...</a>
                        </div>
                        <div class="ca-content-wrapper">
                            <div class="ca-content">
                                <h6>Let's finally become humans</h6>
                                <a href="#" class="ca-close">close</a>
                                <div class="ca-content-text">
                                    <p>I am so happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now.</p>
                                    <p>When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the trickling stream;</p>
                                    <p>She packed her seven versalia, put her initial into the belt and made herself on the way.</p>
                                </div>
                                <ul>
                                    <li><a href="#">Read more</a></li>
                                    <li><a href="#">Share this</a></li>
                                    <li><a href="#">Become a member</a></li>
                                    <li><a href="#">Donate</a></li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <h5>Quotes by Mohandas Gandhi</h5>
        </div>
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
        <script type="text/javascript" src="js/jquery.easing.1.3.js"></script>
        <!-- the jScrollPane script -->
        <script type="text/javascript" src="js/jquery.mousewheel.js"></script>
        <script type="text/javascript" src="js/jquery.contentcarousel.js"></script>
        <script type="text/javascript">
            $('#ca-container').contentcarousel();
        </script>
    </body>
</html>{/source}




Все это пытаюсь сделать через HTML-модуль... подключаю скрипты как здесь помогли мне В модуль &amp;quot;html-модуль&amp;quot;  добавить HTML и JS
*

Dinamitt

  • Осваиваюсь на форуме
  • 38
  • 0 / 0
Re: Вставить модуль в слайдер
« Ответ #3 : 07.02.2018, 20:01:51 »
Ну эти пятерки, они в слайдере как раз там где нужно отображаются.
Еще так подумал, если даже и получилось бы вывести, то во всех колонках будет одни и теже группы выводиться? 
« Последнее редактирование: 07.02.2018, 20:06:23 от Dinamitt »
*

kern.USR

  • Давно я тут
  • 827
  • 68 / 1
Re: Вставить модуль в слайдер
« Ответ #4 : 07.02.2018, 21:14:27 »
Представляю какую вы сейчас ересь прочитаете  ;D
Мда... до момента "открыл файл" всё было хорошо!

Вам нужно создать переопределение шаблона:
1. В папке с шаблоном своего сайта переходите в папку HTML
2. в ней создаёте папку  mod_easysocial_group
3. в ней создаёте php файл, с названием, какое захотите

В этот файл копируете содержимое из card.php

Дальше вам нужно встроить слайдер в свой шаблон

Перед foreach, у себя в шаблоне вставте код:
Код
<div id="ca-container" class="ca-container mod-es mod-es-groups <?php echo $lib->getSuffix();?>" 
<div class="ca-wrapper">
вместо
Код
<div id="es" class="mod-es mod-es-groups <?php echo $lib->getSuffix();?>">
После foreach (после закрывающей его скобки) добавьте ещё один </div>

В тело цикла foreach вставте код блока из слайдера
Код
<div class="ca-item">
                        <div class="ca-item-main">
                            <div class="ca-icon"></div>
                            <h3>Stop11111111111 factory farming</h3>
                            <h4>
                                <span class="ca-quote">&ldquo;</span>
                                <span>5555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555
</span>
                            </h4>
                                <a href="#" class="ca-more">more...</a>
                        </div>
                        <div class="ca-content-wrapper">
                            <div class="ca-content">
                                <h6>Animals are not commodities</h6>
                                <a href="#" class="ca-close">close</a>
                                <div class="ca-content-text">
                                    <p>I am so happy, my dear friend, so absorbed in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist than now.</p>
                                    <p>When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper surface of the impenetrable foliage of my trees, and but a few stray gleams steal into the inner sanctuary, I throw myself down among the tall grass by the trickling stream;</p>
                                    <p>She packed her seven versalia, put her initial into the belt and made herself on the way.</p>
                                </div>
                                <ul>
                                    <li><a href="#">Read more</a></li>
                                    <li><a href="#">Share this</a></li>
                                    <li><a href="#">Become a member</a></li>
                                    <li><a href="#">Donate</a></li>
                                </ul>
                            </div>
                        </div>
                    </div>

А дальше, вместо текста из примера и своих 5555555 вставляйте вывод контента
аватар
Код
 <?php echo $lib->html('avatar.cluster', $group, 'md'); ?>
Заголовок
Код
<?php echo $lib->html('string.escape', $group->getCategory()->get('title'));?>
ну и т.д. (смотрите на то, что выводит стандартный шаблон - догадаться не сложно)

А дальше, в настройках модуля, выбирите свой альтернативный мкет отображения и будет вам счастье
*

Dinamitt

  • Осваиваюсь на форуме
  • 38
  • 0 / 0
Re: Вставить модуль в слайдер
« Ответ #5 : 07.02.2018, 21:19:13 »
Спасибооо... буду пробовать и разбираться. Я думал, все будет на много сложнее (хотя все еще впереди)
*

kern.USR

  • Давно я тут
  • 827
  • 68 / 1
Re: Вставить модуль в слайдер
« Ответ #6 : 07.02.2018, 21:22:09 »
Ничего сложного нет, если включить фантазию и пользоваться гуглом
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться
 

Как вставить модуль в код нужной страницы php?

Автор zvi

Ответов: 9
Просмотров: 3843
Последний ответ 21.02.2024, 11:03:08
от saynez
Убрать из модуля новостей ссылку на статью, на которой выводится модуль

Автор zeus07

Ответов: 3
Просмотров: 720
Последний ответ 08.11.2023, 21:17:26
от GrayAn
Модуль Похожие метки – только более ранние статьи!

Автор Gerostrat

Ответов: 6
Просмотров: 455
Последний ответ 24.08.2023, 21:56:09
от sivers
Модуль для опросов Advanced Poll не работает

Автор Escander

Ответов: 15
Просмотров: 1428
Последний ответ 02.06.2023, 20:10:22
от kzalmatuy1
Вернуть слайдер после работы с модулем html кода

Автор Jenik1245

Ответов: 0
Просмотров: 395
Последний ответ 30.05.2023, 14:15:58
от Jenik1245