Авторизация
 Регистрация   Войти   Забыли пароль? 

Как сделать БОКОВАЯ ПАНЕЛЬ БАННЕРОВ в PHP-Fusion?

Обновлённый PHP-Fusion Bogatyr / Free CMS PHP-Fusion 7 Bogatyr / Как вставить код счётчика, баннера в PHP-Fusion / Как сделать БОКОВАЯ ПАНЕЛЬ БАННЕРОВ в PHP-Fusion?


 Russian

Логотип и два баннера можно легко обновлять в админке cms PHP-Fusion.

В файле  /includes/theme_functions_include.php - строки 64-80 есть функция showbanners()
По умолчанию она выводит логотип (sitebanner) и два баннера (sitebanner1, sitebanner2) в шапке сайта.
Но обычно в дизайнах сайтов она отключается. Обычно баннеры и логотип размещаются в разных частях сайта.

How to make a SIDE PANEL BANNER in PHP-Fusion?

Обновлённый PHP-Fusion Bogatyr / Free CMS PHP-Fusion 7 Bogatyr / Как вставить код счётчика, баннера в PHP-Fusion / How to make a SIDE PANEL BANNER in PHP-Fusion?


 English

The logo and two banners can be easily updated in the admin cms PHP-Fusion.

In the /includes/theme_functions_include.php file - lines 64-80 there is a function showbanners ()
By default, it displays the logo (sitebanner) and two banners (sitebanner1, sitebanner2) in the header of the site.
But usually in website designs it is turned off. Usually banners and logo are placed in different parts of the site.

PHP

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 20

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 21

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\search_bbcode_include.php on line 39

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 20

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 21

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\search_bbcode_include.php on line 39

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 20

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 21

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\search_bbcode_include.php on line 39

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 20

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 21

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\search_bbcode_include.php on line 39

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 20

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\mail_bbcode_include.php on line 21

Warning: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead in F:\OpenServer\domains\php-fusion.vveb.ws\includes\bbcodes\search_bbcode_include.php on line 39
PHP
  1. function showbanners() {
  2.     global $settings;
  3.     ob_start();
  4.     if ($settings['sitebanner2']) {
  5.         eval("?><div style='float: right;'>".stripslashes($settings['sitebanner2'])."</div>\n<?php ");
  6.     }
  7.     if ($settings['sitebanner1']) {
  8.         eval("?>".stripslashes($settings['sitebanner1'])."\n<?php ");
  9.     } elseif ($settings['sitebanner']) {
  10.         echo "<a href='".$settings['siteurl']."'><img src='".BASEDIR.$settings['sitebanner']."' alt='".$settings['sitename']."' style='border: 0;' /></a>\n";
  11.     } else {
  12.         echo "<a href='".$settings['siteurl']."'>".$settings['sitename']."</a>\n";
  13.     }   
  14.     $output = ob_get_contents();
  15.     ob_end_clean();
  16.     return $output;
  17. }



RU: Вставь код баннера PHP-Fusion sitebanner2 в любом желаемом месте /themes/Gillette/theme.php (например, в футер)
EN: Insert the PHP-Fusion sitebanner2 banner code in any desired location /themes/Gillette/theme.php (for example, in the footer)
PHP
  1. // нашёл в includes/theme_functions_include.php
  2.     if ($settings['sitebanner2']) {
  3.         eval("?>".stripslashes($settings['sitebanner2'])."\n<?php ");
  4.     }


RU: Код панели в админке по умолчанию
EN: Panel code in the default admin panel
PHP
  1. <?php
  2. openside("name");
  3.   echo "content";
  4. closeside();
  5. ?>


RU: Создай новую панель в админке mybanner_panel и вставь туда код панели вместо кода по умолчанию
EN: Create a new panel in the mybanner_panel admin panel and insert the panel code there instead of the default code
PHP
  1. if ($settings['sitebanner1']) {
  2.   eval("?>".stripslashes($settings['sitebanner1'])."\n<?php ");
  3. }


RU: или вот тот же баннер с рамкой панели
EN: or here is the same banner with the panel frame
PHP
  1. if ($settings['sitebanner1']) {
  2. openside("Наша реклама");
  3.   eval("?>".stripslashes($settings['sitebanner1'])."\n<?php ");
  4. closeside();
  5. }

RU: Панель будет видна только в том случае, если в админке загружен код баннера.
EN: The panel will be visible only if the banner code is loaded in the admin panel.
Добавить комментарий

Добавить комментарий
Пожалуйста, залогиньтесь для добавления комментария.
Рейтинги
HTML-code and BB-code for blogs and forums

<a href="https://php-fusion.vveb.ws/php-fusion.php?id=66">Как сделать БОКОВАЯ ПАНЕЛЬ БАННЕРОВ в PHP-Fusion?</a>


[url=https://php-fusion.vveb.ws/php-fusion.php?id=66]Как сделать БОКОВАЯ ПАНЕЛЬ БАННЕРОВ в PHP-Fusion?[/url]

Language: Default
 
Код для PHP-Fusion