Files

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

The module consists of two parts, file categories and files.

Module "Files" can be attached to the various pages of the site. If the module is attached to a few pages in the administrative part of the module there is a special filter "section of the website" with the possibility of filtering the output (a list of files, categories and settings) as belonging to the page.

Files

List of files

The display order of the files can be changed using the mouse, simply by dragging them. If connected categories of files, the files can be sorted only within the category (in the filter "Category" to select the category of file).

Edit of file

Files have the following characteristics.

Categories

List of categories

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

When deleting a category will delete all sub-categories and files.

Edit of category

Categories have the following characteristics.

Statistics

Statistics

Settings

Settings

Template tags

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

show_block – выводит несколько файлов из файлового архива.

Атрибуты:

count – number of displayed files (by default 3);

site_id – pages to which the module is attached. Page identifiers are enumerated comma-separated. You can indicate negative value, then the files from the indicated section will be excluded. By default all pages are selected;

cat_id – categories of files, if "Use categories" is checked in the module settings. Category identifiers are enumerated comma-separated. You can indicate negative value, then the files from the indicated category will be excluded. You can indicate current value, then the files from the current (opened) category or all categories, if neither of them is opened, will be shown. You can indicate current value, then the files from the current (opened) category or all categories, if neither of them is opened, will be shown. By default the category is not taken into account, all files are shown.;

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

images – number of images attached to the piece of files;

images_variation – image size tag, set in module settings;

only_module – show the block only on the page to which "Files" module is attached: true – show the block only on the module page, by default the block will be shown on all pages;

tag – tag attached to the files;

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/files/views/files.view.show_block_template.php; default - file modules/files/views/files.view.show_block.php).

Example:

<insert name="show_block" module="files">

выведет 3 последние файла из файлового архива

В шаблоне тега можно получить значение любого атрибута через переменную $result["attributes"]["название атрибута"].

show_block_rel – shows similar files on the page of the file. By default the connection between files are one-sided, this can be changed by checking the option "Link back to parent in the block of similar files" in module settings.

Атрибуты:

count – number of displayed files (by default 3);

images – number of images attached to the piece of files;

images_variation – image size tag, set in 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/files/views/files.view.show_block_rel_template.php; default - file modules/files/views/files.view.show_block_rel.php).

Example:

<insert name="show_block_rel" module="files">

выведет 3 файла, прикрепленные к текущему файлу

В шаблоне тега можно получить значение любого атрибута через переменную $result["attributes"]["название атрибута"].

Database

{files} – Файлы в файловом архиве

{files_category} – Категории файлового архива

{files_category_parents} – Parents relations of категорий файлового архива

{files_category_rel} – Связи файлов и категорий в файловом архиве

{files_counter} – View counter of files

{files_links} – Внешние ссылки на файлы для файлового архива

{files_rel} – Связи похожих файлов

Files

The module is located in the folder modules/files and arranged classically.

  1. modules/files/admin/files.admin.php – Редактирование файлов в файловом архиве;

  2. modules/files/admin/files.admin.category.php – Editing files categories;

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

  4. modules/files/admin/files.admin.counter.php – Viewings statistics;

  5. modules/files/admin/files.admin.menu.php – Map of links for "Menu on the website" module;

  6. modules/files/admin/js/files.admin.js – Редактирование файлов, JS-сценарий;

  7. modules/files/files.php – Controller;

  8. modules/files/files.install.php – Module installation;

  9. modules/files/files.model.php – Model;

  10. modules/files/files.search.php – Settings for search indexing for "Search" module;

  11. modules/files/files.sitemap.php – Map of links for "Site map" module;

  12. modules/files/views/files.view.first_page.php – Template of the first page of the module, if the settings module checked "Use category";

  13. modules/files/views/files.view.id.php – Template of file page;

  14. modules/files/views/files.view.list.php – Template of files list;

  15. modules/files/views/files.view.rows.php – Шаблон вывода списка файлов;

  16. modules/files/views/files.view.rows_block.php – Шаблон блока файлов;

  17. modules/files/views/files.view.rows_block_rel.php – Шаблон блока похожих файлов;

  18. modules/files/views/files.view.rows_first_page.php – Шаблон вывода списка файлов;

  19. modules/files/views/files.view.show_block.php – Template of files block;

  20. modules/files/views/files.view.show_block_rel.php – Template of similar files block.