457 lines
15 KiB
HTML
457 lines
15 KiB
HTML
<html>
|
|
<head>
|
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
|
<title>Dokumentace: Statické stránky</title>
|
|
<style>
|
|
pre {
|
|
display: block;
|
|
padding: 5px;
|
|
border: solid 1px #333333;
|
|
background-color: #cccccc;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h1>Dokumentace k pluginu 'Statické stránky'<br />
|
|
<small>(serendipity_event_staticpage)</small></h1>
|
|
<p>Dokumentaci k tomuto pluginu přeložil do češtiny Vladimír Ajgl (vlada [zavinac] ajgl [tecka] cz) dne 4.5.2013. Od té doby mohl být plugin pozměněn nebo mohly být rozšířené jeho funkce. Zkontrolujte pro jistotu i <a href="../documentation_en.html">aktuální anglickou dokumentaci</a>, <a href="../ChangeLog">ChangeLog</a>, <a href="../README_FOR_RELATED_CATEGORIES.txt">README_FOR_RELATED_CATEGORIES.txt</a>, <a href="../Smarty_and_CSS_Tags">Smarty_and_CSS_Tags</a> a <a href="../TODO">TODO</a>.
|
|
</p>
|
|
|
|
<h2>Popis pluginu</h2>
|
|
<p>
|
|
Zobrazuje v blogu statické stránky se stejným designem jako mají běžné přspěvky. Přidá nové menu do adminstrátorského rozhraní.
|
|
</p>
|
|
|
|
<h2>Vypsání odkazů na související statické stránky ve výpisu kategorií</h2>
|
|
Podívejte se na šalbony <i>staticpage-entries-listing.tpl</i> a <i>plugin_staticpage_related_category.tpl</i>!
|
|
|
|
<p>
|
|
Aby se ve výpisu kategorie zobrazovaly i související statické stránky, přidejte následující kód do šablony <i>entries.tpl</i>:
|
|
<br/>
|
|
(můžete použít {$CONST.PLUGIN_STATICPAGELIST_FRONTPAGE_LINKNAME} místo {$blogTitle})
|
|
|
|
<pre>{if ($view == 'archives') || ($view == 'frontpage')}
|
|
<table border="0" cellpadding="2" cellspacing="2" class="staticpage_navigation">
|
|
<tr>
|
|
<td class="staticpage_navigation_left">»
|
|
|
|
<a href="../{$serendipityBaseURL}">{$blogTitle}</a>
|
|
» {$CONST.ARTICLE_OVERVIEW}</td>
|
|
</tr>
|
|
</table>
|
|
{/if}
|
|
|
|
{if ($view == 'categories')}
|
|
<<able border="0" cellpadding="2" cellspacing="2" class="staticpage_navigation">
|
|
<tr>
|
|
<td class="staticpage_navigation_left">»
|
|
|
|
{if $staticpage_categorypage}
|
|
<a href="../{$staticpage_categorypage.permalink}">{$staticpage_categorypage.pagetitle}</a>
|
|
{else}
|
|
<a href="../{$serendipityBaseURL}">{$blogTitle}</a>
|
|
{/if}
|
|
» {$CONST.ARTICLE_OVERVIEW}</td>
|
|
</tr>
|
|
</table>
|
|
{/if}
|
|
</pre>
|
|
|
|
<h2>Seznam použitých CSS tagů a Smarty proměnných</h2>
|
|
<h3>Proměnné Smarty</h3>
|
|
<pre>bool $staticpage_articleformat
|
|
string $staticpage_articleformattitle
|
|
string $staticpage_headline
|
|
array $staticpage_navigation
|
|
string $staticpage_navigation.prev.link
|
|
string $staticpage_navigation.prev.name
|
|
string $staticpage_navigation.top.link
|
|
string $staticpage_navigation.top.name
|
|
string $staticpage_navigation.next.link
|
|
string $staticpage_navigation.next.name
|
|
string $staticpage_pass
|
|
string $staticpage_form_pass
|
|
string $staticpage_form_url
|
|
array $staticpage_extchildpages
|
|
string $staticpage_extchildpages[i].image
|
|
string $staticpage_extchildpages[i].permalink
|
|
string $staticpage_extchildpages[i].precontent
|
|
string $staticpage_author
|
|
timestamp $staticpage_lastchange
|
|
array $staticpage_adminlink
|
|
bool $staticpage_adminlink.page_user
|
|
string $staticpage_adminlink.link_edit
|
|
string $staticpage_adminlink.link_name
|
|
string $staticpage_precontent
|
|
string $staticpage_content
|
|
array $staticpage_childpages
|
|
string $staticpage_childpages[i].permalink
|
|
string $staticpage_childpages[i].pagetitle
|
|
string $staticpage_categorypage.id
|
|
string $staticpage_categorypage.pagetitle
|
|
string $staticpage_categorypage.permalink
|
|
string $staticpage_categorypage.publishstatus
|
|
</pre>
|
|
|
|
<h3>CSS-Tagy</h3>
|
|
Backend:
|
|
<pre>#serendipityStaticpagesNav ul
|
|
#serendipityStaticpagesNav ul li
|
|
#serendipityStaticpagesNav ul li a
|
|
#serendipityStaticpagesNav ul li a#active
|
|
</pre>
|
|
|
|
Frontend:
|
|
<pre>.staticpage_navigation_left
|
|
.staticpage_navigation_center
|
|
.staticpage_navigation_right
|
|
#staticpage_childpages
|
|
.staticpage_author
|
|
.staticpage_metainfo
|
|
.staticpage_metainfo_lastchange
|
|
.staticpage_metainfo_editlink
|
|
#staticpage_related_category_entry_list
|
|
#static-entries
|
|
</pre>
|
|
|
|
<h2>TODO (zbývá dodělat)</h2>
|
|
<ul>
|
|
<li>Hezčí vzhled</li>
|
|
<li>Schopnost mít více než jeden postranní sloupec, který bude zobrazovat různé stránky.</li>
|
|
<li>Kopírování existujících stránek.</li>
|
|
<li>Podpora oprávnění "může vytvářet statické stránky" pro jednotlivé autory s použitím systému oživatelských oprávnění ve verzi serendipity 0.9 a vyšší.</li>
|
|
</ul>
|
|
|
|
<h2>Historie verzí (ChangeLog)</h2>
|
|
<pre>
|
|
4.02 Removed some & references, trying to fix issues with more recent PHP versions and core dumps / memory corruption
|
|
|
|
4.01 PHP 5.4 compat reference fix (~L 1097)
|
|
|
|
4.00 rewrote document.write replacement (81e9911) to be more html standard conform
|
|
|
|
3.99 fixed disabling collapsible structure box in case of wysiwyg-editor use
|
|
|
|
3.98 Changed custom <title>, meta description, and meta keywords to be regular fields,
|
|
not custom properties.
|
|
|
|
3.97: Changed breadcrumb navigation so it is an independent option. Templates that use custom
|
|
static page templates (plugin_staticpage.tpl, plugin_staticpage_aboutpage.tpl,
|
|
plugin_staticpage_related.tpl) must be modified to include the condition
|
|
{if $staticpage_show_breadcrumb}...{/if}. See included plugin_staticpage.tpl
|
|
for example.
|
|
|
|
3.96: Added last commits missing code part for the javascript hidden boxes (Timbalu)
|
|
Workaround the use of document.write() for javascript enabled browsers
|
|
Added the need of templates index.tpl change note into forms meta block
|
|
|
|
3.95: Fixed bad XHTML in <option> tag (Timbalu),
|
|
added ability to preview staticpages, restrict viewing draft staticpages to logged in authors
|
|
added option to set META input fields, set structure and meta field box to javascript hidden content (Timbalu)
|
|
|
|
3.94: Add "timestamp" field to list of editable staticpage fields
|
|
|
|
3.93: Add $serendipity['is_staticpage'] global variable to indicate if staticpage is selected
|
|
|
|
3.92: extends 1.19: (sidebar) fixed sidebar title
|
|
|
|
3.91: added dependency nl2br(2.14)::$isobr [NoBR] Buttons
|
|
fixed serendipity_db_query search error output
|
|
set smarty fetch to use nativ API - extends s9y version >= 1.3'
|
|
|
|
3.90: fixed typo and shrinked last note
|
|
|
|
3.89: note sidebar plugin availability & update (sidebar 1.18) Fixed smarty load in backend (Timbalu)
|
|
|
|
3.88: Fixed guestbook link generation for non-rewrites (Timbalu)
|
|
|
|
1.16: (sidebar) Added smartify option (by Timbalu)
|
|
|
|
3.87: Add foreach check to prevent error
|
|
|
|
3.86: Improved 404 page handling (Manko10)
|
|
|
|
3.84: Added server "Status:" header as well
|
|
|
|
3.83:
|
|
---------------------------
|
|
|
|
Add missing changes in backend template for selecting a staticpage as 404 error document
|
|
|
|
3.82:
|
|
---------------------------
|
|
|
|
Add possibility to use a staticpage as 404 error document
|
|
by setting the corresponding page property
|
|
|
|
3.81:
|
|
---------------------------
|
|
|
|
Smarty3 forward compatibility
|
|
|
|
3.80:
|
|
---------------------------
|
|
|
|
PHP 5.3 compat
|
|
|
|
3.79:
|
|
---------------------------
|
|
|
|
Beter rename of dirs, by stm9x9
|
|
http://board.s9y.org/viewtopic.php?f=3&t=15461
|
|
|
|
3.78:
|
|
---------------------------
|
|
Fix properly showing stored custom properties for template when changing a page/template
|
|
|
|
3.77:
|
|
---------------------------
|
|
|
|
Remember selection of last backend template in a cookie
|
|
|
|
3.76:
|
|
---------------------------
|
|
|
|
Also allow "_" and "-" in custom backend template names
|
|
|
|
3.75:
|
|
---------------------------
|
|
|
|
Safety confirmation for deleting staticpages
|
|
|
|
3.73:
|
|
----------------------------
|
|
Fix for PHP4 to properly display HTMLArea on default smarty template.
|
|
|
|
|
|
3.72:
|
|
-----------------------------
|
|
Fix for not being able to edit a staticpage through the frontend's
|
|
Edit link
|
|
|
|
|
|
3.70, 3.71:
|
|
-----------------------------
|
|
|
|
Major new functionalities:
|
|
|
|
1. Allow to create custom smarty templates used for editing a
|
|
staticpage.
|
|
|
|
When editing a staticpage in the backend, you now have a dropdown
|
|
where you can choose a template. The default file is placed
|
|
in the plugin's subdirectory "backend_templates". You can
|
|
add files there on your own, which are then shown in the
|
|
dropdown as well.
|
|
|
|
You can override the content of those files within your
|
|
template directory, by placing a file named exactly the same way,
|
|
in the "backend_templates" sub-directory of your template.
|
|
Thus, you can put an empty file inside your plugin
|
|
directory to initialize the ability to use a template-preference.
|
|
|
|
The default template file has several smarty functions to query
|
|
the current value and input fields. You can place all input
|
|
fields the way you like, using Smarty/HTML layouts.
|
|
|
|
You can also still switch to the "old way" through the dropdown.
|
|
|
|
|
|
2. Introduce "custom properties" for staticpages.
|
|
|
|
You need to add those custom properties to your custom smarty
|
|
template, by accessing an input field "serendipity[plugin][custom][xxx]".
|
|
The default backend template has a commented section for an
|
|
example on how to use this.
|
|
|
|
In your final smarty templates (either the staticpage_*.tpl files, or your
|
|
usual smarty template files) you can access those custom properties through
|
|
|
|
{$staticpage_custom.XXX}
|
|
|
|
to place them anywhere you want.
|
|
|
|
To properly see the new layout, you might need to flush your browser's
|
|
CSS cache, as changes have been made to the plugin's CSS file.
|
|
|
|
|
|
3.61:
|
|
-----------------------------
|
|
Speed up call for getting staticpage list and cache it. Otherwise, the
|
|
plugin was unusable for thousands of staticpages, because the
|
|
walkrecursive() function is VERY expensive.
|
|
|
|
3.57:
|
|
=============================
|
|
|
|
Fix smarty function to properly interpret templates passed as argument.
|
|
|
|
3.53:
|
|
==============================
|
|
Changes by Stephan Manske:
|
|
|
|
* new feature: add a related staticpage to a category and the opposite way around
|
|
|
|
|
|
3.32:
|
|
==============================
|
|
Changes by Falk Döring:
|
|
|
|
* Update formatting
|
|
* Fix pageorder setting
|
|
|
|
3.30 / 3.31:
|
|
==============================
|
|
Change by Garvin Hicking:
|
|
|
|
* Allow to search staticpages via s9y Quicksearch
|
|
|
|
3.26:
|
|
==============================
|
|
Change by Garvin Hicking:
|
|
|
|
* Allow to post/edit staticpages via bookmark URLs / wikilinks plugin
|
|
|
|
3.24:
|
|
==============================
|
|
Changes by Falk Döring:
|
|
|
|
* Change: Pagetype 'Aboutpage' renamed to 'Overview'
|
|
* Update: german and english language file
|
|
* Update: external plugin menu
|
|
|
|
3.23:
|
|
==============================
|
|
* Fix: Filename of CSS backend styles
|
|
|
|
3.22:
|
|
==============================
|
|
Changes by Falk Döring:
|
|
|
|
* Fix: disable templates if a plugin is called
|
|
|
|
3.21:
|
|
==============================
|
|
Changes by Falk Döring:
|
|
|
|
* Fix: FAQ-Event now without mod_rewrite support
|
|
</pre>
|
|
|
|
<ul>
|
|
<li>verze 1.0</li>
|
|
<ul>
|
|
<li></li>
|
|
</ul>
|
|
<li>verze 3.20 [Falk Döring]</li>
|
|
<ul>
|
|
<li>Nové: Přidání FAQ-Event do postranního sloupce</li>
|
|
<li>Oprava: některé špatné řetězce akcí</li>
|
|
</ul>
|
|
<li>verze 3.19 [JWalker]</li>
|
|
<ul>
|
|
<li>Oprava: Zobrazovat odkazy "předchozí/další/hlavní stránka" jen pokud nejsou prázdné</li>
|
|
</ul>
|
|
<li>verze 3.18 [Falk Döring]</li>
|
|
<ul>
|
|
<li>Oprava: integrace kontaktního formuláře správně podle postránek, pokud je vypnut mod_rewrite</li>
|
|
</ul>
|
|
<li>verze 3.17 [Falk Döring]</li>
|
|
<ul>
|
|
<li>Nové: seznam pluginů, které mohou být vloženy do postranního sloupce, a jejich status</li>
|
|
</ul>
|
|
<li>verze 3.16 [Falk Döring]</li>
|
|
<ul>
|
|
<li>Oprava výběru jazyka. Nyní můžete vybrat stránku pro všechny jazyky.</li>
|
|
<li>Oprava nevyužitích definic</li>
|
|
</ul>
|
|
<li>verze 3.15</li>
|
|
<ul>
|
|
<li>Změna šablony <i>plugin_staticpage.tpl</i>, aby byly použity unikátní CSS identifikátory</li>
|
|
<li>Oprava PHP varování, pokud není nalezena žádná publikovaná stránka</li>
|
|
<li>Oddělení katalogu jazykových řetězců do <i>lang_en.inc.php</i> [Tadashi Jokagi]</li>
|
|
<li>Aktualizace japonského překladu, synchronizace s anglickým [Tadashi Jokagi]</li>
|
|
</ul>
|
|
<li>verze 3.14 [Falk Döring]</li>
|
|
<ul>
|
|
<li>Nové: Podpora více jazyků</li>
|
|
</ul>
|
|
<li>verze 3.12/3.13 [Stephan Sachse]</li>
|
|
<ul>
|
|
<li>Oprava SQL příkazu k vytvoření tabulky. Znova se omlouvám, chlapi.</li>
|
|
</ul>
|
|
<li>verze 3.11</li>
|
|
<ul>
|
|
<li>Oprava pravopisné chyby, díky uživateli [Wesley]</li>
|
|
<li>Oprava ukončujícího lomítka "/" pro httpPath, díky uživateli [Michel Verdier]</li>
|
|
</ul>
|
|
<li>verze 3.10 [Tadashi Jokagi]</li>
|
|
<ul>
|
|
<li>Změna konstant<br /> "STATICPAGE_{SHOWNAVI,SHOWONNAVI,SHOWARTICLEFORMAT,SHOWCHILDPAGES}_DEFAULT_DESC"
|
|
<br /> na jedinou konstantu
|
|
<br /> "STATICPAGE_DEFAULT_DESC",
|
|
<br /> protože měly všechny stejný obsah. Díky [Tadashi Jokagi]!</li>
|
|
</ul>
|
|
<li>verze 3.09 [Garvin Hicking]</li>
|
|
<ul>
|
|
<li>Oprava PHP short-tags</li>
|
|
<li>Oprava na správné použití serendipity_db_update</li>
|
|
<li>Oprava chybných kontrol "unset" proměnných (kontrola postgreSql čeká)</li>
|
|
</ul>
|
|
<li>verze 3.08 [Falk Döring]</li>
|
|
<ul>
|
|
<li>Oprava DB aktualizací (za které může Garvin :-) )</li>
|
|
<li>Nové: Zobrazení nadpisu nebo odkazů další/předchozí v navigaci stránek-potomků</li>
|
|
<li>Aktualizace: použití funkcí s9y pro aktualizaci</li>
|
|
</ul>
|
|
<li>verze 3.07 [Garvin Hicking]</li>
|
|
<ul>
|
|
<li>Nastavení výchozích hodnot pro číselné sloupce, aby to bylo v pořádku v postreSQL</li>
|
|
</ul>
|
|
<li>verze 3.06 [Falk Döring]</li>
|
|
<ul>
|
|
<li>Nové: Vložení ostatních pluginů do postranního sloupce</li>
|
|
</ul>
|
|
<li>verze 3.05 [Garvin Hicking]</li>
|
|
<ul>
|
|
<li>Změna: ALTER TABLE</li>
|
|
</ul>
|
|
<li>verze 3.04 [Garvin Hicking]</li>
|
|
<ul>
|
|
<li>Oprava: číslo verze s9y</li>
|
|
</ul>
|
|
<li>verze 3.03 [Falk Döring]</li>
|
|
<ul>
|
|
<li>Nové nastavení:</li>
|
|
<ul>
|
|
<li>zapnutí navigace</li>
|
|
<li>zobrazování navigace</li>
|
|
<li>publikování stavu</li>
|
|
</ul>
|
|
<li>nastavení výchozích hodnot v Plugin-Section</li>
|
|
</ul>
|
|
<li>verze 3.02 [Garvin Hicking]</li>
|
|
<ul>
|
|
<li>Oprava: anglický jazykový soubor</li>
|
|
</ul>
|
|
<li>verze 3.01 [Garvin Hicking]</li>
|
|
<ul>
|
|
<li>Opraveny WYSIWYG editory (aby to správně fungovalo v ne-WYSIWYG módu, potřebujete Serendipity >= 0.9-beta3!</li>
|
|
</ul>
|
|
<li>verze 3.0 [Falk Döring]</li>
|
|
<ul>
|
|
<li>Nové: kategorie stránky</li>
|
|
<li>Výchozí: Příspěvky a "Stránka o blogu"</li>
|
|
<li>Oprava: Navigace zpět/vpřed</li>
|
|
<li>Aktualizace: německý překlad</li>
|
|
<li>Podpora obrázku kategorie</li>
|
|
<li>Podpora řazení stránek</li>
|
|
</ul>
|
|
<li>verze 2.12 [Falk Döring]</li>
|
|
<ul>
|
|
<li>Zobrazování navigace na "poslední změny" a "zpět/vpřed"</li>
|
|
<li>Zobrazování odkazu "Upravit tuto stránku"</li>
|
|
</ul>
|
|
</ul>
|
|
|
|
</body>
|
|
</html>
|