Jump to content
View in the app

A better way to browse. Learn more.

IPBMafia.ru - поддержка Invision Community, релизы, темы, плагины и приложения

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Выпадающее меню и подкатегории на IP.Content

Featured Replies

Posted

Всем привет! Я опять к Вам за помощью!

 

Ребят, дело такое. 

 

Есть категории

 

Статьи

База знаний

 

 

В категории "База знаний" есть под категория - "Рыбки" и еще одна под категория "Барбусы" в этим самых "Рыбках".

 

Проблема в том, что при наведении курсора на "Рыбки" не выпадает список под категорий этой под категории и при нажатии на странице не отображается список под категорий.

 

Как быть? Где править?

 

Спасибо!

 


К слову пункт

 

 

 

Показать список статей в этой категории? ДаНет
Если 'нет', в этой категории будут отображены только подкатегории. Если 'да', в этой категории будут отображены подкатегории и статьи.

Отключен

  • Author

post-12899-0-10331800-1402838039.jpgpost-12899-0-32775100-1402838039_thumb.j

 

Наводим курсором на "базу знаний", выпадают подкатегории, а когда курсором наводишь на "рыбы", другие подкатегории не выпадают.

Стоит IP.Content v2.3.6 и хук (CSN-IPB34) jQuery v1.1.0 b и было сделано такое:

 

В блоке ищем: Articles Menu

 

 

<div id='category_list' class='general_box clearfix'>
    <h3>{$this->lang->words['ab__categories']} <a href='{$this->_database_url}?view=categories'>{$this->lang->words['ab__seealllink']}</a></h3>
    <ul>
        <if test="is_array( $this->_categories ) && count( $this->_categories )">
           
<foreach loop="$this->_categories[0] as $r">
               
<li>
                    <a href='{$this->registry->ccsFunctions->returnDatabaseUrl( $r['category_database_id'], $r['category_id'] )}'>{$r['category_name']}</a>
                    <if test="count( $this->_categories[ $r['category_id'] ] )">
                       
<ul>
                            <foreach loop="$this->_categories[ $r['category_id'] ] as $sub">
                               
<li>
                                    <a href='{$this->registry->ccsFunctions->returnDatabaseUrl( $sub['category_database_id'], $sub['category_id'] )}'>{$sub['category_name']}</a>
                                </li>
                            </foreach>
                        </ul>
                    </if>
                </li>
            </foreach>
        </if>
    </ul>
</div>

 

Заменяем:

 

 

 

<div id='category_list' class='general_box clearfix'>
    <h3>{$this->lang->words['ab__categories']} <a href='{$this->_database_url}?view=categories'>{$this->lang->words['ab__seealllink']}</a></h3>
    <ul class="menu">
        <if test="is_array( $this->_categories ) && count( $this->_categories )">
           
<foreach loop="$this->_categories[0] as $r">
               
<li>
                    <a href='{$this->registry->ccsFunctions->returnDatabaseUrl( $r['category_database_id'], $r['category_id'] )}'>{$r['category_name']}</a>
                    <if test="count( $this->_categories[ $r['category_id'] ] )">
                       
<ul class="subnav"> <foreach loop="$this->_categories[ $r['category_id'] ] as $sub">
                   
<li>
                                    <a href='{$this->registry->ccsFunctions->returnDatabaseUrl( $sub['category_database_id'], $sub['category_id'] )}'><img src='{style_images_url}/bullet.png' alt='&gt;' />{$sub['category_name']}</a>
                                </li>
                            </foreach>
                        </ul>
                    </if>
                </li>
            </foreach>
        </if>
    </ul>
</div>

 

Внейшний вид: globalTemplate

 

 

 

<script type='text/javascript'>

 

Вставляем перед: Но не забудьте изменить ссылку на путь к JS "Ваш сайт"

 

 

 

<script type="text/javascript" src="__ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script>!window.jQuery && document.write('<script src="__Ваш сайт/js/jquery-1.4.2.min.js"></script>')</script>
<script type="text/javascript">
jQuery.noConflict();
jQuery(document).ready(function($){
$(document).ready(function(){
     $("ul.menu li a").mouseover(function() {          
        $
(this).parent().find("ul.subnav").slideDown('fast').show();
        $(this).parent().hover(function() {
        }, function(){    
            $
(this).parent().find("ul.subnav").slideUp('slow');
        });
        });
   });

});
</script>

 

В ipb_styles.css добавляем

 

 

 

ul.menu li {
    position: relative;
}

ul.menu li ul.subnav {
    display: none;
   
}
 
 

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Ответить в этой теме...

Последние посетители 0

  • No registered users viewing this page.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.