Lightweight and flexible solution for linking files to pages and lists
PageAvatar is an advanced plugin used to associate pages with any types of files and manage such links. This is a simple yet powerful solution we normally use to build picture galleries for the websites powered by Cotonti Genoa.
How Does It Work?
The plugin is very easy to use. All you have to do is:
Page.add.tpl:
Add enctype="multipart/form-data" property to the form
Add plugin tags as follows:
<tr>
<td>{PAGEADD_FORM_AVATAR_TITLE}:</td>
<td>{PAGEADD_FORM_AVATAR}</td>
</tr>
Page.edit.tpl:
Add enctype="multipart/form-data" property to the form
Add plugin tags as follows:
<tr>
<td>{PAGEEDIT_FORM_AVATAR_TITLE}:</td>
<td>
{PAGEEDIT_FORM_AVATAR}
<!-- IF {PAGEEDIT_FORM_AVATARFILE} --><p>{PHP.L.Uploaded}: {PAGEEDIT_FORM_AVATARFILE}<br /> {PHP.L.Delete}: {PAGEEDIT_FORM_AVATARDELETE}</p><!-- ENDIF -->
</td>
</tr>
The structure of a settings string is as follows:
category code | path to uploads folder | thumbnail mask(s) | mandatory? | extension(s) | thumb creation mode
Brief explanation:
You can now get your image paths in the LIST_ROW regular block or elsewhere, i.e.:
Should you have any questions or would like to report a bug, feel free to open a topic at the forums.
Version History
Insgesamt: 4, auf Seite: 4
Thanked: 2 mal
1. На одном сервере держу несколько сайтов на которых установлен данный плагин. Поскольку после загрузки файлов плагин не проставляет права на файлы то из-за настроек сервера файлы получают права 600 и пользователя-владельца apach что в итоге не позволяет нормально бекапить сайты по фтп (даже в DirectAdmin'е изменить права на файлы нельзя из-за того что владельцем выступает апач - единственным выходом есть использование командыReset Ownership которая в DirectAdmin'е не возможна пакетно, а только по одному файлу). Сделайте пусть простявляет хотя бы права 644