Banners

The module "Banners" displays the banners on this site.

Module refers to the part of the CMS "Content" and can be installed optionally.

Banners

List of banners

Edit of banner

Banners have the following characteristics.

Основные:

  • Banner ID – Element number in a DB (for web master and programmer).
  • Published – The parameter has different values for different language versions of the site.
  • Name – The parameter has different values for different language versions of the site.
  • Banner type – Image, flash, HTML.
  • Link – In a full format http://www.site.ru/. The parameter has different values for different language versions of the site.
  • Open in new window – Link to a banner will be opened in a new window
  • Description – The parameter has different values for different language versions of the site.
  • Date – To be entered in a format dd.mm.year hh:mm. If the specified date if later than the current one, the banner will start to be displayed on site starting from the set date.
  • Views in total – Statistics of views.
  • Clicks in total – Statistics of clicks.
  • Display period – Time for banner showing.
  • Limit quantity of views – To show until countdown
  • Remaining views – Set a counter of times a banner should be shown. Number in this field will decrease with each display till 0 (or an empty field).
  • Limit shows on clicks – To show until countdown
  • Remaining clicks – Set a counter, specifying quantity of clicks in which the banner shall be hidden. Number in this field will decrease with each display till 0 (or an empty field).
  • Limit quantity of views to the user per day – Limit view banner to the user.
  • Quantity of views to the user per day – How many time banner should be shown to one user (counter remains in session). This parameter appears if the option marked "Limit quantity of views to the user per day".
  • Site section – Section for publish banner.
  • Category.
  • Sorting: set before – Sorting banners in the list. Field can be edited only for the published banners.

Categories

List of categories

Banners can have an unlimited number of categories. If necessary, the category can not be used. To do this, disable the "Use category" in the module settings.

Edit of category

Categories have the following characteristics.

Основные:

  • ID – Element number in a DB (for web master and programmer).
  • Name.
  • Published.
  • Sorting: set before – Sorting of categories in the list. Field can be edited only for the categories displayed on a site.

Settings

  • Enable categories – Allows to enable/disable categories of banners.

Settings

Template tags

Для работы с модулем «Banners» служат следующие шаблонные теги:

show_block – shows banners.

Атрибуты:

count – number of displayed banners (by default 1). Значение all выведет все баннеры;

id – идентификатор баннера, если задан, атрибут count игнорируется;

sort – sorting banners: by default as on the module page, date – by date, rand – randomly;

cat_id – categories of banners, if "Use categories" is checked in the module settings.;

defer – deferred load tag template tag: event – load content only at the request of the user when you click "Upload", emergence – load content only when the client window appears in the browser window, async – asynchronous (simultaneous) content loading together with the content of template tags with the same marker, sync – synchronous (sequential) load of content in conjunction with the content of template tags with the same marker, by default, downloading content only at the request of the user;

defer_title – text string displayed at the point where the loadable content appears with the help of delayed loading of the template tag;

template – tag template (file modules/bs/views/bs.view.show_block_template.php; default - file modules/bs/views/bs.view.show_block.php).

Example:

<insert name="show_block" module="bs" sort="rand">

выведет 1 случайный баннер

Database

{bs} – Banners

{bs_category} – Категории баннеров

{bs_site_rel} – Данные о том, на каких страницах сайта выводятся баннеры

Files

  1. modules/bs/admin/bs.admin.php – Редактирование баннеров;

  2. modules/bs/admin/bs.admin.category.php – Editing banners categories;

  3. modules/bs/admin/bs.admin.config.php – Module settings;

  4. modules/bs/admin/js/bs.admin.edit.js – Редактирование баннеров, JS-сценарий;

  5. modules/bs/bs.php – Controller;

  6. modules/bs/bs.action.php – Обработка запроса при клике на ссылку баннера;

  7. modules/bs/bs.install.php – Module installation;

  8. modules/bs/bs.model.php – Model;

  9. modules/bs/js/bs.show_block.js – JS-сценарий обработки клика по баннеру;

  10. modules/bs/views/bs.view.show_block.php – Шаблон блока баннеров;

  11. modules/bs/views/bs.view.show_block_slider.php – Шаблон блока баннеров.