1 | <h2>Розширення конфігурації шаблону</h2> |
---|
2 | |
---|
3 | <h3>Про</h3> |
---|
4 | <p>Piwigo галерея може бути налаштована шляхом заміни існуючих файлів шаблону з індивідуальних версій. Наприклад, за замовчуванням заголовок шаблон (header.tpl) можна замінити шаблон індивідуальний заголовок (my-header.tpl). Після подання зміни до бази даних галерея буде відображати індивідуальний заголовку замість вихідного заголовка.<br> |
---|
5 | Шаблон розширень ефективний спосіб створювати власні теми для нових, так і старих користувачів. Використовується разом з редактором LocalFiles ви можете створювати свої власні під-теми.</p> |
---|
6 | |
---|
7 | <h3>Оригінальний шаблон</h3> |
---|
8 | <p>Тема містить безліч файлів шаблонів, які складають галерею сторінок. Це оригінальні шаблони.</p> |
---|
9 | |
---|
10 | <h3>Необов'язкові ключові слова URL</h3> |
---|
11 | <p>Це слова, знайдені в галереї URL після ім'я модуля. Вони також можуть бути активними постійна (див. документацію постійне посилання для отримання додаткової інформації). <a href="#warnings">ПОПЕРЕДЖЕННЯ:</a> якщо той же оригінальний шаблон і таке ж ключове слово використаний більш ніж на одному налагодженому шаблоні тільки один є активним.</p> |
---|
12 | |
---|
13 | <h3>Зв'яжіть тему</h3> |
---|
14 | <p>Пов'язаних темою є тема, з якої файли шаблонів замінюються.</p> |
---|
15 | |
---|
16 | <h3>Де знаходяться оригінальні шаблони?</h3> |
---|
17 | <p>Оригінальні шаблони файлів шаблонів поставляється з кожною темою окремо. Вони зберігаються в <em>/themes/default/template</em> (або <em>themes/<theme name>/template</em>). Ці файли шаблонів не повинні бути змінені на місці, оскільки зміни будуть втрачені з оновленням теми.<br> |
---|
18 | Підтримка оригінальних шаблонів включають:</p> |
---|
19 | <ul> |
---|
20 | <li><span class="filename">index.tpl</span></li> |
---|
21 | <li><span class="filename">mainpage_categories.tpl</span> and/or <span class="filename">thumbnails.tpl</span></li> |
---|
22 | <li><span class="filename">menubar.tpl</span></li> |
---|
23 | <li><span class="filename">header.tpl</span> and/or <span class="filename">footer.tpl</span></li> |
---|
24 | <li><span class="filename">picture_content.tpl</span> and/or <span class="filename">picture.tpl</span></li> |
---|
25 | <!-- <li><span class="filename">slideshow.tpl</span></li> --> |
---|
26 | <li><span class="filename">profile.tpl</span> and/or <span class="filename">profile_content.tpl</span></li> |
---|
27 | <li><span class="filename">tags.tpl</span></li> |
---|
28 | <li><span class="filename">upload.tpl</span></li> |
---|
29 | <li><span class="filename">about.tpl</span></li> |
---|
30 | <li><span class="filename">popuphelp.tpl</span></li> |
---|
31 | <li><span class="filename">search.tpl</span> and/or <span class="filename">search_rules.tpl</span></li> |
---|
32 | <li><span class="filename">nbm.tpl</span> and/or <span class="filename">notification.tpl</span></li> |
---|
33 | <li><span class="filename">identification.tpl</span> and/or <span class="filename">register.tpl</span></li> |
---|
34 | <li><span class="filename">redirect.tpl</span></li> |
---|
35 | </ul> |
---|
36 | <h3>Saving customised templates</h3> |
---|
37 | <p>Customised templates should be saved in the template-extension folder or subfolders. For example, <em>/template-extension/my-default/header.tpl</em> (or <em>/template-extension/<my-theme-name>/header.tpl</em>) Template files can have any name with a .tpl extension. The template files in subfolders appear in the Template configuration screen as available custom templates.</p> |
---|
38 | <h3>Activating customised templates</h3> |
---|
39 | <p>Select the original template to replace. Optionally choose a URL keyword to ensure that the customised template is only shown on pages with that keyword. Select a bound theme and the changes will be effective on that theme. Submit the changes to the database.</p> |
---|
40 | <h3>Deactivating customised templates</h3> |
---|
41 | <p>Unselect the original template and submit the changes to the database.<br> |
---|
42 | Delete the customised template files from the template-extension folder.</p> |
---|
43 | |
---|
44 | <a name="warnings"></a> |
---|
45 | <h3>Warnings</h3> |
---|
46 | <ul> |
---|
47 | <li><strong>The original template</strong> must be the original template otherwise you may have unpredictable results.</li> |
---|
48 | <li>If the same original template and same URL keyword is used on more than one customised template only the last one is active.</li> |
---|
49 | <li>Distributed sample template files are for test purposes only. Do not edit them. Create your own ones or copy existing theme template files into <em>/template-extension/<my-theme>/</em></li> |
---|
50 | <li>When the customised template is deleted the original template file is immediately reactivated.</li> |
---|
51 | </ul> |
---|