Files Uploader

FilesUp plugin is used to upload images to the site with reference to a particular page and to further their use in the text of the page and as its avatars.

ENGLISH:

FilesUp plugin is designed to upload images to the site with reference to a particular page and to further their use in the text of the page and as its avatars.

For the work plugin uses:
1.modul Page: downloadable images are tied to a specific page,
2.modul PFS to account for the downloaded images, and optionally forming their thumbnail pictures,
3.plagin CKEditor to insert images into the text of the edit page.

Plugin uses HTML5 form for multy select and download images.

The plugin allows you to:
1. Upload and link to a page on the stage of its creation / editing / viewing (separately listed) any number of images, providing descriptions and other options (which will be discussed below), as well as the need to reduce the size of the download on the site.
2. At the stage of creating and editing pages plugin allows the user to turn on the downloaded images or thumbnails in the page text.
3. With a global function from the plugin, you can use more than one page for the loaded image as an avatar, for example, that would create a slide or photo gallery.
4. When you upload images to the site, create a file structure of the archive folder full (maybe a public gallery).

When you upload images to the site and for the further management of them, except for the functions delete the image and change its description, users also have the following options:
1. Specifying thumbnails as active, allowing, for example, use it as a link to the full image.
2. Note iobrazheniya as an avatar, which would allow her or her Add thumbnail as the avatar page.
2.1. As an avatar page can be used by several images. Display of avatars can be controlled through the skin files: editing existing or creating new ones. Conclusion avatars by using a global function get_avatars (page_id, tpl_file), where page_id - index page and tpl_file - filename skin through which the display of avatars.

In the formation of the thumbnails can be to use the appropriate settings file archives or own plugin settings.

Installation:
1.Skopirovat filesup folder in path of plugins your site.
2.In the Extensions section of the Administrative Panel website to install the plugin Files Uploader.
3.If you want to change the settings plugin.
4.Vnesti the following lines in modules / page / tpl / page.add.tpl and modules / page / tpl / page.edit.tpl

<tr>
<td>{PAGEADD_FORM_FILESUP_TITLE}:</td>
<td>{PAGEADD_FORM_FILESUP}</td>
</tr>

5. To start the plug-in when viewing a page by itself or in a list, you can use the following code

for page.tpl:

<!-- IF {PAGE_FILESUP_ID_VALUE} -->
    <li><a href="#" onclick="window.open('filesup?fuid={PAGE_FILESUP_ID_VALUE}&pageid={PAGE_ID}','fu_window','{PHP.cfg.plugin.filesup.fu_winparams|str_replace('-','=',$this)}');return false;">FilesUp</a></li>
<!-- ELSE -->
    <li><a href="#" onclick="window.open('filesup?fuid={PHP|cot_unique(10)}&pageid={PAGE_ID}','fu_window','{PHP.cfg.plugin.filesup.fu_winparams|str_replace('-','=',$this)}');return false;">FilesUp</a></li>
<!-- ENDIF -->

for page.list.tpl:

<!-- IF {LIST_ROW_FILESUP_ID_VALUE} -->
    <a href="#" onclick="window.open('filesup?fuid={LIST_ROW_FILESUP_ID_VALUE}&pageid={LIST_ROW_ID}','fu_window','{PHP.cfg.plugin.filesup.fu_winparams|str_replace('-','=',$this)}');return false;">FilesUp</a>
<!-- ELSE -->
    <a href="#" onclick="window.open('filesup?fuid={PHP|cot_unique(10)}&pageid={LIST_ROW_ID}','fu_window','{PHP.cfg.plugin.filesup.fu_winparams|str_replace('-','=',$this)}');return false;">FilesUp</a>
<!-- ENDIF -->

where {PAGE_FILESUP_ID_VALUE} and {LIST_ROW_FILESUP_ID_VALUE} - tag corresponding to the extrapolation filesup_id page table, and {PAGE_ID} and {LIST_ROW_ID} - tag containing a unique ID of the page.

6. To display the avatar or a page, you need to use avatars call the global function of the corresponding tpl-files using the code:

{PAGE_ID | get_avatars ($ this)} or {LIST_ROW_ID | get_avatars ($ this)} - to display avatars in the list of pages.

7. To change the appearance of the plug-in to edit the files and filesup.tpl filesup.css, located in the folder tpl plugin on your own.

8. To control avatars filesup.avatars.tpl edit or create any other tpl-file for transmission to function get_avatars (page_id, tpl_file).

РУССКИЙ:

Плагин FilesUp предназначен для загрузки изображений на сайт с привязкой к определенной странице и дальнейшего их использования в тексте этой страницы и в качестве ее аватаров.

Для своей работы плагин использует:
1.модуль Page: загружаемые изображения привязаны к определенной странице,
2.модуль PFS для учета загруженных изображений и опционно формирования их миникартинок,
3.плагин CKEditor для вставки изображений в текст редактируемой страницы.

Для выбора и загрузки изображений используется HTML5 форма с мультивыборкой файлов.

Плагин позволяет:
1. Загрузить и привязать к странице на стадии ее создания/редактирования/просмотра (отдельно и в списке) произвольное количество изображений, снабдив их описанием и другими опциями (о которых будет рассказано ниже), а также при необходимости уменьшив их размеры в процессе закачки на сайт.
2. На стадии создания и редактирования страницы плагин предоставляет пользователю возможность включить загруженные изображения или их миникартинки в текст страницы.
3. С помощью глобальной функции из состава плагина можно использовать более одного загруженного для страницы изображения в качестве аватара, что, например, позволит создать слайдер или фото-галерею.
4. При загрузке изображений на сайт, создать в структуре Файлового архива полноценную папку (возможно публичную галерею).

При загрузке изображений на сайт и при дальнейшем управлении ими, кроме функций удаления изображения и изменения его описания, пользователю так же доступны следующие опции:
1. Указание миникартинки, как активной, что позволит, например, использовать ее, как ссылку на полномасштабное изображение.
2. Указание иображения, как аватар, что позволит выводить ее или ее миникартинку, как аватар страницы.
2.1. В качестве аватара страницы может быть использовано несколько изображений. Показом аватаров можно управлять с помощью файлов скина: редактируя существующий или создавая новые. Вывод аватаров осуществляется с помощью глобальной функции get_avatars(page_id, tpl_file), где page_id - индекс страницы, а tpl_file - имя файла скина, через который осуществляется показ аватаров.

При формировании миникартинки могут быть использованны соответствующие настройки Файлового архива или собственные настройки плагина.

Установка:
1.Скопировать папку filesup в дирректорию plugins своего сайта.
2.В разделе Расширения Административной панели сайта установить плагин Files Uploader.
3.При необходимости изменить настройки плагина.
4.Внести следующие строки в файлы modules/page/tpl/page.add.tpl и modules/page/tpl/page.edit.tpl

<tr>
<td>{PAGEADD_FORM_FILESUP_TITLE}:</td>
<td>{PAGEADD_FORM_FILESUP}</td>
</tr>

5.Для запуска плагина при просмотре страницы отдельно или в списке можно использовать следующий код

для page.tpl:

<!-- IF {PAGE_FILESUP_ID_VALUE} -->
    <li><a href="#" onclick="window.open('filesup?fuid={PAGE_FILESUP_ID_VALUE}&pageid={PAGE_ID}','fu_window','{PHP.cfg.plugin.filesup.fu_winparams|str_replace('-','=',$this)}');return false;">FilesUp</a></li>
<!-- ELSE -->
    <li><a href="#" onclick="window.open('filesup?fuid={PHP|cot_unique(10)}&pageid={PAGE_ID}','fu_window','{PHP.cfg.plugin.filesup.fu_winparams|str_replace('-','=',$this)}');return false;">FilesUp</a></li>
<!-- ENDIF -->

для page.list.tpl:

<!-- IF {LIST_ROW_FILESUP_ID_VALUE} -->
    <a href="#" onclick="window.open('filesup?fuid={LIST_ROW_FILESUP_ID_VALUE}&pageid={LIST_ROW_ID}','fu_window','{PHP.cfg.plugin.filesup.fu_winparams|str_replace('-','=',$this)}');return false;">FilesUp</a>
<!-- ELSE -->
    <a href="#" onclick="window.open('filesup?fuid={PHP|cot_unique(10)}&pageid={LIST_ROW_ID}','fu_window','{PHP.cfg.plugin.filesup.fu_winparams|str_replace('-','=',$this)}');return false;">FilesUp</a>
<!-- ENDIF -->

где {PAGE_FILESUP_ID_VALUE} и {LIST_ROW_FILESUP_ID_VALUE} - тэг, соответствующий экстраполю filesup_id таблицы страниц, а {PAGE_ID} и {LIST_ROW_ID} - тэг содержащий уникальный ID страницы.

6. Для вывода аватара или нескольких аватаров страницы необходимо использовать вызов глобальной функции из соответствующих tpl-файлов с помощью кода:

{PAGE_ID|get_avatars($this)} или {LIST_ROW_ID|get_avatars($this)} - для вывода аватаров в списке страниц.

7. Для изменения внешнего вида плагина отредактируйте файлы filesup.tpl и filesup.css, расположенные в папке tpl плагина, по своему усмотрению.

8. Для управления выводом аватаров отредактируйте filesup.avatars.tpl или создайте любой другой tpl-файл для передачи в функцию get_avatars(page_id, tpl_file).

Screenshots:

1. The initial form / Начальная форма

03_220.jpg

2. Prevew / Предпросмотр

03_220.jpg

3. Uploaded files / Загруженные файлы

03_220.jpg


1. n0fx  29. Oktober 2016, 15:11

Hi,

When i try to upload image on the 0.19.9, I get error message like 

SQL error 42S22: Column not found: 1054 Unknown column 'pff_date' in 'field list'

#0  cot_diefatal(SQL error 42S22: Column not found: 1054 Unknown column 'pff_date' in 'field list') called at [D:\xampp\htdocs\cgenoa\system\database.php:459]
#1  CotDB->insert(sed_pfs_folders, Array ([pff_userid] => 1,[pff_title] => haberler,[pff_date] => 1477753750,[pff_updated] => 1477753750,[pff_desc] => haberler klasörü,[pff_ispublic] => 0,[pff_isgallery] => 0,[pff_count] => 0)) called at [D:\xampp\htdocs\cgenoa\plugins\filesup\filesup.php:117]
#2  include(D:\xampp\htdocs\cgenoa\plugins\filesup\filesup.php) called at [D:\xampp\htdocs\cgenoa\system\plugin.php:94]
#3  require_once(D:\xampp\htdocs\cgenoa\system\plugin.php) called at [D:\xampp\htdocs\cgenoa\index.php:172]
2. Macik  31. Oktober 2016, 22:16

Check `*_pfs_folders` table. by default it has `pff_date` field:

  `pff_date` int(11) NOT NULL default '0',

 

Nur registrierte Benutzer können Kommentare schreiben