put the needle on the record and the dance beat goes like this...

(upstream patch by ian)
This commit is contained in:
Garvin Hicking 2016-09-23 11:13:16 +02:00
parent d156ea6567
commit 38acbfb011
16 changed files with 875 additions and 846 deletions

View file

@ -1,18 +1,30 @@
2.02
- IE CSS linklist fix
2.03 && 1.23:
-------------
2.01
- fix ul ident for csslist and simple option
- added new config option for "CSS List" usage only,
* Requirement and Consistent changes
* Use lang API
2.02:
-----
* IE CSS linklist fix
2.01:
-----
* fix ul ident for csslist and simple option
* added new config option for "CSS List" usage only,
to use a new SVG link icon by CSS (defaults true).
If set false, this will return the previous used world icon image,
which as a normal image will even work with very old and outdated browsers.
2.00
- silence cache lite non static PEAR errors on $obj->remove()
- minor preparations for the Serendipity 2.0 backend
- fix multiple dtree includements using a unique name
- add css seperators
2.00:
-----
* silence cache lite non static PEAR errors on $obj->remove()
* minor preparations for the Serendipity 2.0 backend
* fix multiple dtree includements using a unique name
* add css separators
1.99.1 - use serendipity_specialchars

View file

@ -1,4 +1,4 @@
<?php #
<?php
/**
* @version
@ -24,24 +24,24 @@
@define('PLUGIN_LINKLIST_LINKS', 'Manage Links');
@define('PLUGIN_LINKLIST_NOLINKS', 'No Links in List');
@define('PLUGIN_LINKLIST_CATEGORY', 'Use categories');
@define('PLUGIN_LINKLIST_CATEGORYDESC','Use categories to organize links.');
@define('PLUGIN_LINKLIST_ADDLINK','Добавяне на връзка');
@define('PLUGIN_LINKLIST_LINK_EXAMPLE','Пример: http://www.s9y.org или http://www.s9y.org/forums/');
@define('PLUGIN_LINKLIST_EDITLINK','Редактиране на връзка');
@define('PLUGIN_LINKLIST_LINKDESC','Описание на връзката');
@define('PLUGIN_LINKLIST_CATEGORY_NAME','Система от категории:');
@define('PLUGIN_LINKLIST_CATEGORY_NAME_DESC','Можете да изберете специфична за приставката система от категории или категориите на блога.');
@define('PLUGIN_LINKLIST_CATEGORY_NAME_CUSTOM','Специфична');
@define('PLUGIN_LINKLIST_CATEGORY_NAME_DEFAULT','От блога');
@define('PLUGIN_LINKLIST_ADD_CAT','Управление на категориите');
@define('PLUGIN_LINKLIST_CAT_NAME','Име на категорията');
@define('PLUGIN_LINKLIST_PARENT_CATEGORY','Родителска категория');
@define('PLUGIN_LINKLIST_ADMINCAT','Администриране на категориите');
@define('PLUGIN_LINKLIST_CACHE_NAME','Кеширане на страничната приставка');
@define('PLUGIN_LINKLIST_CACHE_DESC','Кеширането на страничната приставка увеличава скоростта на Вашата страница. Кеширането се обновява, когато се добавят връзки през административния интерфейс.');
@define('PLUGIN_LINKLIST_ENABLED_NAME','Enabled');
@define('PLUGIN_LINKLIST_ENABLED_DESC','Enable the plugin.');
@define('PLUGIN_LINKLIST_DELETE_WARN','Когато избраните категории се изтрият, връзките които те са съдържали отиват в коренната директория (на първо ниво).');
@define('PLUGIN_LINKLIST_CATEGORYDESC', 'Use categories to organize links.');
@define('PLUGIN_LINKLIST_ADDLINK', 'Добавяне на връзка');
@define('PLUGIN_LINKLIST_LINK_EXAMPLE', 'Пример: http://www.s9y.org или http://www.s9y.org/forums/');
@define('PLUGIN_LINKLIST_EDITLINK', 'Редактиране на връзка');
@define('PLUGIN_LINKLIST_LINKDESC', 'Описание на връзката');
@define('PLUGIN_LINKLIST_CATEGORY_NAME', 'Система от категории:');
@define('PLUGIN_LINKLIST_CATEGORY_NAME_DESC', 'Можете да изберете специфична за приставката система от категории или категориите на блога.');
@define('PLUGIN_LINKLIST_CATEGORY_NAME_CUSTOM', 'Специфична');
@define('PLUGIN_LINKLIST_CATEGORY_NAME_DEFAULT', 'От блога');
@define('PLUGIN_LINKLIST_ADD_CAT', 'Управление на категориите');
@define('PLUGIN_LINKLIST_CAT_NAME', 'Име на категорията');
@define('PLUGIN_LINKLIST_PARENT_CATEGORY', 'Родителска категория');
@define('PLUGIN_LINKLIST_ADMINCAT', 'Администриране на категориите');
@define('PLUGIN_LINKLIST_CACHE_NAME', 'Кеширане на страничната приставка');
@define('PLUGIN_LINKLIST_CACHE_DESC', 'Кеширането на страничната приставка увеличава скоростта на Вашата страница. Кеширането се обновява, когато се добавят връзки през административния интерфейс.');
@define('PLUGIN_LINKLIST_ENABLED_NAME', 'Enabled');
@define('PLUGIN_LINKLIST_ENABLED_DESC', 'Enable the plugin.');
@define('PLUGIN_LINKLIST_DELETE_WARN', 'Когато избраните категории се изтрият, връзките които те са съдържали отиват в коренната директория (на първо ниво).');
//
// serendipity_event_linklist.php
@ -94,7 +94,8 @@
@define('PLUGIN_LINKS_OUTSTYLE_BLAHBLAH', 'Изберете стил за списъка с връзки. Dtree използва JavaScript, за да възпроизведе дървовиден изглед на списъка. Вариант CSS използва CSS divs и ограничен JavaScript, за да наподоби dtree, но не поддържа всички негови функции. Ограниченият CSS ще произведе прост CSS контролиран списък, което позволява силен контрол над представянето на списъка. Dtree обикновено не е откриваемо от търсещите машини.');
@define('PLUGIN_LINKS_CALLMARKUP', 'Прилагане на форматиране ?');
@define('PLUGIN_LINKS_CALLMARKUP_BLAHBLAH', 'Изберете дали да приложите форматиране на изхода от приставката.');
@define('PLUGIN_LINKS_USEDESC','Използване на даденото описание');
@define('PLUGIN_LINKS_USEDESC_BLAHBLAH','Използване на описанието на заглавието на връзката, ако има такова.');
@define('PLUGIN_LINKS_PREPEND','Въведете текст, който да бъде показван преди списъка на връзките.');
@define('PLUGIN_LINKS_APPEND','Въведете текст, който да бъде показван след списъка на връзките.');
@define('PLUGIN_LINKS_USEDESC', 'Използване на даденото описание');
@define('PLUGIN_LINKS_USEDESC_BLAHBLAH', 'Използване на описанието на заглавието на връзката, ако има такова.');
@define('PLUGIN_LINKS_PREPEND', 'Въведете текст, който да бъде показван преди списъка на връзките.');
@define('PLUGIN_LINKS_APPEND', 'Въведете текст, който да бъде показван след списъка на връзките.');

View file

@ -105,3 +105,4 @@
@define('PLUGIN_LINKS_USEDESC_BLAHBLAH', 'Použít popis pro titulek odkazu, pokud je přítomen.');
@define('PLUGIN_LINKS_PREPEND', 'Zadej jakýkoliv text. Zobrazí se před seznamem odkazů.');
@define('PLUGIN_LINKS_APPEND', 'Zadej jakýkoliv text. Zobrazí se za seznamem odkazů.');

View file

@ -105,3 +105,4 @@
@define('PLUGIN_LINKS_USEDESC_BLAHBLAH', 'Použít popis pro titulek odkazu, pokud je přítomen.');
@define('PLUGIN_LINKS_PREPEND', 'Zadej jakýkoliv text. Zobrazí se před seznamem odkazů.');
@define('PLUGIN_LINKS_APPEND', 'Zadej jakýkoliv text. Zobrazí se za seznamem odkazů.');

View file

@ -1,4 +1,4 @@
<?php #
<?php
/**
* @version
@ -24,24 +24,24 @@
@define('PLUGIN_LINKLIST_LINKS', 'リンク管理');
@define('PLUGIN_LINKLIST_NOLINKS', '一覧にリンクがありません');
@define('PLUGIN_LINKLIST_CATEGORY', 'カテゴリを使う');
@define('PLUGIN_LINKLIST_CATEGORYDESC','リンクの組み立てにカテゴリを使用します。');
@define('PLUGIN_LINKLIST_ADDLINK','リンクを追加する');
@define('PLUGIN_LINKLIST_LINK_EXAMPLE','例: http://www.s9y.org or http://www.s9y.org/forums/');
@define('PLUGIN_LINKLIST_EDITLINK','リンクを編集する');
@define('PLUGIN_LINKLIST_LINKDESC','リンクの説明');
@define('PLUGIN_LINKLIST_CATEGORY_NAME','使用するカテゴリシステム:');
@define('PLUGIN_LINKLIST_CATEGORY_NAME_DESC','ブログのカテゴリシステムか、このプラグインで提供するカスタムカテゴリを使用するか選択することができます。');
@define('PLUGIN_LINKLIST_CATEGORY_NAME_CUSTOM','カスタム');
@define('PLUGIN_LINKLIST_CATEGORY_NAME_DEFAULT','デフォルト');
@define('PLUGIN_LINKLIST_ADD_CAT','カテゴリ管理');
@define('PLUGIN_LINKLIST_CAT_NAME','カテゴリ名');
@define('PLUGIN_LINKLIST_PARENT_CATEGORY','親カテゴリ');
@define('PLUGIN_LINKLIST_ADMINCAT','カテゴリ管理');
@define('PLUGIN_LINKLIST_CACHE_NAME','サイドバーのキャッシュ');
@define('PLUGIN_LINKLIST_CACHE_DESC','サイドバーをキャッシュし、ページ表示の速度を向上させます。Cache is only updated when links are added through the admin interface.');
@define('PLUGIN_LINKLIST_ENABLED_NAME','有効');
@define('PLUGIN_LINKLIST_ENABLED_DESC','プラグインは有効です。');
@define('PLUGIN_LINKLIST_DELETE_WARN','When a category is deleted all its entries will be moved to the root category.');
@define('PLUGIN_LINKLIST_CATEGORYDESC', 'リンクの組み立てにカテゴリを使用します。');
@define('PLUGIN_LINKLIST_ADDLINK', 'リンクを追加する');
@define('PLUGIN_LINKLIST_LINK_EXAMPLE', '例: http://www.s9y.org or http://www.s9y.org/forums/');
@define('PLUGIN_LINKLIST_EDITLINK', 'リンクを編集する');
@define('PLUGIN_LINKLIST_LINKDESC', 'リンクの説明');
@define('PLUGIN_LINKLIST_CATEGORY_NAME', '使用するカテゴリシステム:');
@define('PLUGIN_LINKLIST_CATEGORY_NAME_DESC', 'ブログのカテゴリシステムか、このプラグインで提供するカスタムカテゴリを使用するか選択することができます。');
@define('PLUGIN_LINKLIST_CATEGORY_NAME_CUSTOM', 'カスタム');
@define('PLUGIN_LINKLIST_CATEGORY_NAME_DEFAULT', 'デフォルト');
@define('PLUGIN_LINKLIST_ADD_CAT', 'カテゴリ管理');
@define('PLUGIN_LINKLIST_CAT_NAME', 'カテゴリ名');
@define('PLUGIN_LINKLIST_PARENT_CATEGORY', '親カテゴリ');
@define('PLUGIN_LINKLIST_ADMINCAT', 'カテゴリ管理');
@define('PLUGIN_LINKLIST_CACHE_NAME', 'サイドバーのキャッシュ');
@define('PLUGIN_LINKLIST_CACHE_DESC', 'サイドバーをキャッシュし、ページ表示の速度を向上させます。Cache is only updated when links are added through the admin interface.');
@define('PLUGIN_LINKLIST_ENABLED_NAME', '有効');
@define('PLUGIN_LINKLIST_ENABLED_DESC', 'プラグインは有効です。');
@define('PLUGIN_LINKLIST_DELETE_WARN', 'When a category is deleted all its entries will be moved to the root category.');
//
// serendipity_event_linklist.php
@ -87,4 +87,3 @@
@define('PLUGIN_LINKS_STYLE', '「dtree」スタイルを使う');
@define('PLUGIN_LINKS_STYLE_BLAHBLAH', 'dtree スタイルの使用はより清潔な外観を提供しますが、リンクがロボットによって解析されることは許可しません。');
?>

View file

@ -1,4 +1,4 @@
<?php #
<?php
/**
* @version
@ -24,24 +24,24 @@
@define('PLUGIN_LINKLIST_LINKS', 'Zarządzaj linkami');
@define('PLUGIN_LINKLIST_NOLINKS', 'Brak linków na liście');
@define('PLUGIN_LINKLIST_CATEGORY', 'Używaj kategorii');
@define('PLUGIN_LINKLIST_CATEGORYDESC','Uzywaj kategorii by organizować swoje linki');
@define('PLUGIN_LINKLIST_ADDLINK','Dodaj linka');
@define('PLUGIN_LINKLIST_LINK_EXAMPLE','Przykład: http://www.s9y.org lub http://www.s9y.org/forums/');
@define('PLUGIN_LINKLIST_EDITLINK','Edytuj linka');
@define('PLUGIN_LINKLIST_LINKDESC','Opis linka');
@define('PLUGIN_LINKLIST_CATEGORY_NAME','Używać którego systemu kategorii:');
@define('PLUGIN_LINKLIST_CATEGORY_NAME_DESC','Możesz wybrać, jaki system kategorii ma być wykorzystywany. System kategorii bloga (Domyślny), czy też dostarczany i zawiadywany przez wtyczkę (Własny).');
@define('PLUGIN_LINKLIST_CATEGORY_NAME_CUSTOM','Własny');
@define('PLUGIN_LINKLIST_CATEGORY_NAME_DEFAULT','Domyślny');
@define('PLUGIN_LINKLIST_ADD_CAT','Zarządzaj kategoriami');
@define('PLUGIN_LINKLIST_CAT_NAME','Nazwa kategorii');
@define('PLUGIN_LINKLIST_PARENT_CATEGORY','Kategoria nadrzędna');
@define('PLUGIN_LINKLIST_ADMINCAT','Podgląd i zarządzanie kategoriami');
@define('PLUGIN_LINKLIST_CACHE_NAME','Buforowanie linków');
@define('PLUGIN_LINKLIST_CACHE_DESC','Buforowanie listy linków skutkuje wzrostem wydajności strony. Bufor jest aktualizowany przy modyfikacji listy linków z poziomu Panelu administracyjnego.');
@define('PLUGIN_LINKLIST_ENABLED_NAME','Włącz');
@define('PLUGIN_LINKLIST_ENABLED_DESC','Włącz wtyczkę');
@define('PLUGIN_LINKLIST_DELETE_WARN','Kiedy kategoria jest usuwana, wszystkie linki do niej przynależne zostaną przeniesione do kategorii głównej drzewa linków.');
@define('PLUGIN_LINKLIST_CATEGORYDESC', 'Uzywaj kategorii by organizować swoje linki');
@define('PLUGIN_LINKLIST_ADDLINK', 'Dodaj linka');
@define('PLUGIN_LINKLIST_LINK_EXAMPLE', 'Przykład: http://www.s9y.org lub http://www.s9y.org/forums/');
@define('PLUGIN_LINKLIST_EDITLINK', 'Edytuj linka');
@define('PLUGIN_LINKLIST_LINKDESC', 'Opis linka');
@define('PLUGIN_LINKLIST_CATEGORY_NAME', 'Używać którego systemu kategorii:');
@define('PLUGIN_LINKLIST_CATEGORY_NAME_DESC', 'Możesz wybrać, jaki system kategorii ma być wykorzystywany. System kategorii bloga (Domyślny), czy też dostarczany i zawiadywany przez wtyczkę (Własny).');
@define('PLUGIN_LINKLIST_CATEGORY_NAME_CUSTOM', 'Własny');
@define('PLUGIN_LINKLIST_CATEGORY_NAME_DEFAULT', 'Domyślny');
@define('PLUGIN_LINKLIST_ADD_CAT', 'Zarządzaj kategoriami');
@define('PLUGIN_LINKLIST_CAT_NAME', 'Nazwa kategorii');
@define('PLUGIN_LINKLIST_PARENT_CATEGORY', 'Kategoria nadrzędna');
@define('PLUGIN_LINKLIST_ADMINCAT', 'Podgląd i zarządzanie kategoriami');
@define('PLUGIN_LINKLIST_CACHE_NAME', 'Buforowanie linków');
@define('PLUGIN_LINKLIST_CACHE_DESC', 'Buforowanie listy linków skutkuje wzrostem wydajności strony. Bufor jest aktualizowany przy modyfikacji listy linków z poziomu Panelu administracyjnego.');
@define('PLUGIN_LINKLIST_ENABLED_NAME', 'Włącz');
@define('PLUGIN_LINKLIST_ENABLED_DESC', 'Włącz wtyczkę');
@define('PLUGIN_LINKLIST_DELETE_WARN', 'Kiedy kategoria jest usuwana, wszystkie linki do niej przynależne zostaną przeniesione do kategorii głównej drzewa linków.');
//
// serendipity_plugin_linklist.php
@ -93,4 +93,4 @@
@define('PLUGIN_LINKLIST_ORDER_OUTSTYLE_SIMP_CSS', 'Prosty CSS');
@define('PLUGIN_LINKS_OUTSTYLE', 'Wybierz styl wyświetlania dla listy linków');
@define('PLUGIN_LINKS_OUTSTYLE_BLAHBLAH', 'Wybierz styl wyświetlania dla listy linków. Dtree używa javascriptu do tworzenia drzewa linków (skrypt działa we wszystkich popularnych przeglądarkach). Lista CSS używa divów i prostego javascriptu dla stworzenia efektu uzyskiwanego przez zastosowanie Dtree ale nie jest tak zaawansowany jak Dtree. Prosty CSS to metoda najlepsza jeśli chcesz by wyszukiwarki parsowały linki umieszczone na Twojej stronie. Prosty CSS wyświetli kontrolowaną przez CSS listę. UWAGA! Metody z użyciem Dtree zazwyczaj NIE umozliwiają wyszukiwarkom interentowym na parsowanie wyświetlanych przez nie linków.');
?>

View file

@ -1,4 +1,4 @@
<?php #
<?php
/**
* @version
@ -24,24 +24,24 @@
@define('PLUGIN_LINKLIST_LINKS', 'Manage Links');
@define('PLUGIN_LINKLIST_NOLINKS', 'No Links in List');
@define('PLUGIN_LINKLIST_CATEGORY', 'Use categories');
@define('PLUGIN_LINKLIST_CATEGORYDESC','Use categories to organize links.');
@define('PLUGIN_LINKLIST_ADDLINK','Äîáŕâ˙íĺ íŕ âđúçęŕ');
@define('PLUGIN_LINKLIST_LINK_EXAMPLE','Ďđčěĺđ: http://www.s9y.org čëč http://www.s9y.org/forums/');
@define('PLUGIN_LINKLIST_EDITLINK','Đĺäŕęňčđŕíĺ íŕ âđúçęŕ');
@define('PLUGIN_LINKLIST_LINKDESC','Îďčńŕíčĺ íŕ âđúçęŕňŕ');
@define('PLUGIN_LINKLIST_CATEGORY_NAME','Ńčńňĺěŕ îň ęŕňĺăîđčč:');
@define('PLUGIN_LINKLIST_CATEGORY_NAME_DESC','Ěîćĺňĺ äŕ čçáĺđĺňĺ ńďĺöčôč÷íŕ çŕ ďđčńňŕâęŕňŕ ńčńňĺěŕ îň ęŕňĺăîđčč čëč ęŕňĺăîđččňĺ íŕ áëîăŕ.');
@define('PLUGIN_LINKLIST_CATEGORY_NAME_CUSTOM','Ńďĺöčôč÷íŕ');
@define('PLUGIN_LINKLIST_CATEGORY_NAME_DEFAULT','Îň áëîăŕ');
@define('PLUGIN_LINKLIST_ADD_CAT','Óďđŕâëĺíčĺ íŕ ęŕňĺăîđččňĺ');
@define('PLUGIN_LINKLIST_CAT_NAME','Čěĺ íŕ ęŕňĺăîđč˙ňŕ');
@define('PLUGIN_LINKLIST_PARENT_CATEGORY','Đîäčňĺëńęŕ ęŕňĺăîđč˙');
@define('PLUGIN_LINKLIST_ADMINCAT','Ŕäěčíčńňđčđŕíĺ íŕ ęŕňĺăîđččňĺ');
@define('PLUGIN_LINKLIST_CACHE_NAME','Ęĺřčđŕíĺ íŕ ńňđŕíč÷íŕňŕ ďđčńňŕâęŕ');
@define('PLUGIN_LINKLIST_CACHE_DESC','Ęĺřčđŕíĺňî íŕ ńňđŕíč÷íŕňŕ ďđčńňŕâęŕ óâĺëč÷ŕâŕ ńęîđîńňňŕ íŕ Âŕřŕňŕ ńňđŕíčöŕ. Ęĺřčđŕíĺňî ńĺ îáíîâ˙âŕ, ęîăŕňî ńĺ äîáŕâ˙ň âđúçęč ďđĺç ŕäěčíčńňđŕňčâíč˙ číňĺđôĺéń.');
@define('PLUGIN_LINKLIST_ENABLED_NAME','Enabled');
@define('PLUGIN_LINKLIST_ENABLED_DESC','Enable the plugin.');
@define('PLUGIN_LINKLIST_DELETE_WARN','Ęîăŕňî čçáđŕíčňĺ ęŕňĺăîđčč ńĺ čçňđč˙ň, âđúçęčňĺ ęîčňî ňĺ ńŕ ńúäúđćŕëč îňčâŕň â ęîđĺííŕňŕ äčđĺęňîđč˙ (íŕ ďúđâî íčâî).');
@define('PLUGIN_LINKLIST_CATEGORYDESC', 'Use categories to organize links.');
@define('PLUGIN_LINKLIST_ADDLINK', 'Äîáŕâ˙íĺ íŕ âđúçęŕ');
@define('PLUGIN_LINKLIST_LINK_EXAMPLE', 'Ďđčěĺđ: http://www.s9y.org čëč http://www.s9y.org/forums/');
@define('PLUGIN_LINKLIST_EDITLINK', 'Đĺäŕęňčđŕíĺ íŕ âđúçęŕ');
@define('PLUGIN_LINKLIST_LINKDESC', 'Îďčńŕíčĺ íŕ âđúçęŕňŕ');
@define('PLUGIN_LINKLIST_CATEGORY_NAME', 'Ńčńňĺěŕ îň ęŕňĺăîđčč:');
@define('PLUGIN_LINKLIST_CATEGORY_NAME_DESC', 'Ěîćĺňĺ äŕ čçáĺđĺňĺ ńďĺöčôč÷íŕ çŕ ďđčńňŕâęŕňŕ ńčńňĺěŕ îň ęŕňĺăîđčč čëč ęŕňĺăîđččňĺ íŕ áëîăŕ.');
@define('PLUGIN_LINKLIST_CATEGORY_NAME_CUSTOM', 'Ńďĺöčôč÷íŕ');
@define('PLUGIN_LINKLIST_CATEGORY_NAME_DEFAULT', 'Îň áëîăŕ');
@define('PLUGIN_LINKLIST_ADD_CAT', 'Óďđŕâëĺíčĺ íŕ ęŕňĺăîđččňĺ');
@define('PLUGIN_LINKLIST_CAT_NAME', 'Čěĺ íŕ ęŕňĺăîđč˙ňŕ');
@define('PLUGIN_LINKLIST_PARENT_CATEGORY', 'Đîäčňĺëńęŕ ęŕňĺăîđč˙');
@define('PLUGIN_LINKLIST_ADMINCAT', 'Ŕäěčíčńňđčđŕíĺ íŕ ęŕňĺăîđččňĺ');
@define('PLUGIN_LINKLIST_CACHE_NAME', 'Ęĺřčđŕíĺ íŕ ńňđŕíč÷íŕňŕ ďđčńňŕâęŕ');
@define('PLUGIN_LINKLIST_CACHE_DESC', 'Ęĺřčđŕíĺňî íŕ ńňđŕíč÷íŕňŕ ďđčńňŕâęŕ óâĺëč÷ŕâŕ ńęîđîńňňŕ íŕ Âŕřŕňŕ ńňđŕíčöŕ. Ęĺřčđŕíĺňî ńĺ îáíîâ˙âŕ, ęîăŕňî ńĺ äîáŕâ˙ň âđúçęč ďđĺç ŕäěčíčńňđŕňčâíč˙ číňĺđôĺéń.');
@define('PLUGIN_LINKLIST_ENABLED_NAME', 'Enabled');
@define('PLUGIN_LINKLIST_ENABLED_DESC', 'Enable the plugin.');
@define('PLUGIN_LINKLIST_DELETE_WARN', 'Ęîăŕňî čçáđŕíčňĺ ęŕňĺăîđčč ńĺ čçňđč˙ň, âđúçęčňĺ ęîčňî ňĺ ńŕ ńúäúđćŕëč îňčâŕň â ęîđĺííŕňŕ äčđĺęňîđč˙ (íŕ ďúđâî íčâî).');
//
// serendipity_event_linklist.php
@ -95,7 +95,8 @@
@define('PLUGIN_LINKS_OUTSTYLE_BLAHBLAH', 'Изберете стил за списъка с връзки. Dtree използва JavaScript, за да възпроизведе дървовиден изглед на списъка. Вариант CSS използва CSS divs и ограничен JavaScript, за да наподоби dtree, но не поддържа всички негови функции. Ограниченият CSS ще произведе прост CSS контролиран списък, което позволява силен контрол над представянето на списъка. Dtree обикновено не е откриваемо от търсещите машини.');
@define('PLUGIN_LINKS_CALLMARKUP', 'Прилагане на форматиране ?');
@define('PLUGIN_LINKS_CALLMARKUP_BLAHBLAH', 'Изберете дали да приложите форматиране на изхода от приставката.');
@define('PLUGIN_LINKS_USEDESC','Čçďîëçâŕíĺ íŕ äŕäĺíîňî îďčńŕíčĺ');
@define('PLUGIN_LINKS_USEDESC_BLAHBLAH','Čçďîëçâŕíĺ íŕ îďčńŕíčĺňî íŕ çŕăëŕâčĺňî íŕ âđúçęŕňŕ, ŕęî čěŕ ňŕęîâŕ.');
@define('PLUGIN_LINKS_PREPEND','Âúâĺäĺňĺ ňĺęńň, ęîéňî äŕ áúäĺ ďîęŕçâŕí ďđĺäč ńďčńúęŕ íŕ âđúçęčňĺ.');
@define('PLUGIN_LINKS_APPEND','Âúâĺäĺňĺ ňĺęńň, ęîéňî äŕ áúäĺ ďîęŕçâŕí ńëĺä ńďčńúęŕ íŕ âđúçęčňĺ.');
@define('PLUGIN_LINKS_USEDESC', 'Čçďîëçâŕíĺ íŕ äŕäĺíîňî îďčńŕíčĺ');
@define('PLUGIN_LINKS_USEDESC_BLAHBLAH', 'Čçďîëçâŕíĺ íŕ îďčńŕíčĺňî íŕ çŕăëŕâčĺňî íŕ âđúçęŕňŕ, ŕęî čěŕ ňŕęîâŕ.');
@define('PLUGIN_LINKS_PREPEND', 'Âúâĺäĺňĺ ňĺęńň, ęîéňî äŕ áúäĺ ďîęŕçâŕí ďđĺäč ńďčńúęŕ íŕ âđúçęčňĺ.');
@define('PLUGIN_LINKS_APPEND', 'Âúâĺäĺňĺ ňĺęńň, ęîéňî äŕ áúäĺ ďîęŕçâŕí ńëĺä ńďčńúęŕ íŕ âđúçęčňĺ.');

View file

@ -105,3 +105,4 @@
@define('PLUGIN_LINKS_USEDESC_BLAHBLAH', 'Použít popis pro titulek odkazu, pokud je přítomen.');
@define('PLUGIN_LINKS_PREPEND', 'Zadej jakýkoliv text. Zobrazí se před seznamem odkazů.');
@define('PLUGIN_LINKS_APPEND', 'Zadej jakýkoliv text. Zobrazí se za seznamem odkazů.');

View file

@ -105,3 +105,4 @@
@define('PLUGIN_LINKS_USEDESC_BLAHBLAH', 'Použít popis pro titulek odkazu, pokud je přítomen.');
@define('PLUGIN_LINKS_PREPEND', 'Zadej jakýkoliv text. Zobrazí se před seznamem odkazů.');
@define('PLUGIN_LINKS_APPEND', 'Zadej jakýkoliv text. Zobrazí se za seznamem odkazů.');

View file

@ -24,24 +24,24 @@
@define('PLUGIN_LINKLIST_LINKS', 'Manage Links');
@define('PLUGIN_LINKLIST_NOLINKS', 'No Links in List');
@define('PLUGIN_LINKLIST_CATEGORY', 'Use categories');
@define('PLUGIN_LINKLIST_CATEGORYDESC','Use categories to organize links.');
@define('PLUGIN_LINKLIST_ADDLINK','Add a Link');
@define('PLUGIN_LINKLIST_LINK_EXAMPLE','Example: http://www.s9y.org or http://www.s9y.org/forums/');
@define('PLUGIN_LINKLIST_EDITLINK','Edit a Link');
@define('PLUGIN_LINKLIST_LINKDESC','Description of Link');
@define('PLUGIN_LINKLIST_CATEGORY_NAME','Category system to use:');
@define('PLUGIN_LINKLIST_CATEGORY_NAME_DESC','You can choose to use the blog category system, or the custom categories provided with this plugin.');
@define('PLUGIN_LINKLIST_CATEGORY_NAME_CUSTOM','Custom');
@define('PLUGIN_LINKLIST_CATEGORY_NAME_DEFAULT','Default');
@define('PLUGIN_LINKLIST_ADD_CAT','Manage categories');
@define('PLUGIN_LINKLIST_CAT_NAME','Category Name');
@define('PLUGIN_LINKLIST_PARENT_CATEGORY','Parent Category');
@define('PLUGIN_LINKLIST_ADMINCAT','Administer Categories');
@define('PLUGIN_LINKLIST_CACHE_NAME','Cache sidebar');
@define('PLUGIN_LINKLIST_CACHE_DESC','Caching the sidebar results increases the speed of your page. To clear cache for troubleshooting purposes turn it off and then back on.');
@define('PLUGIN_LINKLIST_ENABLED_NAME','Enabled');
@define('PLUGIN_LINKLIST_ENABLED_DESC','Enable the plugin.');
@define('PLUGIN_LINKLIST_DELETE_WARN','When a category is deleted all its entries will be moved to the root category.');
@define('PLUGIN_LINKLIST_CATEGORYDESC', 'Use categories to organize links.');
@define('PLUGIN_LINKLIST_ADDLINK', 'Add a Link');
@define('PLUGIN_LINKLIST_LINK_EXAMPLE', 'Example: http://www.s9y.org or http://www.s9y.org/forums/');
@define('PLUGIN_LINKLIST_EDITLINK', 'Edit a Link');
@define('PLUGIN_LINKLIST_LINKDESC', 'Description of Link');
@define('PLUGIN_LINKLIST_CATEGORY_NAME', 'Category system to use:');
@define('PLUGIN_LINKLIST_CATEGORY_NAME_DESC', 'You can choose to use the blog category system, or the custom categories provided with this plugin.');
@define('PLUGIN_LINKLIST_CATEGORY_NAME_CUSTOM', 'Custom');
@define('PLUGIN_LINKLIST_CATEGORY_NAME_DEFAULT', 'Default');
@define('PLUGIN_LINKLIST_ADD_CAT', 'Manage categories');
@define('PLUGIN_LINKLIST_CAT_NAME', 'Category Name');
@define('PLUGIN_LINKLIST_PARENT_CATEGORY', 'Parent Category');
@define('PLUGIN_LINKLIST_ADMINCAT', 'Administer Categories');
@define('PLUGIN_LINKLIST_CACHE_NAME', 'Cache sidebar');
@define('PLUGIN_LINKLIST_CACHE_DESC', 'Caching the sidebar results increases the speed of your page. To clear cache for troubleshooting purposes turn it off and then back on.');
@define('PLUGIN_LINKLIST_ENABLED_NAME', 'Enabled');
@define('PLUGIN_LINKLIST_ENABLED_DESC', 'Enable the plugin.');
@define('PLUGIN_LINKLIST_DELETE_WARN', 'When a category is deleted all its entries will be moved to the root category.');
//
// serendipity_plugin_linklist.php
@ -96,8 +96,8 @@
@define('PLUGIN_LINKS_OUTSTYLE_BLAHBLAH', 'Choose the output style for the linklist. Dtree output uses javascript to render a cross-browser tree view. CSS list uses CSS divs and a simple javascript to replicate the dtree view, but does not support all the features of dtree. Simple CSS will output a simple CSS controlled list, which enables tight control over the presentation of links. Note that dtree is not typically parsable by search engines.');
@define('PLUGIN_LINKS_CALLMARKUP', 'Apply markup?');
@define('PLUGIN_LINKS_CALLMARKUP_BLAHBLAH', 'Choose to apply markup to the linklist output. This will apply all markup which is applied to HTML Nugget.');
@define('PLUGIN_LINKS_USEDESC','Use the given description');
@define('PLUGIN_LINKS_USEDESC_BLAHBLAH','Use the description for the link title if it is available.');
@define('PLUGIN_LINKS_PREPEND','Enter any text to be shown before the list of links.');
@define('PLUGIN_LINKS_APPEND','Enter any text to be shown after the list of links.');
@define('PLUGIN_LINKS_USEDESC', 'Use the given description');
@define('PLUGIN_LINKS_USEDESC_BLAHBLAH', 'Use the description for the link title if it is available.');
@define('PLUGIN_LINKS_PREPEND', 'Enter any text to be shown before the list of links.');
@define('PLUGIN_LINKS_APPEND', 'Enter any text to be shown after the list of links.');

View file

@ -1,4 +1,4 @@
<?php #
<?php
/**
* @version
@ -24,24 +24,24 @@
@define('PLUGIN_LINKLIST_LINKS', 'リンク管理');
@define('PLUGIN_LINKLIST_NOLINKS', '一覧にリンクがありません');
@define('PLUGIN_LINKLIST_CATEGORY', 'カテゴリを使う');
@define('PLUGIN_LINKLIST_CATEGORYDESC','リンクの組み立てにカテゴリを使用します。');
@define('PLUGIN_LINKLIST_ADDLINK','リンクを追加する');
@define('PLUGIN_LINKLIST_LINK_EXAMPLE','例: http://www.s9y.org or http://www.s9y.org/forums/');
@define('PLUGIN_LINKLIST_EDITLINK','リンクを編集する');
@define('PLUGIN_LINKLIST_LINKDESC','リンクの説明');
@define('PLUGIN_LINKLIST_CATEGORY_NAME','使用するカテゴリシステム:');
@define('PLUGIN_LINKLIST_CATEGORY_NAME_DESC','ブログのカテゴリシステムか、このプラグインで提供するカスタムカテゴリを使用するか選択することができます。');
@define('PLUGIN_LINKLIST_CATEGORY_NAME_CUSTOM','カスタム');
@define('PLUGIN_LINKLIST_CATEGORY_NAME_DEFAULT','デフォルト');
@define('PLUGIN_LINKLIST_ADD_CAT','カテゴリ管理');
@define('PLUGIN_LINKLIST_CAT_NAME','カテゴリ名');
@define('PLUGIN_LINKLIST_PARENT_CATEGORY','親カテゴリ');
@define('PLUGIN_LINKLIST_ADMINCAT','カテゴリ管理');
@define('PLUGIN_LINKLIST_CACHE_NAME','サイドバーのキャッシュ');
@define('PLUGIN_LINKLIST_CACHE_DESC','サイドバーをキャッシュし、ページ表示の速度を向上させます。Cache is only updated when links are added through the admin interface.');
@define('PLUGIN_LINKLIST_ENABLED_NAME','有効');
@define('PLUGIN_LINKLIST_ENABLED_DESC','プラグインは有効です。');
@define('PLUGIN_LINKLIST_DELETE_WARN','When a category is deleted all its entries will be moved to the root category.');
@define('PLUGIN_LINKLIST_CATEGORYDESC', 'リンクの組み立てにカテゴリを使用します。');
@define('PLUGIN_LINKLIST_ADDLINK', 'リンクを追加する');
@define('PLUGIN_LINKLIST_LINK_EXAMPLE', '例: http://www.s9y.org or http://www.s9y.org/forums/');
@define('PLUGIN_LINKLIST_EDITLINK', 'リンクを編集する');
@define('PLUGIN_LINKLIST_LINKDESC', 'リンクの説明');
@define('PLUGIN_LINKLIST_CATEGORY_NAME', '使用するカテゴリシステム:');
@define('PLUGIN_LINKLIST_CATEGORY_NAME_DESC', 'ブログのカテゴリシステムか、このプラグインで提供するカスタムカテゴリを使用するか選択することができます。');
@define('PLUGIN_LINKLIST_CATEGORY_NAME_CUSTOM', 'カスタム');
@define('PLUGIN_LINKLIST_CATEGORY_NAME_DEFAULT', 'デフォルト');
@define('PLUGIN_LINKLIST_ADD_CAT', 'カテゴリ管理');
@define('PLUGIN_LINKLIST_CAT_NAME', 'カテゴリ名');
@define('PLUGIN_LINKLIST_PARENT_CATEGORY', '親カテゴリ');
@define('PLUGIN_LINKLIST_ADMINCAT', 'カテゴリ管理');
@define('PLUGIN_LINKLIST_CACHE_NAME', 'サイドバーのキャッシュ');
@define('PLUGIN_LINKLIST_CACHE_DESC', 'サイドバーをキャッシュし、ページ表示の速度を向上させます。Cache is only updated when links are added through the admin interface.');
@define('PLUGIN_LINKLIST_ENABLED_NAME', '有効');
@define('PLUGIN_LINKLIST_ENABLED_DESC', 'プラグインは有効です。');
@define('PLUGIN_LINKLIST_DELETE_WARN', 'When a category is deleted all its entries will be moved to the root category.');
//
// serendipity_event_linklist.php
@ -87,4 +87,3 @@
@define('PLUGIN_LINKS_STYLE', '「dtree」スタイルを使う');
@define('PLUGIN_LINKS_STYLE_BLAHBLAH', 'dtree スタイルの使用はより清潔な外観を提供しますが、リンクがロボットによって解析されることは許可しません。');
?>

View file

@ -1,4 +1,4 @@
<?php #
<?php
/**
* @version
@ -24,24 +24,24 @@
@define('PLUGIN_LINKLIST_LINKS', 'Zarządzaj linkami');
@define('PLUGIN_LINKLIST_NOLINKS', 'Brak linków na liście');
@define('PLUGIN_LINKLIST_CATEGORY', 'Używaj kategorii');
@define('PLUGIN_LINKLIST_CATEGORYDESC','Uzywaj kategorii by organizować swoje linki');
@define('PLUGIN_LINKLIST_ADDLINK','Dodaj linka');
@define('PLUGIN_LINKLIST_LINK_EXAMPLE','Przykład: http://www.s9y.org lub http://www.s9y.org/forums/');
@define('PLUGIN_LINKLIST_EDITLINK','Edytuj linka');
@define('PLUGIN_LINKLIST_LINKDESC','Opis linka');
@define('PLUGIN_LINKLIST_CATEGORY_NAME','Używać którego systemu kategorii:');
@define('PLUGIN_LINKLIST_CATEGORY_NAME_DESC','Możesz wybrać, jaki system kategorii ma być wykorzystywany. System kategorii bloga (Domyślny), czy też dostarczany i zawiadywany przez wtyczkę (Własny).');
@define('PLUGIN_LINKLIST_CATEGORY_NAME_CUSTOM','Własny');
@define('PLUGIN_LINKLIST_CATEGORY_NAME_DEFAULT','Domyślny');
@define('PLUGIN_LINKLIST_ADD_CAT','Zarządzaj kategoriami');
@define('PLUGIN_LINKLIST_CAT_NAME','Nazwa kategorii');
@define('PLUGIN_LINKLIST_PARENT_CATEGORY','Kategoria nadrzędna');
@define('PLUGIN_LINKLIST_ADMINCAT','Podgląd i zarządzanie kategoriami');
@define('PLUGIN_LINKLIST_CACHE_NAME','Buforowanie linków');
@define('PLUGIN_LINKLIST_CACHE_DESC','Buforowanie listy linków skutkuje wzrostem wydajności strony. Bufor jest aktualizowany przy modyfikacji listy linków z poziomu Panelu administracyjnego.');
@define('PLUGIN_LINKLIST_ENABLED_NAME','Włącz');
@define('PLUGIN_LINKLIST_ENABLED_DESC','Włącz wtyczkę');
@define('PLUGIN_LINKLIST_DELETE_WARN','Kiedy kategoria jest usuwana, wszystkie linki do niej przynależne zostaną przeniesione do kategorii głównej drzewa linków.');
@define('PLUGIN_LINKLIST_CATEGORYDESC', 'Uzywaj kategorii by organizować swoje linki');
@define('PLUGIN_LINKLIST_ADDLINK', 'Dodaj linka');
@define('PLUGIN_LINKLIST_LINK_EXAMPLE', 'Przykład: http://www.s9y.org lub http://www.s9y.org/forums/');
@define('PLUGIN_LINKLIST_EDITLINK', 'Edytuj linka');
@define('PLUGIN_LINKLIST_LINKDESC', 'Opis linka');
@define('PLUGIN_LINKLIST_CATEGORY_NAME', 'Używać którego systemu kategorii:');
@define('PLUGIN_LINKLIST_CATEGORY_NAME_DESC', 'Możesz wybrać, jaki system kategorii ma być wykorzystywany. System kategorii bloga (Domyślny), czy też dostarczany i zawiadywany przez wtyczkę (Własny).');
@define('PLUGIN_LINKLIST_CATEGORY_NAME_CUSTOM', 'Własny');
@define('PLUGIN_LINKLIST_CATEGORY_NAME_DEFAULT', 'Domyślny');
@define('PLUGIN_LINKLIST_ADD_CAT', 'Zarządzaj kategoriami');
@define('PLUGIN_LINKLIST_CAT_NAME', 'Nazwa kategorii');
@define('PLUGIN_LINKLIST_PARENT_CATEGORY', 'Kategoria nadrzędna');
@define('PLUGIN_LINKLIST_ADMINCAT', 'Podgląd i zarządzanie kategoriami');
@define('PLUGIN_LINKLIST_CACHE_NAME', 'Buforowanie linków');
@define('PLUGIN_LINKLIST_CACHE_DESC', 'Buforowanie listy linków skutkuje wzrostem wydajności strony. Bufor jest aktualizowany przy modyfikacji listy linków z poziomu Panelu administracyjnego.');
@define('PLUGIN_LINKLIST_ENABLED_NAME', 'Włącz');
@define('PLUGIN_LINKLIST_ENABLED_DESC', 'Włącz wtyczkę');
@define('PLUGIN_LINKLIST_DELETE_WARN', 'Kiedy kategoria jest usuwana, wszystkie linki do niej przynależne zostaną przeniesione do kategorii głównej drzewa linków.');
//
// serendipity_plugin_linklist.php
@ -93,4 +93,4 @@
@define('PLUGIN_LINKLIST_ORDER_OUTSTYLE_SIMP_CSS', 'Prosty CSS');
@define('PLUGIN_LINKS_OUTSTYLE', 'Wybierz styl wyświetlania dla listy linków');
@define('PLUGIN_LINKS_OUTSTYLE_BLAHBLAH', 'Wybierz styl wyświetlania dla listy linków. Dtree używa javascriptu do tworzenia drzewa linków (skrypt działa we wszystkich popularnych przeglądarkach). Lista CSS używa divów i prostego javascriptu dla stworzenia efektu uzyskiwanego przez zastosowanie Dtree ale nie jest tak zaawansowany jak Dtree. Prosty CSS to metoda najlepsza jeśli chcesz by wyszukiwarki parsowały linki umieszczone na Twojej stronie. Prosty CSS wyświetli kontrolowaną przez CSS listę. UWAGA! Metody z użyciem Dtree zazwyczaj NIE umozliwiają wyszukiwarkom interentowym na parsowanie wyświetlanych przez nie linków.');
?>

View file

@ -1,4 +1,4 @@
function hide_unhide(thing, path, lines, icons, bottom){
function hide_unhide(thing, path, lines, icons, bottom) {
nav=document.getElementById(thing).style;
if (lines) {
if (bottom) {
@ -8,17 +8,17 @@ function hide_unhide(thing, path, lines, icons, bottom){
plus = path + '/img/plusbottom.gif';
minus= path + '/img/minusbottom.gif';
}
}else{
} else {
plus = path + '/img/nolines_plus.gif';
minus= path + '/img/nolines_minus.gif';
}
if(nav.display=="none"){
if (nav.display=="none") {
document.getElementById(thing+'_image').src=minus;
nav.display='block';
if (icons) {
document.getElementById(thing+'_folder').src=path +'/img/folderopen.gif';
}
}else{
} else {
document.getElementById(thing+'_image').src=plus;
nav.display='none';
if (icons) {

View file

@ -1,3 +1,4 @@
/* serendipity_event_linklist.css start */
div.linklist span.menu_title {
@ -59,4 +60,3 @@ div.linklist a:hover {
}
/* serendipity_event_linklist.css end */

View file

@ -4,19 +4,14 @@ if (IN_serendipity !== true) {
die ("Don't hack!");
}
// Probe for a language include with constants. Still include defines later on, if some constants were missing
$probelang = dirname(__FILE__) . '/' . $serendipity['charset'] . 'lang_' . $serendipity['lang'] . '.inc.php';
if (file_exists($probelang)) {
include $probelang;
}
include_once dirname(__FILE__) . '/lang_en.inc.php';
class serendipity_event_linklist extends serendipity_event {
@serendipity_plugin_api::load_language(dirname(__FILE__));
class serendipity_event_linklist extends serendipity_event
{
var $title = PLUGIN_LINKLIST_TITLE;
function introspect(&$propbag) {
function introspect(&$propbag)
{
global $serendipity;
$propbag->add('name', PLUGIN_LINKLIST_TITLE);
@ -30,9 +25,9 @@ class serendipity_event_linklist extends serendipity_event {
'external_plugin' => true
));
$propbag->add('author', 'Matthew Groeninger, Omid Mottaghi Rad');
$propbag->add('version', '2.02');
$propbag->add('version', '2.03');
$propbag->add('requirements', array(
'serendipity' => '0.8',
'serendipity' => '1.6',
'smarty' => '2.6.7',
'php' => '4.1.0'
));
@ -40,237 +35,13 @@ class serendipity_event_linklist extends serendipity_event {
$propbag->add('groups', array('FRONTEND_VIEWS', 'BACKEND_FEATURES'));
}
function decode($string) {
if (LANG_CHARSET != 'UTF-8') {
return utf8_decode($string);
}
return $string;
}
function event_hook($event, &$bag, &$eventData, $addData = null) {
global $serendipity;
$hooks = &$bag->get('event_hooks');
if (isset($hooks[$event])) {
switch($event) {
case 'backend_sidebar_entries_event_display_linklist':
if ($this->get_config('active')!='true') {
return false;
}
if (isset($_POST['REMOVE'])) {
if (isset($_POST['serendipity']['link_to_remove'])) {
foreach ($_POST['serendipity']['link_to_remove'] as $key) {
$this->del_link($key);
}
} else {
if (isset($_POST['serendipity']['category_to_remove'])) {
foreach ($_POST['serendipity']['category_to_remove'] as $key) {
$this->del_category($key);
}
}
}
}
if (isset($_POST['SAVE'])) {
foreach ($_POST['serendipity']['link_to_recat'] AS $key => $row) {
$this->update_cat($key,$row);
}
}
if (isset($_POST['ADD'])) {
if (isset($_POST['serendipity']['add_link']['title']) && isset($_POST['serendipity']['add_link']['link'])) {
$this->add_link($_POST['serendipity']['add_link']['link'],$_POST['serendipity']['add_link']['title'],$_POST['serendipity']['add_link']['desc'],$_POST['serendipity']['link_to_recat']['cat']);
} else {
if (isset($_POST['serendipity']['add_category']['title'])) {
$this->add_cat($_POST['serendipity']['add_category']['title'],$_POST['serendipity']['link_to_recat']['cat']);
}
}
}
if (isset($_POST['EDIT'])) {
if (isset($_POST['serendipity']['add_link']['title']) && isset($_POST['serendipity']['add_link']['link'])&& isset($_POST['serendipity']['add_link']['id'])) {
$this->update_link($_POST['serendipity']['add_link']['id'],$_POST['serendipity']['add_link']['link'],$_POST['serendipity']['add_link']['title'],$_POST['serendipity']['add_link']['desc'],$_POST['serendipity']['link_to_recat']['cat']);
}
}
switch ($_GET['submit']){
case 'move up':
$this->move_up($_GET['serendipity']['link_to_move']);
break;
case 'move down':
$this->move_down($_GET['serendipity']['link_to_move']);
break;
}
if ($this->get_config('cache') == 'yes') {
if (@include_once("Cache/Lite.php")) {
$cache_obj = new Cache_Lite( array('cacheDir' => $serendipity['serendipityPath'].'templates_c/','automaticSerialization' => true));
$output = $this->generate_output(true);
$cache_obj->save($output,'linklist_cache');
} else {
$output = $this->generate_output(true);
$this->set_config('cached_output',$output);
}
}
if (isset($_GET['serendipity']['edit_link'])) {
$this->output_add_edit_linkadmin(TRUE,$_GET['serendipity']['edit_link']);
} else {
if (isset($_GET['serendipity']['manage_category'])) {
$this->output_categoryadmin(TRUE,$_GET['serendipity']['edit_link']);
} else {
$this->output_add_edit_linkadmin(FALSE);
$this->output_linkadmin();
}
}
return true;
break;
case 'backend_sidebar_entries':
if ($this->get_config('active')=='true' && $serendipity['version'][0] < 2) {
echo "\n".'<li class="serendipitySideBarMenuLink serendipitySideBarMenuEntryLinks"><a href="?serendipity[adminModule]=event_display&amp;serendipity[adminAction]=linklist">' . PLUGIN_LINKLIST_ADMINLINK . '</a></li>';
}
return true;
break;
case 'backend_sidebar_admin_appearance':
if ($this->get_config('active')=='true' && $serendipity['version'][0] > 1) {
echo "\n".'<li><a href="?serendipity[adminModule]=event_display&amp;serendipity[adminAction]=linklist">' . PLUGIN_LINKLIST_ADMINLINK . '</a></li>';
}
return true;
break;
case 'css':
if ($this->get_config('style') == 'dtree') {
$searchstr = '.dtree';
$filename = 'serendipity_event_dtree.css';
} else {
$searchstr = '.linklist';
$filename = 'serendipity_event_linklist.css';
}
// class exists in CSS by another Plugin, or a User has customized it and we don't need default
$pos = strpos($eventData, $searchstr);
if ($pos === false) {
$tfile = serendipity_getTemplateFile($filename, 'serendipityPath');
if (!$tfile || $tfile == $filename) {
$tfile = dirname(__FILE__) . '/' . $filename;
}
$eventData .= file_get_contents($tfile);
}
return true;
break;
case 'external_plugin':
$uri_parts = explode('?', str_replace('&amp;', '&', $eventData));
$parts = explode('&', $uri_parts[0]);
$uri_part = $parts[0];
switch($uri_part) {
case 'lldtree.js': // name unique!
header('Content-Type: text/javascript');
echo file_get_contents(dirname(__FILE__).'/dtree.js');
break;
case 'linklist.js':
header('Content-Type: text/javascript');
echo file_get_contents(dirname(__FILE__).'/linklist.js');
break;
}
return true;
break;
case 'plugins_linklist_input':
$eventData['links'] = $this->generate_output(false);
return true;
break;
case 'plugins_linklist_conf':
$this->set_config('style', $eventData['style']);
$this->set_config('display', $eventData['display']);
$this->set_config('category', $eventData['category']);
$this->set_config('cache', $eventData['cache']);
$eventData['changed'] = 'false';
if ($eventData['enabled']=='true') {
if ($this->get_config('active')!='true') {
$eventData['changed'] = 'true';
$this->set_config('active','true');
$this->set_config('active','true');
$this->set_config('category','custom');
$q = 'SELECT count(id) FROM '.$serendipity['dbPrefix'].'links';
$sql = serendipity_db_query($q);
if ($sql[0][0] == 0) {
$xml = xml_parser_create('UTF-8');
xml_parse_into_struct($xml, '<list>'.serendipity_utf8_encode($eventData['links']).'</list>', $struct, $index);
xml_parser_free($xml);
$depth = -1;
for($level[]=0, $i=1, $j=1; isset($struct[$i]); $i++, $j++){
if (isset($struct[$i]['type'])){
if ($struct[$i]['type']=='open' && strtolower($struct[$i]['tag'])=='dir'){
$this->add_cat($this->decode($struct[$i]['attributes']['NAME']),$in_cat[0]);
$q = 'SELECT categoryid FROM '.$serendipity['dbPrefix'].'link_category where category_name = "'.serendipity_db_escape_string($this->decode($struct[$i]['attributes']['NAME'])).'"';
$sql = serendipity_db_query($q);
$in_cat[] = $sql[0][0];
$depth++;
} else if($struct[$i]['type']=='close' && strtolower($struct[$i]['tag'])=='dir'){
$blah = array_pop($in_cat);
$depth--;
} else if($struct[$i]['type']=='complete' && strtolower($struct[$i]['tag'])=='link'){
$this->add_link($this->decode($struct[$i]['attributes']['LINK']),$this->decode($struct[$i]['attributes']['NAME']),$this->decode($struct[$i]['attributes']['DESCRIP']),$in_cat[$depth]);
}
}
}
}
if ($eventData['cache'] == 'yes') {
if (@include_once("Cache/Lite.php")) {
$cache_obj = new Cache_Lite( array('cacheDir' => $serendipity['serendipityPath'].'templates_c/','automaticSerialization' => true));
$output = $this->generate_output(true);
$eventData['links'] = $output;
$cache_obj->save($output,'linklist_cache');
} else {
$output = $this->generate_output(true);
$eventData['links'] = $output;
$this->set_config('cached_output',$output);
}
}
}
} else {
if ($this->get_config('active') == 'true') {
$this->set_config('active', 'false');
$this->set_config('cache', 'no');
$this->set_config('display', 'category');
$eventData['links'] = $this->generate_output(true);
if (@include_once("Cache/Lite.php")) {
$cache_obj = new Cache_Lite(array('cacheDir' => $serendipity['serendipityPath'].'templates_c/','automaticSerialization' => true));
@$cache_obj->remove('linklist_cache');
} else {
$this->set_config('cached_output','');
}
$eventData['changed'] = 'true';
}
}
return true;
break;
default:
return false;
break;
}
} else {
return false;
}
}
function generate_content(&$title) {
function generate_content(&$title)
{
$title = $this->title;
}
function generate_output($ignorecache) {
function generate_output($ignorecache)
{
global $serendipity;
$cache = $this->get_config('cache');
if ($cache == 'yes' && $ignorecache == false) {
@ -388,9 +159,8 @@ class serendipity_event_linklist extends serendipity_event {
return $output;
}
function cleanup() {
function cleanup()
{
global $serendipity;
if ($this->get_config('cache') == 'yes') {
if (@include_once("Cache/Lite.php")) {
@ -405,7 +175,8 @@ class serendipity_event_linklist extends serendipity_event {
return true;
}
function install() {
function install()
{
global $serendipity;
// Create table
$q = "CREATE TABLE ".$serendipity['dbPrefix']."links (
@ -439,7 +210,7 @@ class serendipity_event_linklist extends serendipity_event {
)";
$sql = serendipity_db_schema_import($q);
$this->set_config('active','false');
$this->set_config('active', 'false');
$this->set_config('style', 'no');
$this->set_config('display', 'category');
$this->set_config('category', 'custom');
@ -447,7 +218,8 @@ class serendipity_event_linklist extends serendipity_event {
$this->set_config('category','custom');
}
function uninstall(&$propbag) {
function uninstall(&$propbag)
{
global $serendipity;
// Drop table
$q = "DROP TABLE ".$serendipity['dbPrefix']."links";
@ -456,7 +228,227 @@ class serendipity_event_linklist extends serendipity_event {
$sql = serendipity_db_schema_import($q);
}
function add_link($link,$name,$desc,$catid = 0) {
function decode($string)
{
if (LANG_CHARSET != 'UTF-8') {
return utf8_decode($string);
}
return $string;
}
function event_hook($event, &$bag, &$eventData, $addData = null)
{
global $serendipity;
$hooks = &$bag->get('event_hooks');
if (isset($hooks[$event])) {
switch($event) {
case 'backend_sidebar_entries_event_display_linklist':
if (!serendipity_db_bool($this->get_config('active'))) {
return false;
}
if (isset($_POST['REMOVE'])) {
if (isset($_POST['serendipity']['link_to_remove'])) {
foreach ($_POST['serendipity']['link_to_remove'] as $key) {
$this->del_link($key);
}
} else {
if (isset($_POST['serendipity']['category_to_remove'])) {
foreach ($_POST['serendipity']['category_to_remove'] as $key) {
$this->del_category($key);
}
}
}
}
if (isset($_POST['SAVE'])) {
foreach ($_POST['serendipity']['link_to_recat'] AS $key => $row) {
$this->update_cat($key,$row);
}
}
if (isset($_POST['ADD'])) {
if (isset($_POST['serendipity']['add_link']['title']) && isset($_POST['serendipity']['add_link']['link'])) {
$this->add_link($_POST['serendipity']['add_link']['link'],$_POST['serendipity']['add_link']['title'],$_POST['serendipity']['add_link']['desc'],$_POST['serendipity']['link_to_recat']['cat']);
} else {
if (isset($_POST['serendipity']['add_category']['title'])) {
$this->add_cat($_POST['serendipity']['add_category']['title'],$_POST['serendipity']['link_to_recat']['cat']);
}
}
}
if (isset($_POST['EDIT'])) {
if (isset($_POST['serendipity']['add_link']['title']) && isset($_POST['serendipity']['add_link']['link'])&& isset($_POST['serendipity']['add_link']['id'])) {
$this->update_link($_POST['serendipity']['add_link']['id'],$_POST['serendipity']['add_link']['link'],$_POST['serendipity']['add_link']['title'],$_POST['serendipity']['add_link']['desc'],$_POST['serendipity']['link_to_recat']['cat']);
}
}
switch ($_GET['submit']){
case 'move up':
$this->move_up($_GET['serendipity']['link_to_move']);
break;
case 'move down':
$this->move_down($_GET['serendipity']['link_to_move']);
break;
}
if ($this->get_config('cache') == 'yes') {
if (@include_once("Cache/Lite.php")) {
$cache_obj = new Cache_Lite( array('cacheDir' => $serendipity['serendipityPath'].'templates_c/','automaticSerialization' => true));
$output = $this->generate_output(true);
$cache_obj->save($output,'linklist_cache');
} else {
$output = $this->generate_output(true);
$this->set_config('cached_output',$output);
}
}
if (isset($_GET['serendipity']['edit_link'])) {
$this->output_add_edit_linkadmin(TRUE,$_GET['serendipity']['edit_link']);
} else {
if (isset($_GET['serendipity']['manage_category'])) {
$this->output_categoryadmin(TRUE,$_GET['serendipity']['edit_link']);
} else {
$this->output_add_edit_linkadmin(FALSE);
$this->output_linkadmin();
}
}
break;
case 'backend_sidebar_entries':
if (serendipity_db_bool($this->get_config('active')) && $serendipity['version'][0] < 2) {
echo "\n".' <li class="serendipitySideBarMenuLink serendipitySideBarMenuEntryLinks"><a href="?serendipity[adminModule]=event_display&amp;serendipity[adminAction]=linklist">' . PLUGIN_LINKLIST_ADMINLINK . '</a></li>'."\n";
}
break;
case 'backend_sidebar_admin_appearance':
if (serendipity_db_bool($this->get_config('active')) && $serendipity['version'][0] > 1) {
echo "\n".' <li><a href="?serendipity[adminModule]=event_display&amp;serendipity[adminAction]=linklist">' . PLUGIN_LINKLIST_ADMINLINK . '</a></li>'."\n";
}
break;
case 'css':
if ($this->get_config('style') == 'dtree') {
$searchstr = '.dtree';
$filename = 'serendipity_event_dtree.css';
} else {
$searchstr = '.linklist';
$filename = 'serendipity_event_linklist.css';
}
// CSS class does NOT exist by user customized template styles, include default
// OR added by another Plugin
if (strpos($eventData, $searchstr) === false) {
$tfile = serendipity_getTemplateFile($filename, 'serendipityPath');
if (!$tfile || $tfile == $filename) {
$tfile = dirname(__FILE__) . '/' . $filename;
}
$eventData .= file_get_contents($tfile);
}
break;
case 'external_plugin':
$uri_parts = explode('?', str_replace('&amp;', '&', $eventData));
$parts = explode('&', $uri_parts[0]);
$uri_part = $parts[0];
switch($uri_part) {
case 'lldtree.js': // name unique!
header('Content-Type: text/javascript');
echo file_get_contents(dirname(__FILE__).'/dtree.js');
break;
case 'linklist.js':
header('Content-Type: text/javascript');
echo file_get_contents(dirname(__FILE__).'/linklist.js');
break;
}
break;
case 'plugins_linklist_input':
$eventData['links'] = $this->generate_output(false);
break;
case 'plugins_linklist_conf':
$this->set_config('style', $eventData['style']);
$this->set_config('display', $eventData['display']);
$this->set_config('category', $eventData['category']);
$this->set_config('cache', $eventData['cache']);
$eventData['changed'] = 'false';
if ($eventData['enabled']=='true') {
if (!serendipity_db_bool($this->get_config('active'))) {
$eventData['changed'] = 'true';
$this->set_config('active', 'true');
$this->set_config('category', 'custom');
$q = 'SELECT count(id) FROM '.$serendipity['dbPrefix'].'links';
$sql = serendipity_db_query($q);
if ($sql[0][0] == 0) {
$xml = xml_parser_create('UTF-8');
xml_parse_into_struct($xml, '<list>'.serendipity_utf8_encode($eventData['links']).'</list>', $struct, $index);
xml_parser_free($xml);
$depth = -1;
for($level[]=0, $i=1, $j=1; isset($struct[$i]); $i++, $j++){
if (isset($struct[$i]['type'])){
if ($struct[$i]['type']=='open' && strtolower($struct[$i]['tag'])=='dir'){
$this->add_cat($this->decode($struct[$i]['attributes']['NAME']),$in_cat[0]);
$q = 'SELECT categoryid FROM '.$serendipity['dbPrefix'].'link_category where category_name = "'.serendipity_db_escape_string($this->decode($struct[$i]['attributes']['NAME'])).'"';
$sql = serendipity_db_query($q);
$in_cat[] = $sql[0][0];
$depth++;
} else if ($struct[$i]['type']=='close' && strtolower($struct[$i]['tag'])=='dir'){
$blah = array_pop($in_cat);
$depth--;
} else if ($struct[$i]['type']=='complete' && strtolower($struct[$i]['tag'])=='link'){
$this->add_link($this->decode($struct[$i]['attributes']['LINK']),$this->decode($struct[$i]['attributes']['NAME']),$this->decode($struct[$i]['attributes']['DESCRIP']),$in_cat[$depth]);
}
}
}
}
if ($eventData['cache'] == 'yes') {
if (@include_once("Cache/Lite.php")) {
$cache_obj = new Cache_Lite( array('cacheDir' => $serendipity['serendipityPath'].'templates_c/','automaticSerialization' => true));
$output = $this->generate_output(true);
$eventData['links'] = $output;
$cache_obj->save($output,'linklist_cache');
} else {
$output = $this->generate_output(true);
$eventData['links'] = $output;
$this->set_config('cached_output',$output);
}
}
}
} else {
if (serendipity_db_bool($this->get_config('active'))) {
$this->set_config('active', 'false');
$this->set_config('cache', 'no');
$this->set_config('display', 'category');
$eventData['links'] = $this->generate_output(true);
if (@include_once("Cache/Lite.php")) {
$cache_obj = new Cache_Lite(array('cacheDir' => $serendipity['serendipityPath'].'templates_c/','automaticSerialization' => true));
@$cache_obj->remove('linklist_cache');
} else {
$this->set_config('cached_output','');
}
$eventData['changed'] = 'true';
}
}
break;
default:
return false;
}
return true;
} else {
return false;
}
}
function add_link($link,$name,$desc,$catid = 0)
{
global $serendipity;
$link = $this->clean_link($link);
@ -474,7 +466,8 @@ class serendipity_event_linklist extends serendipity_event {
serendipity_db_insert('links', $values);
}
function update_link($id, $link, $title, $desc, $catid) {
function update_link($id, $link, $title, $desc, $catid)
{
global $serendipity;
$link = $this->clean_link($link);
@ -487,7 +480,8 @@ class serendipity_event_linklist extends serendipity_event {
serendipity_db_update('links', $key, $values);
}
function del_link($id) {
function del_link($id)
{
global $serendipity;
$q = 'SELECT order_num FROM '.$serendipity['dbPrefix'].'links where id='.(int)$id;
@ -504,7 +498,8 @@ class serendipity_event_linklist extends serendipity_event {
}
}
function add_cat($name,$parent) {
function add_cat($name,$parent)
{
global $serendipity;
$values['category_name'] = $name;
@ -512,7 +507,8 @@ class serendipity_event_linklist extends serendipity_event {
serendipity_db_insert('link_category', $values);
}
function del_category($id) {
function del_category($id)
{
global $serendipity;
$q = 'DELETE FROM '.$serendipity['dbPrefix'].'link_category where categoryid='.(int)$id;
$sql = serendipity_db_query($q);
@ -522,14 +518,16 @@ class serendipity_event_linklist extends serendipity_event {
serendipity_db_update('links', $key, $values);
}
function update_cat($id,$cat) {
function update_cat($id,$cat)
{
global $serendipity;
$q = 'UPDATE '.$serendipity['dbPrefix'].'links SET category = '.serendipity_db_escape_string($cat).' where id = '.(int)$id;
$sql = serendipity_db_query($q);
}
function move_up($id) {
function move_up($id)
{
global $serendipity;
$q = 'SELECT order_num FROM '.$serendipity['dbPrefix'].'links where id='.(int)$id;
$sql = serendipity_db_query($q);
@ -548,7 +546,8 @@ class serendipity_event_linklist extends serendipity_event {
}
}
function move_down($id) {
function move_down($id)
{
global $serendipity;
$q = 'SELECT count(id) AS countit FROM '.$serendipity['dbPrefix'].'links';
@ -578,8 +577,8 @@ class serendipity_event_linklist extends serendipity_event {
}
}
function output_linkadmin() {
function output_linkadmin()
{
global $serendipity;
$display = $this->get_config('display');
$q = $this->set_query($display);
@ -660,7 +659,8 @@ class serendipity_event_linklist extends serendipity_event {
return $x . "</select>\n";
}
function output_add_edit_linkadmin($edit = FALSE,$id = -1) {
function output_add_edit_linkadmin($edit = FALSE,$id = -1)
{
global $serendipity;
$display = $this->get_config('display');
$categories = $this->build_categories();
@ -703,7 +703,8 @@ class serendipity_event_linklist extends serendipity_event {
</form>';
}
function output_categoryadmin() {
function output_categoryadmin()
{
global $serendipity;
$display = $this->get_config('display');
$categories = $this->build_categories();
@ -771,7 +772,8 @@ class serendipity_event_linklist extends serendipity_event {
}
function set_query($display) {
function set_query($display)
{
global $serendipity;
$q = 'SELECT s.link AS link,
s.title AS name,
@ -801,7 +803,8 @@ class serendipity_event_linklist extends serendipity_event {
return $q;
}
function build_categories() {
function build_categories()
{
global $serendipity;
if ($this->get_config('category') == 'custom') {
$table = $serendipity['dbPrefix'].'link_category';
@ -822,7 +825,8 @@ class serendipity_event_linklist extends serendipity_event {
return $categories;
}
function clean_link($link) {
function clean_link($link)
{
$parts_arr = parse_url($link);
if (strcmp($parts_arr['pass'], '') != 0) {
$ret_url .= $parts_arr['user'];
@ -846,5 +850,8 @@ class serendipity_event_linklist extends serendipity_event {
}
return $ret_url;
}
}
/* vim: set sts=4 ts=4 expandtab : */
?>

View file

@ -4,13 +4,7 @@ if (IN_serendipity !== true) {
die ("Don't hack!");
}
// Probe for a language include with constants. Still include defines later on, if some constants were missing
$probelang = dirname(__FILE__) . '/' . $serendipity['charset'] . 'lang_' . $serendipity['lang'] . '.inc.php';
if (file_exists($probelang)) {
include $probelang;
}
include_once dirname(__FILE__) . '/lang_en.inc.php';
@serendipity_plugin_api::load_language(dirname(__FILE__));
class serendipity_plugin_linklist extends serendipity_plugin
{
@ -24,7 +18,7 @@ class serendipity_plugin_linklist extends serendipity_plugin
$propbag->add('description', PLUGIN_LINKS_BLAHBLAH);
$propbag->add('stackable', true);
$propbag->add('author', 'Matthew Groeninger, Omid Mottaghi Rad');
$propbag->add('version', '1.22');
$propbag->add('version', '1.23');
$propbag->add('stackable', false);
$propbag->add('configuration', array(
'title',
@ -55,7 +49,7 @@ class serendipity_plugin_linklist extends serendipity_plugin
'imgdir'));
$this->protected = TRUE; // If set to TRUE, only allows the owner of the plugin to modify its configuration
$propbag->add('requirements', array(
'serendipity' => '0.8',
'serendipity' => '1.6',
'smarty' => '2.6.7',
'php' => '4.1.0'
));
@ -63,9 +57,12 @@ class serendipity_plugin_linklist extends serendipity_plugin
$propbag->add('groups', array('FRONTEND_FEATURES'));
}
function introspect_config_item($name, &$propbag) {
function introspect_config_item($name, &$propbag)
{
global $serendipity;
switch($name) {
case 'title':
$propbag->add('type', 'string');
$propbag->add('name', PLUGIN_LINKS_TITLE);
@ -103,7 +100,7 @@ class serendipity_plugin_linklist extends serendipity_plugin
break;
case 'links':
if($this->get_config('directxml') == 'true') {
if (serendipity_db_bool($this->get_config('directxml', 'true'))) {
$propbag->add('type', 'text');
$propbag->add('name', PLUGIN_LINKS_LINKS);
$propbag->add('description', PLUGIN_LINKS_LINKS_BLAHBLAH);
@ -113,7 +110,7 @@ class serendipity_plugin_linklist extends serendipity_plugin
break;
case 'display':
if($this->get_config('directxml') != 'true') {
if (!serendipity_db_bool($this->get_config('directxml', 'true'))) {
$select = array();
$select["alpha"] = PLUGIN_LINKLIST_ORDER_ALPHA;
$select["category"] = PLUGIN_LINKLIST_ORDER_CATEGORY;
@ -129,7 +126,7 @@ class serendipity_plugin_linklist extends serendipity_plugin
break;
case 'category':
if($this->get_config('directxml') != 'true') {
if (!serendipity_db_bool($this->get_config('directxml', 'true'))) {
$propbag->add('type', 'radio');
$propbag->add('name', PLUGIN_LINKLIST_CATEGORY_NAME);
$propbag->add('description', PLUGIN_LINKLIST_CATEGORY_NAME_DESC);
@ -155,7 +152,7 @@ class serendipity_plugin_linklist extends serendipity_plugin
break;
case 'openAllText':
if($this->get_config('style') == "dtree") {
if ($this->get_config('style') == "dtree") {
$propbag->add('type', 'string');
$propbag->add('name', PLUGIN_LINKS_OPENALL);
$propbag->add('description', PLUGIN_LINKS_OPENALL_BLAHBLAH);
@ -164,7 +161,7 @@ class serendipity_plugin_linklist extends serendipity_plugin
break;
case 'closeAllText':
if($this->get_config('style') == "dtree") {
if ($this->get_config('style') == "dtree") {
$propbag->add('type', 'string');
$propbag->add('name', PLUGIN_LINKS_CLOSEALL);
$propbag->add('description', PLUGIN_LINKS_CLOSEALL_BLAHBLAH);
@ -173,7 +170,7 @@ class serendipity_plugin_linklist extends serendipity_plugin
break;
case 'showOpenAndCloseLinks':
if($this->get_config('style') == "dtree") {
if ($this->get_config('style') == "dtree") {
$propbag->add('type', 'boolean');
$propbag->add('name', PLUGIN_LINKS_SHOW);
$propbag->add('description', PLUGIN_LINKS_SHOW_BLAHBLAH);
@ -182,7 +179,7 @@ class serendipity_plugin_linklist extends serendipity_plugin
break;
case 'locationOfOpenAndClose':
if($this->get_config('style') == "dtree") {
if ($this->get_config('style') == "dtree") {
$propbag->add('type', 'radio');
$propbag->add('name', PLUGIN_LINKS_LOCATION);
$propbag->add('description', PLUGIN_LINKS_LOCATION_BLAHBLAH);
@ -195,7 +192,7 @@ class serendipity_plugin_linklist extends serendipity_plugin
break;
case 'useSelection':
if($this->get_config('style') == "dtree") {
if ($this->get_config('style') == "dtree") {
$propbag->add('type', 'boolean');
$propbag->add('name', PLUGIN_LINKS_SELECTION);
$propbag->add('description', PLUGIN_LINKS_SELECTION_BLAHBLAH);
@ -204,7 +201,7 @@ class serendipity_plugin_linklist extends serendipity_plugin
break;
case 'useCookies':
if($this->get_config('style') == "dtree") {
if ($this->get_config('style') == "dtree") {
$propbag->add('type', 'boolean');
$propbag->add('name', PLUGIN_LINKS_COOKIE);
$propbag->add('description', PLUGIN_LINKS_COOKIE_BLAHBLAH);
@ -213,7 +210,7 @@ class serendipity_plugin_linklist extends serendipity_plugin
break;
case 'useLines':
if($this->get_config('style') != "simp_css") {
if ($this->get_config('style') != "simp_css") {
$propbag->add('type', 'boolean');
$propbag->add('name', PLUGIN_LINKS_LINE);
$propbag->add('description', PLUGIN_LINKS_LINE_BLAHBLAH);
@ -222,7 +219,7 @@ class serendipity_plugin_linklist extends serendipity_plugin
break;
case 'useIcons':
if($this->get_config('style') != "simp_css") {
if ($this->get_config('style') != "simp_css") {
$propbag->add('type', 'boolean');
$propbag->add('name', PLUGIN_LINKS_ICON);
$propbag->add('description', PLUGIN_LINKS_ICON_BLAHBLAH);
@ -231,7 +228,7 @@ class serendipity_plugin_linklist extends serendipity_plugin
break;
case 'useSVG':
if($this->get_config('style') == "css") {
if ($this->get_config('style') == "css") {
$propbag->add('type', 'boolean');
$propbag->add('name', PLUGIN_LINKS_SVGICON);
$propbag->add('description', '');
@ -240,7 +237,7 @@ class serendipity_plugin_linklist extends serendipity_plugin
break;
case 'useStatusText':
if($this->get_config('style') == "dtree") {
if ($this->get_config('style') == "dtree") {
$propbag->add('type', 'boolean');
$propbag->add('name', PLUGIN_LINKS_STATUS);
$propbag->add('description', PLUGIN_LINKS_STATUS_BLAHBLAH);
@ -249,7 +246,7 @@ class serendipity_plugin_linklist extends serendipity_plugin
break;
case 'closeSameLevel':
if($this->get_config('style') == "dtree") {
if ($this->get_config('style') == "dtree") {
$propbag->add('type', 'boolean');
$propbag->add('name', PLUGIN_LINKS_CLOSELEVEL);
$propbag->add('description', PLUGIN_LINKS_CLOSELEVEL_BLAHBLAH);
@ -285,7 +282,7 @@ class serendipity_plugin_linklist extends serendipity_plugin
break;
case 'imgdir':
if($this->get_config('style') != "simp_css") {
if ($this->get_config('style') != "simp_css") {
$propbag->add('type', 'string');
$propbag->add('name', PLUGIN_LINKS_IMGDIR);
$propbag->add('description', PLUGIN_LINKS_IMGDIR_BLAHBLAH);
@ -294,7 +291,7 @@ class serendipity_plugin_linklist extends serendipity_plugin
break;
case 'category_default_open':
if($this->get_config('style') != "simp_css") {
if ($this->get_config('style') != "simp_css") {
$propbag->add('type', 'radio');
$propbag->add('name', PLUGIN_LINKLIST_CATEGORY_DEFAULT_OPEN_NAME);
$propbag->add('description', PLUGIN_LINKLIST_CATEGORY_DEFAULT_OPEN_DESC);
@ -308,7 +305,7 @@ class serendipity_plugin_linklist extends serendipity_plugin
break;
case 'call_markup':
if($this->get_config('style') != "dtree") {
if ($this->get_config('style') != "dtree") {
$propbag->add('type', 'boolean');
$propbag->add('name', PLUGIN_LINKS_CALLMARKUP);
$propbag->add('description', PLUGIN_LINKS_CALLMARKUP_BLAHBLAH);
@ -322,7 +319,8 @@ class serendipity_plugin_linklist extends serendipity_plugin
return true;
}
function decode($string) {
function decode($string)
{
if (LANG_CHARSET != 'UTF-8') {
return utf8_decode($string);
}
@ -335,7 +333,7 @@ class serendipity_plugin_linklist extends serendipity_plugin
global $serendipity;
$title = $this->get_config('title');
if(!$this->get_config('directxml')) {
if (!serendipity_db_bool($this->get_config('directxml', 'true'))) {
serendipity_plugin_api::hook_event('plugins_linklist_input', $linkcode);
$this->set_config('links',$linkcode['links']);
}
@ -366,13 +364,15 @@ class serendipity_plugin_linklist extends serendipity_plugin
}
function gen_output($links, $style) {
function gen_output($links, $style)
{
global $serendipity;
$imgdir = $this->get_config('imgdir');
$use_descrip = $this->get_config('use_description',false);
$use_descrip = serendipity_db_bool($this->get_config('use_description', 'false'));
/* XML definitaion */
/* XML definition */
$xml = xml_parser_create('UTF-8');
$linkxml = serendipity_utf8_encode($links);
xml_parse_into_struct($xml, '<list>' . $linkxml . '</list>', $struct, $index);
@ -385,9 +385,10 @@ class serendipity_plugin_linklist extends serendipity_plugin
$str = $this->get_config('prepend_text');
$str .= "\n\n";
if ($style == "dtree") {
$str .= "\n".'<script src="' . $serendipity['baseURL'] . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] . '?/' : '') . 'plugin/lldtree.js" type="text/javascript"></script>'."\n";
#$str .= "\n".'<script src="' . $serendipity['baseURL'] . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] . '?/' : '') . 'plugin/lldtree.js" type="text/javascript"></script>'."\n";
$str .= "\n".'<script type="text/javascript" src="'.$serendipity['serendipityHTTPPath'] . 'plugins/serendipity_event_linklist/lldtree.js"></script>'."\n";
if ($this->get_config('showOpenAndCloseLinks')=='true' && $this->get_config('locationOfOpenAndClose')=='top'){
if (serendipity_db_bool($this->get_config('showOpenAndCloseLinks', 'true')) && $this->get_config('locationOfOpenAndClose') == 'top'){
$str .= '<p><a href="javascript: d.openAll();">'.$this->get_config('openAllText').'</a> | <a href="javascript: d.closeAll();">'.$this->get_config('closeAllText').'</a></p>';
}
@ -396,12 +397,12 @@ class serendipity_plugin_linklist extends serendipity_plugin
d = new dTree("d","'.$imgdir.'");'."\n";
/* configuration section*/
if ($this->get_config('useSelection') != true) $str.='d.config.useSelection=false;'."\n";
if ($this->get_config('useCookies') != true) $str.='d.config.useCookies=false;'."\n";
if ($this->get_config('useLines') != true) $str.='d.config.useLines=false;'."\n";
if ($this->get_config('useIcons') != true) $str.='d.config.useIcons=false;'."\n";
if ($this->get_config('useStatusText') == true) $str.='d.config.useStatusText=true;'."\n";
if ($this->get_config('closeSameLevel') == true) $str.='d.config.closeSameLevel=true;'."\n";
if (!serendipity_db_bool($this->get_config('useSelection', 'false'))) $str.='d.config.useSelection=false;'."\n";
if (!serendipity_db_bool($this->get_config('useCookies', 'false'))) $str.='d.config.useCookies=false;'."\n";
if (!serendipity_db_bool($this->get_config('useLines', 'true'))) $str.='d.config.useLines=false;'."\n";
if (!serendipity_db_bool($this->get_config('useIcons', 'true'))) $str.='d.config.useIcons=false;'."\n";
if (serendipity_db_bool($this->get_config('useStatusText', 'true'))) $str.='d.config.useStatusText=true;'."\n";
if (serendipity_db_bool($this->get_config('closeSameLevel', 'false'))) $str.='d.config.closeSameLevel=true;'."\n";
$my_target = $this->get_config('target');
if (!empty($my_target)) {
$str .= 'd.config.target="'.$my_target.'";'."\n";
@ -411,15 +412,15 @@ class serendipity_plugin_linklist extends serendipity_plugin
$str .= 'd.add(0,-1,"'.$this->get_config('top_level').'");'."\n";
for($level[]=0, $i=1, $j=1; isset($struct[$i]); $i++, $j++){
if(isset($struct[$i]['type'])){
if($struct[$i]['type'] == 'open' && strtolower($struct[$i]['tag']) == 'dir'){
if (isset($struct[$i]['type'])){
if ($struct[$i]['type'] == 'open' && strtolower($struct[$i]['tag']) == 'dir'){
$str .= 'd.add('.$j.','.$level[count($level)-1].',"'.$this->decode($struct[$i]['attributes']['NAME']).'");'."\n";
$level[] = $j;
}
else if($struct[$i]['type'] == 'close' && strtolower($struct[$i]['tag']) == 'dir'){
else if ($struct[$i]['type'] == 'close' && strtolower($struct[$i]['tag']) == 'dir'){
$dump=array_pop($level);
}
else if($struct[$i]['type']=='complete' && strtolower($struct[$i]['tag'])=='link'){
else if ($struct[$i]['type']=='complete' && strtolower($struct[$i]['tag'])=='link'){
if ((isset($struct[$i]['attributes']['NAME'])) && ($struct[$i]['attributes']['NAME'] != "") && ($use_descrip)) {
$title_text = $this->decode($struct[$i]['attributes']['DESCRIP']);
} else {
@ -434,12 +435,12 @@ class serendipity_plugin_linklist extends serendipity_plugin
//-->
</script>';
if($this->get_config('showOpenAndCloseLinks')=='true' && $this->get_config('locationOfOpenAndClose')=='bottom'){
if (serendipity_db_bool($this->get_config('showOpenAndCloseLinks', 'true')) && $this->get_config('locationOfOpenAndClose') == 'bottom'){
$str.='<p><a href="javascript: d.openAll();">'.$this->get_config('openAllText').'</a> | <a href="javascript: d.closeAll();">'.$this->get_config('closeAllText').'</a></p>';
}
} else {
if($this->get_config('call_markup') != 'true') {
if (!serendipity_db_bool($this->get_config('call_markup', 'false'))) {
$delimiter = "\n";
} else {
$delimiter = "";
@ -456,16 +457,16 @@ class serendipity_plugin_linklist extends serendipity_plugin
$dir_array[''] = array('dirname' => '','level' => 1,linkcount => 0,'links' => $link_array,'dircount' => 0,'directories' => $link_array);
for($level[] = 0, $i=1, $j=1; isset($struct[$i]); $i++, $j++){
if (isset($struct[$i]['type'])){
if($struct[$i]['type'] == 'open' && strtolower($struct[$i]['tag']) == 'dir'){
if ($struct[$i]['type'] == 'open' && strtolower($struct[$i]['tag']) == 'dir'){
$dir_array[$dirname[0]]['directories'][] = $this->decode($struct[$i]['attributes']['NAME']);
$dir_array[$dirname[0]]['dircount']++;
array_unshift($dirname, $this->decode($struct[$i]['attributes']['NAME']));
array_unshift($level,$j);
$dir_array[$dirname[0]] = array('dirname' => $dirname[0],'level' => count($level),'linkcount' => 0,'links' => $link_array,'dircount' => 0,'directories' => $link_array);
} else if($struct[$i]['type'] == 'close' && strtolower($struct[$i]['tag']) == 'dir'){
} else if ($struct[$i]['type'] == 'close' && strtolower($struct[$i]['tag']) == 'dir'){
$dump=array_shift($dirname);
$dump=array_shift($level);
} else if($struct[$i]['type'] == 'complete' && strtolower($struct[$i]['tag']) == 'link'){
} else if ($struct[$i]['type'] == 'complete' && strtolower($struct[$i]['tag']) == 'link'){
$dir_array[$dirname[0]]['linkcount']++;
if (count($level) == 0) {
$level_pass = 1;
@ -479,19 +480,19 @@ class serendipity_plugin_linklist extends serendipity_plugin
}
/* ???
//Process array into output
if ($this->get_config('useIcons')) {
if (serendipity_db_bool($this->get_config('useIcons', 'true'))) {
} else {
}
*/
$imagear['imgdir'] = $imgdir;
$imagear['uselines'] = $this->get_config('useLines');
$imagear['useicons'] = $this->get_config('useIcons');
$imagear['uselines'] = serendipity_db_bool($this->get_config('useLines', 'true'));
$imagear['useicons'] = serendipity_db_bool($this->get_config('useIcons', 'true'));
if ($imagear['useicons']) {
$imagear['folder'] = '/img/folder.gif';
$imagear['folderopen'] = '/img/folderopen.gif';
$imagear['page'] = '/img/page.gif';
}
if ($this->get_config('useLines')) {
if (serendipity_db_bool($this->get_config('useLines', 'true'))) {
$imagear['line'] = '/img/line.gif';
$imagear['join'] = '/img/join.gif';
$imagear['joinBottom'] = '/img/joinbottom.gif';
@ -512,7 +513,8 @@ class serendipity_plugin_linklist extends serendipity_plugin
}
if (!$lessformatting) {
$str .= '<script src="'.$serendipity['baseURL'] . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] . '?/' : '').'plugin/linklist.js" type="text/javascript"></script>'."\n";
#$str .= '<script src="'.$serendipity['baseURL'] . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] . '?/' : '').'plugin/linklist.js" type="text/javascript"></script>'."\n";
$str .= '<script type="text/javascript" src="'.$serendipity['serendipityHTTPPath'] . 'plugins/serendipity_event_linklist/linklist.js"></script>'."\n";
}
$class = !$lessformatting ? 'csslist' : 'simple';
$str .= '<div class="linklist"><ul class="'. $class .'">'.$delimiter;
@ -523,7 +525,7 @@ class serendipity_plugin_linklist extends serendipity_plugin
$str .= $this->get_config('append_text');
if ($this->get_config('call_markup') == 'true') {
if (serendipity_db_bool($this->get_config('call_markup', 'false'))) {
$entry = array('html_nugget' => $str);
serendipity_plugin_api::hook_event('frontend_display', $entry);
return $entry['html_nugget'];
@ -533,7 +535,8 @@ class serendipity_plugin_linklist extends serendipity_plugin
}
function cleanup() {
function cleanup()
{
$cache = $this->get_config('cache');
if ($this->get_config('cache') == 'no') {
@ -548,7 +551,7 @@ class serendipity_plugin_linklist extends serendipity_plugin
'style' => $this->get_config('style'),
'cache' => $cache);
if($this->get_config('directxml') != 'true') {
if (!serendipity_db_bool($this->get_config('directxml', 'true'))) {
$blah = $this->get_config('display');
if (!isset($blah)) {
$this->set_config('display','category');
@ -565,7 +568,8 @@ class serendipity_plugin_linklist extends serendipity_plugin
}
function build_tree ($fullarray, $rootdir, $imagearray, $more_track, $strtemp = "", $lessformatting = NULL, $delimiter = "\n", $use_descrip = false) {
function build_tree ($fullarray, $rootdir, $imagearray, $more_track, $strtemp = "", $lessformatting = NULL, $delimiter = "\n", $use_descrip = false)
{
$imgdir = $imagearray['imgdir'];
$uselines = $imagearray['uselines'];
$useicons = $imagearray['useicons'];
@ -632,7 +636,7 @@ class serendipity_plugin_linklist extends serendipity_plugin
}
}
if ($useicons) {
if (serendipity_db_bool($this->get_config('useSVG', true))) {
if (serendipity_db_bool($this->get_config('useSVG', 'true'))) {
$page_icon = '<img class="svg"/>';
} else {
$page_icon = '<img src="'.$imgdir.$imagearray['page'].'" alt="" />';
@ -662,6 +666,8 @@ class serendipity_plugin_linklist extends serendipity_plugin
}
return $strtemp;
}
}
/* vim: set sts=4 ts=4 expandtab : */
?>