Official marketplace page:
https://abuyfile.com/ru/market/cotonti/plugs/cot-plug-db-view-structure
link to the combined export file that was imported into Google Docs
DB Structure Viewer is an administrative plugin for CMF Cotonti Siena (version 0.9.26 and above) that lets you browse the database structure, export tables in several formats, and perform combined data export from multiple related tables into a single CSV file with flexible JOIN settings and image aggregation.
The plugin is aimed at administrators, developers, and QA engineers who need quick access to data and DB structure directly from the Cotonti control panel.
- System administrators – quickly check the DB structure without phpMyAdmin or SSH.
- Developers – documentation, migration preparation, debugging.
- QA engineers – obtain data samples for testing.
- Site owners – export products, users, and other content for external services (marketplaces, analytics).
- List of all Cotonti tables (without prefix).
- For each table: columns, types, NULL, keys, default values, extra attributes.
- View the first 10 rows or a specific row by ID.
- Select one or more tables.
- Formats: JSON, SQL, CSV, PHP Array.
- Three modes: structure only, structure + 10 rows, all rows.
- Save to server and/or send to browser.
- Optional ZIP compression.
- Base table defines the rows of the resulting CSV.
- Dynamically add columns specifying:
- column header,
- source table,
- field,
- (optional) aggregation type for images.
- Automatic JOIN detection between tables or manual selection of the join field.
- Special aggregations for the
attachertable:- First image (MIN) – the earliest uploaded file,
- Rest images (comma separated) – all subsequent files.
- Automatic conversion of relative image paths to absolute URLs.
- Form settings are saved in the browser’s localStorage, so they survive page reloads.
- All export operations are recorded in the
cot_dbviewstructure_logstable. - View logs with pagination and download links.
- «Clear all logs» button to wipe the entire history.
- Checks whether the exported file still exists on the server; if it has been deleted, a warning is displayed.
- Download the archive from GitHub or grab the latest version from the marketplace.
- Unpack and upload the
dbviewstructurefolder to your site’spluginsdirectory. - In the admin panel go to Extensions → dbviewstructure → Install.
- Configure the plugin (click «Configuration»):
export_path– folder for saving files (defaultplugins/dbviewstructure/export/).log_enabled– enable logging (recommended).export_to_browser– also send the file to the browser.max_rows_per_page– number of log entries per page.pack_to_zip– pack files into ZIP.
In the admin panel: Tools → DB Structure Viewer. Four tabs are available.
- Tables & Fields – summary list with basic info.
- View rows – select a table and optionally an ID to filter.
- Select tables (checkboxes).
- Choose format (SQL, CSV, JSON, PHP Array).
- Data mode: structure / 10 rows / all rows.
- Click «Export».
- Select the base table.
- Add columns:
- enter the header,
- pick a table,
- wait for fields to load,
- choose a field,
- (optional) set image aggregation,
- if needed, switch JOIN to manual and pick the join field.
- Buttons «+ Add column», «Clear fields».
- Click «Export» — generates CSV and, if configured, ZIP.
- Table with export history.
- For each log: ID, filename, format, number of tables, data included, date.
- If the file exists – download link; otherwise red text «File missing from server».
- «Clear all logs» button.
- Export tab → check the desired tables.
- Choose SQL format, mode «Structure only».
- Click «Export».
- Combined CSV tab.
- Base table:
market. - Add columns:
- «SKU», table
market, fieldfieldmrkt_pcod. - «Title», table
market, fieldfieldmrkt_title. - «Main photo», table
attacher, fieldatt_path, aggregation «First image (MIN)». - «Additional photos», table
attacher, fieldatt_path, aggregation «Rest images (comma separated)».
- «SKU», table
- Click «Export».
- Base table
market. - For columns from the table
i18n4marketpro_pages:- table
i18n4marketpro_pages, - field, e.g.
ipage_title, - if auto‑JOIN fails, switch to «JOIN: manual» and select
ipage_id.
- table
- Other columns – similar.
plugins/dbviewstructure/
├── dbviewstructure.setup.php
├── dbviewstructure.tools.php
├── dbviewstructure.ajax.php
├── inc/
│ └── dbviewstructure.functions.php
├── tpl/
│ └── dbviewstructure.tools.tpl
├── export/
├── logs/
├── lang/
│ └── dbviewstructure.ru.lang.php
└── setup/
├── dbviewstructure.install.sql
└── dbviewstructure.uninstall.sql
dbviewstructure.tools.php– controller: processes requests, manages tabs.dbviewstructure.ajax.php– handles AJAX requests to load table columns.inc/dbviewstructure.functions.php– all functions for DB operations, export, packing, JOIN detection.tpl/dbviewstructure.tools.tpl– templates for all tabs with JavaScript (localStorage, dynamic columns).
- Table and column names are escaped by
dbview_quote_identifier(). - PDO prepared statements are used.
- Access is restricted by
plug: dbviewstructurerights (admins only). - Files are served through a script that validates the path and permissions.
- Cotonti Siena 0.9.26+
- PHP 8.4+
- MySQL 8.0+
- PHP
zipextension (for ZIP packing)
BSD License © 2025-2026 webitproff
v2.1.0 (2026-07-01):
- Added «Combined CSV» tab:
- dynamic CSV construction from multiple tables,
- automatic and manual JOIN,
- image aggregations (first/rest images),
- absolute URLs for images,
- form state saved in localStorage.
- Improved «Logs» tab:
- checks if exported file still exists,
- mass clear logs button.
- Minor fixes and ZIP stability improvements.
Issues and pull requests: https://github.com/webitproff/cot-dbviewstructure
Official Cotonti Market page: https://abuyfile.com/ru/market/cotonti/plugs/cot-plug-db-view-structure
Author: webitproff
GitHub: https://github.com/webitproff
РУССКИЙ
Официальная страница плагина в маркетплейсе:
ссылка на файл комбинированного экспорта, который был импортирован в Google-таблицы
DB Structure Viewer — административный плагин для CMF Cotonti Siena (версия 0.9.26 и выше), позволяющий просматривать структуру базы данных, экспортировать таблицы в нескольких форматах, а также выполнять комбинированный экспорт данных из нескольких связанных таблиц в единый CSV‑файл с гибкой настройкой связей (JOIN) и агрегацией картинок.
Плагин ориентирован на администраторов, разработчиков и QA‑инженеров, которым нужен быстрый доступ к данным и структуре БД прямо из панели управления Cotonti.
- Системным администраторам — быстрая проверка структуры БД без доступа к phpMyAdmin или SSH.
- Разработчикам — документирование, подготовка миграций, отладка.
- QA-инженерам — получение выборок данных для тестирования.
- Владельцам сайтов — выгрузка товаров, пользователей и другого контента для внешних сервисов (маркетплейсы, аналитика).
- Список всех таблиц Cotonti (без префикса).
- Для каждой таблицы: поля, типы, NULL, ключи, значение по умолчанию, extra‑атрибуты.
- Просмотр первых 10 строк или конкретной строки по ID.
- Выбор одной или нескольких таблиц.
- Форматы: JSON, SQL, CSV, PHP Array.
- Три режима: только структура, структура + 10 строк, все строки.
- Сохранение на сервер и/или отдача в браузер.
- Упаковка в ZIP (опционально).
- Базовая таблица задаёт строки итогового CSV.
- Динамическое добавление колонок с указанием:
- названия колонки,
- таблицы‑источника,
- поля,
- (опционально) типа агрегации для картинок.
- Автоматическое определение связей (JOIN) между таблицами или ручной выбор поля связи.
- Специальные агрегации для таблицы
attacher:- Первая картинка (MIN) – самый ранний файл,
- Остальные картинки (через запятую) – все последующие.
- Автоматическое преобразование относительных путей картинок в абсолютные URL.
- Сохранение настроек формы в localStorage браузера для восстановления после перезагрузки.
- Запись всех операций экспорта в таблицу
cot_dbviewstructure_logs. - Просмотр логов с пагинацией и ссылками на скачивание.
- Кнопка «Очистить все логи» для полной очистки истории.
- Проверка наличия файла на сервере: если файл удалён, отображается предупреждение.
- Скачайте архив с GitHub или возьмите последнюю версию из маркетплейса.
- Распакуйте архив и загрузите папку
dbviewstructureв каталогpluginsвашего сайта. - В админ‑панели перейдите: Расширения → dbviewstructure → Установить.
- Настройте плагин (кнопка «Конфигурация»):
export_path— путь для сохранения файлов (по умолчаниюplugins/dbviewstructure/export/).log_enabled— включить логирование (рекомендуется).export_to_browser— одновременно отдавать файл в браузер.max_rows_per_page— записей на странице логов.pack_to_zip— упаковывать файлы в ZIP.
В админ‑панели: Инструменты → DB Structure Viewer. Доступны четыре вкладки.
- Таблицы и Поля — общий список с основной информацией.
- Просмотр строк — выбор таблицы и ID для фильтрации.
- Выбор таблиц (чекбоксы).
- Выбор формата (SQL, CSV, JSON, PHP Array).
- Режим данных: структура / 10 строк / все строки.
- Кнопка «Экспорт».
- Выбор базовой таблицы.
- Добавление колонок:
- введите название,
- выберите таблицу,
- дождитесь загрузки полей,
- выберите поле,
- (опционально) настройте агрегацию для картинок,
- при необходимости переключите JOIN в ручной режим и укажите поле связи.
- Кнопки «+ Добавить колонку», «Очистить поля».
- Кнопка «Экспорт» — запускает формирование CSV и, если настроено, ZIP.
- Таблица с историей экспортов.
- Для каждого лога: ID, имя файла, формат, количество таблиц, наличие данных, дата.
- Если файл существует — ссылка на скачивание; если нет — красный текст «Файл отсутствует на сервере».
- Кнопка «Очистить все логи».
- Вкладка «Экспорт» → отметить нужные таблицы.
- Выбрать формат SQL, режим «Только структура».
- Нажать «Экспорт».
- Вкладка «Комбинированный CSV».
- Базовая таблица:
market. - Добавить колонки:
- «Артикул», таблица
market, полеfieldmrkt_pcod. - «Название», таблица
market, полеfieldmrkt_title. - «Главное фото», таблица
attacher, полеatt_path, агрегация «Первая картинка (MIN)». - «Доп. фото», таблица
attacher, полеatt_path, агрегация «Остальные картинки».
- «Артикул», таблица
- Нажать «Экспорт».
- Базовая таблица
market. - Для колонок из таблицы
i18n4marketpro_pages:- таблица
i18n4marketpro_pages, - поле, например,
ipage_title, - если авто‑JOIN не сработал, включить «JOIN: вручную» и выбрать
ipage_id.
- таблица
- Остальные колонки — аналогично.
plugins/dbviewstructure/
├── dbviewstructure.setup.php
├── dbviewstructure.tools.php
├── dbviewstructure.ajax.php
├── inc/
│ └── dbviewstructure.functions.php
├── tpl/
│ └── dbviewstructure.tools.tpl
├── export/
├── logs/
├── lang/
│ └── dbviewstructure.ru.lang.php
└── setup/
├── dbviewstructure.install.sql
└── dbviewstructure.uninstall.sql
dbviewstructure.tools.php— контроллер: обрабатывает запросы, управляет вкладками.dbviewstructure.ajax.php— отвечает на AJAX‑запросы для загрузки списка полей таблицы.inc/dbviewstructure.functions.php— все функции работы с БД, экспорта, упаковки, определения JOIN.tpl/dbviewstructure.tools.tpl— шаблоны всех вкладок с JavaScript (сохранение в localStorage, динамические колонки).
- Имена таблиц и полей экранируются функцией
dbview_quote_identifier(). - Используются подготовленные выражения PDO.
- Доступ к плагину ограничен правами
plug: dbviewstructure(только администраторы). - Файлы отдаются через скрипт с проверкой пути и прав.
- Cotonti Siena 0.9.26+
- PHP 8.4+
- MySQL 8.0+
- Расширение PHP
zip(для ZIP‑упаковки)
BSD License © 2025-2026 webitproff
v2.1.0 (01.07.2026):
- Добавлена вкладка «Комбинированный CSV»:
- динамическое конструирование CSV из нескольких таблиц,
- автоматический и ручной JOIN,
- агрегации для изображений (первая/остальные картинки),
- абсолютные URL для картинок,
- сохранение формы в localStorage.
- Обновлён интерфейс вкладки «Логи»:
- проверка существования файла,
- кнопка массовой очистки логов.
- Мелкие исправления и улучшения стабильности ZIP‑упаковки.
Issues и pull‑requests: https://github.com/webitproff/cot-dbviewstructure
Официальная страница на Cotonti Market: https://abuyfile.com/ru/market/cotonti/plugs/cot-plug-db-view-structure
Автор: webitproff
GitHub: https://github.com/webitproff