Не работает слайдер из стороннего шаблона

Тема в разделе "Внешний вид, шаблоны, графика", создана пользователем fenix_63, 10.04.2014.

  1. fenix_63
    Offline

    fenix_63 Недавно здесь

    Регистрация:
    10.04.2014
    Сообщения:
    8
    Симпатии:
    0
    Пол:
    Мужской
    Всем привет. Народ, я вот скачал шаблон для Joomla 3.x http://a4joomla.com/joomla-templates/triplex3r-free/ но картинки в этом слайдере не меняются когда я на локальном компе у себя запускаю этот шаблон.

    Настройки сделал все как указано вот тут: http://a4joomla.com/joomla-templates/triplex3r-free/slideshow.html
    Подскажите, что делаю не так? Или какой ещё исходник сюда выложить. Ну ни в какую не хочет этот слайдер работать. Картинка только одна отображается, а смены не происходит. sad.gif

    Вот исходник index.php

    Код (PHP):
    1. <?php // no direct access
    2. defined( '_JEXEC' ) or die( 'Restricted access' );
    3. $app = JFactory::getApplication();
    4. $doc = JFactory::getDocument();
    5. $showLeftColumn = (bool) $this->countModules('position-7');
    6. $showRightColumn = (bool) $this->countModules('position-6');
    7.  
    8. //Мои 2 строчки
    9. $showMyMenu = (bool)$this->countModules('position-2');//Моя строчка
    10. $showSlide =(bool)$this->countModules('slideshow');//Моя строчка
    11.  
    12.  
    13. $showRightColumn &= $app->input->getCmd('layout', '')!= 'edit' ;
    14.  
    15. $logoText   = $this->params->get("logoText","TRIPLEX3R");
    16. $logoFontsize   = $this->params->get("logoFontsize", "32");
    17. $slogan = $this->params->get("slogan","template from a4joomla.com");
    18.  
    19. $twitterurl = $this->params->get("twitterUrl");
    20. $facebookurl = $this->params->get("facebookUrl");
    21. $feedurl = $this->params->get("feedUrl");
    22. $googleurl = $this->params->get("googleUrl");
    23. $youtubeurl = $this->params->get("youtubeUrl");
    24.  
    25. $rightColumnWidth   = $this->params->get("rightColumnWidth", "3");
    26. $leftColumnWidth    = $this->params->get("leftColumnWidth", "3");
    27. $logoWidth  = $this->params->get("logoWidth", "4");
    28. $logoTextPosition   = $this->params->get("logoTextPosition", "30");
    29. $sloganPosition = $this->params->get("sloganPosition", "-5");
    30. $searchPosition = $this->params->get("searchPosition", "25");
    31. $topmenuPosition = $this->params->get("topmenuPosition", "5");
    32. $slideshowPosition = $this->params->get("slideshowPosition", "0");
    33. $sociWidth = 9 - $logoWidth;
    34. $headerrightWidth = 12 - $logoWidth;
    35.  
    36. if ($showLeftColumn && $showRightColumn) {
    37.   $contentWidth = 12 - $leftColumnWidth - $rightColumnWidth;
    38. } elseif (!$showLeftColumn && $showRightColumn) {
    39.   $contentWidth = 12 - $rightColumnWidth;
    40. } elseif ($showLeftColumn && !$showRightColumn) {
    41.   $contentWidth = 12 - $leftColumnWidth;
    42. } else {
    43.   $contentWidth = 12 ;
    44. }
    45.  
    46.  
    47. // Add JavaScript Frameworks
    48. JHtml::_('bootstrap.framework');
    49.  
    50. // Add Stylesheets
    51. $doc->addStyleSheet(JURI::base().'templates/'.$this->template.'/css/template.css', $type = 'text/css');
    52.  
    53. // Load optional RTL Bootstrap CSS
    54. JHtml::_('bootstrap.loadCss', false, $this->direction);
    55. ?>
    56.  
    57.  
    58.  
    59.  
    60. <!DOCTYPE html>
    61. <html lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
    62.  
    63. <head>
    64.  
    65. <!------------------------------------------------------------Меню------------------------------------------------------------>
    66. <link rel="stylesheet" href="/templates/a4joomla-triplex3r-free/css/ddsmoothmenu.css" />
    67. <script type="text/javascript" src="/templates/a4joomla-triplex3r-free/js/jquery.min.js"></script>
    68. <script type="text/javascript" src="/templates/a4joomla-triplex3r-free/js/ddsmoothmenu.js"></script>
    69. <!--------------------------------теперь сюда нужно подключить слайдер (который идёт с шаблоном)--------------------------------->
    70. <link rel="stylesheet" href="/templates/a4joomla-triplex3r-free/css/nivo-slider.css" />
    71. <link rel="stylesheet" href="/templates/a4joomla-triplex3r-free/css/style.css" />
    72. <!--следующие 2 строки взяты с сайта http://docs.dev7studios.com/jquery-plugins/nivo-slider -->
    73. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js" type="text/javascript"></script>
    74. <script src="/templates/a4joomla-triplex3r-free/js/jquery.nivo.slider.pack.js" type="text/javascript"></script>
    75. <script type="text/javascript" src="/templates/a4joomla-triplex3r-free/js/jquery.nivo.slider.js"></script>
    76. <script type="text/javascript">
    77.    $(window).load(function() {
    78.    
    79.      //$('#slider').nivoSlider();
    80.      $('#slider').on('click', '.nivoSlider', function(){
    81.  
    82.         });
    83.    
    84.      $('#ais_91').on('click', '.nivoSlider', function(){
    85.  
    86.         });
    87.    
    88.    });
    89.  
    90.  
    91.  
    92.    $('#slider').nivoSlider({
    93.      effect: 'fade',               // Specify sets like: 'fold,fade,sliceDown'
    94.      slices: 15,                     // For slice animations
    95.      boxCols: 8,                     // For box animations
    96.      boxRows: 4,                     // For box animations
    97.      animSpeed: 500,                 // Slide transition speed
    98.      pauseTime: 3000,               // How long each slide will show
    99.      startSlide: 0,               // Set starting Slide (0 index)
    100.      directionNav: true,             // Next & Prev navigation
    101.      controlNav: true,             // 1,2,3... navigation
    102.      controlNavThumbs: false,       // Use thumbnails for Control Nav
    103.      pauseOnHover: true,             // Stop animation while hovering
    104.      manualAdvance: false,         // Force manual transitions
    105.      prevText: 'Prev',             // Prev directionNav text
    106.      nextText: 'Next',             // Next directionNav text
    107.      randomStart: false,             // Start on a random slide
    108.      beforeChange: function(){},     // Triggers before a slide transition
    109.      afterChange: function(){},   // Triggers after a slide transition
    110.      slideshowEnd: function(){},     // Triggers after all slides have been shown
    111.      lastSlide: function(){},       // Triggers when last slide is shown
    112.      afterLoad: function(){}         // Triggers when slider has loaded
    113.    });
    114.  
    115.  
    116.    $("#ais_91").nivoSlider({
    117.     "effect":"fade",
    118.     "slices":2,
    119.     "controlNav":false,
    120.     "directionNavHide":false,
    121.     "responsive":true
    122. });
    123.  
    124.  
    125.  
    126.                              
    127.  
    128.  
    129. </script>
    130.  
    131. <style type="text/css">
    132.  
    133.    #ais_91_wrapper{
    134.      max-width:980px;
    135.      height: 216px; /*всю строчку добавил сам*/
    136.    }
    137.    #ais_91{
    138.      width:100%;
    139.      height: auto;/*216px;*//*меняю сам*/
    140.    }
    141.    .nivoSlider {
    142.      -moz-box-shadow: none;
    143.      -webkit-box-shadow: none;
    144.      box-shadow: none;
    145.    }
    146.  
    147.    #slideshow-container {
    148.     width:980px;
    149.     height:216px;
    150.    }
    151.  
    152. </style>
    153. <!----------------------------------инициализация горизонтального и вертикального меню----------------------------->
    154. <script type="text/javascript">
    155.     //горизонтальное меню
    156.     ddsmoothmenu.init({
    157.    mainmenuid: "smoothmenu1", //menu DIV id
    158.    orientation: 'h',
    159.    classname: 'ddsmoothmenu', //class added to menu's outer DIV
    160.    //customtheme: ["#1c5a80", "#18374a"],
    161.    contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
    162. })
    163.  
    164.    //вертикальное меню
    165.    ddsmoothmenu.init({
    166.    mainmenuid: "smoothmenu2", //menu DIV id
    167.    orientation: 'v',
    168.    classname: 'ddsmoothmenu-v', //class added to menu's outer DIV
    169.    //customtheme: ["#1c5a80", "#18374a"],
    170.    contentsource: "markup" //"markup" or ["container_id", "path_to_menu_file"]
    171. })
    172.  
    173.  
    174. jQuery(window).on('load',  function() {
    175.                 new JCaption('img.caption');
    176.             });
    177. /*
    178. function keepAlive() {
    179. var myAjax = new Request({method: "get", url: "index.php"}).send();}
    180. window.addEvent("domready", function(){ keepAlive.periodical(840000); });
    181. */
    182. jQuery(document).ready(function()
    183.                 {
    184.                     jQuery('.hasTooltip').tooltip({"html": true,"container": "body"});
    185.                 });
    186. //============================================================================================================================
    187.  
    188. //=============================================================================================================================
    189.  
    190.  
    191. </script>
    192.     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    193.     <jdoc:include type="head" />
    194.  
    195.     <link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/css/icomoon2.css" type="text/css" />
    196.  
    197. <style type="text/css">
    198. <?php if ($this->countModules('slideshow')) : ?>
    199. #header {
    200.     border-bottom: 0;
    201. }
    202. <?php endif; ?>
    203. #logo h2 {
    204.    font-size:<?php echo $logoFontsize; ?>px;
    205.     margin-top:<?php echo $logoTextPosition; ?>px;
    206. }
    207. #logo h3 {
    208.     margin-top:<?php echo $sloganPosition; ?>px;
    209. }
    210. #hsocial {
    211.     margin-top:<?php echo $searchPosition; ?>px;
    212. }
    213. #topmenu {
    214.     margin-top:<?php echo $topmenuPosition; ?>px;
    215. }
    216. #slideshow-mod {
    217. padding-top:<?php echo $slideshowPosition; ?>px;
    218. }
    219. </style>
    220.  
    221. <!--[if lt IE 9]>
    222.     <script src="<?php echo $this->baseurl ?>/media/jui/js/html5.js"></script>
    223. <![endif]-->
    224. <!--[if lte IE 7]>
    225.     <script src="<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/js/lte-ie7.js"></script>
    226. <![endif]-->
    227. </head>
    228. <body>
    229.  
    230.  
    231.     <div id="header" class="container">  
    232.         <div class="row">
    233.             <div id="logo" class="span<?php echo $logoWidth; ?>">
    234.                     <h2><a href="<?php echo JURI::base(); ?>" title="<?php echo htmlspecialchars($logoText); ?>"><?php echo htmlspecialchars($logoText); ?></a></h2>
    235.                     <h3><?php echo htmlspecialchars($slogan); ?></h3>
    236.             </div>
    237.             <div id="headerright" class="span<?php echo $headerrightWidth; ?>">
    238.                 <div id="hsocial" class="row">
    239.                     <?php if($this->countModules('position-0')) : ?>
    240.                         <div id="search" class="span3 pull-right clearfix">
    241.                             <jdoc:include type="modules" name="position-0" style="xhtml" />
    242.                         </div>
    243.                     <?php endif; ?>
    244.                     <div id="soci" class="span<?php echo $sociWidth; ?> pull-right">
    245.                     <?php if($youtubeurl) : ?>
    246.                         <a target="_blank" class="myyoutube pull-right" href="<?php echo $youtubeurl; ?>" title="Youtube"><i class="icon2-youtube"></i></a>
    247.                     <?php endif; ?>
    248.                     <?php if($feedurl) : ?>
    249.                         <a target="_blank" class="myfeed pull-right" href="<?php echo $feedurl; ?>" title="Feed"><i class="icon2-feed-2"></i></a>
    250.                     <?php endif; ?>
    251.                     <?php if($twitterurl) : ?>
    252.                         <a target="_blank" class="mytwitter pull-right" href="<?php echo $twitterurl; ?>" title="Twitter"><i class="icon2-twitter-2"></i></a>
    253.                     <?php endif; ?>
    254.                     <?php if($googleurl) : ?>
    255.                         <a target="_blank" class="mygoogle pull-right" href="<?php echo $googleurl; ?>" title="Google"><i class="icon2-google-plus-3"></i></a>
    256.                     <?php endif; ?>
    257.                     <?php if($facebookurl) : ?>
    258.                         <a target="_blank" class="myfacebook pull-right" href="<?php echo $facebookurl; ?>" title="Facebook"><i class="icon2-facebook-2"></i></a>
    259.                     <?php endif; ?>
    260.                     </div>
    261.                 </div>  
    262.                 <?php if($this->countModules('position-1')) : ?>
    263.                 <div id="topmenu" class="navbar">
    264.                     <div class="navbar-inner">
    265.                         <div class="container">
    266.                            
    267.                          <span class="brand hidden-tablet hidden-desktop">MENU</span>
    268.                             <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
    269.                                 <span class="icon-downarrow"></span>
    270.                             </a>
    271.                        
    272.                         <!--div class="nav-collapse collapse pull-right clearfix">
    273.                             <jdoc:include type="modules" name="position-1" style="none" />
    274.                         </div-->
    275.                        
    276.                        
    277.                          <!--Заменил topmenu на smoothmenu1-->
    278.                          <div class="ddsmoothmenu" id="smoothmenu1">
    279.                            <jdoc:include type="modules" name="position-1" />
    280.                          </div>
    281.                        
    282.                        
    283.                        
    284.                        
    285.                         </div>
    286.                     </div>
    287.                 </div>
    288.                 <?php endif; ?>
    289.             </div>
    290.         </div>
    291.     </div>
    292.  
    293. <!--сюда нужно добавить  слайд-панель, и каким то образом обернуть в DIV-->
    294. <div id="slideshow-mod"><!--slideshow-container вместо slideshow-mod-->
    295.    
    296.    <div id="slsh">
    297.      <div class="moduletable">
    298.        <div id="ais_91_wrapper" class="ari-image-slider-wrapper ari-is-theme-default">
    299.          <div id="ais_91" class="ari-image-slider nivoSlider" style="height:216px;">
    300.    
    301.    
    302.            <!--Сюда можно вставить картинку-->
    303.          
    304.            <div id="slider" class="nivoSlider">
    305.               <img src="/templates/a4joomla-triplex3r-free/images/3pics-color1.jpg" alt="" title="" class="imageslider-item"/>
    306.               <img src="/templates/a4joomla-triplex3r-free/images/3pics-mono1.jpg" alt="" title="" class="imageslider-item"/>
    307.            </div>
    308.          
    309.            <!--img class="nivo-main-image" src="/templates/a4joomla-triplex3r-free/images/3pics-color1.jpg"-->
    310.          
    311.          
    312.            <div class="nivo-caption"></div>
    313.            <div class="nivo-directionNav">
    314.               <a class="nivo-prevNav">Prev</a>
    315.               <a class="nivo-nextNav">Next</a>
    316.            </div>
    317.          
    318.          
    319.          
    320.          
    321.            <div class="nivo-slice" name="0" style="left:0px; width:980px; height:216px; opacity:1; overflow:hidden;">
    322.              <img src="/templates/a4joomla-triplex3r-free/images/3pics-color1.jpg"  />
    323.            </div>
    324.          
    325.            <div class="nivo-slice" name="1" style="left:490px; width:490px; height:216px; opacity:0; overflow:hidden;">
    326.              <img src="/templates/a4joomla-triplex3r-free/images/3pics-mono1.jpg"  />
    327.            </div>
    328.            
    329.  
    330.          
    331.              
    332.          
    333.          
    334.          
    335.          
    336.        
    337.          </div>
    338.        </div>
    339.      </div>
    340.    </div>
    341.  
    342. </div>
    343.  
    344.  
    345. <!-------------------------------------------------------------------------->
    346.  
    347.  
    348.     <div id="wrap" class="container">
    349.  
    350.         <?php if($this->countModules('position-2')) : ?>
    351.             <div id="pathway">
    352.                 <jdoc:include type="modules" name="position-2" />
    353.             </div>
    354.         <?php endif; ?>
    355.         <div id="cbody" class="row-fluid">
    356.        
    357.        
    358.        
    359.          <?php if($showLeftColumn) : ?>
    360.          <!--Сюда также нужно попробовать подключить стороннее меню для проверки его работоспособности-->
    361.                
    362.                 <div id="sidebar" class="span<?php echo $leftColumnWidth; ?>"> 
    363.                     <jdoc:include type="modules" name="position-7" style="xhtml" />
    364.                 </div>
    365.        
    366.        
    367.          <!---------------------------------------------------------------------------------------------->
    368.             <?php endif; ?>
    369.        
    370.        
    371.        
    372.        
    373.             <div id="content60" class="span<?php echo $contentWidth; ?>">  
    374.                 <div id="content">
    375.                     <jdoc:include type="message" />
    376.                     <jdoc:include type="component" />
    377.                 </div>
    378.             </div>
    379.        
    380.        
    381.          <?php if($showRightColumn) : ?>
    382.             <div id="sidebar-2" class="span<?php echo $rightColumnWidth; ?>">  
    383.                     <jdoc:include type="modules" name="position-6" style="xhtml" />
    384.                 </div>
    385.             <?php endif; ?>
    386.        
    387.        
    388.        
    389.         </div>
    390. <!--end of wrap-->
    391.     </div>
    392.  
    393.  
    394.     <div id="footer" class="container">
    395.         <?php if($this->countModules('position-14')) : ?>  
    396.             <jdoc:include type="modules" name="position-14" style="xhtml" />  
    397.         <?php endif; ?>
    398.     </div>
    399.     <div id="a4j" class="container"><a href="http://a4joomla.com/"><?php echo JText::_('TPL_A4JOOMLA-TRIPLEX3R-FREE_FOOTER_LINK_TEXT');?></a></div>
    400.  
    401.  
    402. </body>
    403. </html>
     
  2.  
  3. OlegM
    Offline

    OlegM Russian Joomla! Team Команда форума

    Регистрация:
    12.04.2007
    Сообщения:
    4 311
    Симпатии:
    375
    Пол:
    Мужской
    Смотри в Firebug (DevTools) ошибки JavaScript
     
  4. fenix_63
    Offline

    fenix_63 Недавно здесь

    Регистрация:
    10.04.2014
    Сообщения:
    8
    Симпатии:
    0
    Пол:
    Мужской
    Посмотрел, какие были ошибки исправил, осталась только одна, но она в файле, который отвечает за отображение меню, а не слайдера, а вот слайдер настроить, так и не получается...

    Текст ошибки: Uncaught TypeError: Cannot set property 'className' of undefined в файле ddsmoothmenu.js
    Я аж прям не знаю что делать :(
     

Поделиться этой страницей

Загрузка...