jquery подключение к Joomla 1.5

Тема в разделе "Интерактивные возможности", создана пользователем Pasha199, 09.02.2011.

  1. Offline

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

    Регистрация:
    09.02.2011
    Сообщения:
    8
    Симпатии:
    0
    Пол:
    Мужской
    Не могу подключить библиотеку jquery к шаблону.

    index.php шаблона

    Код (CODE):
    1. <?php
    2. /**
    3.  * @package Gantry Template Framework - RocketTheme
    4.  * @version 1.5.0 December 1, 2010
    5.  * @author RocketTheme http://www.rockettheme.com
    6.  * @copyright Copyright (C) 2007 - 2010 RocketTheme, LLC
    7.  * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
    8.  *
    9.  * Gantry uses the Joomla Framework (http://www.joomla.org), a GNU/GPLv2 content management system
    10.  *
    11.  */
    12. // no direct access
    13. defined( '_JEXEC' ) or die( 'Restricted index access' );
    14.  
    15. // load and inititialize gantry class
    16. require_once('lib/gantry/gantry.php');
    17. $gantry->init();
    18.  
    19. ?>
    20. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    21. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $gantry->language; ?>" lang="<?php echo $gantry->language;?>" >
    22. <head>
    23.  
    24.  
    25.  
    26.     <?php
    27.         $gantry->displayHead();
    28.         $gantry->addStyles(array('template.css','joomla.css','typography.css'));
    29.     ?>
    30. </head>
    31.     <body <?php echo $gantry->displayBodyTag(array('backgroundlevel','bodyLevel')); ?>>
    32.         <div id="rt-page-surround">
    33.             <?php /** Begin Drawer **/ if ($gantry->countModules('drawer')) : ?>
    34.             <div id="rt-drawer">
    35.                 <div class="rt-container">
    36.                     <?php echo $gantry->displayModules('drawer','standard','standard'); ?>
    37.                     <div class="clear"></div>
    38.                 </div>
    39.             </div>
    40.             <?php /** End Drawer **/ endif; ?>
    41.             <?php /** Begin Top **/ if ($gantry->countModules('top')) : ?>
    42.             <div id="rt-top">
    43.                 <div class="rt-container">
    44.                     <?php if (controlsDisplay('top')): ?>
    45.                     <div class="controls"><span class="down"></span><span class="up"></span></div>
    46.                     <?php endif; ?>
    47.                     <?php echo $gantry->displayModules('top','standard','scroller'); ?>
    48.                     <div class="clear"></div>
    49.                 </div>
    50.             </div>
    51.             <?php /** End Top **/ endif; ?>
    52.             <div id="rt-topbar"></div>
    53.             <div id="rt-page-background">
    54.                 <div id="rt-page-background2">
    55.                     <?php /** Begin Header **/ if ($gantry->countModules('header')) : ?>
    56.                     <div id="rt-header">
    57.                         <div class="rt-container">
    58.                             <?php echo $gantry->displayModules('header','standard','standard'); ?>
    59.                             <div class="clear"></div>
    60.                         </div>
    61.                     </div>
    62.                     <?php /** End Header **/ endif; ?>
    63.                     <div class="rt-container">
    64.                         <?php /** Begin Navigation **/ if ($gantry->countModules('navigation')) : ?>
    65.                         <div id="rt-navigation" class="<?php if ($gantry->get('menu-centering')) : ?>centered<?php endif; ?>"><div id="rt-navigation2"><div id="rt-navigation3">
    66.                             <?php echo $gantry->displayModules('navigation','basic','basic'); ?>
    67.                             <div class="clear"></div>
    68.                         </div></div></div>
    69.                         <?php /** End Navigation **/ endif; ?>
    70.                         <?php /** Begin Sub Navigation **/ if ($gantry->countModules('subnavigation')) : ?>
    71.                         <div id="rt-subnavigation" class="<?php if ($gantry->get('menu-centering')) : ?>centered<?php endif; ?>">
    72.                             <?php echo $gantry->displayModules('subnavigation','basic','basic'); ?>
    73.                             <div class="clear"></div>
    74.                         </div>
    75.                         <?php /** End Sub Navigation **/ endif; ?>
    76.                         <?php /** Begin Utility **/ if ($gantry->countModules('utility')) : ?>
    77.                         <div id="rt-utility">
    78.                             <?php echo $gantry->displayModules('utility','standard','standard'); ?>
    79.                             <div class="clear"></div>
    80.                         </div>
    81.                         <?php /** End Utility **/ endif; ?>
    82.                         <?php /** Begin Showcase **/ if ($gantry->countModules('showcase')) : ?>
    83.                         <div class="rt-section-div"></div>
    84.                         <div id="rt-showcase">
    85.                             <?php if (controlsDisplay('showcase')): ?>
    86.                             <div class="controls"><span class="down"></span><span class="up"></span></div>
    87.                             <?php endif; ?>
    88.                             <?php echo $gantry->displayModules('showcase','standard','scroller'); ?>
    89.                             <div class="clear"></div>
    90.                         </div>
    91.                         <?php /** End Showcase **/ endif; ?>
    92.                         <?php if ($gantry->countModules('showcase') and $gantry->countModules('feature')) : ?>
    93.                         <div class="rt-showfeature-div"></div>
    94.                         <?php endif; ?>
    95.                         <?php /** Begin Feature **/ if ($gantry->countModules('feature')) : ?>
    96.                         <div id="rt-feature">
    97.                             <?php if (controlsDisplay('feature')): ?>
    98.                             <div class="controls"><span class="down"></span><span class="up"></span></div>
    99.                             <?php endif; ?>
    100.                             <?php echo $gantry->displayModules('feature','standard','scroller'); ?>
    101.                             <div class="clear"></div>
    102.                         </div>
    103.                         <?php /** End Feature **/ endif; ?>
    104.                         <div id="rt-body-background">
    105.                             <div id="rt-body-overlay">
    106.                                 <?php /** Begin Main Top **/ if ($gantry->countModules('maintop')) : ?>
    107.                                 <div id="rt-maintop">
    108.                                     <?php echo $gantry->displayModules('maintop','standard','standard'); ?>
    109.                                     <div class="clear"></div>
    110.                                 </div>
    111.                                 <?php /** End Main Top **/ endif; ?>
    112.                                 <?php /** Begin Breadcrumbs **/ if ($gantry->countModules('breadcrumb')) : ?>
    113.                                 <div id="rt-breadcrumbs">
    114.                                     <?php echo $gantry->displayModules('breadcrumb','basic','breadcrumbs'); ?>
    115.                                     <div class="clear"></div>
    116.                                 </div>
    117.                                 <?php /** End Breadcrumbs **/ endif; ?>
    118.                                 <?php /** Begin Main Body **/ ?>
    119.                                 <?php echo $gantry->displayOrderedMainbody('mainbody','sidebar','standard','standard','standard','standard','standard'); ?>
    120.                                 <?php /** End Main Body **/ ?>
    121.                                 <?php /** Begin Main Bottom **/ if ($gantry->countModules('mainbottom')) : ?>
    122.                                 <div id="rt-mainbottom">
    123.                                     <?php echo $gantry->displayModules('mainbottom','standard','standard'); ?>
    124.                                     <div class="clear"></div>
    125.                                 </div>
    126.                                 <?php /** End Main Bottom **/ endif; ?>
    127.                             </div>
    128.                         </div>
    129.                         <?php /** Begin Bottom **/ if ($gantry->countModules('bottom')) : ?>
    130.                         <div id="rt-bottom">
    131.                             <?php if (controlsDisplay('bottom')): ?>
    132.                             <div class="controls"><span class="down"></span><span class="up"></span></div>
    133.                             <?php endif; ?>
    134.                             <?php echo $gantry->displayModules('bottom','standard','scroller'); ?>
    135.                             <div class="clear"></div>
    136.                         </div>
    137.                         <?php /** End Bottom **/ endif; ?>
    138.                     </div>
    139.                 </div>
    140.                 <?php /** Begin Footer Section **/ if ($gantry->countModules('footer') or $gantry->countModules('copyright') or $gantry->countModules('debug')) : ?>
    141.  
    142.                 <div id="rt-footer-surround">
    143.                     <?php /** Begin Footer **/ if ($gantry->countModules('footer')) : ?>
    144.                     <div class="rt-container">
    145.                         <div id="rt-footer">
    146.                             <div class="rt-section-surround">
    147.                                 <div class="rt-row-surround">
    148.                                     <?php echo $gantry->displayModules('footer','standard','standard'); ?>
    149.                                     <div class="clear"></div>
    150.                                 </div>
    151.                             </div>
    152.                         </div>
    153.                     </div>
    154.                     <?php /** End Footer **/ endif; ?>
    155.                     <?php /** Begin Copyright **/ if ($gantry->countModules('copyright')) : ?>
    156.                     <div id="rt-copyright">
    157.                         <div class="rt-container">
    158.                             <?php echo $gantry->displayModules('copyright','standard','standard'); ?>
    159.                             <div class="clear"></div>
    160.                         </div>
    161.                     </div>
    162.                     <?php /** End Copyright **/ endif; ?>
    163.                     <?php /** Begin Debug **/ if ($gantry->countModules('debug')) : ?>
    164.                     <div id="rt-debug">
    165.                         <div class="rt-container">
    166.                             <?php echo $gantry->displayModules('debug','standard','standard'); ?>
    167.                             <div class="clear"></div>
    168.                         </div>
    169.                     </div>
    170.                     <?php /** End Debug **/ endif; ?>
    171.                 </div>
    172.                 <?php /** End Footer Section **/ endif; ?>
    173.             </div>
    174.             <?php /** Begin Popups **/
    175.             echo $gantry->displayModules('popup','popup','popup');
    176.             echo $gantry->displayModules('login','login','popup');
    177.             /** End Popup s**/ ?>
    178.             <?php /** Begin Analytics **/ if ($gantry->countModules('analytics')) : ?>
    179.             <?php echo $gantry->displayModules('analytics','basic','basic'); ?>
    180.             <?php /** End Analytics **/ endif; ?>
    181.         </div>
    182.     </body>
    183. </html>
    184. <?php
    185. $gantry->finalize();
    186.  
    187. function controlsDisplay($positionStub){
    188.     global $gantry;
    189.    
    190.     $published = array();  
    191.     $showControls = false;
    192.     $positions = $gantry->getPositions($positionStub);
    193.    
    194.     foreach($positions as $position){
    195.         if ($gantry->countModules($position)) array_push($published, $position);
    196.     }
    197.    
    198.     foreach($published as $position){
    199.         if (!$showControls && $gantry->get('scrolling'.$positionStub.'-enabled') && $gantry->countSubPositionModules($position) > 1) $showControls = true;
    200.     }
    201.    
    202.     return $showControls;
    203.    
    204. }
    205.  
    206. ?>


    библиотеку положил в корень сайта в папку js (там лежит файл jquery.js)

    создал страницу в нее через html редактор написал код скрипта

    Код (CODE):
    1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    2. <html xmlns="http://www.w3.org/1999/xhtml">
    3. <head>
    4.     <title></title>
    5.     <style type="text/css">
    6.         body
    7.         {
    8.             font-family: Arial, Sans-Serif;
    9.             font-size: 13px;
    10.         }
    11.     #inputArea
    12.     {
    13.         font-family: Arial, Sans-Serif;
    14.         font-size: 13px;
    15.         background-color: #d6e5f4;
    16.         padding: 10px;
    17.         width:310px;
    18.     }
    19.     #inputArea input, #inputArea textarea
    20.     {
    21.         font-family: Arial, Sans-Serif;
    22.         font-size: 13px;
    23.         margin-bottom: 5px;
    24.         display: block;
    25.         padding: 4px;
    26.         width: 300px;
    27.     }
    28.  
    29.         .activeField
    30.         {
    31.             background-image: none;
    32.             background-color: #ffffff;
    33.             border: solid 1px #33677F;
    34.         }
    35.         .idle
    36.         {
    37.         border: solid 1px #85b1de;
    38.         background-image: url( 'gray_bg.png' );
    39.         background-repeat: repeat-x;
    40.         background-position: top;
    41.         background-color:#FFFFFF;
    42.         }
    43.     </style>
    44.     <script src="jquery.js" type="text/javascript"></script>
    45.     <script type="text/javascript">
    46.         $(document).ready(function(){
    47.         $("input, textarea").addClass("idle");
    48.             $("input, textarea").focus(function(){
    49.                 $(this).addClass("activeField").removeClass("idle");
    50.         }).blur(function(){
    51.                 $(this).removeClass("activeField").addClass("idle");
    52.         });
    53.         });
    54.     </script>
    55.  
    56. </head>
    57. <body>
    58.  
    59.     <div id="inputArea">
    60.        <form method="post" action="#">
    61.        
    62.        <label>Имя:</label><input type="text" />
    63.        
    64.         <label>E-mail:</label><input  type="text" />
    65.        
    66.         <label>Веб-сайт:</label><input type="text" />
    67.        
    68.         <label>Текст комментария:</label><textarea rows="4" cols="30"></textarea>
    69.        
    70.           <input type="submit" value="Отправить"></form>
    71.  
    72.         </div>
    73.        
    74.        
    75.      
    76. </body>
    77. </html>


    Вот что получается

    [​IMG]

    а должно получится (на голом HTML все работает как надо скрин ниже, а на Joomle не получается)

    [​IMG]


    Помогите пожалуйста, уже 2 день бьюсь
     
  2.  
  3. woojin
    Offline

    woojin Местный Команда форума => Cпециалист <=

    Регистрация:
    31.05.2009
    Сообщения:
    3 206
    Симпатии:
    334
    Пол:
    Мужской
    ну ты конечно крут создал непонятно где html файл а jquery спрятал в каталог js и пытаешься непонятно откуда подключить к своему html эту библиотеку

    в шаблоне библиотека jquery должна лежать в папке самого шаблона в js
    а её подключение производится вот так
    Код (PHP):
    1. <script language="JavaScript" src="<?php echo $this->baseurl ;?>/templates/<?php echo $this->template ;?>/js/jquery.js"></script>

    между тегами
    Код (html):
    1. <head></head>
    в любом месте
     
  4. Offline

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

    Регистрация:
    09.02.2011
    Сообщения:
    8
    Симпатии:
    0
    Пол:
    Мужской
    index.php шаблона

    Код (CODE):
    1. <?php
    2. /**
    3.  * @package Gantry Template Framework - RocketTheme
    4.  * @version 1.5.0 December 1, 2010
    5.  * @author RocketTheme http://www.rockettheme.com
    6.  * @copyright Copyright (C) 2007 - 2010 RocketTheme, LLC
    7.  * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 only
    8.  *
    9.  * Gantry uses the Joomla Framework (http://www.joomla.org), a GNU/GPLv2 content management system
    10.  *
    11.  */
    12. // no direct access
    13. defined( '_JEXEC' ) or die( 'Restricted index access' );
    14.  
    15. // load and inititialize gantry class
    16. require_once('lib/gantry/gantry.php');
    17. $gantry->init();
    18.  
    19. ?>
    20. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    21. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $gantry->language; ?>" lang="<?php echo $gantry->language;?>" >
    22. <head>
    23.  
    24. <script language="JavaScript" src="<?php echo $this->baseurl ;?>/templates/<?php echo $this->template ;?>/js/jquery.js"></script>
    25.  
    26.     <?php
    27.         $gantry->displayHead();
    28.         $gantry->addStyles(array('template.css','joomla.css','typography.css'));
    29.     ?>
    30. </head>
    31.     <body <?php echo $gantry->displayBodyTag(array('backgroundlevel','bodyLevel')); ?>>
    32.         <div id="rt-page-surround">
    33.             <?php /** Begin Drawer **/ if ($gantry->countModules('drawer')) : ?>
    34.             <div id="rt-drawer">
    35.                 <div class="rt-container">
    36.                     <?php echo $gantry->displayModules('drawer','standard','standard'); ?>
    37.                     <div class="clear"></div>
    38.                 </div>
    39.             </div>
    40.             <?php /** End Drawer **/ endif; ?>
    41.             <?php /** Begin Top **/ if ($gantry->countModules('top')) : ?>
    42.             <div id="rt-top">
    43.                 <div class="rt-container">
    44.                     <?php if (controlsDisplay('top')): ?>
    45.                     <div class="controls"><span class="down"></span><span class="up"></span></div>
    46.                     <?php endif; ?>
    47.                     <?php echo $gantry->displayModules('top','standard','scroller'); ?>
    48.                     <div class="clear"></div>
    49.                 </div>
    50.             </div>
    51.             <?php /** End Top **/ endif; ?>
    52.             <div id="rt-topbar"></div>
    53.             <div id="rt-page-background">
    54.                 <div id="rt-page-background2">
    55.                     <?php /** Begin Header **/ if ($gantry->countModules('header')) : ?>
    56.                     <div id="rt-header">
    57.                         <div class="rt-container">
    58.                             <?php echo $gantry->displayModules('header','standard','standard'); ?>
    59.                             <div class="clear"></div>
    60.                         </div>
    61.                     </div>
    62.                     <?php /** End Header **/ endif; ?>
    63.                     <div class="rt-container">
    64.                         <?php /** Begin Navigation **/ if ($gantry->countModules('navigation')) : ?>
    65.                         <div id="rt-navigation" class="<?php if ($gantry->get('menu-centering')) : ?>centered<?php endif; ?>"><div id="rt-navigation2"><div id="rt-navigation3">
    66.                             <?php echo $gantry->displayModules('navigation','basic','basic'); ?>
    67.                             <div class="clear"></div>
    68.                         </div></div></div>
    69.                         <?php /** End Navigation **/ endif; ?>
    70.                         <?php /** Begin Sub Navigation **/ if ($gantry->countModules('subnavigation')) : ?>
    71.                         <div id="rt-subnavigation" class="<?php if ($gantry->get('menu-centering')) : ?>centered<?php endif; ?>">
    72.                             <?php echo $gantry->displayModules('subnavigation','basic','basic'); ?>
    73.                             <div class="clear"></div>
    74.                         </div>
    75.                         <?php /** End Sub Navigation **/ endif; ?>
    76.                         <?php /** Begin Utility **/ if ($gantry->countModules('utility')) : ?>
    77.                         <div id="rt-utility">
    78.                             <?php echo $gantry->displayModules('utility','standard','standard'); ?>
    79.                             <div class="clear"></div>
    80.                         </div>
    81.                         <?php /** End Utility **/ endif; ?>
    82.                         <?php /** Begin Showcase **/ if ($gantry->countModules('showcase')) : ?>
    83.                         <div class="rt-section-div"></div>
    84.                         <div id="rt-showcase">
    85.                             <?php if (controlsDisplay('showcase')): ?>
    86.                             <div class="controls"><span class="down"></span><span class="up"></span></div>
    87.                             <?php endif; ?>
    88.                             <?php echo $gantry->displayModules('showcase','standard','scroller'); ?>
    89.                             <div class="clear"></div>
    90.                         </div>
    91.                         <?php /** End Showcase **/ endif; ?>
    92.                         <?php if ($gantry->countModules('showcase') and $gantry->countModules('feature')) : ?>
    93.                         <div class="rt-showfeature-div"></div>
    94.                         <?php endif; ?>
    95.                         <?php /** Begin Feature **/ if ($gantry->countModules('feature')) : ?>
    96.                         <div id="rt-feature">
    97.                             <?php if (controlsDisplay('feature')): ?>
    98.                             <div class="controls"><span class="down"></span><span class="up"></span></div>
    99.                             <?php endif; ?>
    100.                             <?php echo $gantry->displayModules('feature','standard','scroller'); ?>
    101.                             <div class="clear"></div>
    102.                         </div>
    103.                         <?php /** End Feature **/ endif; ?>
    104.                         <div id="rt-body-background">
    105.                             <div id="rt-body-overlay">
    106.                                 <?php /** Begin Main Top **/ if ($gantry->countModules('maintop')) : ?>
    107.                                 <div id="rt-maintop">
    108.                                     <?php echo $gantry->displayModules('maintop','standard','standard'); ?>
    109.                                     <div class="clear"></div>
    110.                                 </div>
    111.                                 <?php /** End Main Top **/ endif; ?>
    112.                                 <?php /** Begin Breadcrumbs **/ if ($gantry->countModules('breadcrumb')) : ?>
    113.                                 <div id="rt-breadcrumbs">
    114.                                     <?php echo $gantry->displayModules('breadcrumb','basic','breadcrumbs'); ?>
    115.                                     <div class="clear"></div>
    116.                                 </div>
    117.                                 <?php /** End Breadcrumbs **/ endif; ?>
    118.                                 <?php /** Begin Main Body **/ ?>
    119.                                 <?php echo $gantry->displayOrderedMainbody('mainbody','sidebar','standard','standard','standard','standard','standard'); ?>
    120.                                 <?php /** End Main Body **/ ?>
    121.                                 <?php /** Begin Main Bottom **/ if ($gantry->countModules('mainbottom')) : ?>
    122.                                 <div id="rt-mainbottom">
    123.                                     <?php echo $gantry->displayModules('mainbottom','standard','standard'); ?>
    124.                                     <div class="clear"></div>
    125.                                 </div>
    126.                                 <?php /** End Main Bottom **/ endif; ?>
    127.                             </div>
    128.                         </div>
    129.                         <?php /** Begin Bottom **/ if ($gantry->countModules('bottom')) : ?>
    130.                         <div id="rt-bottom">
    131.                             <?php if (controlsDisplay('bottom')): ?>
    132.                             <div class="controls"><span class="down"></span><span class="up"></span></div>
    133.                             <?php endif; ?>
    134.                             <?php echo $gantry->displayModules('bottom','standard','scroller'); ?>
    135.                             <div class="clear"></div>
    136.                         </div>
    137.                         <?php /** End Bottom **/ endif; ?>
    138.                     </div>
    139.                 </div>
    140.                 <?php /** Begin Footer Section **/ if ($gantry->countModules('footer') or $gantry->countModules('copyright') or $gantry->countModules('debug')) : ?>
    141.  
    142.                 <div id="rt-footer-surround">
    143.                     <?php /** Begin Footer **/ if ($gantry->countModules('footer')) : ?>
    144.                     <div class="rt-container">
    145.                         <div id="rt-footer">
    146.                             <div class="rt-section-surround">
    147.                                 <div class="rt-row-surround">
    148.                                     <?php echo $gantry->displayModules('footer','standard','standard'); ?>
    149.                                     <div class="clear"></div>
    150.                                 </div>
    151.                             </div>
    152.                         </div>
    153.                     </div>
    154.                     <?php /** End Footer **/ endif; ?>
    155.                     <?php /** Begin Copyright **/ if ($gantry->countModules('copyright')) : ?>
    156.                     <div id="rt-copyright">
    157.                         <div class="rt-container">
    158.                             <?php echo $gantry->displayModules('copyright','standard','standard'); ?>
    159.                             <div class="clear"></div>
    160.                         </div>
    161.                     </div>
    162.                     <?php /** End Copyright **/ endif; ?>
    163.                     <?php /** Begin Debug **/ if ($gantry->countModules('debug')) : ?>
    164.                     <div id="rt-debug">
    165.                         <div class="rt-container">
    166.                             <?php echo $gantry->displayModules('debug','standard','standard'); ?>
    167.                             <div class="clear"></div>
    168.                         </div>
    169.                     </div>
    170.                     <?php /** End Debug **/ endif; ?>
    171.                 </div>
    172.                 <?php /** End Footer Section **/ endif; ?>
    173.             </div>
    174.             <?php /** Begin Popups **/
    175.             echo $gantry->displayModules('popup','popup','popup');
    176.             echo $gantry->displayModules('login','login','popup');
    177.             /** End Popup s**/ ?>
    178.             <?php /** Begin Analytics **/ if ($gantry->countModules('analytics')) : ?>
    179.             <?php echo $gantry->displayModules('analytics','basic','basic'); ?>
    180.             <?php /** End Analytics **/ endif; ?>
    181.         </div>
    182.     </body>
    183. </html>
    184. <?php
    185. $gantry->finalize();
    186.  
    187. function controlsDisplay($positionStub){
    188.     global $gantry;
    189.    
    190.     $published = array();  
    191.     $showControls = false;
    192.     $positions = $gantry->getPositions($positionStub);
    193.    
    194.     foreach($positions as $position){
    195.         if ($gantry->countModules($position)) array_push($published, $position);
    196.     }
    197.    
    198.     foreach($published as $position){
    199.         if (!$showControls && $gantry->get('scrolling'.$positionStub.'-enabled') && $gantry->countSubPositionModules($position) > 1) $showControls = true;
    200.     }
    201.    
    202.     return $showControls;
    203.    
    204. }
    205.  
    206. ?>


    HTML страницы

    Код (CODE):
    1. <ul>
    2. <li><strong>Антон</strong></li>
    3. </ul>
    4. <p><strong> </strong></p>
    5. <p><span style="text-decoration: underline;"><img src="images/stories/icq.png" border="0" title="ICQ" /></span> <span style="text-decoration: underline;">123456</span></p>
    6. <p><strong><img src="images/stories/skype.png" border="0" title="Skype" /> </strong><span style="text-decoration: underline;">Name 1</span></p>
    7. <p><a href="mailto:info@domen.ru">info@domen.ru</a></p>
    8. <p><span style="text-decoration: underline;">+7 495 425-95-96</span></p>
    9. <ul>
    10. <li><strong>Александр</strong></li>
    11. </ul>
    12. <p><strong> </strong></p>
    13. <p><img src="images/stories/icq.png" border="0" title="ICQ" /> <span style="text-decoration: underline;">123456</span></p>
    14. <p><a href="mailto:info@domen.ru">info@domen.ru</a></p>
    15. <p><span style="text-decoration: underline;">+7 495 569-95-96 </span></p>
    16. <!--         body         {             font-family: Arial, Sans-Serif;             font-size: 13px;         }  #inputArea  {       font-family: Arial, Sans-Serif;         font-size: 13px;        background-color: #d6e5f4;      padding: 10px;      width:310px;    }   #inputArea input, #inputArea textarea   {       font-family: Arial, Sans-Serif;         font-size: 13px;        margin-bottom: 5px;         display: block;         padding: 4px;       width: 300px;   }          .activeField         {             background-image: none;             background-color: #ffffff;             border: solid 1px #33677F;         }         .idle         {       border: solid 1px #85b1de;      background-image: url( 'gray_bg.png' );         background-repeat: repeat-x;        background-position: top;       background-color:#FFFFFF;         }      -->
    17. <script src="jquery.js" type="text/javascript"></script>
    18. <script type="text/javascript">// <![CDATA[
    19.         $(document).ready(function(){
    20.         $("input, textarea").addClass("idle");
    21.             $("input, textarea").focus(function(){
    22.                 $(this).addClass("activeField").removeClass("idle");
    23.         }).blur(function(){
    24.                 $(this).removeClass("activeField").addClass("idle");
    25.         });
    26.         });
    27. // ]]></script>
    28. <div id="inputArea"><form action="#" method="post"> <label>Имя:</label><input type="text" /> <label>E-mail:</label><input type="text" /> <label>Веб-сайт:</label><input type="text" /> <label>Текст комментария:</label><textarea cols="30" rows="4"></textarea> <input type="submit" value="Отправить" /></form></div>


    Все равно форма обратной связи отображается как на первом скрине. А нужно как на 2-ом. Папку js в папке шаблона создал в нее кинул файл jquery.js
    В чем ошибка?
     
  5. Offline

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

    Регистрация:
    09.02.2011
    Сообщения:
    8
    Симпатии:
    0
    Пол:
    Мужской
    woojin, все получилось. Спасибо. Это я ступил просто =)
     
  6. woojin
    Offline

    woojin Местный Команда форума => Cпециалист <=

    Регистрация:
    31.05.2009
    Сообщения:
    3 206
    Симпатии:
    334
    Пол:
    Мужской
    читай подпись!!!!

    сколько можно носом тыкать?
     

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

Загрузка...