freetag decode fix and list option

This commit is contained in:
Ian 2014-09-28 10:40:31 +02:00
parent 86550df882
commit 67a5659ae6
12 changed files with 1007 additions and 919 deletions

View file

@ -0,0 +1,7 @@
<Files .htaccess>
Allow from all
</Files>
<IfModule mod_rewrite.c>
RewriteEngine Off
</IfModule>

View file

@ -1,3 +1,14 @@
3.58:
----
* Fix doubled encoded umlaut taglinks by searchengines backlinks.
* Added a new option to allow showing taglink entries as a linklist.
This adds a 'taglist' tag as a reserved command to tags,
which not allows this tag as a normal tag any further.
The addition can be done either by the preset taglink as "/plugin/taglist/"
or manually added by certain taglinks as "/plugin/tag/allyourtags/taglist".
This needs you to modify your templates entries.tpl file,
as described in the documentation file or the README.
3.57:
----
Stricter array check to prevent PHP notices

View file

@ -63,3 +63,55 @@ foreach($rows AS $row) {
htmlspecialchars($row['title'])
);
}
The following code illustrates on how to change your templates entries.tpl file in case of enabled option 'tags-as-list':
{serendipity_hookPlugin hook="entries_header" addData="$entry_id"}
{if $taglist}
<article id="taglistentries" class="clearfix serendipity_entry">
<div class="clearfix content serendipity_entry_body">
<h2>{$head_subtitle}</h2>
{foreach from=$entries item="dategroup"}
{foreach from=$dategroup.entries item="entry"}
<div class="static-entries-list">
({$dategroup.date|date_format:"%d.%m.%Y"}) <a href="{$entry.link}">{$entry.title|default:$entry.id}</a>
</div>
{/foreach}
{/foreach}
</div>
</article>
{else}
--- OLD CODE START-and keep --
{foreach from=$entries item="dategroup"}
{foreach from=$dategroup.entries item="entry"}
{assign var="entry" value=$entry scope="parent"}
*** LONG CODE FOR THE entries output article ***
{/foreach}
{foreachelse}
{if not $plugin_clean_page}
<p class="nocontent">{$CONST.NO_ENTRIES_TO_PRINT}</p>
{/if}
{/foreach}
--- OLD CODE END and keep---
{/if}{* not taglist end *}
--- OLD CODE FOOTER INFO START and keep ---
{if $footer_info or $footer_prev_page or $footer_next_page}
*** inside CODE ***
{/if}
--- OLD CODE FOOTER INFO END and keep ---
{serendipity_hookPlugin hook="entries_footer"}

View file

@ -1,354 +0,0 @@
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Dokumentace: Freetag</title>
<style>
pre {
display: block;
padding: 5px;
border: solid 1px #333333;
background-color: #cccccc;
}
</style>
</head>
<body>
<h1>Dokumentace k pluginu 'Freetag'<br />
<small>(serendipity_event_freetag)</small></h1>
<p>Dokumentaci k tomuto pluginu přeložil do češtiny Vladimír Ajgl (vlada [zavinac] ajgl [tecka] cz) a naposledy zkontroloval dne 20.4.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="../README">aktuální anglické "README"</a>, <a href="../README.txt">"README.txt"</a> a <a href="../ChangeLog">ChangeLog</a>.
<p>
<h2>Popis pluginu</h2>
<p>
Umožňuje libovolné přidávání klíčových slov k příspěvkům
</p>
<h2>Užitečné skripty</h2>
<p>Následující kód ukazuje příklad, jak použít rozšířený výstup do smarty šablony. Takto může například vypadat šablona "entries.tpl"
<pre>
{if isset($entry.freetag.extended) && $entry.freetag.extended == 1}
{if $entry.freetag.tags.tags}
&lt;div class="serendipity_freeTag"&gt;{$entry.freetag.tags.description}
{foreach from=$entry.freetag.tags.tags item="tag"}
{$tag}
{/foreach}
&lt;/div&gt;
{if $is_single_entry or $is_preview}
{$entry.freetag.related.description}
&lt;ul class="serendipity_freeTag_related"&gt;
{foreach from=$entry.freetag.related.entries item="link"}
&lt;li&gt;{$link}&lt;/li&gt;
{/foreach}
&lt;/ul&gt;
{/if}
{/if}
{else}
{$entry.freetag}
{/if}
</pre>
</p>
<p>
Pomocí následujícího sql dotazu můžete v databázi vytvořit tagy z existujících kategorií:
<pre>
INSERT INTO serendipity_entrytags (entryid, tag)
SELECT serendipity_entries.id, serendipity_category.category_name
FROM serendipity_entries, serendipity_category, serendipity_entrycat
WHERE serendipity_entrycat.entryid = serendipity_entries.id
AND serendipity_category.categoryid = serendipity_entrycat.categoryid;
</pre>
(převzato z <a href="http://pixelated-dreams.com/archives/229-Spring-Cleaning.html">http://pixelated-dreams.com/archives/229-Spring-Cleaning.html</a>)
</p>
<p>
A nebo můžete pro vytvoření tagů z kategorií použít následující skript:
<pre>
&lt;?php
include 'serendipity_config.inc.php';
$rows = serendipity_db_query("SELECT e.id, e.title, c.category_name
FROM {$serendipity['dbPrefix']}entries AS e
JOIN {$serendipity['dbPrefix']}entrycat AS ec
ON ec.entryid = e.id
JOIN {$serendipity['dbPrefix']}category AS c
ON ec.categoryid = c.categoryid");
foreach($rows AS $row) {
serendipity_db_query(
sprintf(
"REPLACE INTO {$serendipity['dbPrefix']}entrytags (entryid, tag) VALUES (%d, %s)",
(int)$row['id'],
serendipity_db_escape_string($row['category_name'])
)
);
printf(
"Category '%s' added as Tag for Entry #%d, '%s'&lt;br /&gt;\n",
htmlspecialchars($row['category_name']),
(int)$row['id'],
htmlspecialchars($row['title'])
);
}
?&gt;
</pre>
</p>
<h1>Historie verzí (ChangeLog)</h1>
<ul>
<li>verze 3.43</li>
<ul>
<li>Statické opravy pro kompatibilitu freetag<->flattr (žádné chyby PHP5)</li>
</ul>
<li>verze 3.42</li>
<ul>
<li>Statické opravy pro generování spartacus</li>
</ul>
<li>verze 3.41</li>
<ul>
<li>Deklarace metody install() jako statické</li>
</ul>
<li>verze 3.39</li>
<ul>
<li>Přidána specifická kontrola is_array($eventData), díky uživateli [gregman]</li>
</ul>
<li>verze 3.38</li>
<ul>
<li>Přidán chybějící fieldset v případě, že není nastavený admin_show_taglist (díky uživateli [gregman])</li>
</ul>
<li>verze 3.37</li>
<ul>
<li>Při publikování příspěvku je nahrazení cat2tag provedeno, i když jsou tagy prázdné, takže název kategorie se v tagách objeví vždycky.</li>
</ul>
<li>verze 3.36</li>
<ul>
<li>Opraven [tag] v jedné instanci formulářového pole v HTML, díky uživateli [ascger] z diskuzního fóra</li>
</ul>
<li>verze 3.35</li>
<ul>
<li>Opraveno - Změna některých instancí [tag] na %5Btag%5D, který je kompatibilní s HTML - bug č.3427291</li>
</ul>
<li>verze 3.34</li>
<ul>
<li>Pro mysql použít pouze sql dotaz SHOW.</li>
</ul>
<li>verze 3.33</li>
<ul>
<li>Odkazy na https:// místo http://, aby správně fungoval backend na serverech se zapnutým SSL. Díky uživateli [Manko10].</li>
</ul>
<li>verze 3.30, 3.31, 3.32</li>
<ul>
<li>Aktualizováno - použitý přiložený tagcloud.swf od WP-Cumulus/Roy Tanck na verzi 1.23.</li>
<li>Opraveno - Hrozba HTML injection nahlášená uživatelem [MustLive]</li>
<li>Opraveno - Hrozba XSS (Cross Site Scripting) nahlášená uživatelem [Stefan Schurtz]</li>
</ul>
<li>verze 3.28</li>
<ul>
<li>Možnost použití konstrukce ?serendipity[tag]=Tag1;Tag2;Tag3</li>
</ul>
<li>verze 3.27</li>
<ul>
<li>Správná detekce porovnání (collation) v MySQL databázi</li>
</ul>
<li>verze 3.26</li>
<ul>
<li>Přidána kontrola is_array() [Timbalu]</li>
</ul>
<li>verze 3.25</li>
<ul>
<li>Oprava kódování databáze</li>
</ul>
<li>verze 3.24</li>
<ul>
<li>Přidáno kórování databáze (MySQL), oprava od uživatele [Vincent]</li>
</ul>
<li>verze 3.23</li>
<ul>
<li>Přidána oprava zalamování bílých znaků, viz <a href="http://board.s9y.org/viewtopic.php?f=5&t=17760">http://board.s9y.org/viewtopic.php?f=5&t=17760</a></li>
</ul>
<li>verze 3.22</li>
<ul>
<li>Ošetřen možný XSS útok (Cross Site Scripting) reportovaný uživatelem [Stefan Schurtz] (SSCHADV2011-004)</li>
</ul>
<li>verze 3.21</li>
<ul>
<li>Přidán háček (event hook) "sort" pro plugin serendipity_event_sort (autor [lazybadger])</li>
</ul>
<li>verze 3.20</li>
<ul>
<li>Mrak tagů se zobrazuje jako smarty šablona "plugin_freetag.tpl". Pokud si chcete přizpůsobit výstup, zkopírujte tento soubor do adresáře vašeho stylu vzhledu a upravte ho dle sebe.</li>
</ul>
<li>verze 3.18</li>
<ul>
<li>Automatická detekce klíčových slov nyní funguje pouze vně html tagů, takže nic jako &lt;a href="..//serendipity/"&gt; nyní nebude detekováno jako klíčové slovo 'serendipity'</li>
</ul>
<li>verze 3.17</li>
<ul>
<li>Přidána funkce do administrátorské sekce: vyčištění tagů přiřazených k neexistujícím příspěvkům.</li>
<li>Text potvrzovacího tlačítko ve formuláři pro přejmenování tagu už není zadán natvrdo, ale dá se přeložit.</li>
<li>Opravena chyba v syntaxi HTML ve formuláři pro přejmenování tagu, a to použitím odpovídající HTML entity.</li>
</ul>
<li>verze 3.16</li>
<ul>
<li>Oprava chyby: Klíčová slova (meta-keywords) se nezobrazovala v příspěvcích.</li>
</ul>
<li>verze 3.15</li>
<ul>
<li>Odstraněna nesprávná chybová hláška "FATAL ERROR! Unrecognized type for
serendipity_event_freetag:: !"
<br />(Fatální chyba! Neznámý typ pro serendipity_event_freetag:: !)</li>
</ul>
<li>verze 3.13, 3.14</li>
<ul>
<li>Přidáno volání funkce mb_internal_encoding() pro správný převod znaků na malá písmena.</li>
</ul>
<li>verze 3.12.1</li>
<ul>
<li>Nahrazeno "wick-based" automatické doplňování jquery pluginem (wick nefungoval v Opeře) </li>
</ul>
<li>verze 3.11.0</li>
<ul>
<li>Přidána volba, zda mají být tagy přidány na základě automatického hledání klíčových slov.</li>
<li>Opraveny falešné výsledky při změně hledání na regulární výrazy.</li>
</ul>
<li>verze 3.10.5</li>
<ul>
<li>Chytání očekávaných chyb v tagcloud query.</li>
</ul>
<li>verze 3.10.4</li>
<ul>
<li>Přidána další kontrola na prázdný výsledek pro potlačení chybových hlášek databáze.</li>
</ul>
<li>verze 3.10.3</li>
<ul>
<li>Opraveny chybějící tagy v náhledu uloženého příspěvku v přehledu příspěvků.</li>
<li>Opraveno připojování výstupu k náhledu v editoru.</li>
</ul>
<li>verze 3.10.2</li>
<ul>
<li>Opravena chybná detekce rozšířeného/jednoduchého příspěvku.</li>
</ul>
<li>verze 3.10</li>
<ul>
<li>Produkuje podobné články jako nečíslovaný seznam &lt;ul&gt;</li>
<li>Zanoření o jeden krok níže při prohledávání podobných tagů.</li>
<li>"Podobné tagy" je nyní odstavec &lt;p&gt; míst původního bloku &lt;div&gt;</li>
<li>Zaveden rozšířený Smarty-Markup</li>
<li>Vyčištění kódu v displayEntry()</li>
</ul>
<li>verze 3.09</li>
<ul>
<li>Opraveno chybějící escapování proměnných v SQL dotazech.</li>
</ul>
<li>verze 3.08 [Chessnut]</li>
<ul>
<li>Při prohlížení příspěvků podle tagů nejsou používána omezení kategoriemi (jako například v pluginu startcat)</li>
</ul>
<li>verze 3.07</li>
<ul>
<li>Kontrola, že se pole array vytvoří pouze při úspěšném provedení SQL dotazu.</li>
</ul>
<li>verze 3.06 [garvinhicking]</li>
<ul>
<li>Oprava automatického hledání dle klíčových slov i na tagy s velkými písmeny.</li>
</ul>
<li>verze 3.05 [garvinhicking]</li>
<ul>
<li>Používání pouze flash-bg/fg barev, pokud je flash cloud zapnut.</li>
</ul>
<li>verze 3.04 [garvinhicking]</li>
<ul>
<li>Přidána nezdokumentovaná volba pro vložení příbuzných příspěvků do přehledu (<a href="http://board.s9y.org/viewtopic.php?f=10&t=11124&p=83814#p83814">http://board.s9y.org/viewtopic.php?f=10&t=11124&p=83814#p83814</a>)</li>
</ul>
<li>verze 3.03 [garvinhicking]</li>
<ul>
<li>Přidáno escapování databáze při čtení tagů.</li>
<li>Opraven duplicitní řetězec LIMIT v SQl dotazu. (Díky uživateli [rupa])</li>
</ul>
<li>verze 3.01 [designor]</li>
<ul>
<li>Optimalizace výstupu, použití nejnovějšího SWFObject.</li>
</ul>
<li>verze 3.0 [lstrojny]</li>
<ul>
<li>Oprava verze</li>
</ul>
<li>verze 2.51 [lstrojny]</li>
<ul>
<li>Opraveno řazení tagů při použití se šablonou.</li>
</ul>
<li>verze 2.5 [lstrojny]</li>
<ul>
<li>Přidání možnosti použití Smarty šablony pro vykreslení postranního sloupce.</li>
<li>Sjednocení čísel verzí.</li>
</ul>
<li>verze 2.105 [RobA]</li>
<ul>
<li>Opravy ve Flashi, omezování počtu tagů, výchozí hodnoty nastavení.</li>
</ul>
<li>verze 2.103 [RobA]</li>
<ul>
<li>Přidán rotující Flashový tagcloud (mrak tagů)</li>
</ul>
<li>verze 2.97 [garvinhicking]</li>
<ul>
<li>Možnost umístění tagů do smarty šablony pomocí {$entry.freetag}, pokud je nastaveno použití smarty.</li>
</ul>
<li>verze 2.96 [garvinhicking]</li>
<ul>
<li>Oprava XSS při zobrazování mraku příbuzných tagů, díky [<a href="mailto:Alex@bitsploit.de">Alex@bitsploit.de</a>]</li>
</ul>
<li>verze 2.95 [garvinhicking]</li>
<ul>
<li>Přidán nastavitelný obrázek technorati</li>
</ul>
<li>verze 2.92/2.45 [brockhaus]</li>
<ul>
<li>Přidáno nastavení pro XML obrázek</li>
</ul>
<li>verze 2.88/2.44 [brockhaus]</li>
<ul>
<li>Přidán volitelný tag technorati za tagy v patičce příspěvku.</li>
</ul>
<li>verze 2.88/2.43 [brockhaus]</li>
<ul>
<li>Přidána možnost nastavení minimální/maximální velikosti fontu v postranním sloupci.</li>
</ul>
<li>verze 2.88/2.42 [garvinhicking]</li>
<ul>
<li>Řazení tagů v postranním sloupci bez ohledu na velikost písmen.</li>
</ul>
<li>verze 2.88/2.41 [brockhaus]</li>
<ul>
<li>Plugin pro postranní sloupec vždycky načetl prvních X tagů podle jména, ne podle příbuznosti (tagcount, počet tagů). Tedy příbuzné/podobné tagy tagy na konci abecedy se nezobrazovaly.</li>
</ul>
<li>verze 2.70</li>
<ul>
<li>Přidána možnost "automatické tagy". To znamená, které tagy přiřadit k příspěvku, pokud jsou v něm nalezena klíčová slova svázaná s tagem.</li>
</ul>
<li>verze 2.64</li>
<ul>
<li>Přidána volba pro převod kategorií na tagy.</li>
</ul>
<li>verze 2.48</li>
<ul>
<li>Nastavení pro převod na mlá písmena, oprava od [Lars Strojny]</li>
</ul>
<li>verze 2.47</li>
<ul>
<li>Lepší zobrazování meta-informací</li>
</ul>
<li>verze 2.44</li>
<ul>
<li>Zobrazování podobných příspěvků, oprava od [Stain]</li>
<li>Změna místa zobrazování tagů, nyní nastavitelné uživatelem.</li>
</ul>
</ul>
</body>
</html>

View file

@ -1,354 +0,0 @@
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Dokumentace: Freetag</title>
<style>
pre {
display: block;
padding: 5px;
border: solid 1px #333333;
background-color: #cccccc;
}
</style>
</head>
<body>
<h1>Dokumentace k pluginu 'Freetag'<br />
<small>(serendipity_event_freetag)</small></h1>
<p>Dokumentaci k tomuto pluginu přeložil do češtiny Vladimír Ajgl (vlada [zavinac] ajgl [tecka] cz) a naposledy zkontroloval dne 20.4.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="../README">aktuální anglické "README"</a>, <a href="../README.txt">"README.txt"</a> a <a href="../ChangeLog">ChangeLog</a>.
<p>
<h2>Popis pluginu</h2>
<p>
Umožňuje libovolné přidávání klíčových slov k příspěvkům
</p>
<h2>Užitečné skripty</h2>
<p>Následující kód ukazuje příklad, jak použít rozšířený výstup do smarty šablony. Takto může například vypadat šablona "entries.tpl"
<pre>
{if isset($entry.freetag.extended) && $entry.freetag.extended == 1}
{if $entry.freetag.tags.tags}
&lt;div class="serendipity_freeTag"&gt;{$entry.freetag.tags.description}
{foreach from=$entry.freetag.tags.tags item="tag"}
{$tag}
{/foreach}
&lt;/div&gt;
{if $is_single_entry or $is_preview}
{$entry.freetag.related.description}
&lt;ul class="serendipity_freeTag_related"&gt;
{foreach from=$entry.freetag.related.entries item="link"}
&lt;li&gt;{$link}&lt;/li&gt;
{/foreach}
&lt;/ul&gt;
{/if}
{/if}
{else}
{$entry.freetag}
{/if}
</pre>
</p>
<p>
Pomocí následujícího sql dotazu můžete v databázi vytvořit tagy z existujících kategorií:
<pre>
INSERT INTO serendipity_entrytags (entryid, tag)
SELECT serendipity_entries.id, serendipity_category.category_name
FROM serendipity_entries, serendipity_category, serendipity_entrycat
WHERE serendipity_entrycat.entryid = serendipity_entries.id
AND serendipity_category.categoryid = serendipity_entrycat.categoryid;
</pre>
(převzato z <a href="http://pixelated-dreams.com/archives/229-Spring-Cleaning.html">http://pixelated-dreams.com/archives/229-Spring-Cleaning.html</a>)
</p>
<p>
A nebo můžete pro vytvoření tagů z kategorií použít následující skript:
<pre>
&lt;?php
include 'serendipity_config.inc.php';
$rows = serendipity_db_query("SELECT e.id, e.title, c.category_name
FROM {$serendipity['dbPrefix']}entries AS e
JOIN {$serendipity['dbPrefix']}entrycat AS ec
ON ec.entryid = e.id
JOIN {$serendipity['dbPrefix']}category AS c
ON ec.categoryid = c.categoryid");
foreach($rows AS $row) {
serendipity_db_query(
sprintf(
"REPLACE INTO {$serendipity['dbPrefix']}entrytags (entryid, tag) VALUES (%d, %s)",
(int)$row['id'],
serendipity_db_escape_string($row['category_name'])
)
);
printf(
"Category '%s' added as Tag for Entry #%d, '%s'&lt;br /&gt;\n",
htmlspecialchars($row['category_name']),
(int)$row['id'],
htmlspecialchars($row['title'])
);
}
?&gt;
</pre>
</p>
<h1>Historie verzí (ChangeLog)</h1>
<ul>
<li>verze 3.43</li>
<ul>
<li>Statické opravy pro kompatibilitu freetag<->flattr (žádné chyby PHP5)</li>
</ul>
<li>verze 3.42</li>
<ul>
<li>Statické opravy pro generování spartacus</li>
</ul>
<li>verze 3.41</li>
<ul>
<li>Deklarace metody install() jako statické</li>
</ul>
<li>verze 3.39</li>
<ul>
<li>Přidána specifická kontrola is_array($eventData), díky uživateli [gregman]</li>
</ul>
<li>verze 3.38</li>
<ul>
<li>Přidán chybějící fieldset v případě, že není nastavený admin_show_taglist (díky uživateli [gregman])</li>
</ul>
<li>verze 3.37</li>
<ul>
<li>Při publikování příspěvku je nahrazení cat2tag provedeno, i když jsou tagy prázdné, takže název kategorie se v tagách objeví vždycky.</li>
</ul>
<li>verze 3.36</li>
<ul>
<li>Opraven [tag] v jedné instanci formulářového pole v HTML, díky uživateli [ascger] z diskuzního fóra</li>
</ul>
<li>verze 3.35</li>
<ul>
<li>Opraveno - Změna některých instancí [tag] na %5Btag%5D, který je kompatibilní s HTML - bug č.3427291</li>
</ul>
<li>verze 3.34</li>
<ul>
<li>Pro mysql použít pouze sql dotaz SHOW.</li>
</ul>
<li>verze 3.33</li>
<ul>
<li>Odkazy na https:// místo http://, aby správně fungoval backend na serverech se zapnutým SSL. Díky uživateli [Manko10].</li>
</ul>
<li>verze 3.30, 3.31, 3.32</li>
<ul>
<li>Aktualizováno - použitý přiložený tagcloud.swf od WP-Cumulus/Roy Tanck na verzi 1.23.</li>
<li>Opraveno - Hrozba HTML injection nahlášená uživatelem [MustLive]</li>
<li>Opraveno - Hrozba XSS (Cross Site Scripting) nahlášená uživatelem [Stefan Schurtz]</li>
</ul>
<li>verze 3.28</li>
<ul>
<li>Možnost použití konstrukce ?serendipity[tag]=Tag1;Tag2;Tag3</li>
</ul>
<li>verze 3.27</li>
<ul>
<li>Správná detekce porovnání (collation) v MySQL databázi</li>
</ul>
<li>verze 3.26</li>
<ul>
<li>Přidána kontrola is_array() [Timbalu]</li>
</ul>
<li>verze 3.25</li>
<ul>
<li>Oprava kódování databáze</li>
</ul>
<li>verze 3.24</li>
<ul>
<li>Přidáno kórování databáze (MySQL), oprava od uživatele [Vincent]</li>
</ul>
<li>verze 3.23</li>
<ul>
<li>Přidána oprava zalamování bílých znaků, viz <a href="http://board.s9y.org/viewtopic.php?f=5&t=17760">http://board.s9y.org/viewtopic.php?f=5&t=17760</a></li>
</ul>
<li>verze 3.22</li>
<ul>
<li>Ošetřen možný XSS útok (Cross Site Scripting) reportovaný uživatelem [Stefan Schurtz] (SSCHADV2011-004)</li>
</ul>
<li>verze 3.21</li>
<ul>
<li>Přidán háček (event hook) "sort" pro plugin serendipity_event_sort (autor [lazybadger])</li>
</ul>
<li>verze 3.20</li>
<ul>
<li>Mrak tagů se zobrazuje jako smarty šablona "plugin_freetag.tpl". Pokud si chcete přizpůsobit výstup, zkopírujte tento soubor do adresáře vašeho stylu vzhledu a upravte ho dle sebe.</li>
</ul>
<li>verze 3.18</li>
<ul>
<li>Automatická detekce klíčových slov nyní funguje pouze vně html tagů, takže nic jako &lt;a href="..//serendipity/"&gt; nyní nebude detekováno jako klíčové slovo 'serendipity'</li>
</ul>
<li>verze 3.17</li>
<ul>
<li>Přidána funkce do administrátorské sekce: vyčištění tagů přiřazených k neexistujícím příspěvkům.</li>
<li>Text potvrzovacího tlačítko ve formuláři pro přejmenování tagu už není zadán natvrdo, ale dá se přeložit.</li>
<li>Opravena chyba v syntaxi HTML ve formuláři pro přejmenování tagu, a to použitím odpovídající HTML entity.</li>
</ul>
<li>verze 3.16</li>
<ul>
<li>Oprava chyby: Klíčová slova (meta-keywords) se nezobrazovala v příspěvcích.</li>
</ul>
<li>verze 3.15</li>
<ul>
<li>Odstraněna nesprávná chybová hláška "FATAL ERROR! Unrecognized type for
serendipity_event_freetag:: !"
<br />(Fatální chyba! Neznámý typ pro serendipity_event_freetag:: !)</li>
</ul>
<li>verze 3.13, 3.14</li>
<ul>
<li>Přidáno volání funkce mb_internal_encoding() pro správný převod znaků na malá písmena.</li>
</ul>
<li>verze 3.12.1</li>
<ul>
<li>Nahrazeno "wick-based" automatické doplňování jquery pluginem (wick nefungoval v Opeře) </li>
</ul>
<li>verze 3.11.0</li>
<ul>
<li>Přidána volba, zda mají být tagy přidány na základě automatického hledání klíčových slov.</li>
<li>Opraveny falešné výsledky při změně hledání na regulární výrazy.</li>
</ul>
<li>verze 3.10.5</li>
<ul>
<li>Chytání očekávaných chyb v tagcloud query.</li>
</ul>
<li>verze 3.10.4</li>
<ul>
<li>Přidána další kontrola na prázdný výsledek pro potlačení chybových hlášek databáze.</li>
</ul>
<li>verze 3.10.3</li>
<ul>
<li>Opraveny chybějící tagy v náhledu uloženého příspěvku v přehledu příspěvků.</li>
<li>Opraveno připojování výstupu k náhledu v editoru.</li>
</ul>
<li>verze 3.10.2</li>
<ul>
<li>Opravena chybná detekce rozšířeného/jednoduchého příspěvku.</li>
</ul>
<li>verze 3.10</li>
<ul>
<li>Produkuje podobné články jako nečíslovaný seznam &lt;ul&gt;</li>
<li>Zanoření o jeden krok níže při prohledávání podobných tagů.</li>
<li>"Podobné tagy" je nyní odstavec &lt;p&gt; míst původního bloku &lt;div&gt;</li>
<li>Zaveden rozšířený Smarty-Markup</li>
<li>Vyčištění kódu v displayEntry()</li>
</ul>
<li>verze 3.09</li>
<ul>
<li>Opraveno chybějící escapování proměnných v SQL dotazech.</li>
</ul>
<li>verze 3.08 [Chessnut]</li>
<ul>
<li>Při prohlížení příspěvků podle tagů nejsou používána omezení kategoriemi (jako například v pluginu startcat)</li>
</ul>
<li>verze 3.07</li>
<ul>
<li>Kontrola, že se pole array vytvoří pouze při úspěšném provedení SQL dotazu.</li>
</ul>
<li>verze 3.06 [garvinhicking]</li>
<ul>
<li>Oprava automatického hledání dle klíčových slov i na tagy s velkými písmeny.</li>
</ul>
<li>verze 3.05 [garvinhicking]</li>
<ul>
<li>Používání pouze flash-bg/fg barev, pokud je flash cloud zapnut.</li>
</ul>
<li>verze 3.04 [garvinhicking]</li>
<ul>
<li>Přidána nezdokumentovaná volba pro vložení příbuzných příspěvků do přehledu (<a href="http://board.s9y.org/viewtopic.php?f=10&t=11124&p=83814#p83814">http://board.s9y.org/viewtopic.php?f=10&t=11124&p=83814#p83814</a>)</li>
</ul>
<li>verze 3.03 [garvinhicking]</li>
<ul>
<li>Přidáno escapování databáze při čtení tagů.</li>
<li>Opraven duplicitní řetězec LIMIT v SQl dotazu. (Díky uživateli [rupa])</li>
</ul>
<li>verze 3.01 [designor]</li>
<ul>
<li>Optimalizace výstupu, použití nejnovějšího SWFObject.</li>
</ul>
<li>verze 3.0 [lstrojny]</li>
<ul>
<li>Oprava verze</li>
</ul>
<li>verze 2.51 [lstrojny]</li>
<ul>
<li>Opraveno řazení tagů při použití se šablonou.</li>
</ul>
<li>verze 2.5 [lstrojny]</li>
<ul>
<li>Přidání možnosti použití Smarty šablony pro vykreslení postranního sloupce.</li>
<li>Sjednocení čísel verzí.</li>
</ul>
<li>verze 2.105 [RobA]</li>
<ul>
<li>Opravy ve Flashi, omezování počtu tagů, výchozí hodnoty nastavení.</li>
</ul>
<li>verze 2.103 [RobA]</li>
<ul>
<li>Přidán rotující Flashový tagcloud (mrak tagů)</li>
</ul>
<li>verze 2.97 [garvinhicking]</li>
<ul>
<li>Možnost umístění tagů do smarty šablony pomocí {$entry.freetag}, pokud je nastaveno použití smarty.</li>
</ul>
<li>verze 2.96 [garvinhicking]</li>
<ul>
<li>Oprava XSS při zobrazování mraku příbuzných tagů, díky [<a href="mailto:Alex@bitsploit.de">Alex@bitsploit.de</a>]</li>
</ul>
<li>verze 2.95 [garvinhicking]</li>
<ul>
<li>Přidán nastavitelný obrázek technorati</li>
</ul>
<li>verze 2.92/2.45 [brockhaus]</li>
<ul>
<li>Přidáno nastavení pro XML obrázek</li>
</ul>
<li>verze 2.88/2.44 [brockhaus]</li>
<ul>
<li>Přidán volitelný tag technorati za tagy v patičce příspěvku.</li>
</ul>
<li>verze 2.88/2.43 [brockhaus]</li>
<ul>
<li>Přidána možnost nastavení minimální/maximální velikosti fontu v postranním sloupci.</li>
</ul>
<li>verze 2.88/2.42 [garvinhicking]</li>
<ul>
<li>Řazení tagů v postranním sloupci bez ohledu na velikost písmen.</li>
</ul>
<li>verze 2.88/2.41 [brockhaus]</li>
<ul>
<li>Plugin pro postranní sloupec vždycky načetl prvních X tagů podle jména, ne podle příbuznosti (tagcount, počet tagů). Tedy příbuzné/podobné tagy tagy na konci abecedy se nezobrazovaly.</li>
</ul>
<li>verze 2.70</li>
<ul>
<li>Přidána možnost "automatické tagy". To znamená, které tagy přiřadit k příspěvku, pokud jsou v něm nalezena klíčová slova svázaná s tagem.</li>
</ul>
<li>verze 2.64</li>
<ul>
<li>Přidána volba pro převod kategorií na tagy.</li>
</ul>
<li>verze 2.48</li>
<ul>
<li>Nastavení pro převod na mlá písmena, oprava od [Lars Strojny]</li>
</ul>
<li>verze 2.47</li>
<ul>
<li>Lepší zobrazování meta-informací</li>
</ul>
<li>verze 2.44</li>
<ul>
<li>Zobrazování podobných příspěvků, oprava od [Stain]</li>
<li>Změna místa zobrazování tagů, nyní nastavitelné uživatelem.</li>
</ul>
</ul>
</body>
</html>

View file

@ -1,4 +1,4 @@
<?php #
<?php
/**
* @version
@ -56,6 +56,9 @@
@define('PLUGIN_FREETAG_MAX_TAGS', 'Wieviele Tags sollen angezeigt werden?');
@define('PLUGIN_FREETAG_TRESHOLD_TAG_COUNT', 'Wie oft muss ein Tag vorkommen, damit er angezeigt wird?');
//
// later on additions
//
@define('PLUGIN_EVENT_FREETAG_TAGCLOUD_MIN', 'Minimale Schriftgröße eines Tags in der Wolke in %');
@define('PLUGIN_EVENT_FREETAG_TAGCLOUD_MAX', 'Maximale Schriftgröße eines Tags in der Wolke in %');
@ -99,15 +102,21 @@
@define('PLUGIN_EVENT_FREETAG_ORDER_TAGNAME', 'Tag-Name');
@define('PLUGIN_EVENT_FREETAG_ORDER_TAGCOUNT', 'Tag-Anzahl');
@define('PLUGIN_EVENT_FREETAG_TECHNORATI_TAGLINK', 'Technorati Tag Links');
@define('PLUGIN_EVENT_FREETAG_TECHNORATI_TAGLINK', 'Technorati Tag Links');
@define('PLUGIN_EVENT_FREETAG_TECHNORATI_TAGLINK_DESC', 'Fügt Links auf Technorati Tags hinzu. Wenn auf diese Links geklickt wird, so wird eine Liste von ähnlichen Einträgen in weiteren Blogs angezeigt, die in Technorati zu dem entsprechenden Tag gespeichert wurden.');
@define('PLUGIN_EVENT_FREETAG_TECHNORATI_TAGLINK_IMG', 'Technorati Tag Bild');
@define('PLUGIN_EVENT_FREETAG_TECHNORATI_TAGLINK_IMG', 'Technorati Tag Bild');
@define('PLUGIN_EVENT_FREETAG_XMLIMAGE', 'XML Bild relativ zum Template Verzeichnis');
@define('PLUGIN_EVENT_FREETAG_XMLIMAGE', 'XML Bild relativ zum Template Verzeichnis');
@define('PLUGIN_EVENT_FREETAG_EMBED_FOOTER_DESC2', 'Wenn auf "Smarty" gestellt wird, dann wird eine smarty Variable {$entry.freetag} generiert, die an beliebiger Stelle in der entries.tpl Vorlagendatei eingefügt werden kann.');
@define('PLUGIN_EVENT_FREETAG_EXTENDED_SMARTY', 'Erweiteres Smarty');
@define('PLUGIN_EVENT_FREETAG_EXTENDED_SMARTY_DESC', 'Nutze statt der HTML-Ausgabe, ob nun direkt oder per Smarty, verschiedene Smartyvariablen, die im Template zusammgefügt werden können. Dies überschreibt alle anderen diesbezüglichen Einstellungen. Ein Beispiel für die Nutzung findet sich im Readme.');
@define('PLUGIN_EVENT_FREETAG_KILL', 'Wenn aktiviert werden alle zugeh&ouml;rigen Tags gel&ouml;scht.');
@define('PLUGIN_EVENT_FREETAG_TAGLINK_DESC', 'Eine mögliche Änderung des Taglinks wäre "plugin/taglist/" anstelle von "plugin/tag/" zu schreiben. Dies wäre das Kommando, um jeden Taglink als Liste, anstelle von bereits geöffneten Artikeln, auszugeben. Man kann aber ebenso manuell für bestimmte Taglinks den "/taglist" tag an einen bereits existierenden Taglink (zB. "/plugin/tag/deine/tags/taglist") anhängen. In beiden Fällen ist "taglist" fortan ein reserviertes Kommando und kann nicht mehr als normales Tagwort verwendet werden. Für beide Möglichkeiten ist eine eigenhändig eingebaute Code-Änderung nötig, so wie in der Dokumentation für die "tag-as-list" Option beschrieben wird.');
@define('PLUGIN_EVENT_FREETAG_TAGSASLIST', 'Erlaube "tags-as-list" = ungeöffnete Artikel');
@define('PLUGIN_EVENT_FREETAG_TAGSASLIST_DESC', 'In der Plugin-Dokumentation ist zu lesen, wie die existierende templates entries.tpl Datei für die Listenanzeige der Taglink-Ausgabe im Code geändert werden muss.');

View file

@ -96,10 +96,194 @@ foreach($rows AS $row) {
</pre>
</p>
<p>&nbsp;</p>
<h3>Option: Tags-as-list</h3>
<p>The following code illustrates on how to change your templates entries.tpl file (all + lines, without '+ '):</p>
<pre class="prettyprint linenums lang-html " data-pbcklang="html" data-pbcktabsize="4">
{serendipity_hookPlugin hook=&quot;entries_header&quot; addData=&quot;$entry_id&quot;}
+ {if $taglist}
+ &lt;article id=&quot;taglistentries&quot; class=&quot;clearfix serendipity_entry&quot;&gt;
+ &lt;div class=&quot;clearfix content serendipity_entry_body&quot;&gt;
+ &lt;h2&gt;{$head_subtitle}&lt;/h2&gt;
+ {foreach from=$entries item=&quot;dategroup&quot;}
+ {foreach from=$dategroup.entries item=&quot;entry&quot;}
+
+ &lt;div class=&quot;static-entries-list&quot;&gt;
+ ({$dategroup.date|date_format:&quot;%d.%m.%Y&quot;}) &lt;a href=&quot;{$entry.link}&quot;&gt;{$entry.title|default:$entry.id}&lt;/a&gt;
+ &lt;/div&gt;
+
+ {/foreach}
+ {/foreach}
+
+ &lt;/div&gt;
+ &lt;/article&gt;
+
+ {else}
+
{foreach from=$entries item=&quot;dategroup&quot;}
{foreach from=$dategroup.entries item=&quot;entry&quot;}
{assign var=&quot;entry&quot; value=$entry scope=&quot;parent&quot;}
&lt;article id=&quot;post_{$entry.id}&quot; class=&quot;clearfix serendipity_entry{if $dategroup.is_sticky} sticky{/if}&quot;&gt;
&lt;header class=&quot;clearfix&quot;&gt;
&lt;h2&gt;&lt;a href=&quot;{$entry.link}&quot;&gt;{$entry.title}&lt;/a&gt;&lt;/h2&gt;
&lt;span class=&quot;serendipity_byline block_level&quot;&gt;&lt;span class=&quot;single_user&quot;&gt;{$CONST.POSTED_BY} &lt;a href=&quot;{$entry.link_author}&quot;&gt;{$entry.author}&lt;/a&gt; {$CONST.ON} &lt;/span&gt;&lt;time datetime=&quot;{$entry.timestamp|@serendipity_html5time}&quot;&gt;{$entry.timestamp|@formatTime:$template_option.date_format}&lt;/time&gt;{if $entry.is_entry_owner and not $is_preview} | &lt;a href=&quot;{$entry.link_edit}&quot;&gt;{$CONST.EDIT_ENTRY}&lt;/a&gt;{/if}&lt;/span&gt;
&lt;/header&gt;
&lt;div class=&quot;clearfix content serendipity_entry_body&quot;&gt;
{if $entry.categories}{foreach from=$entry.categories item=&quot;entry_category&quot;}{if $entry_category.category_icon}&lt;a href=&quot;{$entry_category.category_link}&quot;&gt;&lt;img class=&quot;serendipity_entryIcon&quot; title=&quot;{$entry_category.category_name|@escape}{$entry_category.category_description|@emptyPrefix}&quot; alt=&quot;{$entry_category.category_name|@escape}&quot; src=&quot;{$entry_category.category_icon}&quot;&gt;&lt;/a&gt;{/if}{/foreach}{/if}
{$entry.body}
{if $entry.has_extended and not $is_single_entry and not $entry.is_extended}
&lt;a class=&quot;read_more block_level&quot; href=&quot;{$entry.link}#extended&quot;&gt;{$CONST.VIEW_EXTENDED_ENTRY|@sprintf:$entry.title}&lt;/a&gt;
{/if}
&lt;/div&gt;
{if $entry.is_extended}
&lt;div id=&quot;extended&quot; class=&quot;clearfix content&quot;&gt;
{$entry.extended}
&lt;/div&gt;
{/if}
{if $entry.plugin_display_dat}
{$entry.plugin_display_dat}
{/if}
&lt;footer class=&quot;clearfix&quot;&gt;
{if $entry.categories}
&lt;span class=&quot;visuallyhidden&quot;&gt;{$CONST.CATEGORIES}: &lt;/span&gt;{foreach from=$entry.categories item=&quot;entry_category&quot; name=&quot;categories&quot;}&lt;a href=&quot;{$entry_category.category_link}&quot;&gt;{$entry_category.category_name|@escape}&lt;/a&gt;{if not $smarty.foreach.categories.last}, {/if}{/foreach}
{/if}
{if $entry.categories and ($entry.has_comments or $entry.has_disqus)} | {/if}
{if ($entry.has_comments or $entry.has_disqus)}
{if $entry.has_disqus }
{$entry.comments}{if $entry.has_trackbacks}, &lt;a href=&quot;{$entry.link}#trackbacks&quot;&gt;{$entry.trackbacks} {$entry.label_trackbacks}&lt;/a&gt;{/if}
{else}
&lt;a href=&quot;{$entry.link}#comments&quot; title=&quot;{$entry.comments} {$entry.label_comments}{if $entry.has_trackbacks}, {$entry.trackbacks} {$entry.label_trackbacks}{/if}&quot;&gt;{$entry.comments} {$entry.label_comments}&lt;/a&gt;
{/if}
{/if}
{if $entry.url_tweetthis}
| &lt;a href=&quot;{$entry.url_tweetthis}&quot; title=&quot;{$CONST.TWOK11_TWEET_THIS}&quot;&gt;Twitter&lt;/a&gt;
{/if}
{if $entry.url_dentthis}
| &lt;a href=&quot;{$entry.url_dentthis}&quot; title=&quot;{$CONST.TWOK11_DENT_THIS}&quot;&gt;Identica&lt;/a&gt;
{/if}
{if $entry.url_shorturl}
| &lt;a href=&quot;{$entry.url_shorturl}&quot; title=&quot;{$CONST.TWOK11_SHORT_URL_HINT}&quot; class=&quot;short-url&quot;&gt;{$CONST.TWOK11_SHORT_URL}&lt;/a&gt;
{/if}
{$entry.add_footer}
&lt;/footer&gt;
&lt;!--
&lt;rdf:RDF xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot;
xmlns:trackback=&quot;http://madskills.com/public/xml/rss/module/trackback/&quot;
xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot;&gt;
&lt;rdf:Description
rdf:about=&quot;{$entry.link_rdf}&quot;
trackback:ping=&quot;{$entry.link_trackback}&quot;
dc:title=&quot;{$entry.title_rdf|@default:$entry.title}&quot;
dc:identifier=&quot;{$entry.rdf_ident}&quot; /&gt;
&lt;/rdf:RDF&gt;
--&gt;
{if $is_single_entry and not $is_preview}
{if $CONST.DATA_UNSUBSCRIBED}
&lt;p class=&quot;serendipity_msg_notice&quot;&gt;{$CONST.DATA_UNSUBSCRIBED|@sprintf:$CONST.UNSUBSCRIBE_OK}&lt;/p&gt;
{/if}
{if $CONST.DATA_TRACKBACK_DELETED}
&lt;p class=&quot;serendipity_msg_notice&quot;&gt;{$CONST.DATA_TRACKBACK_DELETED|@sprintf:$CONST.TRACKBACK_DELETED}&lt;/p&gt;
{/if}
{if $CONST.DATA_TRACKBACK_APPROVED}
&lt;p class=&quot;serendipity_msg_notice&quot;&gt;{$CONST.DATA_TRACKBACK_APPROVED|@sprintf:$CONST.TRACKBACK_APPROVED}&lt;/p&gt;
{/if}
{if $CONST.DATA_COMMENT_DELETED}
&lt;p class=&quot;serendipity_msg_notice&quot;&gt;{$CONST.DATA_COMMENT_DELETED|@sprintf:$CONST.COMMENT_DELETED}&lt;/p&gt;
{/if}
{if $CONST.DATA_COMMENT_APPROVED}
&lt;p class=&quot;serendipity_msg_notice&quot;&gt;{$CONST.DATA_COMMENT_APPROVED|@sprintf:$CONST.COMMENT_APPROVED}&lt;/p&gt;
{/if}
&lt;section id=&quot;trackbacks&quot; class=&quot;serendipity_comments serendipity_section_trackbacks&quot;&gt;
&lt;h3&gt;{$CONST.TRACKBACKS}&lt;/h3&gt;
&lt;div id=&quot;trackback_url&quot; class=&quot;block_level&quot;&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;{$entry.link_trackback}&quot; title=&quot;{$CONST.TRACKBACK_SPECIFIC_ON_CLICK|@escape}&quot;&gt;{$CONST.TRACKBACK_SPECIFIC}&lt;/a&gt;&lt;/div&gt;
{serendipity_printTrackbacks entry=$entry.id}
&lt;/section&gt;
&lt;section id=&quot;comments&quot; class=&quot;serendipity_comments serendipity_section_comments&quot;&gt;
&lt;h3&gt;{$CONST.COMMENTS}&lt;/h3&gt;
&lt;p class=&quot;manage_comments&quot;&gt;{$CONST.DISPLAY_COMMENTS_AS}
{if $entry.viewmode eq $CONST.VIEWMODE_LINEAR}
{$CONST.COMMENTS_VIEWMODE_LINEAR} | &lt;a href=&quot;{$entry.link_viewmode_threaded}#comments&quot; rel=&quot;nofollow&quot;&gt;{$CONST.COMMENTS_VIEWMODE_THREADED}&lt;/a&gt;
{else}
&lt;a rel=&quot;nofollow&quot; href=&quot;{$entry.link_viewmode_linear}#comments&quot;&gt;{$CONST.COMMENTS_VIEWMODE_LINEAR}&lt;/a&gt; | {$CONST.COMMENTS_VIEWMODE_THREADED}
{/if}
&lt;/p&gt;
{serendipity_printComments entry=$entry.id mode=$entry.viewmode}
{if $entry.is_entry_owner}
&lt;p class=&quot;manage_comments&quot;&gt;
{if $entry.allow_comments}
&lt;a href=&quot;{$entry.link_deny_comments}&quot;&gt;{$CONST.COMMENTS_DISABLE}&lt;/a&gt;
{else}
&lt;a href=&quot;{$entry.link_allow_comments}&quot;&gt;{$CONST.COMMENTS_ENABLE}&lt;/a&gt;
{/if}
&lt;/p&gt;
{/if}
&lt;/section&gt;
&lt;a id=&quot;feedback&quot;&gt;&lt;/a&gt;
{foreach from=$comments_messagestack item=&quot;message&quot;}
&lt;p class=&quot;serendipity_msg_important&quot;&gt;{$message}&lt;/p&gt;
{/foreach}
{if $is_comment_added}
&lt;p class=&quot;serendipity_msg_notice&quot;&gt;{$CONST.COMMENT_ADDED}&lt;/p&gt;
{elseif $is_comment_moderate}
&lt;p class=&quot;serendipity_msg_notice&quot;&gt;{$CONST.COMMENT_ADDED}: {$CONST.THIS_COMMENT_NEEDS_REVIEW}&lt;/p&gt;
{elseif not $entry.allow_comments}
&lt;p class=&quot;serendipity_msg_important&quot;&gt;{$CONST.COMMENTS_CLOSED}&lt;/p&gt;
{/if}
&lt;section id=&quot;respond&quot; class=&quot;serendipity_section_commentform&quot;&gt;
&lt;h3&gt;{$CONST.ADD_COMMENT}&lt;/h3&gt;
{$COMMENTFORM}
&lt;/section&gt;
{/if}
{$entry.backend_preview}
&lt;/article&gt;
{/foreach}
{foreachelse}
{if not $plugin_clean_page}
&lt;p class=&quot;nocontent&quot;&gt;{$CONST.NO_ENTRIES_TO_PRINT}&lt;/p&gt;
{/if}
{/foreach}
+
+ {/if}{* not taglist end *}
+
{if $footer_info or $footer_prev_page or $footer_next_page}
&lt;nav class=&quot;serendipity_pagination block_level&quot;&gt;
&lt;h2 class=&quot;visuallyhidden&quot;&gt;{$CONST.TWOK11_PAG_TITLE}&lt;/h2&gt;
&lt;ul class=&quot;clearfix&quot;&gt;
{if $footer_info}
&lt;li class=&quot;info&quot;&gt;&lt;span&gt;{$footer_info}&lt;/span&gt;&lt;/li&gt;
{/if}
&lt;li class=&quot;prev&quot;&gt;{if $footer_prev_page}&lt;a href=&quot;{$footer_prev_page}&quot;&gt;{/if}{if $footer_prev_page}&amp;larr; {$CONST.PREVIOUS_PAGE}{else}&amp;nbsp;{/if}{if $footer_prev_page}&lt;/a&gt;{/if}&lt;/li&gt;
&lt;li class=&quot;next&quot;&gt;{if $footer_next_page}&lt;a href=&quot;{$footer_next_page}&quot;&gt;{/if}{if $footer_next_page}{$CONST.NEXT_PAGE} &amp;rarr;{else}&amp;nbsp;{/if}{if $footer_next_page}&lt;/a&gt;{/if}&lt;/li&gt;
&lt;/ul&gt;
&lt;/nav&gt;
{/if}
{serendipity_hookPlugin hook=&quot;entries_footer&quot;}
</pre>
<p>&nbsp;</p>
<h1>Historie verzí (ChangeLog)</h1>
<ul>
<li>Please read more current Changelog!</li>
<li>verze 3.43</li>
<ul>
<li>Statické opravy pro kompatibilitu freetag<->flattr (žádné chyby PHP5)</li>

View file

@ -96,10 +96,194 @@ foreach($rows AS $row) {
</pre>
</p>
<p>&nbsp;</p>
<h3>Option: Tags-as-list</h3>
<p>The following code illustrates on how to change your templates entries.tpl file (all + lines, without '+ '):</p>
<pre class="prettyprint linenums lang-html " data-pbcklang="html" data-pbcktabsize="4">
{serendipity_hookPlugin hook=&quot;entries_header&quot; addData=&quot;$entry_id&quot;}
+ {if $taglist}
+ &lt;article id=&quot;taglistentries&quot; class=&quot;clearfix serendipity_entry&quot;&gt;
+ &lt;div class=&quot;clearfix content serendipity_entry_body&quot;&gt;
+ &lt;h2&gt;{$head_subtitle}&lt;/h2&gt;
+ {foreach from=$entries item=&quot;dategroup&quot;}
+ {foreach from=$dategroup.entries item=&quot;entry&quot;}
+
+ &lt;div class=&quot;static-entries-list&quot;&gt;
+ ({$dategroup.date|date_format:&quot;%d.%m.%Y&quot;}) &lt;a href=&quot;{$entry.link}&quot;&gt;{$entry.title|default:$entry.id}&lt;/a&gt;
+ &lt;/div&gt;
+
+ {/foreach}
+ {/foreach}
+
+ &lt;/div&gt;
+ &lt;/article&gt;
+
+ {else}
+
{foreach from=$entries item=&quot;dategroup&quot;}
{foreach from=$dategroup.entries item=&quot;entry&quot;}
{assign var=&quot;entry&quot; value=$entry scope=&quot;parent&quot;}
&lt;article id=&quot;post_{$entry.id}&quot; class=&quot;clearfix serendipity_entry{if $dategroup.is_sticky} sticky{/if}&quot;&gt;
&lt;header class=&quot;clearfix&quot;&gt;
&lt;h2&gt;&lt;a href=&quot;{$entry.link}&quot;&gt;{$entry.title}&lt;/a&gt;&lt;/h2&gt;
&lt;span class=&quot;serendipity_byline block_level&quot;&gt;&lt;span class=&quot;single_user&quot;&gt;{$CONST.POSTED_BY} &lt;a href=&quot;{$entry.link_author}&quot;&gt;{$entry.author}&lt;/a&gt; {$CONST.ON} &lt;/span&gt;&lt;time datetime=&quot;{$entry.timestamp|@serendipity_html5time}&quot;&gt;{$entry.timestamp|@formatTime:$template_option.date_format}&lt;/time&gt;{if $entry.is_entry_owner and not $is_preview} | &lt;a href=&quot;{$entry.link_edit}&quot;&gt;{$CONST.EDIT_ENTRY}&lt;/a&gt;{/if}&lt;/span&gt;
&lt;/header&gt;
&lt;div class=&quot;clearfix content serendipity_entry_body&quot;&gt;
{if $entry.categories}{foreach from=$entry.categories item=&quot;entry_category&quot;}{if $entry_category.category_icon}&lt;a href=&quot;{$entry_category.category_link}&quot;&gt;&lt;img class=&quot;serendipity_entryIcon&quot; title=&quot;{$entry_category.category_name|@escape}{$entry_category.category_description|@emptyPrefix}&quot; alt=&quot;{$entry_category.category_name|@escape}&quot; src=&quot;{$entry_category.category_icon}&quot;&gt;&lt;/a&gt;{/if}{/foreach}{/if}
{$entry.body}
{if $entry.has_extended and not $is_single_entry and not $entry.is_extended}
&lt;a class=&quot;read_more block_level&quot; href=&quot;{$entry.link}#extended&quot;&gt;{$CONST.VIEW_EXTENDED_ENTRY|@sprintf:$entry.title}&lt;/a&gt;
{/if}
&lt;/div&gt;
{if $entry.is_extended}
&lt;div id=&quot;extended&quot; class=&quot;clearfix content&quot;&gt;
{$entry.extended}
&lt;/div&gt;
{/if}
{if $entry.plugin_display_dat}
{$entry.plugin_display_dat}
{/if}
&lt;footer class=&quot;clearfix&quot;&gt;
{if $entry.categories}
&lt;span class=&quot;visuallyhidden&quot;&gt;{$CONST.CATEGORIES}: &lt;/span&gt;{foreach from=$entry.categories item=&quot;entry_category&quot; name=&quot;categories&quot;}&lt;a href=&quot;{$entry_category.category_link}&quot;&gt;{$entry_category.category_name|@escape}&lt;/a&gt;{if not $smarty.foreach.categories.last}, {/if}{/foreach}
{/if}
{if $entry.categories and ($entry.has_comments or $entry.has_disqus)} | {/if}
{if ($entry.has_comments or $entry.has_disqus)}
{if $entry.has_disqus }
{$entry.comments}{if $entry.has_trackbacks}, &lt;a href=&quot;{$entry.link}#trackbacks&quot;&gt;{$entry.trackbacks} {$entry.label_trackbacks}&lt;/a&gt;{/if}
{else}
&lt;a href=&quot;{$entry.link}#comments&quot; title=&quot;{$entry.comments} {$entry.label_comments}{if $entry.has_trackbacks}, {$entry.trackbacks} {$entry.label_trackbacks}{/if}&quot;&gt;{$entry.comments} {$entry.label_comments}&lt;/a&gt;
{/if}
{/if}
{if $entry.url_tweetthis}
| &lt;a href=&quot;{$entry.url_tweetthis}&quot; title=&quot;{$CONST.TWOK11_TWEET_THIS}&quot;&gt;Twitter&lt;/a&gt;
{/if}
{if $entry.url_dentthis}
| &lt;a href=&quot;{$entry.url_dentthis}&quot; title=&quot;{$CONST.TWOK11_DENT_THIS}&quot;&gt;Identica&lt;/a&gt;
{/if}
{if $entry.url_shorturl}
| &lt;a href=&quot;{$entry.url_shorturl}&quot; title=&quot;{$CONST.TWOK11_SHORT_URL_HINT}&quot; class=&quot;short-url&quot;&gt;{$CONST.TWOK11_SHORT_URL}&lt;/a&gt;
{/if}
{$entry.add_footer}
&lt;/footer&gt;
&lt;!--
&lt;rdf:RDF xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot;
xmlns:trackback=&quot;http://madskills.com/public/xml/rss/module/trackback/&quot;
xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot;&gt;
&lt;rdf:Description
rdf:about=&quot;{$entry.link_rdf}&quot;
trackback:ping=&quot;{$entry.link_trackback}&quot;
dc:title=&quot;{$entry.title_rdf|@default:$entry.title}&quot;
dc:identifier=&quot;{$entry.rdf_ident}&quot; /&gt;
&lt;/rdf:RDF&gt;
--&gt;
{if $is_single_entry and not $is_preview}
{if $CONST.DATA_UNSUBSCRIBED}
&lt;p class=&quot;serendipity_msg_notice&quot;&gt;{$CONST.DATA_UNSUBSCRIBED|@sprintf:$CONST.UNSUBSCRIBE_OK}&lt;/p&gt;
{/if}
{if $CONST.DATA_TRACKBACK_DELETED}
&lt;p class=&quot;serendipity_msg_notice&quot;&gt;{$CONST.DATA_TRACKBACK_DELETED|@sprintf:$CONST.TRACKBACK_DELETED}&lt;/p&gt;
{/if}
{if $CONST.DATA_TRACKBACK_APPROVED}
&lt;p class=&quot;serendipity_msg_notice&quot;&gt;{$CONST.DATA_TRACKBACK_APPROVED|@sprintf:$CONST.TRACKBACK_APPROVED}&lt;/p&gt;
{/if}
{if $CONST.DATA_COMMENT_DELETED}
&lt;p class=&quot;serendipity_msg_notice&quot;&gt;{$CONST.DATA_COMMENT_DELETED|@sprintf:$CONST.COMMENT_DELETED}&lt;/p&gt;
{/if}
{if $CONST.DATA_COMMENT_APPROVED}
&lt;p class=&quot;serendipity_msg_notice&quot;&gt;{$CONST.DATA_COMMENT_APPROVED|@sprintf:$CONST.COMMENT_APPROVED}&lt;/p&gt;
{/if}
&lt;section id=&quot;trackbacks&quot; class=&quot;serendipity_comments serendipity_section_trackbacks&quot;&gt;
&lt;h3&gt;{$CONST.TRACKBACKS}&lt;/h3&gt;
&lt;div id=&quot;trackback_url&quot; class=&quot;block_level&quot;&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;{$entry.link_trackback}&quot; title=&quot;{$CONST.TRACKBACK_SPECIFIC_ON_CLICK|@escape}&quot;&gt;{$CONST.TRACKBACK_SPECIFIC}&lt;/a&gt;&lt;/div&gt;
{serendipity_printTrackbacks entry=$entry.id}
&lt;/section&gt;
&lt;section id=&quot;comments&quot; class=&quot;serendipity_comments serendipity_section_comments&quot;&gt;
&lt;h3&gt;{$CONST.COMMENTS}&lt;/h3&gt;
&lt;p class=&quot;manage_comments&quot;&gt;{$CONST.DISPLAY_COMMENTS_AS}
{if $entry.viewmode eq $CONST.VIEWMODE_LINEAR}
{$CONST.COMMENTS_VIEWMODE_LINEAR} | &lt;a href=&quot;{$entry.link_viewmode_threaded}#comments&quot; rel=&quot;nofollow&quot;&gt;{$CONST.COMMENTS_VIEWMODE_THREADED}&lt;/a&gt;
{else}
&lt;a rel=&quot;nofollow&quot; href=&quot;{$entry.link_viewmode_linear}#comments&quot;&gt;{$CONST.COMMENTS_VIEWMODE_LINEAR}&lt;/a&gt; | {$CONST.COMMENTS_VIEWMODE_THREADED}
{/if}
&lt;/p&gt;
{serendipity_printComments entry=$entry.id mode=$entry.viewmode}
{if $entry.is_entry_owner}
&lt;p class=&quot;manage_comments&quot;&gt;
{if $entry.allow_comments}
&lt;a href=&quot;{$entry.link_deny_comments}&quot;&gt;{$CONST.COMMENTS_DISABLE}&lt;/a&gt;
{else}
&lt;a href=&quot;{$entry.link_allow_comments}&quot;&gt;{$CONST.COMMENTS_ENABLE}&lt;/a&gt;
{/if}
&lt;/p&gt;
{/if}
&lt;/section&gt;
&lt;a id=&quot;feedback&quot;&gt;&lt;/a&gt;
{foreach from=$comments_messagestack item=&quot;message&quot;}
&lt;p class=&quot;serendipity_msg_important&quot;&gt;{$message}&lt;/p&gt;
{/foreach}
{if $is_comment_added}
&lt;p class=&quot;serendipity_msg_notice&quot;&gt;{$CONST.COMMENT_ADDED}&lt;/p&gt;
{elseif $is_comment_moderate}
&lt;p class=&quot;serendipity_msg_notice&quot;&gt;{$CONST.COMMENT_ADDED}: {$CONST.THIS_COMMENT_NEEDS_REVIEW}&lt;/p&gt;
{elseif not $entry.allow_comments}
&lt;p class=&quot;serendipity_msg_important&quot;&gt;{$CONST.COMMENTS_CLOSED}&lt;/p&gt;
{/if}
&lt;section id=&quot;respond&quot; class=&quot;serendipity_section_commentform&quot;&gt;
&lt;h3&gt;{$CONST.ADD_COMMENT}&lt;/h3&gt;
{$COMMENTFORM}
&lt;/section&gt;
{/if}
{$entry.backend_preview}
&lt;/article&gt;
{/foreach}
{foreachelse}
{if not $plugin_clean_page}
&lt;p class=&quot;nocontent&quot;&gt;{$CONST.NO_ENTRIES_TO_PRINT}&lt;/p&gt;
{/if}
{/foreach}
+
+ {/if}{* not taglist end *}
+
{if $footer_info or $footer_prev_page or $footer_next_page}
&lt;nav class=&quot;serendipity_pagination block_level&quot;&gt;
&lt;h2 class=&quot;visuallyhidden&quot;&gt;{$CONST.TWOK11_PAG_TITLE}&lt;/h2&gt;
&lt;ul class=&quot;clearfix&quot;&gt;
{if $footer_info}
&lt;li class=&quot;info&quot;&gt;&lt;span&gt;{$footer_info}&lt;/span&gt;&lt;/li&gt;
{/if}
&lt;li class=&quot;prev&quot;&gt;{if $footer_prev_page}&lt;a href=&quot;{$footer_prev_page}&quot;&gt;{/if}{if $footer_prev_page}&amp;larr; {$CONST.PREVIOUS_PAGE}{else}&amp;nbsp;{/if}{if $footer_prev_page}&lt;/a&gt;{/if}&lt;/li&gt;
&lt;li class=&quot;next&quot;&gt;{if $footer_next_page}&lt;a href=&quot;{$footer_next_page}&quot;&gt;{/if}{if $footer_next_page}{$CONST.NEXT_PAGE} &amp;rarr;{else}&amp;nbsp;{/if}{if $footer_next_page}&lt;/a&gt;{/if}&lt;/li&gt;
&lt;/ul&gt;
&lt;/nav&gt;
{/if}
{serendipity_hookPlugin hook=&quot;entries_footer&quot;}
</pre>
<p>&nbsp;</p>
<h1>Historie verzí (ChangeLog)</h1>
<ul>
<li>Please read more current Changelog!</li>
<li>verze 3.43</li>
<ul>
<li>Statické opravy pro kompatibilitu freetag<->flattr (žádné chyby PHP5)</li>

View file

@ -0,0 +1,277 @@
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Documentation: Freetag</title>
<style>
pre {
display: block;
padding: 5px;
border: solid 1px #333;
background-color: #ddd;
}
</style>
</head>
<body>
<h1>Documentation of the Freetag event plugin<br />
<small>(serendipity_event_freetag)</small></h1>
<p>Documentary added by Ian on 2014-09-27. Informations given in <a href="README">The most current README</a>, <a href="README.txt"> and older README.txt</a> a <a href="ChangeLog">and the most current ChangeLog file</a>.
<h2>Scripting changes by options</h2>
<h3>Option: Extendet Smarty</h3>
<p>When using extended smarty output, the following code illustrates how the smarty-variables could be used when dropped into the entries.tpl:
<pre class="prettyprint linenums lang-php " data-pbcklang="php" data-pbcktabsize="4">
{if isset($entry.freetag.extended) &amp;&amp; $entry.freetag.extended == 1}
{if $entry.freetag.tags.tags}
&lt;div class=&quot;serendipity_freeTag&quot;&gt;{$entry.freetag.tags.description}
{foreach from=$entry.freetag.tags.tags item=&quot;tag&quot;}
{$tag}
{/foreach}
&lt;/div&gt;
{if $is_single_entry or $is_preview}
{$entry.freetag.related.description}
&lt;ul class=&quot;serendipity_freeTag_related&quot;&gt;
{foreach from=$entry.freetag.related.entries item=&quot;link&quot;}
&lt;li&gt;{$link}&lt;/li&gt;
{/foreach}
&lt;/ul&gt;
{/if}
{/if}
{else}
{$entry.freetag}
{/if}
</pre>
<h3>Using this subquery you can convert existing categories to tags:</h3>
<pre class="prettyprint linenums lang-sql " data-pbcklang="sql" data-pbcktabsize="4">
INSERT INTO serendipity_entrytags (entryid, tag)
SELECT serendipity_entries.id, serendipity_category.category_name
FROM serendipity_entries, serendipity_category, serendipity_entrycat
WHERE serendipity_entrycat.entryid = serendipity_entries.id
AND serendipity_category.categoryid = serendipity_entrycat.categoryid;
</pre>
<p>[quoted from: http://pixelated-dreams.com/archives/229-Spring-Cleaning.html]</p>
<h3>Or using this script you can convert existing categories to tags:</h3>
<pre class="prettyprint linenums lang-php " data-pbcklang="php" data-pbcktabsize="4">
&lt;?php
include &#39;serendipity_config.inc.php&#39;;
$rows = serendipity_db_query(&quot;SELECT e.id, e.title, c.category_name
FROM {$serendipity[&#39;dbPrefix&#39;]}entries AS e
JOIN {$serendipity[&#39;dbPrefix&#39;]}entrycat AS ec
ON ec.entryid = e.id
JOIN {$serendipity[&#39;dbPrefix&#39;]}category AS c
ON ec.categoryid = c.categoryid&quot;);
foreach($rows AS $row) {
serendipity_db_query(
sprintf(
&quot;REPLACE INTO {$serendipity[&#39;dbPrefix&#39;]}entrytags (entryid, tag) VALUES (%d, %s)&quot;,
(int)$row[&#39;id&#39;],
serendipity_db_escape_string($row[&#39;category_name&#39;])
)
);
printf(
&quot;Category &#39;%s&#39; added as Tag for Entry #%d, &#39;%s&#39;&lt;br /&gt;\n&quot;,
htmlspecialchars($row[&#39;category_name&#39;]),
(int)$row[&#39;id&#39;],
htmlspecialchars($row[&#39;title&#39;])
);
}</pre>
<p>&nbsp;</p>
<h3>Option: Tags-as-list</h3>
<p>The following code illustrates on how to change your templates entries.tpl file (all + lines, without '+ '):</p>
<pre class="prettyprint linenums lang-html " data-pbcklang="html" data-pbcktabsize="4">
{serendipity_hookPlugin hook=&quot;entries_header&quot; addData=&quot;$entry_id&quot;}
+ {if $taglist}
+ &lt;article id=&quot;taglistentries&quot; class=&quot;clearfix serendipity_entry&quot;&gt;
+ &lt;div class=&quot;clearfix content serendipity_entry_body&quot;&gt;
+ &lt;h2&gt;{$head_subtitle}&lt;/h2&gt;
+ {foreach from=$entries item=&quot;dategroup&quot;}
+ {foreach from=$dategroup.entries item=&quot;entry&quot;}
+
+ &lt;div class=&quot;static-entries-list&quot;&gt;
+ ({$dategroup.date|date_format:&quot;%d.%m.%Y&quot;}) &lt;a href=&quot;{$entry.link}&quot;&gt;{$entry.title|default:$entry.id}&lt;/a&gt;
+ &lt;/div&gt;
+
+ {/foreach}
+ {/foreach}
+
+ &lt;/div&gt;
+ &lt;/article&gt;
+
+ {else}
+
{foreach from=$entries item=&quot;dategroup&quot;}
{foreach from=$dategroup.entries item=&quot;entry&quot;}
{assign var=&quot;entry&quot; value=$entry scope=&quot;parent&quot;}
&lt;article id=&quot;post_{$entry.id}&quot; class=&quot;clearfix serendipity_entry{if $dategroup.is_sticky} sticky{/if}&quot;&gt;
&lt;header class=&quot;clearfix&quot;&gt;
&lt;h2&gt;&lt;a href=&quot;{$entry.link}&quot;&gt;{$entry.title}&lt;/a&gt;&lt;/h2&gt;
&lt;span class=&quot;serendipity_byline block_level&quot;&gt;&lt;span class=&quot;single_user&quot;&gt;{$CONST.POSTED_BY} &lt;a href=&quot;{$entry.link_author}&quot;&gt;{$entry.author}&lt;/a&gt; {$CONST.ON} &lt;/span&gt;&lt;time datetime=&quot;{$entry.timestamp|@serendipity_html5time}&quot;&gt;{$entry.timestamp|@formatTime:$template_option.date_format}&lt;/time&gt;{if $entry.is_entry_owner and not $is_preview} | &lt;a href=&quot;{$entry.link_edit}&quot;&gt;{$CONST.EDIT_ENTRY}&lt;/a&gt;{/if}&lt;/span&gt;
&lt;/header&gt;
&lt;div class=&quot;clearfix content serendipity_entry_body&quot;&gt;
{if $entry.categories}{foreach from=$entry.categories item=&quot;entry_category&quot;}{if $entry_category.category_icon}&lt;a href=&quot;{$entry_category.category_link}&quot;&gt;&lt;img class=&quot;serendipity_entryIcon&quot; title=&quot;{$entry_category.category_name|@escape}{$entry_category.category_description|@emptyPrefix}&quot; alt=&quot;{$entry_category.category_name|@escape}&quot; src=&quot;{$entry_category.category_icon}&quot;&gt;&lt;/a&gt;{/if}{/foreach}{/if}
{$entry.body}
{if $entry.has_extended and not $is_single_entry and not $entry.is_extended}
&lt;a class=&quot;read_more block_level&quot; href=&quot;{$entry.link}#extended&quot;&gt;{$CONST.VIEW_EXTENDED_ENTRY|@sprintf:$entry.title}&lt;/a&gt;
{/if}
&lt;/div&gt;
{if $entry.is_extended}
&lt;div id=&quot;extended&quot; class=&quot;clearfix content&quot;&gt;
{$entry.extended}
&lt;/div&gt;
{/if}
{if $entry.plugin_display_dat}
{$entry.plugin_display_dat}
{/if}
&lt;footer class=&quot;clearfix&quot;&gt;
{if $entry.categories}
&lt;span class=&quot;visuallyhidden&quot;&gt;{$CONST.CATEGORIES}: &lt;/span&gt;{foreach from=$entry.categories item=&quot;entry_category&quot; name=&quot;categories&quot;}&lt;a href=&quot;{$entry_category.category_link}&quot;&gt;{$entry_category.category_name|@escape}&lt;/a&gt;{if not $smarty.foreach.categories.last}, {/if}{/foreach}
{/if}
{if $entry.categories and ($entry.has_comments or $entry.has_disqus)} | {/if}
{if ($entry.has_comments or $entry.has_disqus)}
{if $entry.has_disqus }
{$entry.comments}{if $entry.has_trackbacks}, &lt;a href=&quot;{$entry.link}#trackbacks&quot;&gt;{$entry.trackbacks} {$entry.label_trackbacks}&lt;/a&gt;{/if}
{else}
&lt;a href=&quot;{$entry.link}#comments&quot; title=&quot;{$entry.comments} {$entry.label_comments}{if $entry.has_trackbacks}, {$entry.trackbacks} {$entry.label_trackbacks}{/if}&quot;&gt;{$entry.comments} {$entry.label_comments}&lt;/a&gt;
{/if}
{/if}
{if $entry.url_tweetthis}
| &lt;a href=&quot;{$entry.url_tweetthis}&quot; title=&quot;{$CONST.TWOK11_TWEET_THIS}&quot;&gt;Twitter&lt;/a&gt;
{/if}
{if $entry.url_dentthis}
| &lt;a href=&quot;{$entry.url_dentthis}&quot; title=&quot;{$CONST.TWOK11_DENT_THIS}&quot;&gt;Identica&lt;/a&gt;
{/if}
{if $entry.url_shorturl}
| &lt;a href=&quot;{$entry.url_shorturl}&quot; title=&quot;{$CONST.TWOK11_SHORT_URL_HINT}&quot; class=&quot;short-url&quot;&gt;{$CONST.TWOK11_SHORT_URL}&lt;/a&gt;
{/if}
{$entry.add_footer}
&lt;/footer&gt;
&lt;!--
&lt;rdf:RDF xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot;
xmlns:trackback=&quot;http://madskills.com/public/xml/rss/module/trackback/&quot;
xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot;&gt;
&lt;rdf:Description
rdf:about=&quot;{$entry.link_rdf}&quot;
trackback:ping=&quot;{$entry.link_trackback}&quot;
dc:title=&quot;{$entry.title_rdf|@default:$entry.title}&quot;
dc:identifier=&quot;{$entry.rdf_ident}&quot; /&gt;
&lt;/rdf:RDF&gt;
--&gt;
{if $is_single_entry and not $is_preview}
{if $CONST.DATA_UNSUBSCRIBED}
&lt;p class=&quot;serendipity_msg_notice&quot;&gt;{$CONST.DATA_UNSUBSCRIBED|@sprintf:$CONST.UNSUBSCRIBE_OK}&lt;/p&gt;
{/if}
{if $CONST.DATA_TRACKBACK_DELETED}
&lt;p class=&quot;serendipity_msg_notice&quot;&gt;{$CONST.DATA_TRACKBACK_DELETED|@sprintf:$CONST.TRACKBACK_DELETED}&lt;/p&gt;
{/if}
{if $CONST.DATA_TRACKBACK_APPROVED}
&lt;p class=&quot;serendipity_msg_notice&quot;&gt;{$CONST.DATA_TRACKBACK_APPROVED|@sprintf:$CONST.TRACKBACK_APPROVED}&lt;/p&gt;
{/if}
{if $CONST.DATA_COMMENT_DELETED}
&lt;p class=&quot;serendipity_msg_notice&quot;&gt;{$CONST.DATA_COMMENT_DELETED|@sprintf:$CONST.COMMENT_DELETED}&lt;/p&gt;
{/if}
{if $CONST.DATA_COMMENT_APPROVED}
&lt;p class=&quot;serendipity_msg_notice&quot;&gt;{$CONST.DATA_COMMENT_APPROVED|@sprintf:$CONST.COMMENT_APPROVED}&lt;/p&gt;
{/if}
&lt;section id=&quot;trackbacks&quot; class=&quot;serendipity_comments serendipity_section_trackbacks&quot;&gt;
&lt;h3&gt;{$CONST.TRACKBACKS}&lt;/h3&gt;
&lt;div id=&quot;trackback_url&quot; class=&quot;block_level&quot;&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;{$entry.link_trackback}&quot; title=&quot;{$CONST.TRACKBACK_SPECIFIC_ON_CLICK|@escape}&quot;&gt;{$CONST.TRACKBACK_SPECIFIC}&lt;/a&gt;&lt;/div&gt;
{serendipity_printTrackbacks entry=$entry.id}
&lt;/section&gt;
&lt;section id=&quot;comments&quot; class=&quot;serendipity_comments serendipity_section_comments&quot;&gt;
&lt;h3&gt;{$CONST.COMMENTS}&lt;/h3&gt;
&lt;p class=&quot;manage_comments&quot;&gt;{$CONST.DISPLAY_COMMENTS_AS}
{if $entry.viewmode eq $CONST.VIEWMODE_LINEAR}
{$CONST.COMMENTS_VIEWMODE_LINEAR} | &lt;a href=&quot;{$entry.link_viewmode_threaded}#comments&quot; rel=&quot;nofollow&quot;&gt;{$CONST.COMMENTS_VIEWMODE_THREADED}&lt;/a&gt;
{else}
&lt;a rel=&quot;nofollow&quot; href=&quot;{$entry.link_viewmode_linear}#comments&quot;&gt;{$CONST.COMMENTS_VIEWMODE_LINEAR}&lt;/a&gt; | {$CONST.COMMENTS_VIEWMODE_THREADED}
{/if}
&lt;/p&gt;
{serendipity_printComments entry=$entry.id mode=$entry.viewmode}
{if $entry.is_entry_owner}
&lt;p class=&quot;manage_comments&quot;&gt;
{if $entry.allow_comments}
&lt;a href=&quot;{$entry.link_deny_comments}&quot;&gt;{$CONST.COMMENTS_DISABLE}&lt;/a&gt;
{else}
&lt;a href=&quot;{$entry.link_allow_comments}&quot;&gt;{$CONST.COMMENTS_ENABLE}&lt;/a&gt;
{/if}
&lt;/p&gt;
{/if}
&lt;/section&gt;
&lt;a id=&quot;feedback&quot;&gt;&lt;/a&gt;
{foreach from=$comments_messagestack item=&quot;message&quot;}
&lt;p class=&quot;serendipity_msg_important&quot;&gt;{$message}&lt;/p&gt;
{/foreach}
{if $is_comment_added}
&lt;p class=&quot;serendipity_msg_notice&quot;&gt;{$CONST.COMMENT_ADDED}&lt;/p&gt;
{elseif $is_comment_moderate}
&lt;p class=&quot;serendipity_msg_notice&quot;&gt;{$CONST.COMMENT_ADDED}: {$CONST.THIS_COMMENT_NEEDS_REVIEW}&lt;/p&gt;
{elseif not $entry.allow_comments}
&lt;p class=&quot;serendipity_msg_important&quot;&gt;{$CONST.COMMENTS_CLOSED}&lt;/p&gt;
{/if}
&lt;section id=&quot;respond&quot; class=&quot;serendipity_section_commentform&quot;&gt;
&lt;h3&gt;{$CONST.ADD_COMMENT}&lt;/h3&gt;
{$COMMENTFORM}
&lt;/section&gt;
{/if}
{$entry.backend_preview}
&lt;/article&gt;
{/foreach}
{foreachelse}
{if not $plugin_clean_page}
&lt;p class=&quot;nocontent&quot;&gt;{$CONST.NO_ENTRIES_TO_PRINT}&lt;/p&gt;
{/if}
{/foreach}
+
+ {/if}{* not taglist end *}
+
{if $footer_info or $footer_prev_page or $footer_next_page}
&lt;nav class=&quot;serendipity_pagination block_level&quot;&gt;
&lt;h2 class=&quot;visuallyhidden&quot;&gt;{$CONST.TWOK11_PAG_TITLE}&lt;/h2&gt;
&lt;ul class=&quot;clearfix&quot;&gt;
{if $footer_info}
&lt;li class=&quot;info&quot;&gt;&lt;span&gt;{$footer_info}&lt;/span&gt;&lt;/li&gt;
{/if}
&lt;li class=&quot;prev&quot;&gt;{if $footer_prev_page}&lt;a href=&quot;{$footer_prev_page}&quot;&gt;{/if}{if $footer_prev_page}&amp;larr; {$CONST.PREVIOUS_PAGE}{else}&amp;nbsp;{/if}{if $footer_prev_page}&lt;/a&gt;{/if}&lt;/li&gt;
&lt;li class=&quot;next&quot;&gt;{if $footer_next_page}&lt;a href=&quot;{$footer_next_page}&quot;&gt;{/if}{if $footer_next_page}{$CONST.NEXT_PAGE} &amp;rarr;{else}&amp;nbsp;{/if}{if $footer_next_page}&lt;/a&gt;{/if}&lt;/li&gt;
&lt;/ul&gt;
&lt;/nav&gt;
{/if}
{serendipity_hookPlugin hook=&quot;entries_footer&quot;}
</pre>
<p>&nbsp;</p>
</body>
</html>

View file

@ -1,4 +1,4 @@
<?php #
<?php
/**
* @version
@ -56,6 +56,9 @@
@define('PLUGIN_FREETAG_MAX_TAGS', 'Wieviele Tags sollen angezeigt werden?');
@define('PLUGIN_FREETAG_TRESHOLD_TAG_COUNT', 'Wie oft muss ein Tag vorkommen, damit er angezeigt wird?');
//
// later on additions
//
@define('PLUGIN_EVENT_FREETAG_TAGCLOUD_MIN', 'Minimale Schriftgröße eines Tags in der Wolke in %');
@define('PLUGIN_EVENT_FREETAG_TAGCLOUD_MAX', 'Maximale Schriftgröße eines Tags in der Wolke in %');
@ -101,15 +104,21 @@
@define('PLUGIN_EVENT_FREETAG_ORDER_TAGNAME', 'Tag-Name');
@define('PLUGIN_EVENT_FREETAG_ORDER_TAGCOUNT', 'Tag-Anzahl');
@define('PLUGIN_EVENT_FREETAG_TECHNORATI_TAGLINK', 'Technorati Tag Links');
@define('PLUGIN_EVENT_FREETAG_TECHNORATI_TAGLINK', 'Technorati Tag Links');
@define('PLUGIN_EVENT_FREETAG_TECHNORATI_TAGLINK_DESC', 'Fügt Links auf Technorati Tags hinzu. Wenn auf diese Links geklickt wird, so wird eine Liste von ähnlichen Einträgen in weiteren Blogs angezeigt, die in Technorati zu dem entsprechenden Tag gespeichert wurden.');
@define('PLUGIN_EVENT_FREETAG_TECHNORATI_TAGLINK_IMG', 'Technorati Tag Bild');
@define('PLUGIN_EVENT_FREETAG_TECHNORATI_TAGLINK_IMG', 'Technorati Tag Bild');
@define('PLUGIN_EVENT_FREETAG_XMLIMAGE', 'XML Bild relativ zum Template Verzeichnis');
@define('PLUGIN_EVENT_FREETAG_XMLIMAGE', 'XML Bild relativ zum Template Verzeichnis');
@define('PLUGIN_EVENT_FREETAG_EMBED_FOOTER_DESC2', 'Wenn auf "Smarty" gestellt wird, dann wird eine smarty Variable {$entry.freetag} generiert, die an beliebiger Stelle in der entries.tpl Vorlagendatei eingefügt werden kann.');
@define('PLUGIN_EVENT_FREETAG_EXTENDED_SMARTY', 'Erweiteres Smarty');
@define('PLUGIN_EVENT_FREETAG_EXTENDED_SMARTY_DESC', 'Nutze statt der HTML-Ausgabe, ob nun direkt oder per Smarty, verschiedene Smartyvariablen, die im Template zusammgefügt werden können. Dies überschreibt alle anderen diesbezüglichen Einstellungen. Ein Beispiel für die Nutzung findet sich im Readme.');
@define('PLUGIN_EVENT_FREETAG_KILL', 'Wenn aktiviert werden alle zugeh&ouml;rigen Tags gel&ouml;scht.');
@define('PLUGIN_EVENT_FREETAG_KILL', 'Wenn aktiviert werden alle zugehörigen Tags gelöscht.');
@define('PLUGIN_EVENT_FREETAG_TAGLINK_DESC', 'Eine mögliche Änderung des Taglinks wäre "plugin/taglist/" anstelle von "plugin/tag/" zu schreiben. Dies wäre das Kommando, um jeden Taglink als Liste, anstelle von bereits geöffneten Artikeln, auszugeben. Man kann aber ebenso manuell für bestimmte Taglinks den "/taglist" tag an einen bereits existierenden Taglink (zB. "/plugin/tag/deine/tags/taglist") anhängen. In beiden Fällen ist "taglist" fortan ein reserviertes Kommando und kann nicht mehr als normales Tagwort verwendet werden. Für beide Möglichkeiten ist eine eigenhändig eingebaute Code-Änderung nötig, so wie in der Dokumentation für die "tag-as-list" Option beschrieben wird.');
@define('PLUGIN_EVENT_FREETAG_TAGSASLIST', 'Erlaube "tags-as-list" = ungeöffnete Artikel');
@define('PLUGIN_EVENT_FREETAG_TAGSASLIST_DESC', 'In der Plugin-Dokumentation ist zu lesen, wie die existierende templates entries.tpl Datei für die Listenanzeige der Taglink-Ausgabe im Code geändert werden muss.');

View file

@ -1,4 +1,4 @@
<?php #
<?php
/**
* @version
@ -56,6 +56,9 @@
@define('PLUGIN_FREETAG_MAX_TAGS', 'How many tags should be shown?');
@define('PLUGIN_FREETAG_TRESHOLD_TAG_COUNT', 'How many occurences must a tag have in order to be shown?');
//
// later on additions
//
@define('PLUGIN_EVENT_FREETAG_TAGCLOUD_MIN', 'Minimum font size % of tag in tag cloud');
@define('PLUGIN_EVENT_FREETAG_TAGCLOUD_MAX', 'Maximum font size % of tag in tag cloud');
@ -101,12 +104,12 @@
@define('PLUGIN_EVENT_FREETAG_ORDER_TAGNAME', 'Tag name');
@define('PLUGIN_EVENT_FREETAG_ORDER_TAGCOUNT', 'Tag count');
@define('PLUGIN_EVENT_FREETAG_TECHNORATI_TAGLINK', 'Technorati tag links');
@define('PLUGIN_EVENT_FREETAG_TECHNORATI_TAGLINK', 'Technorati tag links');
@define('PLUGIN_EVENT_FREETAG_TECHNORATI_TAGLINK_DESC', 'Adds technorati tag links behind the tags in the entry footer. Clicking them will show similair articles in other blogs found on technorati.');
@define('PLUGIN_EVENT_FREETAG_TECHNORATI_TAGLINK_IMG', 'Technorati tag image');
@define('PLUGIN_EVENT_FREETAG_TECHNORATI_TAGLINK_IMG', 'Technorati tag image');
@define('PLUGIN_EVENT_FREETAG_XMLIMAGE', 'XML image relative to template path');
@define('PLUGIN_EVENT_FREETAG_XMLIMAGE', 'XML image relative to template path');
@define('PLUGIN_EVENT_FREETAG_EMBED_FOOTER_DESC2', 'If set to "Smarty", then a smarty variable {$entry.freetag} will be created that you can place anywhere in your entries.tpl template file.');
@ -115,3 +118,9 @@
@define('PLUGIN_EVENT_FREETAG_COLLATION', '(MySQL) Database collation for the entrytags.tag column (auto-detected)');
@define('PLUGIN_EVENT_FREETAG_KILL', 'When checked, all assigned tags to this entry will be removed.');
@define('PLUGIN_EVENT_FREETAG_TAGLINK_DESC', 'A possible change in your taglink, is to write "plugin/taglist/" instead of "plugin/tag/". This will make your tag(s) appear as as clickable list, instead of already opened entries. You can also add this manually to certain taglinks in the frontend or append a "/taglist" tag to an already existing path (eg "/plugin/tag/your/tags/append/taglist"). In both cases "taglist" is a reserved word from now on and can not be used as a normal tag elsewhere anymore. If you want to use this, please enable next option and add some code manually, described in the documentary for the "tag-as-list" option.');
@define('PLUGIN_EVENT_FREETAG_TAGSASLIST', 'Enable "tags-as-list" = non-opened entries');
@define('PLUGIN_EVENT_FREETAG_TAGSASLIST_DESC', 'Please read the documentary in this plugins "Local Documentation" on how to add the smarty taglist code to your existing templates entries.tpl file.');

View file

@ -1,4 +1,4 @@
<?php #
<?php
/*
* ULTRA HIGH PRIORITY
* - get some kind of data-sharing protocol in action. It is very difficult
@ -52,12 +52,12 @@ define('FREETAG_EDITENTRY_URL','?serendipity[action]=admin&amp;serendipity[admin
class serendipity_event_freetag extends serendipity_event
{
var $tags = array();
var $displayTag = false;
var $title = PLUGIN_EVENT_FREETAG_TITLE;
var $TaggedEntries = null;
var $tags = array();
var $displayTag = false;
var $title = PLUGIN_EVENT_FREETAG_TITLE;
var $TaggedEntries = null;
var $supported_properties = array();
var $dependencies = array();
var $dependencies = array();
function introspect(&$propbag)
{
@ -66,13 +66,13 @@ class serendipity_event_freetag extends serendipity_event
$propbag->add('name', PLUGIN_EVENT_FREETAG_TITLE);
$propbag->add('description', PLUGIN_EVENT_FREETAG_DESC);
$propbag->add('stackable', false);
$propbag->add('author', 'Garvin Hicking, Jonathan Arkell, Grischa Brockhaus, Lars Strojny, Malte Paskuda');
$propbag->add('author', 'Garvin Hicking, Jonathan Arkell, Grischa Brockhaus, Lars Strojny, Malte Paskuda, Ian');
$propbag->add('requirements', array(
'serendipity' => '0.8',
'smarty' => '2.6.7',
'php' => '4.1.0'
));
$propbag->add('version', '3.57');
$propbag->add('version', '3.58');
$propbag->add('event_hooks', array(
'frontend_fetchentries' => true,
'frontend_fetchentry' => true,
@ -103,7 +103,7 @@ class serendipity_event_freetag extends serendipity_event
$propbag->add('groups', array('BACKEND_EDITOR'));
$this->supported_properties = array('freetag_name', 'freetag_tagList');
$this->dependencies = array('serendipity_plugin_freetag' => 'keep');
$propbag->add('configuration', array('cat2tag', 'keyword2tag', 'taglink', 'embed_footer', 'extended_smarty', 'show_tagcloud', 'min_percent', 'max_percent', 'max_tags', 'use_flash', 'flash_tag_color', 'flash_bg_trans', 'flash_bg_color', 'flash_width', 'flash_speed', 'meta_keywords', 'show_related', 'show_related_count', 'lowercase_tags', 'collation', 'send_http_header', 'admin_show_taglist', 'admin_ftayt', 'technorati_tag_link', 'technorati_tag_image'));
$propbag->add('configuration', array('cat2tag', 'keyword2tag', 'taglink', 'taglist', 'embed_footer', 'extended_smarty', 'show_tagcloud', 'min_percent', 'max_percent', 'max_tags', 'use_flash', 'flash_tag_color', 'flash_bg_trans', 'flash_bg_color', 'flash_width', 'flash_speed', 'meta_keywords', 'show_related', 'show_related_count', 'lowercase_tags', 'collation', 'send_http_header', 'admin_show_taglist', 'admin_ftayt', 'technorati_tag_link', 'technorati_tag_image'));
}
function introspect_config_item($name, &$propbag) {
@ -143,16 +143,23 @@ class serendipity_event_freetag extends serendipity_event
break;
case 'extended_smarty':
$propbag->add('type', 'boolean');
$propbag->add('type', 'boolean');
$propbag->add('name', PLUGIN_EVENT_FREETAG_EXTENDED_SMARTY);
$propbag->add('description', PLUGIN_EVENT_FREETAG_EXTENDED_SMARTY_DESC);
$propbag->add('default', false);
break;
case 'taglist':
$propbag->add('type', 'boolean');
$propbag->add('name', PLUGIN_EVENT_FREETAG_TAGSASLIST);
$propbag->add('description', PLUGIN_EVENT_FREETAG_TAGSASLIST_DESC);
$propbag->add('default', false);
break;
case 'taglink':
$propbag->add('type', 'string');
$propbag->add('name', PLUGIN_EVENT_FREETAG_TAGLINK);
$propbag->add('description', '');
$propbag->add('description', PLUGIN_EVENT_FREETAG_TAGLINK_DESC);
$propbag->add('default', $serendipity['baseURL'] . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] . '?/' : '') . 'plugin/tag/');
break;
@ -192,17 +199,17 @@ class serendipity_event_freetag extends serendipity_event
break;
case 'show_related':
$propbag->add('type', 'boolean');
$propbag->add('name', PLUGIN_EVENT_FREETAG_SHOW_RELATED);
$propbag->add('description', '');
$propbag->add('default', true);
$propbag->add('type', 'boolean');
$propbag->add('name', PLUGIN_EVENT_FREETAG_SHOW_RELATED);
$propbag->add('description', '');
$propbag->add('default', true);
break;
case 'show_related_count':
$propbag->add('type', 'string');
$propbag->add('name', PLUGIN_EVENT_FREETAG_SHOW_RELATED_COUNT);
$propbag->add('description', '');
$propbag->add('default', '5');
$propbag->add('type', 'string');
$propbag->add('name', PLUGIN_EVENT_FREETAG_SHOW_RELATED_COUNT);
$propbag->add('description', '');
$propbag->add('default', '5');
break;
case 'lowercase_tags':
@ -302,7 +309,7 @@ class serendipity_event_freetag extends serendipity_event
$q = "select count(tag) from {$serendipity['dbPrefix']}" . $table;
$row = serendipity_db_query($q, true, 'num');
if (!is_numeric($row[0])) { // if the response we got back was an SQL error.. :P
if (!is_numeric($row[0])) { // if the response we got back was an SQL error.. :P
return false;
} else {
return true;
@ -312,7 +319,7 @@ class serendipity_event_freetag extends serendipity_event
static function upgradeFromVersion1() {
global $serendipity;
$q = "select count(*) from {$serendipity['dbPrefix']}entryproperties where property = 'ep_freetag_name'";
$q = "SELECT count(*) FROM {$serendipity['dbPrefix']}entryproperties WHERE property = 'ep_freetag_name'";
$result = serendipity_db_query($q);
if ((int)$result[0] > 0) {
@ -325,7 +332,7 @@ class serendipity_event_freetag extends serendipity_event
static function convertEntryPropertiesTags() {
global $serendipity;
$q = "select entryid, value from {$serendipity['dbPrefix']}entryproperties where property = 'ep_freetag_name'";
$q = "SELECT entryid, value FROM {$serendipity['dbPrefix']}entryproperties WHERE property = 'ep_freetag_name'";
$result = serendipity_db_query($q);
if (!is_array($result)) {
@ -340,7 +347,7 @@ class serendipity_event_freetag extends serendipity_event
echo '<BR/>';
}
$q = "delete from {$serendipity['dbPrefix']}entryproperties where property = 'ep_freetag_name'";
$q = "DELETE FROM {$serendipity['dbPrefix']}entryproperties WHERE property = 'ep_freetag_name'";
$result = serendipity_db_query($q);
}
@ -358,7 +365,7 @@ class serendipity_event_freetag extends serendipity_event
global $serendipity;
if (!serendipity_event_freetag::tableCreated('entrytags')) {
$q = "create table {$serendipity['dbPrefix']}entrytags (" .
$q = "CREATE TABLE {$serendipity['dbPrefix']}entrytags (" .
"entryid int(10) not null, " .
"tag varchar(50) not null, " .
"primary key (entryid, tag)" .
@ -375,7 +382,7 @@ class serendipity_event_freetag extends serendipity_event
}
if (!serendipity_event_freetag::tableCreated('tagkeywords')) {
$q = "create table {$serendipity['dbPrefix']}tagkeywords (" .
$q = "CREATE TABLE {$serendipity['dbPrefix']}tagkeywords (" .
"keywords text, " .
"tag varchar(50) not null, " .
"primary key (tag)" .
@ -403,11 +410,11 @@ class serendipity_event_freetag extends serendipity_event
$taglink = $this->get_config('taglink');
}
$links = array();
$links = array();
if (empty($tagString)) {
return array();
}
$tags = explode(',', $tagString);
$tags = explode(',', $tagString);
foreach($tags as $tag) {
$tag = trim($tag);
if (empty($tag)) {
@ -426,7 +433,7 @@ class serendipity_event_freetag extends serendipity_event
global $serendipity;
static $taglink = null;
$links = array();
$links = array();
if ($taglink == null) {
$taglink = $this->get_config('taglink');
@ -440,23 +447,22 @@ class serendipity_event_freetag extends serendipity_event
$technorati_img = $this->get_config('technorati_tag_image');
$img_url = $this->get_config('path_img',$serendipity['serendipityHTTPPath'] . 'plugins/serendipity_event_freetag/img/');
foreach($tags as $tag) {
$tag = trim($tag);
if (empty($tag)) {
continue;
}
$links[] = '<a href="' . $taglink . serendipity_event_freetag::makeURLTag($tag) . '"' .
' title="' . htmlspecialchars($tag) . '"' .
' rel="tag">' . htmlspecialchars($tag) . '</a>' .
($technorati?'<a href="http://technorati.com/tag/' . urlencode($tag) . '" class="serendipity_freeTag_technoratiTag" rel="tag"><img style="border:0;vertical-align:middle;margin-left:.4em" src="' . $technorati_img . '?tag=' . urlencode($tag) . '" alt="technorati" /></a>':'');
continue;
}
$links[] = '<a href="' . $taglink . serendipity_event_freetag::makeURLTag($tag) . '"' .
' title="' . htmlspecialchars($tag) . '"' .
' rel="tag">' . htmlspecialchars($tag) . '</a>' .
($technorati?'<a href="http://technorati.com/tag/' . urlencode($tag) . '" class="serendipity_freeTag_technoratiTag" rel="tag"><img style="border:0;vertical-align:middle;margin-left:.4em" src="' . $technorati_img . '?tag=' . urlencode($tag) . '" alt="technorati" /></a>':'');
}
if ($extended_smarty) {
return $links;
} else {
return implode(', ', $links);
}
}
if ($extended_smarty) {
return $links;
} else {
return implode(', ', $links);
}
}
function getRelatedEntries($tags, $postID) {
@ -501,19 +507,19 @@ class serendipity_event_freetag extends serendipity_event
$entrylink = $serendipity['baseURL'] . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] . '?/' : '/');
if ($extended_smarty) {
$return = array();
$return['description'] = PLUGIN_EVENT_FREETAG_RELATED_ENTRIES;
foreach($entries AS $entryid => $title) {
$return['entries'][] = '<a href="' . serendipity_archiveURL($entryid, $title) . '" title="' . htmlspecialchars($title) . '">' . htmlspecialchars($title) . '</a>';
}
} else {
$return = '<div class="serendipity_freeTag_related">' . PLUGIN_EVENT_FREETAG_RELATED_ENTRIES . '<ul class="plainList">';
foreach($entries AS $entryid => $title) {
$return .= '<li> <a href="' . serendipity_archiveURL($entryid, $title) . '" title="' . htmlspecialchars($title) . '">' . htmlspecialchars($title) . '</a></li>';
}
$return .= '</ul></div>';
}
if ($extended_smarty) {
$return = array();
$return['description'] = PLUGIN_EVENT_FREETAG_RELATED_ENTRIES;
foreach($entries AS $entryid => $title) {
$return['entries'][] = '<a href="' . serendipity_archiveURL($entryid, $title) . '" title="' . htmlspecialchars($title) . '">' . htmlspecialchars($title) . '</a>';
}
} else {
$return = '<div class="serendipity_freeTag_related">' . PLUGIN_EVENT_FREETAG_RELATED_ENTRIES . '<ul class="plainList">';
foreach($entries AS $entryid => $title) {
$return .= '<li> <a href="' . serendipity_archiveURL($entryid, $title) . '" title="' . htmlspecialchars($title) . '">' . htmlspecialchars($title) . '</a></li>';
}
$return .= '</ul></div>';
}
return $return;
}
@ -533,7 +539,7 @@ class serendipity_event_freetag extends serendipity_event
$taglink = $cfg_taglink;
}
$template = $cfg_template;
$template = $cfg_template;
if (!$template) {
serendipity_event_freetag::renderTags($tags, $xml, $nl, $scaling, $maxSize, $minSize, $useFlash, $flashbgtrans, $flashtagcolor, $flashbgcolor, $flashwidth, $flashspeed, $taglink, $xml_image);
} else {
@ -674,7 +680,7 @@ class serendipity_event_freetag extends serendipity_event
echo '<script type="text/javascript" src="';
echo $serendipity['serendipityHTTPPath'];
echo 'plugins/serendipity_event_freetag/swfobject.js"></script>'. "\n";
echo '<script type="text/javascript">'. "\n";
echo '<script type="text/javascript">'. "\n";
echo 'swfobject.registerObject("tagcloud", "9.0.0", "expressInstall.swf");'. "\n";
echo '</script>'. "\n";
}
@ -696,10 +702,41 @@ class serendipity_event_freetag extends serendipity_event
case 'external_plugin':
$uri_parts = explode('?', str_replace(array('&amp;', '%FF'), array('&', '.'), $eventData));
$param = explode('/', $uri_parts[0]);
$param = $taglist ? explode('/', str_replace('/taglist','',$uri_parts[0])) : explode('/', $uri_parts[0]);
$plugincode = array_shift($param);
$taglist = serendipity_db_bool($this->get_config('taglist', false));
$tagged_as_list = false;
// By option or manually added blogdomain.com/plugin/taglist/Serendipity/Blog/Plums - see below
if ($plugincode == "taglist") $plugincode = "tags";
if (($plugincode == "tag") || ($plugincode == "tags") || ($plugincode == "freetag")) {
// Manually added (last) parameter 'taglist" to view tags by list for certain taglinks eg. blogdomain.com/plugin/tag/Serendipity/Blog/Plums/taglist - both need a modified entries.tpl
if ($taglist && in_array('taglist', $serendipity['uriArguments'])) {
$param = array_map('urldecode', $param);
$param = array_map('urldecode', $param); // for doubled encoded tag umlauts via searchengines backlinks
$param = is_array($param) ? array_map('strip_tags', $param) : strip_tags($param);
$param = array_filter($param); // empty removed XSS by strip_tags
if (!is_object($serendipity['smarty'])) {
serendipity_smarty_init(); // to avoid member function assign() on a non-object error, start Smarty templating
}
if (false === serendipity_db_bool($this->get_config('show_tagcloud', true))) {
// Since this is extra stuff, we need to regular assign the subtitle header and not use $serendipity['head_subtitle'] !
if (count($param) > 1) {
$serendipity['smarty']->assign('head_subtitle', sprintf(PLUGIN_EVENT_FREETAG_USING, implode(' + ', array_map('htmlspecialchars', $param))));
} else {
$serendipity['smarty']->assign('head_subtitle', sprintf(PLUGIN_EVENT_FREETAG_USING, htmlspecialchars($param[0])));
}
}
$serendipity['smarty']->assign('taglist', true);
foreach($serendipity['uriArguments'] AS $uak => $uav) {
if ($uav == 'taglist') unset($serendipity['uriArguments'][$uak]);
}
$tagged_as_list = true;
}
/* Attempt to locate hidden variables within the URI */
foreach ($serendipity['uriArguments'] as $k => $v) {
if ($v[0] == 'P') { /* Page */
@ -719,14 +756,28 @@ class serendipity_event_freetag extends serendipity_event
$this->displayTag = true;
$param = null;
} else if (count($param) == 1) {
$param = urldecode($param[0]);
$param = urldecode($param[0]);
$param = urldecode($param); // for doubled encoded tag umlauts via searchengines backlinks
$param = strip_tags($param);
$serendipity['head_subtitle'] = sprintf(PLUGIN_EVENT_FREETAG_USING, htmlspecialchars($param));
$emit_404 = true;
} else {
if (!$tagged_as_list) {
$param = array_map('urldecode', $param);
$param = array_map('urldecode', $param); // for doubled encoded tag umlauts via searchengines backlinks in sprintf
}
$param = array_map('strip_tags', $param);
$param = array_filter($param); // empty removed XSS by strip_tags
$serendipity['head_subtitle'] = sprintf(PLUGIN_EVENT_FREETAG_USING, implode(' + ', array_map('htmlspecialchars', $param)));
$param = array_map('urldecode', $param);
$emit_404 = true;
}
// for XSS secureness, while using doubled decode
$param = is_array($param) ? array_map('strip_tags', $param) : strip_tags($param);
if (is_array($param)) {
array_filter($param); // empty removed XSS by strip_tags
}
$param = is_array($param) ? array_map('htmlspecialchars', $param) : htmlspecialchars($param);
$this->tags['show'] = $param;
$serendipity['plugin_vars']['tag'] = $param;
if (is_array($param)) {
@ -760,7 +811,7 @@ class serendipity_event_freetag extends serendipity_event
break;
case 'backend_sidebar_entries':
if ($serendipity['version'][0] == '1') {
if ($serendipity['version'][0] < 2) {
?>
<li class="serendipitySideBarMenuLink serendipitySideBarMenuEntryLinks"><a href="?serendipity[adminModule]=event_display&amp;serendipity[adminAction]=managetags"><?php echo PLUGIN_EVENT_FREETAG_MANAGETAGS; ?></a></li>
<?php
@ -886,7 +937,7 @@ function enableAutocomplete() {
matchContains: "word",
autoFill: false
});
}
}
};
addLoadEvent(enableAutocomplete);
@ -929,13 +980,13 @@ addLoadEvent(enableAutocomplete);
}
// jQuery Migrate is used due to $.browser of autocomplete plugin not being available in jquery 1.9+
echo '
' . ($serendipity['version'][0] == 1 ? '<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" type="text/javascript"></script>' : '') . '
' . ($serendipity['version'][0] < 2 ? '<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" type="text/javascript"></script>' : '') . '
<link rel="stylesheet" type="text/css" href="' . $serendipity['baseURL'] . 'plugins/serendipity_event_freetag/jquery.autocomplete.css" />
<script src="https://code.jquery.com/jquery-migrate-1.1.1.js"></script>
<script type="text/javascript" src="' . $serendipity['baseURL'] . 'plugins/serendipity_event_freetag/jquery.autocomplete.min.js"></script>
<script type="text/javascript">
var tags = [' . implode(',', $wicktags) . '];
' . ($serendipity['version'][0] == 1 ? '
' . ($serendipity['version'][0] < 2 ? '
function enableAutocomplete() {
$("#properties_freetag_tagList").autocomplete(tags, {
minChars: 0,
@ -981,7 +1032,7 @@ addLoadEvent(enableAutocomplete);
}
</script>
<?php
if ($serendipity['version'][0] == '1') {
if ($serendipity['version'][0] < 2) {
?>
<fieldset style="margin: 5px">
<a name="tagListAnchor"></a>
@ -1003,7 +1054,7 @@ addLoadEvent(enableAutocomplete);
}
if ($upc != $lastletter)
echo " <b>|".$upc.':</b> ';
if ($serendipity['version'][0] == '1') {
if ($serendipity['version'][0] < 2) {
echo "<a href=\"#tagListAnchor\" style=\"text-decoration: none\" onClick=\"addTag('$tag')\">$tag</a>, ";
} else {
echo "<a href=\"#tagListAnchor\" onClick=\"addTag('$tag')\">$tag</a>, ";
@ -1014,7 +1065,7 @@ addLoadEvent(enableAutocomplete);
</div>
<?php
} else {
if ($serendipity['version'][0] == '1') {
if ($serendipity['version'][0] < 2) {
?>
<fieldset style="margin: 5px">
<?php
@ -1022,7 +1073,7 @@ addLoadEvent(enableAutocomplete);
echo '<fieldset id="edit_entry_freetags" class="entryproperties_freetag mfp-hide">';
}
}
if ($serendipity['version'][0] == '1') {
if ($serendipity['version'][0] < 2) {
?>
<legend><?php echo PLUGIN_EVENT_FREETAG_TITLE; ?></legend>
<label for="serendipity[properties][freetag_tagList]" title="<?php echo PLUGIN_EVENT_FREETAG_TITLE; ?>">
@ -1033,7 +1084,7 @@ addLoadEvent(enableAutocomplete);
<label for="serendipity[properties][freetag_kill]" title="<?php echo PLUGIN_EVENT_FREETAG_KILL; ?>">
<?php echo PLUGIN_EVENT_FREETAG_KILL; ?></label><br/>
<?php
} else {
} else {
?>
<span class="wrap_legend"><legend><?php echo PLUGIN_EVENT_FREETAG_TITLE; ?></legend></span>
<div class="form_field">
@ -1045,7 +1096,7 @@ addLoadEvent(enableAutocomplete);
<label for="properties_freetag_kill"><?php echo PLUGIN_EVENT_FREETAG_KILL; ?></label>
</div>
<?php
}
}
?>
</fieldset>
<?php
@ -1075,7 +1126,7 @@ addLoadEvent(enableAutocomplete);
$arr_showtag = $showtag;
} else {
$arr_showtag = explode(';', $showtag);
}
}
$multimode = 'and';
if (count($arr_showtag) > 1) {
$showtag = $arr_showtag;
@ -1203,6 +1254,7 @@ addLoadEvent(enableAutocomplete);
// Is it a feature?
$this->displayEntry($eventData, $addData);
return true;
break; // Ian: shouldn't it break here? See upper question.
case 'xmlrpc_updertEntry':
if (isset($eventData['id']) && isset($eventData['mt_keywords'])) {
@ -1245,95 +1297,97 @@ addLoadEvent(enableAutocomplete);
//echo real smarty-elements:
$show_related = serendipity_db_bool($this->get_config('show_related', true));
$elements = count($eventData);
$elements = count($eventData);
//If not using extended-smarty, we want related entries only when
//showing only one entry
if ($elements > 1) {
$manyEntries = true;
} else {
$manyEntries = false;
}
//If not using extended-smarty, we want related entries only when
//showing only one entry
if ($elements > 1) {
$manyEntries = true;
} else {
$manyEntries = false;
}
for ($entry = 0; $entry < $elements; $entry++) {
$tags = $this->getTagsForEntry($eventData[$entry]['id']);
for ($entry = 0; $entry < $elements; $entry++) {
$tags = $this->getTagsForEntry($eventData[$entry]['id']);
//when in preview, maybe there are no tags stored yet
if ($addData['preview'] && empty($tags)) {
$tags = explode(',', $serendipity['POST']['properties']['freetag_tagList']);
}
$eventData = $this->addTags($entry, $tags, $eventData);
$tags = explode(',', $serendipity['POST']['properties']['freetag_tagList']);
}
$eventData = $this->addTags($entry, $tags, $eventData);
if ($show_related) {
$relatedEntries = $this->getRelatedEntries($tags, $eventData[$entry]['id']);
$eventData = $this->addRelatedEntries($entry, $manyEntries, $relatedEntries, $eventData);
}
}
if ($show_related) {
$relatedEntries = $this->getRelatedEntries($tags, $eventData[$entry]['id']);
$eventData = $this->addRelatedEntries($entry, $manyEntries, $relatedEntries, $eventData);
}
}
}
#
# Add related entries to eventData[$entry]
#
# $entry: number of entry in $eventData
# for use in displayEntry
/**
* Add related entries to eventData[$entry]
*
* $entry: number of entry in $eventData
* for use in displayEntry
*/
function addRelatedEntries($entry, $manyEntries, $relatedEntries, $eventData) {
if (is_array($relatedEntries)) {
if ($this->get_config('extended_smarty', false)) {
$eventData[$entry]['freetag']['extended'] = true;
$eventData[$entry]['freetag']['related'] = $this->getRelatedEntriesHtml($relatedEntries, true);
} else if (! $manyEntries){
$field = $this->getField($eventData, $entry);
//work with getFieldReference to prevent caching-issues
$entryText =& $this->getFieldReference($field, $eventData[$entry]);
$entryText .= $this->getRelatedEntriesHtml($relatedEntries);
}
}
return $eventData;
}
if (is_array($relatedEntries)) {
if ($this->get_config('extended_smarty', false)) {
$eventData[$entry]['freetag']['extended'] = true;
$eventData[$entry]['freetag']['related'] = $this->getRelatedEntriesHtml($relatedEntries, true);
} else if (! $manyEntries){
$field = $this->getField($eventData, $entry);
//work with getFieldReference to prevent caching-issues
$entryText =& $this->getFieldReference($field, $eventData[$entry]);
$entryText .= $this->getRelatedEntriesHtml($relatedEntries);
}
}
return $eventData;
}
#
# $entry: number of entry in $eventData
# for use in displayEntry
function addTags($entry, $tags, $eventData) {
if (!is_array($eventData)) $eventData = array();
/**
* $entry: number of entry in $eventData
* for use in displayEntry
*/
function addTags($entry, $tags, $eventData) {
if (!is_array($eventData)) $eventData = array();
if ($this->get_config('extended_smarty', false)) {
$eventData[$entry]['freetag']['extended'] = true;
$eventData[$entry]['freetag']['tags']['description'] = str_replace('%s', '', PLUGIN_EVENT_FREETAG_LIST);
$eventData[$entry]['freetag']['tags']['tags'] = $this->getTagHtml($tags, true);
} else {
if (!empty($tags)) {
$field = $this->getField($eventData, $entry);
$msg = '<div class="serendipity_freeTag">' . PLUGIN_EVENT_FREETAG_LIST . '</div>';
//in preview, $eventData maybe don't contain the field - till now
if (!isset($eventData[$entry][$field])) {
if ($this->get_config('extended_smarty', false)) {
$eventData[$entry]['freetag']['extended'] = true;
$eventData[$entry]['freetag']['tags']['description'] = str_replace('%s', '', PLUGIN_EVENT_FREETAG_LIST);
$eventData[$entry]['freetag']['tags']['tags'] = $this->getTagHtml($tags, true);
} else {
if (!empty($tags)) {
$field = $this->getField($eventData, $entry);
$msg = '<div class="serendipity_freeTag">' . PLUGIN_EVENT_FREETAG_LIST . '</div>';
//in preview, $eventData maybe don't contain the field - till now
if (!isset($eventData[$entry][$field])) {
$eventData[$entry][$field] = "";
}
$entryText =& $this->getFieldReference($field, $eventData[$entry]);
$entryText =& $this->getFieldReference($field, $eventData[$entry]);
$entryText .= sprintf($msg, $this->getTagHtml($tags));
}
}
return $eventData;
}
$entryText .= sprintf($msg, $this->getTagHtml($tags));
}
}
return $eventData;
}
function getField($eventData, $entry) {
$embed_footer = $this->get_config('embed_footer');
if ($embed_footer === 'yes' || ($embed_footer !== 'no' && serendipity_db_bool($embed_footer))) {
$field = 'add_footer';
} else if ($embed_footer === 'smarty') {
$field = 'freetag';
} else {
//The option is set to add to the entry, but where?
if (strlen($eventData[$entry]['extended']) > 0) {
$field = 'extended';
} else {
$field = 'body';
}
}
return $field;
}
function getField($eventData, $entry) {
$embed_footer = $this->get_config('embed_footer');
if ($embed_footer === 'yes' || ($embed_footer !== 'no' && serendipity_db_bool($embed_footer))) {
$field = 'add_footer';
} else if ($embed_footer === 'smarty') {
$field = 'freetag';
} else {
//The option is set to add to the entry, but where?
if (strlen($eventData[$entry]['extended']) > 0) {
$field = 'extended';
} else {
$field = 'body';
}
}
return $field;
}
/**
* Returns a list of all tags
@ -1424,26 +1478,26 @@ addLoadEvent(enableAutocomplete);
echo $content;
}
#
# descend: if true, get the related tags of the related tags of given tag
#
#
# descend: if true, get the related tags of the related tags of given tag
#
function getTagCloudTags($tag, $descend = true) {
$rows = serendipity_db_query($this->getTagCloudQuery('', $tag));
if (is_array($rows)) {
foreach((array)$rows as $r) {
$tags[$r['tag']] = $r['total'];
$tags[$r['tag']] = $r['total'];
#get also tags which are related only by other tags
if($descend) {
if($descend) {
$descended_tags = $this->getTagCloudTags($r['tag'], false);
if (is_array($descended_tags)) {
foreach($descended_tags AS $dtag => $value) {
$descended_tags[$dtag] = $value / 2;
}
}
#$tags = array_merge($tags, $descended_tags);
$tags = $tags + $descended_tags;
#$tags = array_merge($tags, $descended_tags);
$tags = $tags + $descended_tags;
}
}
}
@ -1605,13 +1659,13 @@ addLoadEvent(enableAutocomplete);
function getLeafTags($leafWeight=1) {
global $serendipity;
$q = "SELECT tag, count(tag) as total
$q = "SELECT tag, count(tag) as total
FROM {$serendipity['dbPrefix']}entrytags
GROUP BY tag
HAVING count(tag) <= $leafWeight
ORDER BY tag";
$rows = serendipity_db_query($q);
$rows = serendipity_db_query($q);
if (!is_array($rows)) {
echo $rows;
@ -1714,7 +1768,7 @@ addLoadEvent(enableAutocomplete);
$this->install();
$this->set_config('dbversion', 2);
}
if ($serendipity['version'][0] == '1') {
if ($serendipity['version'][0] < 2) {
?>
<div style="border: 1px solid #000;" class="freetagMenu">
<ul>
@ -1773,7 +1827,7 @@ addLoadEvent(enableAutocomplete);
$page = (isset($serendipity['GET']['page']) ? $serendipity['GET']['page'] : 1);
$from = ($page - 1) * $per_fetch;
$to = ($page) * $per_fetch;
if ($serendipity['version'][0] == '2') {
if ($serendipity['version'][0] > 1) {
echo '<h3>';
}
printf(PLUGIN_EVENT_FREETAG_REBUILD_FETCHNO, $from, $to);
@ -1789,7 +1843,7 @@ addLoadEvent(enableAutocomplete);
);
$total = serendipity_getTotalEntries();
if ($serendipity['version'][0] == '1') {
if ($serendipity['version'][0] < 2) {
printf(PLUGIN_EVENT_FREETAG_REBUILD_TOTAL . '<br />', $total);
} else {
printf(PLUGIN_EVENT_FREETAG_REBUILD_TOTAL, $total);
@ -1797,14 +1851,14 @@ addLoadEvent(enableAutocomplete);
}
if (is_array($entries)) {
if ($serendipity['version'][0] == '2') {
if ($serendipity['version'][0] > 1) {
echo '<ul class="plainList">';
}
foreach ($entries AS $entry) {
unset($entry['orderkey']);
unset($entry['loginname']);
unset($entry['email']);
if ($serendipity['version'][0] == '1') {
if ($serendipity['version'][0] < 2) {
printf('%d - "%s"<br />', $entry['id'], htmlspecialchars($entry['title']));
} else {
printf('<li>%d - "%s"', $entry['id'], htmlspecialchars($entry['title']));
@ -1820,17 +1874,17 @@ addLoadEvent(enableAutocomplete);
if (is_string($up)) {
echo "<div>$up</div>\n";
}
if ($serendipity['version'][0] == '1') {
if ($serendipity['version'][0] < 2) {
echo DONE . "<br />\n";
} else {
echo ' ... ' . DONE . "</li>\n";
}
}
if ($serendipity['version'][0] == '2') {
if ($serendipity['version'][0] > 1) {
echo '</ul>';
}
}
if ($serendipity['version'][0] == '1') {
if ($serendipity['version'][0] < 2) {
echo '<br />';
}
@ -1845,7 +1899,7 @@ addLoadEvent(enableAutocomplete);
</script>
<?php
} else {
if ($serendipity['version'][0] == '1') {
if ($serendipity['version'][0] < 2) {
echo '<div class="serendipity_msg_notice">' . DONE . '</div>';
} else {
echo '<span class="msg_notice"><span class="icon-info-circled"></span>' . DONE . '</span>';
@ -1875,7 +1929,7 @@ addLoadEvent(enableAutocomplete);
}
// Cycle all entries
if ($serendipity['version'][0] == '2') {
if ($serendipity['version'][0] > 1) {
echo '<ul class="plainList">';
}
foreach ($entries AS $id => $props) {
@ -1896,7 +1950,7 @@ addLoadEvent(enableAutocomplete);
}
$this->addTagsToEntry($id, $newtags);
if ($serendipity['version'][0] == '1') {
if ($serendipity['version'][0] < 2) {
printf(
PLUGIN_EVENT_FREETAG_GLOBALCAT2TAG_ENTRY . '<br />',
$id,
@ -1914,10 +1968,10 @@ addLoadEvent(enableAutocomplete);
echo '</li>';
}
}
if ($serendipity['version'][0] == '2') {
if ($serendipity['version'][0] > 1) {
echo '</ul>';
}
if ($serendipity['version'][0] == '1') {
if ($serendipity['version'][0] < 2) {
echo PLUGIN_EVENT_FREETAG_GLOBALCAT2TAG . '<br />';
} else {
echo '<span class="msg_notice"><span class="icon-info-circled"></span>' . PLUGIN_EVENT_FREETAG_GLOBALCAT2TAG . '</span>';
@ -1970,7 +2024,7 @@ addLoadEvent(enableAutocomplete);
$r = serendipity_db_query($q);
if ($r === true) {
if ($serendipity['version'][0] == '1') {
if ($serendipity['version'][0] < 2) {
echo PLUGIN_EVENT_FREETAG_MANAGE_UNTAGGED_NONE;
} else {
echo '<span class="msg_notice"><span class="icon-info-circled"></span> ' . PLUGIN_EVENT_FREETAG_MANAGE_UNTAGGED_NONE . '</span>';
@ -1978,11 +2032,11 @@ addLoadEvent(enableAutocomplete);
} else if (!is_array($r)) {
echo $r;
} else {
if ($serendipity['version'][0] == '2') {
if ($serendipity['version'][0] > 1) {
echo '<ul class="plainList">';
}
foreach ($r as $row) {
if ($serendipity['version'][0] == '1') {
if ($serendipity['version'][0] < 2) {
echo '<p style="margin: 5px; border: 1px dotted #000; padding: 3px;" class="freetagMenu">
<a href="' . FREETAG_EDITENTRY_URL . $row['id'] . '"><img style="border: 0px;" src="' . serendipity_getTemplateFile('admin/img/edit.png') . '"></a>
' . $row['title'] . '
@ -1994,7 +2048,7 @@ addLoadEvent(enableAutocomplete);
</li>';
}
}
if ($serendipity['version'][0] == '2') {
if ($serendipity['version'][0] > 1) {
echo '</ul>';
}
}
@ -2017,7 +2071,7 @@ addLoadEvent(enableAutocomplete);
}
$url = FREETAG_MANAGE_URL . "&amp;serendipity[tagview]=".htmlspecialchars($this->eventData['GET']['tagview']);
if ($serendipity['version'][0] == '1') {
if ($serendipity['version'][0] < 2) {
echo '<br />' . PLUGIN_EVENT_FREETAG_KEYWORDS_DESC . '<br /><br />';
} else {
echo '<span class="msg_notice"><span class="icon-info-circled"></span>' . PLUGIN_EVENT_FREETAG_KEYWORDS_DESC . '</span>';
@ -2056,7 +2110,7 @@ addLoadEvent(enableAutocomplete);
?>
<input type="hidden" name="serendipity[tag]" value="<?php echo urlencode(urldecode($serendipity['GET']['tag'])); ?>" />
<?php
if ($serendipity['version'][0] == '1') {
if ($serendipity['version'][0] < 2) {
?>
<input type="submit" name="serendipity[keywordsubmit]" class="serendipityPrettyButton input_button" value="<?php echo SAVE; ?>" />
<?php
@ -2066,7 +2120,7 @@ addLoadEvent(enableAutocomplete);
<?php
}
} else {
if ($serendipity['version'][0] == '1') {
if ($serendipity['version'][0] < 2) {
?>
<a href="<?php echo $url ?>&amp;serendipity%5Btag%5D=<?php echo urlencode($tag)?>#edit"><?php echo EDIT ?></a>
<?php
@ -2116,7 +2170,7 @@ addLoadEvent(enableAutocomplete);
<td><?php echo $weight; ?></td>
<td>
<?php
if ($serendipity['version'][0] == '1') {
if ($serendipity['version'][0] < 2) {
?>
<a href="<?php echo $url?>&amp;serendipity[tagaction]=rename&amp;serendipity[tag]=<?php echo urlencode($tag)?>"><?php echo PLUGIN_EVENT_FREETAG_MANAGE_ACTION_RENAME ?></a>
<a href="<?php echo $url?>&amp;serendipity[tagaction]=split&amp;serendipity[tag]=<?php echo urlencode($tag)?>"><?php echo PLUGIN_EVENT_FREETAG_MANAGE_ACTION_SPLIT ?></a>
@ -2298,16 +2352,16 @@ addLoadEvent(enableAutocomplete);
function cleanupTagAssignments() {
global $serendipity;
if ($serendipity['version'][0] == '1') {
if ($serendipity['version'][0] < 2) {
echo "<br>";
}
// Search for inconsistencies
$q_search = "SELECT et.tag AS tag, et.entryid AS entryid, e.id ".
"FROM {$serendipity['dbPrefix']}entrytags AS et LEFT JOIN {$serendipity['dbPrefix']}entries AS e ".
"ON et.entryid = e.id ".
"WHERE e.id IS NULL ".
"ORDER BY et.tag ASC";
"FROM {$serendipity['dbPrefix']}entrytags AS et LEFT JOIN {$serendipity['dbPrefix']}entries AS e ".
"ON et.entryid = e.id ".
"WHERE e.id IS NULL ".
"ORDER BY et.tag ASC";
$mappings = serendipity_db_query($q_search, FALSE, 'assoc', TRUE);
if (is_array($mappings) && count($mappings) > 0) {
@ -2327,14 +2381,14 @@ addLoadEvent(enableAutocomplete);
$cleanup = serendipity_db_query($q_cleanup);
if ($cleanup === TRUE) {
if ($serendipity['version'][0] == '1') {
if ($serendipity['version'][0] < 2) {
echo "<b>".PLUGIN_EVENT_FREETAG_MANAGE_CLEANUP_SUCCESSFUL."</b>";
} else {
echo '<span class="msg_success"><span class="icon-ok-circled"></span> ' . PLUGIN_EVENT_FREETAG_MANAGE_CLEANUP_SUCCESSFUL . '</span>';
}
}
else {
if ($serendipity['version'][0] == '1') {
if ($serendipity['version'][0] < 2) {
echo "<b>".PLUGIN_EVENT_FREETAG_MANAGE_CLEANUP_FAILED."</b><br><br><b>DB-Error:</b>".$cleanup;
} else {
echo '<div class="msg_error"><p><span class="icon-attention-circled"></span> ' . PLUGIN_EVENT_FREETAG_MANAGE_CLEANUP_FAILED . '</p><strong>DB-Error:</strong> ' . $cleanup . '</div>';
@ -2347,7 +2401,7 @@ addLoadEvent(enableAutocomplete);
foreach ($mappings as $mapping) {
$cleanup_tags[$mapping['tag']][] = $mapping['entryid'];
}
if ($serendipity['version'][0] == '1') {
if ($serendipity['version'][0] < 2) {
echo PLUGIN_EVENT_FREETAG_MANAGE_CLEANUP_INFO."<br><br>";
} else {
echo '<span class="msg_notice"><span class="icon-info-circled"></span> ' . PLUGIN_EVENT_FREETAG_MANAGE_CLEANUP_INFO . '</span>';
@ -2365,9 +2419,9 @@ addLoadEvent(enableAutocomplete);
// Display submit form to start cleanup process
echo '<form action="" method="GET">';
echo $this->getManageUrlAsHidden($this->eventData);
echo '<input type="hidden" name="serendipity[tagview]" value="'.htmlspecialchars($this->eventData['GET']['tagview']).'">';
echo '<input type="hidden" name="serendipity[tagview]" value="'.htmlspecialchars($this->eventData['GET']['tagview']).'">';
echo '<input type="hidden" name="serendipity[perform]" value="true" />';
if ($serendipity['version'][0] == '1') {
if ($serendipity['version'][0] < 2) {
echo '<input class="serendipityPrettyButton input_button" type="submit" name="submit" value="'.PLUGIN_EVENT_FREETAG_MANAGE_CLEANUP_PERFORM.'" />';
} else {
echo '<input type="submit" name="submit" value="'.PLUGIN_EVENT_FREETAG_MANAGE_CLEANUP_PERFORM.'">';
@ -2377,7 +2431,7 @@ addLoadEvent(enableAutocomplete);
}
elseif ($mappings === TRUE) {
// No inconsistencies found
if ($serendipity['version'][0] == '1') {
if ($serendipity['version'][0] < 2) {
echo "<b>".PLUGIN_EVENT_FREETAG_MANAGE_CLEANUP_NOTHING."</b>";
} else {
echo '<span class="msg_notice"><span class="icon-info-circled"></span> ' . PLUGIN_EVENT_FREETAG_MANAGE_CLEANUP_NOTHING . '</span>';
@ -2385,7 +2439,7 @@ addLoadEvent(enableAutocomplete);
}
else {
// An error occures while searching for inconsistencies
if ($serendipity['version'][0] == '1') {
if ($serendipity['version'][0] < 2) {
echo "<b>".PLUGIN_EVENT_FREETAG_MANAGE_CLEANUP_LOOKUP_ERROR."</b><br><br><b>DB-Error:</b>".$mappings;
} else {
echo '<div class="msg_error"><p><span class="icon-attention-circled"></span> ' . PLUGIN_EVENT_FREETAG_MANAGE_CLEANUP_LOOKUP_ERROR . '</p><strong>DB-Error:</strong> ' . $mappings . '</div>';
@ -2452,20 +2506,20 @@ img.serendipity_freeTag_xmlButton
}
function debugMsg($msg) {
global $serendipity;
global $serendipity;
$this->debug_fp = @fopen ( $serendipity ['serendipityPath'] . 'templates_c/freetag.log', 'a' );
if (! $this->debug_fp) {
return false;
}
$this->debug_fp = @fopen ( $serendipity ['serendipityPath'] . 'templates_c/freetag.log', 'a' );
if (! $this->debug_fp) {
return false;
}
if (empty ( $msg )) {
fwrite ( $this->debug_fp, "failure \n" );
} else {
fwrite ( $this->debug_fp, print_r ( $msg, true ) );
}
fclose ( $this->debug_fp );
}
if (empty ( $msg )) {
fwrite ( $this->debug_fp, "failure \n" );
} else {
fwrite ( $this->debug_fp, print_r ( $msg, true ) );
}
fclose ( $this->debug_fp );
}
}
/* vim: set sts=4 ts=4 expandtab : */