Правый sidebar

Started by Sprinx on 2012-05-05 15:19 — 25 replies, 4579 views

#1
Не подскажете как вывести ланг в правый sidebar?
#2
так же как и в tpl
#3
У меня tpl и есть.
Пробовал по аналогии как с page_header.tpl.Не получилось.😳
#4
Это делается в паге_фотере.тпл
#5
открыть config.php
найти
 
Код:
$bb_cfg['sidebar1_static_content_path'] = BB_PATH .'/misc/html/sidebar1.html';      #
ниже вставить
 
Код:
$bb_cfg['sidebar3_static_content_path'] = BB_PATH .'/templates/default/sidebar3.tpl';      #
найти
 
Код:
$page_cfg['show_sidebar2'] = array(
#  BB_SCRIPT => true
  'index' => false,
);
ниже вставить
 
Код:
$page_cfg['show_sidebar3'] = array(
#  BB_SCRIPT => true
  'index' => true,
);
открыть \includes\page_header.php
найти
 
Код:
  'SHOW_SIDEBAR2'      => (!empty($page_cfg['show_sidebar2'][BB_SCRIPT]) || $bb_cfg['show_sidebar2_on_every_page']),
ниже вставить
 
Код:
  'SHOW_SIDEBAR3'      => (!empty($page_cfg['show_sidebar3'][BB_SCRIPT])),
открыть \templates\default\index.tpl
найти
 
Код:
<div id="forums_top_nav">
  <h1 class="pagetitle"><a href="{U_INDEX}">{T_INDEX}</a></h1>
</div><!--/forums_top_nav-->
ниже вставить
 
Код:
<table cellspacing="0" cellpadding="0" width="100%">
<tr>
<td class="vTop">
найти
 
Код:
<!--bottom_info-->
<div class="bottom_info">
 
  <div id="timezone">
    <p>{LAST_VISIT_DATE}</p>
    <p>{CURRENT_TIME}</p>
    <p>{S_TIMEZONE}</p>
  </div>
  <div class="clear"></div>
ниже вставить
 
Код:
</td>
  <!-- IF SHOW_SIDEBAR3 -->
    <!--sidebar3-->
    <td id="sidebar3">
    <div id="sidebar3_wrap">
      <?php if (!empty($bb_cfg['sidebar3_static_content_path'])) include($bb_cfg['sidebar3_static_content_path']); ?>
      <img width="210" class="spacer" src="{SPACER}" alt="" />
    </div><!--/sidebar3_wrap-->
    </td><!--/sidebar3-->
  <!-- ENDIF -->
</tr></table>
открыть templates\default\css\main.css
найти
 
Код:
      #sidebar2 {
        padding: 0 3px 0 6px; vertical-align: top;
        width: 240px;
      }
ниже вставить
 
Код:
#sidebar3 {}
найти ниже
 
Код:
#sidebar2-wrap {}
ниже вставить
 
Код:
#sidebar3-wrap { margin-top: -8px; width: 180px;  }
найти
 
Код:
  #sidebar1 li { margin-bottom: 2px; margin-left: 14px; }
  #sidebar1 a  { text-decoration: none; color: #005A88; }
ниже вставить
 
Код:
#sidebar3 {
  margin-top: -8px; width: 180px; padding: 6px 6px 0 3px; vertical-align: top;
  }
  #sidebar3 h3 {
    padding: 0 0 4px 0; margin: 8px 0 2px 0;
    color: #333333; text-indent: 0.5em;
    background: transparent url(../images/hr200_ltr_gradient.jpg) no-repeat left bottom;
  }
    #sidebar3 h3 a { color: #333333; }
    #sidebar3 h5 { padding: 2px 4px 5px; }
    #sidebar3 ul { margin: 6px 0 0 10px; }
    #sidebar3 li { margin-bottom: 2px; margin-left: 14px; }
    #sidebar3 a  { text-decoration: none; color: #005A88; }

Вот как подключал.
#6
Что ни кто незнает как вывести ланг в tpl?
#7
Vitalychez_, ты реально нахомутал с правым сайдбаром 😀
В config.php
$page_cfg['show_sidebar2'] = array(
# BB_SCRIPT => true
'index' => true,
);
Открывай page_footer.tpl
находишь
<!--sidebar2-->
и после вставляй что тебе нужно.
#8
Спасибо.Но там чють по другому.
$page_cfg['show_sidebar2'] = array(# BB_SCRIPT => true'index' => false,
);

Меняем 'index' => false, на 'index' => true,

Идем в misc/html. И ищем sidebar2.html
Туда и вписываем нужный код оформления.🙂
#9
Спасибо.Но там чють по другому.
$page_cfg['show_sidebar2'] = array(# BB_SCRIPT => true'index' => false,
);

Меняем 'index' => false, на 'index' => true,

Идем в misc/html. И ищем sidebar2.html
Туда и вписываем нужный код оформления.🙂
Я знаю что пишу )
А в sidebar2.html можно вставлять только статику, но никак не переменные.
Вот туда ты и не выведешь ланги и всё остальное))
#10
Находим </div><!--/sidebar2_wrap-->

Выше вставить <!-- INCLUDE sidebar3.tpl -->

Теперь и переменные есть🙂