first commit
This commit is contained in:
10
plugins/rss2/config/config.php
Normal file
10
plugins/rss2/config/config.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
$rss_fields=array(8,12);
|
||||
// Time to live, to do with caching
|
||||
$rss_ttl=60;
|
||||
$rss_show_field_titles=false;
|
||||
|
||||
// Add any new vars that specify metadata fields to this array to stop them being deleted if plugin is in use
|
||||
// These are added in hooks/all.php
|
||||
$rss_fieldvars = array("rss_fields");
|
30
plugins/rss2/hooks/all.php
Executable file
30
plugins/rss2/hooks/all.php
Executable file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
function HookRss2AllInitialise()
|
||||
{
|
||||
global $rss_fieldvars;
|
||||
config_register_core_fieldvars("RSS2 plugin",$rss_fieldvars);
|
||||
}
|
||||
|
||||
function HookRss2AllPreheaderoutput()
|
||||
{
|
||||
if(!function_exists("get_api_key"))
|
||||
{
|
||||
include_once __DIR__ . "/../../../include/api_functions.php";
|
||||
}
|
||||
}
|
||||
|
||||
function HookRss2AllSearchbarbeforebottomlinks()
|
||||
{
|
||||
include_once __DIR__ . "/../../../include/api_functions.php";
|
||||
global $baseurl,$lang,$userpassword,$username,$userref,$api_scramble_key;
|
||||
|
||||
$query="user=" . base64_encode($username) . "&search=!last50";
|
||||
$private_key = get_api_key($userref);
|
||||
// Sign the query using the private key
|
||||
$sign=hash("sha256",$private_key . $query);
|
||||
?>
|
||||
<p><a href="<?php echo $baseurl?>/plugins/rss2/pages/rssfilter.php?<?php echo $query; ?>&sign=<?php echo urlencode($sign); ?>"><i aria-hidden="true" class="fa fa-fw fa-rss"></i> <?php echo escape($lang["new_content_rss_feed"]); ?></a></p>
|
||||
<?php
|
||||
}
|
||||
|
37
plugins/rss2/hooks/search.php
Executable file
37
plugins/rss2/hooks/search.php
Executable file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
function HookRss2SearchRender_search_actions_add_option($options)
|
||||
{
|
||||
global $baseurl_short, $search, $restypes, $archive, $lang, $username, $userref, $api_scramble_key, $k;
|
||||
|
||||
$c = count($options);
|
||||
|
||||
if ($k=='')
|
||||
{
|
||||
$querystring = "user=" . base64_encode($username) . "&search=" . $search . "&restypes=" .$restypes;
|
||||
$querystring .= "&archive=" . $archive;
|
||||
$private_key = get_api_key($userref);
|
||||
|
||||
// Sign the query using the private key, this needs to be done un-encoded so that it is checked correctly
|
||||
$sign = hash("sha256",$private_key . $querystring);
|
||||
|
||||
$query_params = [
|
||||
"user" => base64_encode($username),
|
||||
"search" => $search,
|
||||
"restypes" => $restypes,
|
||||
"archive" => $archive,
|
||||
"sign" => $sign
|
||||
];
|
||||
|
||||
$url = generateURL($baseurl_short . "plugins/rss2/pages/rssfilter.php", $query_params);
|
||||
|
||||
$data_attribute['url'] = $url;
|
||||
$data_attribute['no-ajax'] = true;
|
||||
$options[$c]['value'] = 'rss';
|
||||
$options[$c]['label'] = $lang["rss_feed_for_search_filter"];
|
||||
$options[$c]['data_attr'] = $data_attribute;
|
||||
$options[$c]['category'] = ACTIONGROUP_ADVANCED;
|
||||
$options[$c]['order_by'] = 500;
|
||||
|
||||
return $options;
|
||||
}
|
||||
}
|
13
plugins/rss2/languages/ar.php
Normal file
13
plugins/rss2/languages/ar.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["rss_setup_heading"]='تكوين RSS2';
|
||||
$lang["rss_fields"]='حقول RSS:';
|
||||
$lang["rss_ttl"]='مدة صلاحية RSS (RSS TTL)';
|
||||
$lang["rss_show_field_titles"]='عرض عناوين الحقول';
|
||||
$lang["new_content_rss_feed"]='تغذية RSS للمحتوى الجديد';
|
||||
$lang["subject"]='الموضوع';
|
||||
$lang["rss_feed_for_search_filter"]='إنشاء تغذية RSS لهذا الاستعلام';
|
||||
$lang["filtered_resource_update_for"]='تحديث المصادر المصفاة للبحث [%search%]';
|
||||
$lang["plugin-rss2-title"]='تغذية RSS';
|
||||
$lang["plugin-rss2-desc"]='يمكن من إنشاء خلاصات RSS للمحتوى الجديد للمستخدمين المصدقين، بما في ذلك الحقول القابلة للتكوين.';
|
11
plugins/rss2/languages/bn.php
Normal file
11
plugins/rss2/languages/bn.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["rss_setup_heading"]='RSS2 কনফিগারেশন';
|
||||
$lang["rss_fields"]='আরএসএস ক্ষেত্রসমূহ:';
|
||||
$lang["rss_ttl"]='RSS TTL:';
|
||||
$lang["rss_show_field_titles"]='ক্ষেত্র শিরোনাম প্রদর্শন করুন';
|
||||
$lang["new_content_rss_feed"]='নতুন কন্টেন্ট আরএসএস ফিড';
|
||||
$lang["subject"]='বিষয়';
|
||||
$lang["rss_feed_for_search_filter"]='এই অনুসন্ধানের জন্য আরএসএস ফিড তৈরি করুন';
|
||||
$lang["filtered_resource_update_for"]='অনুসন্ধান [%search%] এর জন্য ফিল্টার করা রিসোর্স আপডেট';
|
13
plugins/rss2/languages/ca.php
Normal file
13
plugins/rss2/languages/ca.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["rss_setup_heading"]='Configuració de RSS2';
|
||||
$lang["rss_fields"]='Camps RSS:';
|
||||
$lang["rss_ttl"]='RSS TTL: (Temps de vida)';
|
||||
$lang["rss_show_field_titles"]='Mostra els títols dels camps';
|
||||
$lang["new_content_rss_feed"]='Nou contingut del canal RSS';
|
||||
$lang["subject"]='Tema';
|
||||
$lang["rss_feed_for_search_filter"]='Crear un canal RSS per a aquesta consulta';
|
||||
$lang["filtered_resource_update_for"]='Actualització del recurs filtrat per la cerca [%search%]';
|
||||
$lang["plugin-rss2-title"]='Canal RSS';
|
||||
$lang["plugin-rss2-desc"]='Permet la generació autenticada de feeds RSS de contingut nou, incloent-hi camps configurables.';
|
13
plugins/rss2/languages/cs.php
Normal file
13
plugins/rss2/languages/cs.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["rss_setup_heading"]='Konfigurace RSS2';
|
||||
$lang["rss_fields"]='RSS pole:';
|
||||
$lang["rss_ttl"]='RSS TTL:';
|
||||
$lang["rss_show_field_titles"]='Zobrazit pole Tituly';
|
||||
$lang["new_content_rss_feed"]='Nový obsah RSS kanál';
|
||||
$lang["subject"]='Předmět';
|
||||
$lang["rss_feed_for_search_filter"]='Vytvořit RSS kanál pro tento dotaz';
|
||||
$lang["filtered_resource_update_for"]='Filtrovaná aktualizace zdroje pro vyhledávání [%search%]';
|
||||
$lang["plugin-rss2-title"]='RSS kanál';
|
||||
$lang["plugin-rss2-desc"]='Umožňuje ověřené generování RSS kanálů nového obsahu, včetně konfigurovatelných polí.';
|
11
plugins/rss2/languages/cy.php
Normal file
11
plugins/rss2/languages/cy.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["rss_setup_heading"]='RSS2 Cyfluniad';
|
||||
$lang["rss_fields"]='Meintiau RSS:';
|
||||
$lang["rss_ttl"]='RSS TTL:';
|
||||
$lang["rss_show_field_titles"]='Dangos Teitlau maes';
|
||||
$lang["new_content_rss_feed"]='Newyddion cynnwys ffynhonnell RSS';
|
||||
$lang["subject"]='Pwnc';
|
||||
$lang["rss_feed_for_search_filter"]='Creu ffynhonnell RSS ar gyfer y chwiliad hwn';
|
||||
$lang["filtered_resource_update_for"]='Diweddariad adnodd wedi\'i hidlo ar gyfer chwilio [%search%]';
|
13
plugins/rss2/languages/da.php
Normal file
13
plugins/rss2/languages/da.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["rss_setup_heading"]='RSS2 Konfiguration';
|
||||
$lang["rss_fields"]='RSS-felter:';
|
||||
$lang["rss_ttl"]='RSS TTL betyder "RSS Time To Live"';
|
||||
$lang["rss_show_field_titles"]='Vis felttitler';
|
||||
$lang["new_content_rss_feed"]='Ny indhold RSS-feed';
|
||||
$lang["subject"]='Emne';
|
||||
$lang["rss_feed_for_search_filter"]='Opret RSS-feed til denne forespørgsel';
|
||||
$lang["filtered_resource_update_for"]='Filtreret ressourceopdatering til søgning [%search%]';
|
||||
$lang["plugin-rss2-title"]='RSS-feed';
|
||||
$lang["plugin-rss2-desc"]='Muliggør den godkendte generering af RSS-feeds af nyt indhold, inklusive konfigurerbare felter.';
|
15
plugins/rss2/languages/de.php
Normal file
15
plugins/rss2/languages/de.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["rss_setup_heading"]='RSS2-Konfiguration';
|
||||
$lang["rss_fields"]='RSS-Felder:';
|
||||
$lang["rss_ttl"]='RSS TTL:
|
||||
|
||||
RSS TTL: (RSS Time To Live) - RSS Zeit bis zum Ablauf.';
|
||||
$lang["rss_show_field_titles"]='Anzeigen von Feldtiteln';
|
||||
$lang["new_content_rss_feed"]='Neuer Inhalt RSS-Feed';
|
||||
$lang["subject"]='Betreff';
|
||||
$lang["rss_feed_for_search_filter"]='Erstelle einen RSS-Feed für diese Abfrage';
|
||||
$lang["filtered_resource_update_for"]='Aktualisierung der gefilterten Ressourcen für die Suche [%search%]';
|
||||
$lang["plugin-rss2-title"]='RSS-Feed';
|
||||
$lang["plugin-rss2-desc"]='Ermöglicht die authentifizierte Erstellung von RSS-Feeds für neue Inhalte, einschließlich konfigurierbarer Felder.';
|
13
plugins/rss2/languages/el.php
Normal file
13
plugins/rss2/languages/el.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["rss_setup_heading"]='Ρύθμιση του RSS2';
|
||||
$lang["rss_fields"]='Πεδία RSS:';
|
||||
$lang["rss_ttl"]='Χρόνος ζωής RSS (RSS TTL)';
|
||||
$lang["rss_show_field_titles"]='Εμφάνιση τίτλων πεδίων';
|
||||
$lang["new_content_rss_feed"]='Ροή RSS νέου περιεχομένου';
|
||||
$lang["subject"]='Θέμα';
|
||||
$lang["rss_feed_for_search_filter"]='Δημιουργία RSS τροφοδοσίας για αυτό το ερώτημα';
|
||||
$lang["filtered_resource_update_for"]='Ενημέρωση φιλτραρισμένου αντικειμένου για αναζήτηση [%search%]';
|
||||
$lang["plugin-rss2-title"]='Ροή RSS';
|
||||
$lang["plugin-rss2-desc"]='Επιτρέπει την αυθεντικοποιημένη δημιουργία RSS feeds νέου περιεχομένου, συμπεριλαμβανομένων διαμορφώσιμων πεδίων.';
|
14
plugins/rss2/languages/en.php
Normal file
14
plugins/rss2/languages/en.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
# English
|
||||
# Language File for the RSS2 Plugin
|
||||
# -------
|
||||
#
|
||||
#
|
||||
$lang["rss_setup_heading"]="RSS2 Configuration";
|
||||
$lang["rss_fields"]="RSS fields:";
|
||||
$lang["rss_ttl"]="RSS TTL:";
|
||||
$lang["rss_show_field_titles"]="Show field Titles";
|
||||
$lang["new_content_rss_feed"]="New content RSS feed";
|
||||
$lang["subject"]="Subject";
|
||||
$lang["rss_feed_for_search_filter"]="Create RSS feed for this query";
|
||||
$lang["filtered_resource_update_for"]="Filtered resource update for search [%search%]"; #%search% will be replaced, e.g. "!last50"
|
15
plugins/rss2/languages/es-AR.php
Normal file
15
plugins/rss2/languages/es-AR.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["rss_setup_heading"]='Configuración de RSS2';
|
||||
$lang["rss_fields"]='Campos RSS:';
|
||||
$lang["rss_ttl"]='RSS TTL:
|
||||
|
||||
Tiempo de vida (TTL) de RSS:';
|
||||
$lang["rss_show_field_titles"]='Mostrar títulos de campo';
|
||||
$lang["new_content_rss_feed"]='Nuevo feed RSS de contenido';
|
||||
$lang["subject"]='Asunto';
|
||||
$lang["rss_feed_for_search_filter"]='Crear fuente RSS para esta consulta';
|
||||
$lang["filtered_resource_update_for"]='Actualización de recursos filtrados para la búsqueda [%search%]';
|
||||
$lang["plugin-rss2-title"]='Fuente RSS';
|
||||
$lang["plugin-rss2-desc"]='Permite la generación autenticada de feeds RSS de nuevo contenido, incluyendo campos configurables.';
|
13
plugins/rss2/languages/es.php
Normal file
13
plugins/rss2/languages/es.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["rss_setup_heading"]='Configuración de RSS2';
|
||||
$lang["rss_fields"]='Campos RSS:';
|
||||
$lang["rss_ttl"]='Tiempo de vida de RSS (RSS TTL)';
|
||||
$lang["rss_show_field_titles"]='Mostrar títulos de campo';
|
||||
$lang["new_content_rss_feed"]='Nuevo feed RSS de contenido';
|
||||
$lang["subject"]='Asunto';
|
||||
$lang["rss_feed_for_search_filter"]='Crear fuente RSS para esta consulta';
|
||||
$lang["filtered_resource_update_for"]='Actualización de recursos filtrados para la búsqueda [%search%]';
|
||||
$lang["plugin-rss2-title"]='Fuente RSS';
|
||||
$lang["plugin-rss2-desc"]='Permite la generación autenticada de feeds RSS de contenido nuevo, incluyendo campos configurables.';
|
11
plugins/rss2/languages/fa.php
Normal file
11
plugins/rss2/languages/fa.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["rss_setup_heading"]='پیکربندی RSS2';
|
||||
$lang["rss_fields"]='فیلدهای RSS:';
|
||||
$lang["rss_ttl"]='RSS TTL:';
|
||||
$lang["rss_show_field_titles"]='نمایش عناوین فیلدها';
|
||||
$lang["new_content_rss_feed"]='فید RSS محتوای جدید';
|
||||
$lang["subject"]='موضوع';
|
||||
$lang["rss_feed_for_search_filter"]='ایجاد فید RSS برای این جستجو';
|
||||
$lang["filtered_resource_update_for"]='بهروزرسانی منبع فیلتر شده برای جستجو [%search%]';
|
13
plugins/rss2/languages/fi.php
Normal file
13
plugins/rss2/languages/fi.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["rss_setup_heading"]='RSS2-asetukset';
|
||||
$lang["rss_fields"]='RSS-kentät:';
|
||||
$lang["rss_ttl"]='RSS TTL: (RSS:n TTL:)';
|
||||
$lang["rss_show_field_titles"]='Näytä kenttien otsikot';
|
||||
$lang["new_content_rss_feed"]='Uusi sisältö RSS-syöte';
|
||||
$lang["subject"]='Aihe';
|
||||
$lang["rss_feed_for_search_filter"]='Luo RSS-syöte tälle kyselylle';
|
||||
$lang["filtered_resource_update_for"]='Suodatettu resurssipäivitys haulle [%search%]';
|
||||
$lang["plugin-rss2-title"]='RSS-syöte';
|
||||
$lang["plugin-rss2-desc"]='Mahdollistaa todennetun RSS-syötteiden luomisen uudesta sisällöstä, mukaan lukien konfiguroitavat kentät.';
|
15
plugins/rss2/languages/fr.php
Normal file
15
plugins/rss2/languages/fr.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["rss_setup_heading"]='Configuration de RSS2';
|
||||
$lang["rss_fields"]='Champs RSS :';
|
||||
$lang["rss_ttl"]='RSS TTL:
|
||||
|
||||
RSS TTL (Time to Live) :';
|
||||
$lang["rss_show_field_titles"]='Afficher les titres de champ';
|
||||
$lang["new_content_rss_feed"]='Nouveau flux RSS de contenu';
|
||||
$lang["subject"]='Sujet';
|
||||
$lang["rss_feed_for_search_filter"]='Créer un flux RSS pour cette requête';
|
||||
$lang["filtered_resource_update_for"]='Mise à jour des ressources filtrées pour la recherche [%search%]';
|
||||
$lang["plugin-rss2-title"]='Flux RSS';
|
||||
$lang["plugin-rss2-desc"]='Permet la génération authentifiée de flux RSS de nouveaux contenus, y compris des champs configurables.';
|
13
plugins/rss2/languages/hi.php
Normal file
13
plugins/rss2/languages/hi.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["rss_setup_heading"]='आरएसएस2 कॉन्फ़िगरेशन';
|
||||
$lang["rss_fields"]='आरएसएस फ़ील्ड्स:';
|
||||
$lang["rss_ttl"]='आरएसएस टीटीएल:';
|
||||
$lang["rss_show_field_titles"]='फ़ील्ड शीर्षक दिखाएं';
|
||||
$lang["new_content_rss_feed"]='नया सामग्री RSS फ़ीड';
|
||||
$lang["subject"]='विषय';
|
||||
$lang["rss_feed_for_search_filter"]='इस क्वेरी के लिए आरएसएस फ़ीड बनाएँ';
|
||||
$lang["filtered_resource_update_for"]='खोज [%search%] के लिए फ़िल्टर किया गया संसाधन अद्यतन';
|
||||
$lang["plugin-rss2-title"]='आरएसएस फ़ीड';
|
||||
$lang["plugin-rss2-desc"]='प्रमाणीकृत आरएसएस फीड्स के निर्माण को सक्षम बनाता है जिसमें नए सामग्री और विन्यास योग्य फ़ील्ड्स शामिल हैं।';
|
13
plugins/rss2/languages/hr.php
Normal file
13
plugins/rss2/languages/hr.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["rss_setup_heading"]='Konfiguracija RSS2';
|
||||
$lang["rss_fields"]='Polja RSS-a:';
|
||||
$lang["rss_ttl"]='RSS TTL:';
|
||||
$lang["rss_show_field_titles"]='Prikaži nazive polja';
|
||||
$lang["new_content_rss_feed"]='Novi sadržaj RSS kanala';
|
||||
$lang["subject"]='Predmet';
|
||||
$lang["rss_feed_for_search_filter"]='Stvorite RSS kanal za ovaj upit';
|
||||
$lang["filtered_resource_update_for"]='Ažuriranje filtriranih resursa za pretragu [%search%]';
|
||||
$lang["plugin-rss2-title"]='RSS Feed';
|
||||
$lang["plugin-rss2-desc"]='Omogućuje autentificirano generiranje RSS feedova novog sadržaja, uključujući konfigurabilna polja.';
|
11
plugins/rss2/languages/hu.php
Normal file
11
plugins/rss2/languages/hu.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["rss_setup_heading"] = 'RSS2 Konfiguráció';
|
||||
$lang["rss_fields"] = 'RSS mezők:';
|
||||
$lang["rss_ttl"] = 'RSS TTL:';
|
||||
$lang["rss_show_field_titles"] = 'Mezőcímek megjelenítése';
|
||||
$lang["new_content_rss_feed"] = 'Új tartalom RSS hírcsatorna';
|
||||
$lang["subject"] = 'Tárgy';
|
||||
$lang["rss_feed_for_search_filter"] = 'RSS hírcsatorna létrehozása ehhez a lekérdezéshez';
|
||||
$lang["filtered_resource_update_for"] = 'Szűrt erőforrás frissítés a kereséshez [%search%]';
|
13
plugins/rss2/languages/id.php
Normal file
13
plugins/rss2/languages/id.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["rss_setup_heading"]='Konfigurasi RSS2';
|
||||
$lang["rss_fields"]='Kolom RSS:';
|
||||
$lang["rss_ttl"]='Waktu Hidup RSS (RSS TTL):';
|
||||
$lang["rss_show_field_titles"]='Tampilkan Judul Kolom';
|
||||
$lang["new_content_rss_feed"]='Umpan RSS konten baru';
|
||||
$lang["subject"]='Mata Pelajaran';
|
||||
$lang["rss_feed_for_search_filter"]='Buat umpan RSS untuk kueri ini';
|
||||
$lang["filtered_resource_update_for"]='Pembaruan sumber daya yang difilter untuk pencarian [%search%]';
|
||||
$lang["plugin-rss2-title"]='Umpan RSS';
|
||||
$lang["plugin-rss2-desc"]='Memungkinkan pembuatan RSS feed yang terautentikasi dari konten baru, termasuk bidang yang dapat dikonfigurasi.';
|
15
plugins/rss2/languages/it.php
Normal file
15
plugins/rss2/languages/it.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["rss_setup_heading"]='Configurazione RSS2';
|
||||
$lang["rss_fields"]='Campi RSS:';
|
||||
$lang["rss_ttl"]='RSS TTL:
|
||||
|
||||
RSS TTL significa "Time To Live" (Tempo di vita) per gli elementi RSS. Indica il tempo in cui un elemento RSS rimane in cache prima di essere aggiornato.';
|
||||
$lang["rss_show_field_titles"]='Mostra i titoli dei campi';
|
||||
$lang["new_content_rss_feed"]='Nuovo feed RSS di contenuti';
|
||||
$lang["subject"]='Oggetto';
|
||||
$lang["rss_feed_for_search_filter"]='Creare un feed RSS per questa query';
|
||||
$lang["filtered_resource_update_for"]='Aggiornamento risorse filtrate per la ricerca [%search%]';
|
||||
$lang["plugin-rss2-title"]='Feed RSS';
|
||||
$lang["plugin-rss2-desc"]='Abilita la generazione autenticata di feed RSS di nuovi contenuti, inclusi campi configurabili.';
|
13
plugins/rss2/languages/jp.php
Normal file
13
plugins/rss2/languages/jp.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["rss_setup_heading"]='RSS2の設定';
|
||||
$lang["rss_fields"]='RSSフィールド:';
|
||||
$lang["rss_show_field_titles"]='フィールドタイトルを表示する';
|
||||
$lang["new_content_rss_feed"]='新しいコンテンツのRSSフィード';
|
||||
$lang["subject"]='件名';
|
||||
$lang["rss_feed_for_search_filter"]='このクエリのためのRSSフィードを作成する。';
|
||||
$lang["filtered_resource_update_for"]='検索 [%search%] のためのフィルターされたリソースの更新';
|
||||
$lang["rss_ttl"]='RSS TTL:';
|
||||
$lang["plugin-rss2-title"]='RSSフィード';
|
||||
$lang["plugin-rss2-desc"]='新しいコンテンツのRSSフィードを認証生成し、設定可能なフィールドを含めることができます。';
|
13
plugins/rss2/languages/ko.php
Normal file
13
plugins/rss2/languages/ko.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["rss_setup_heading"]='RSS2 구성';
|
||||
$lang["rss_fields"]='RSS 필드:';
|
||||
$lang["rss_ttl"]='RSS TTL:';
|
||||
$lang["rss_show_field_titles"]='필드 제목 표시';
|
||||
$lang["new_content_rss_feed"]='새 콘텐츠 RSS 피드';
|
||||
$lang["subject"]='주제';
|
||||
$lang["rss_feed_for_search_filter"]='이 쿼리에 대한 RSS 피드 생성';
|
||||
$lang["filtered_resource_update_for"]='검색 [%search%]에 대한 필터링된 리소스 업데이트';
|
||||
$lang["plugin-rss2-title"]='RSS 피드';
|
||||
$lang["plugin-rss2-desc"]='새 콘텐츠의 RSS 피드 생성을 인증하고 구성 가능한 필드를 포함합니다.';
|
15
plugins/rss2/languages/nl.php
Normal file
15
plugins/rss2/languages/nl.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["rss_setup_heading"]='RSS2-configuratie';
|
||||
$lang["rss_fields"]='RSS-velden:';
|
||||
$lang["rss_ttl"]='RSS TTL:
|
||||
|
||||
RSS TTL betekent de tijd (in seconden) dat een RSS-feed in de cache van de gebruiker wordt bewaard voordat deze wordt vernieuwd.';
|
||||
$lang["rss_show_field_titles"]='Toon veldtitels';
|
||||
$lang["new_content_rss_feed"]='Nieuwe inhoud RSS-feed';
|
||||
$lang["subject"]='Onderwerp';
|
||||
$lang["rss_feed_for_search_filter"]='Maak een RSS-feed voor deze zoekopdracht';
|
||||
$lang["filtered_resource_update_for"]='Geüpdatete gefilterde bron voor zoekopdracht [%search%]';
|
||||
$lang["plugin-rss2-title"]='RSS-feed';
|
||||
$lang["plugin-rss2-desc"]='Maakt de geauthenticeerde generatie van RSS-feeds van nieuwe inhoud mogelijk, inclusief configureerbare velden.';
|
13
plugins/rss2/languages/no.php
Normal file
13
plugins/rss2/languages/no.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["rss_setup_heading"]='RSS2 konfigurasjon';
|
||||
$lang["rss_fields"]='RSS-felt:';
|
||||
$lang["rss_ttl"]='RSS TTL: (RSS levetid)';
|
||||
$lang["rss_show_field_titles"]='Vis felttittel';
|
||||
$lang["new_content_rss_feed"]='Ny innhold RSS-strøm';
|
||||
$lang["subject"]='Emne';
|
||||
$lang["rss_feed_for_search_filter"]='Opprett RSS-strøm for denne forespørselen';
|
||||
$lang["filtered_resource_update_for"]='Filtrert ressursoppdatering for søk [%search%]';
|
||||
$lang["plugin-rss2-title"]='RSS-feed';
|
||||
$lang["plugin-rss2-desc"]='Aktiverer autentisert generering av RSS-feeder for nytt innhold, inkludert konfigurerbare felt.';
|
11
plugins/rss2/languages/pa.php
Normal file
11
plugins/rss2/languages/pa.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["rss_setup_heading"]='RSS2 ਸੰਰਚਨਾ';
|
||||
$lang["rss_fields"]='RSS ਫੀਲਡਸ:';
|
||||
$lang["rss_ttl"]='RSS TTL:';
|
||||
$lang["rss_show_field_titles"]='ਫੀਲਡ ਸਿਰਲੇਖ ਦਿਖਾਓ';
|
||||
$lang["new_content_rss_feed"]='ਨਵੀਂ ਸਮੱਗਰੀ RSS ਫੀਡ';
|
||||
$lang["subject"]='ਵਿਸ਼ਾ';
|
||||
$lang["rss_feed_for_search_filter"]='ਇਸ ਪੁੱਛਗਿੱਛ ਲਈ RSS ਫੀਡ ਬਣਾਓ';
|
||||
$lang["filtered_resource_update_for"]='ਫਿਲਟਰ ਕੀਤਾ ਰਿਸੋਰਸ ਅੱਪਡੇਟ ਖੋਜ ਲਈ [%search%]';
|
13
plugins/rss2/languages/pl.php
Normal file
13
plugins/rss2/languages/pl.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["rss_setup_heading"]='Konfiguracja RSS2';
|
||||
$lang["rss_fields"]='Pola RSS:';
|
||||
$lang["rss_ttl"]='RSS TTL: (czas życia)';
|
||||
$lang["rss_show_field_titles"]='Pokaż tytuły pól';
|
||||
$lang["new_content_rss_feed"]='Nowy kanał RSS dla nowych zasobów';
|
||||
$lang["subject"]='Temat';
|
||||
$lang["rss_feed_for_search_filter"]='Utwórz kanał RSS dla tego zapytania';
|
||||
$lang["filtered_resource_update_for"]='Zaktualizowano zasoby przefiltrowane dla wyszukiwania [%search%]';
|
||||
$lang["plugin-rss2-title"]='Kanał RSS';
|
||||
$lang["plugin-rss2-desc"]='Umożliwia uwierzytelnione generowanie kanałów RSS z nową zawartością, w tym konfigurowalne pola.';
|
13
plugins/rss2/languages/pt-BR.php
Normal file
13
plugins/rss2/languages/pt-BR.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["rss_setup_heading"]='Configuração do RSS2';
|
||||
$lang["rss_fields"]='Campos RSS:';
|
||||
$lang["rss_ttl"]='Tempo de Vida do RSS (RSS TTL):';
|
||||
$lang["rss_show_field_titles"]='Mostrar títulos de campo';
|
||||
$lang["new_content_rss_feed"]='Novo feed RSS de conteúdo';
|
||||
$lang["subject"]='Assunto';
|
||||
$lang["rss_feed_for_search_filter"]='Criar feed RSS para esta consulta';
|
||||
$lang["filtered_resource_update_for"]='Atualização de recurso filtrado para pesquisa [%search%]';
|
||||
$lang["plugin-rss2-title"]='Feed RSS';
|
||||
$lang["plugin-rss2-desc"]='Permite a geração autenticada de feeds RSS de novos conteúdos, incluindo campos configuráveis.';
|
13
plugins/rss2/languages/pt.php
Normal file
13
plugins/rss2/languages/pt.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["rss_setup_heading"]='Configuração do RSS2';
|
||||
$lang["rss_fields"]='Campos RSS:';
|
||||
$lang["rss_ttl"]='Tempo de Vida do RSS (RSS TTL):';
|
||||
$lang["rss_show_field_titles"]='Mostrar títulos de campo';
|
||||
$lang["new_content_rss_feed"]='Novo feed RSS de conteúdo';
|
||||
$lang["subject"]='Assunto';
|
||||
$lang["rss_feed_for_search_filter"]='Criar feed RSS para esta consulta';
|
||||
$lang["filtered_resource_update_for"]='Atualização de recurso filtrado para pesquisa [%search%]';
|
||||
$lang["plugin-rss2-title"]='Feed RSS';
|
||||
$lang["plugin-rss2-desc"]='Permite a geração autenticada de feeds RSS de novos conteúdos, incluindo campos configuráveis.';
|
13
plugins/rss2/languages/ro.php
Normal file
13
plugins/rss2/languages/ro.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["rss_setup_heading"]='Configurare RSS2';
|
||||
$lang["rss_fields"]='Câmpuri RSS:';
|
||||
$lang["rss_ttl"]='TTL RSS:';
|
||||
$lang["rss_show_field_titles"]='Afișează titlurile câmpurilor';
|
||||
$lang["new_content_rss_feed"]='Flux RSS pentru conținut nou';
|
||||
$lang["subject"]='Subiect';
|
||||
$lang["rss_feed_for_search_filter"]='Creați un flux RSS pentru această interogare';
|
||||
$lang["filtered_resource_update_for"]='Actualizare resurse filtrate pentru căutarea [%search%]';
|
||||
$lang["plugin-rss2-title"]='Flux RSS';
|
||||
$lang["plugin-rss2-desc"]='Permite generarea autentificată a fluxurilor RSS de conținut nou, inclusiv câmpuri configurabile.';
|
15
plugins/rss2/languages/ru.php
Normal file
15
plugins/rss2/languages/ru.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["rss_setup_heading"]='Конфигурация RSS2';
|
||||
$lang["rss_fields"]='Поля RSS:';
|
||||
$lang["rss_ttl"]='RSS TTL:
|
||||
|
||||
RSS TTL (время жизни) - это параметр, который определяет, как долго RSS-канал может быть кэширован до того, как он должен быть обновлен.';
|
||||
$lang["rss_show_field_titles"]='Показать заголовки полей';
|
||||
$lang["new_content_rss_feed"]='Лента RSS нового контента';
|
||||
$lang["subject"]='Тема';
|
||||
$lang["rss_feed_for_search_filter"]='Создать RSS-канал для этого запроса';
|
||||
$lang["filtered_resource_update_for"]='Обновление отфильтрованных ресурсов для поиска [%search%]';
|
||||
$lang["plugin-rss2-title"]='RSS Лента';
|
||||
$lang["plugin-rss2-desc"]='Позволяет аутентифицированную генерацию RSS-лент нового контента, включая настраиваемые поля.';
|
13
plugins/rss2/languages/sk.php
Normal file
13
plugins/rss2/languages/sk.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["rss_setup_heading"]='Konfigurácia RSS2';
|
||||
$lang["rss_fields"]='RSS polia:';
|
||||
$lang["rss_ttl"]='RSS TTL:';
|
||||
$lang["rss_show_field_titles"]='Zobraziť názvy polí';
|
||||
$lang["new_content_rss_feed"]='Nový RSS kanál obsahu';
|
||||
$lang["subject"]='Predmet';
|
||||
$lang["rss_feed_for_search_filter"]='Vytvoriť RSS kanál pre túto požiadavku';
|
||||
$lang["filtered_resource_update_for"]='Aktualizácia filtrovaných zdrojov pre vyhľadávanie [%search%]';
|
||||
$lang["plugin-rss2-title"]='RSS kanál';
|
||||
$lang["plugin-rss2-desc"]='Omogoča overjeno generiranje RSS virov nove vsebine, vključno s konfigurabilnimi polji.';
|
18
plugins/rss2/languages/sv.php
Normal file
18
plugins/rss2/languages/sv.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
# Swedish
|
||||
# Language File for the RSS2 Plugin
|
||||
# Updated by Henrik Frizén 20131024 for svn r4998
|
||||
# -------
|
||||
#
|
||||
#
|
||||
$lang["rss_setup_heading"]="Rss2 – inställningar";
|
||||
$lang["rss_fields"]="rss_fields:";
|
||||
$lang["rss_ttl"]="rss_ttl:";
|
||||
$lang["rss_show_field_titles"]="Visa fältnamn";
|
||||
$lang["new_content_rss_feed"]="Rss-flöde för nya material";
|
||||
$lang["subject"]="Ämne";
|
||||
$lang["rss_feed_for_search_filter"]="Skapa rss-flöde för denna sökfråga";
|
||||
$lang["filtered_resource_update_for"]="Filtrerad uppdatering av material för sökfrågan [%search%]"; #%search% will be replaced, e.g. "!last50"
|
||||
|
||||
$lang["plugin-rss2-title"]='RSS-flöde';
|
||||
$lang["plugin-rss2-desc"]='Möjliggör autentiserad generering av RSS-flöden av nytt innehåll, inklusive konfigurerbara fält.';
|
11
plugins/rss2/languages/sw.php
Normal file
11
plugins/rss2/languages/sw.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["rss_setup_heading"]='Usanidi wa RSS2';
|
||||
$lang["rss_fields"]='Viwanja vya RSS:';
|
||||
$lang["rss_ttl"]='RSS TTL:';
|
||||
$lang["rss_show_field_titles"]='Onyesha Majina ya Sehemu';
|
||||
$lang["new_content_rss_feed"]='Mlisho wa RSS wa maudhui mapya';
|
||||
$lang["subject"]='Mada';
|
||||
$lang["rss_feed_for_search_filter"]='Tengeneza RSS feed kwa swali hili';
|
||||
$lang["filtered_resource_update_for"]='Sasisho la rasilimali iliyochujwa kwa utafutaji [%search%]';
|
11
plugins/rss2/languages/th.php
Normal file
11
plugins/rss2/languages/th.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["rss_setup_heading"]='การกำหนดค่า RSS2';
|
||||
$lang["rss_fields"]='ฟิลด์ RSS:';
|
||||
$lang["rss_ttl"]='RSS TTL:';
|
||||
$lang["rss_show_field_titles"]='แสดงชื่อฟิลด์';
|
||||
$lang["new_content_rss_feed"]='ฟีด RSS เนื้อหาใหม่';
|
||||
$lang["subject"]='หัวข้อ';
|
||||
$lang["rss_feed_for_search_filter"]='สร้างฟีด RSS สำหรับการค้นหานี้';
|
||||
$lang["filtered_resource_update_for"]='การอัปเดตทรัพยากรที่กรองสำหรับการค้นหา [%search%]';
|
13
plugins/rss2/languages/tr.php
Normal file
13
plugins/rss2/languages/tr.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["rss_setup_heading"]='RSS2 Yapılandırması';
|
||||
$lang["rss_fields"]='RSS alanları:';
|
||||
$lang["rss_ttl"]='RSS TTL:';
|
||||
$lang["rss_show_field_titles"]='Alan Başlıklarını Göster';
|
||||
$lang["new_content_rss_feed"]='Yeni içerik RSS beslemesi';
|
||||
$lang["subject"]='Konu';
|
||||
$lang["rss_feed_for_search_filter"]='Bu sorgu için RSS beslemesi oluştur';
|
||||
$lang["filtered_resource_update_for"]='Arama [%search%] için filtrelenmiş kaynak güncellemesi';
|
||||
$lang["plugin-rss2-title"]='RSS Beslemesi';
|
||||
$lang["plugin-rss2-desc"]='Yeni içeriğin, yapılandırılabilir alanlar dahil olmak üzere, kimlik doğrulamalı RSS beslemelerinin oluşturulmasını sağlar.';
|
11
plugins/rss2/languages/uk.php
Normal file
11
plugins/rss2/languages/uk.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["rss_setup_heading"]='Конфігурація RSS2';
|
||||
$lang["rss_fields"]='Поля RSS:';
|
||||
$lang["rss_ttl"]='RSS TTL:';
|
||||
$lang["rss_show_field_titles"]='Показати назви полів';
|
||||
$lang["new_content_rss_feed"]='Новий RSS-канал контенту';
|
||||
$lang["subject"]='Тема';
|
||||
$lang["rss_feed_for_search_filter"]='Створити RSS-стрічку для цього запиту';
|
||||
$lang["filtered_resource_update_for"]='Фільтроване оновлення ресурсу для пошуку [%search%]';
|
11
plugins/rss2/languages/ur.php
Normal file
11
plugins/rss2/languages/ur.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["rss_setup_heading"]='RSS2 تشکیل دیں';
|
||||
$lang["rss_fields"]='آر ایس ایس فیلڈز:';
|
||||
$lang["rss_ttl"]='آر ایس ایس ٹی ٹی ایل:';
|
||||
$lang["rss_show_field_titles"]='فیلڈ کے عنوانات دکھائیں';
|
||||
$lang["new_content_rss_feed"]='نیا مواد آر ایس ایس فیڈ';
|
||||
$lang["subject"]='موضوع';
|
||||
$lang["rss_feed_for_search_filter"]='اس استفسار کے لیے آر ایس ایس فیڈ بنائیں';
|
||||
$lang["filtered_resource_update_for"]='تلاش [%search%] کے لیے فلٹر شدہ وسائل کی تازہ کاری';
|
11
plugins/rss2/languages/vi.php
Normal file
11
plugins/rss2/languages/vi.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["rss_setup_heading"] = 'Cấu hình RSS2';
|
||||
$lang["rss_fields"] = 'Các trường RSS';
|
||||
$lang["rss_ttl"] = 'RSS TTL:';
|
||||
$lang["rss_show_field_titles"] = 'Hiển thị tiêu đề trường';
|
||||
$lang["new_content_rss_feed"] = 'Nguồn cấp dữ liệu RSS nội dung mới';
|
||||
$lang["subject"] = 'Chủ đề';
|
||||
$lang["rss_feed_for_search_filter"] = 'Tạo nguồn cấp dữ liệu RSS cho truy vấn này';
|
||||
$lang["filtered_resource_update_for"] = 'Cập nhật tài nguyên đã lọc cho tìm kiếm [%search%]';
|
15
plugins/rss2/languages/zh-CN.php
Normal file
15
plugins/rss2/languages/zh-CN.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
|
||||
$lang["rss_setup_heading"]='RSS2 配置';
|
||||
$lang["rss_fields"]='RSS字段:';
|
||||
$lang["rss_ttl"]='RSS TTL:
|
||||
|
||||
RSS TTL: (RSS生存时间) 是指RSS Feed的缓存时间,即RSS Feed在更新后多长时间内可以被缓存。';
|
||||
$lang["rss_show_field_titles"]='显示字段标题';
|
||||
$lang["new_content_rss_feed"]='新内容 RSS 订阅。';
|
||||
$lang["subject"]='主题';
|
||||
$lang["rss_feed_for_search_filter"]='创建此查询的 RSS 订阅。';
|
||||
$lang["filtered_resource_update_for"]='搜索 [%search%] 的筛选资源更新';
|
||||
$lang["plugin-rss2-title"]='RSS订阅';
|
||||
$lang["plugin-rss2-desc"]='启用经过身份验证的新内容RSS源生成,包括可配置字段。';
|
139
plugins/rss2/pages/rssfeed.php
Executable file
139
plugins/rss2/pages/rssfeed.php
Executable file
@@ -0,0 +1,139 @@
|
||||
<?php
|
||||
|
||||
class RSSFeed
|
||||
{
|
||||
public $Articles = array();
|
||||
|
||||
// Channel info
|
||||
public $title = '';
|
||||
public $link = '';
|
||||
public $description = '';
|
||||
public $optional = array();
|
||||
public $image = array('url' => '', 'title' => '', 'link' => '', 'description' => '', 'w' => 0, 'h' => 0);
|
||||
|
||||
public function __construct($title, $link, $description, $optional = '')
|
||||
{
|
||||
$this->title = $title;
|
||||
$this->link = $link;
|
||||
$this->description = $description;
|
||||
|
||||
if (is_array($optional) && count($optional)) {
|
||||
$this->optional = $optional;
|
||||
}
|
||||
}
|
||||
|
||||
function AddOptional($key, $value)
|
||||
{
|
||||
$this->optional[$key] = $value;
|
||||
}
|
||||
|
||||
function AddImage($title, $url, $link, $description = '')
|
||||
{
|
||||
$this->image['title'] = $title;
|
||||
$this->image['url'] = $url;
|
||||
$this->image['link'] = $link;
|
||||
$this->image['description'] = $description;
|
||||
|
||||
if( $tmp = @getimagesize($url) ){
|
||||
$this->image['w'] = ($tmp[0] > 144) ? 144 : $tmp[0];
|
||||
$this->image['h'] = ($tmp[1] > 400) ? 400 : $tmp[1];
|
||||
}
|
||||
}
|
||||
|
||||
function AddArticle($title, $link, $description, $optional = '')
|
||||
{
|
||||
// inserisce un nuovo articolo
|
||||
$i = array_push($this->Articles, array('title' => $title, 'link' => $link, 'description' => $description));
|
||||
|
||||
// aggiunge le coppie chiave valore opzionali
|
||||
// all'articolo appena inserito
|
||||
if (is_array($optional) && count($optional))
|
||||
{
|
||||
--$i;
|
||||
foreach($optional as $k=>$v)
|
||||
{
|
||||
$this->Articles[$i][$k] = $v;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function Output($save = false, $path = '')
|
||||
{
|
||||
$out = '<?xml version="1.0" encoding="UTF-8" ?>' . "\n" .
|
||||
'<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">' . "\n" .
|
||||
'<channel>' . "\n";
|
||||
global $rss_ttl,$baseurl;
|
||||
$parameters=array();
|
||||
foreach ($_GET as $key=>$value){
|
||||
$parameters[$key]=$value;
|
||||
}
|
||||
$parameters=http_build_query($parameters,'','&');
|
||||
global $baseurl;
|
||||
|
||||
$out .= "<title>$this->title</title>\n" .
|
||||
"<link>$this->link</link>\n" .
|
||||
"<description>$this->description</description>\n".
|
||||
"<ttl>".$rss_ttl."</ttl>\n".
|
||||
'<atom:link href="'.$baseurl.'/plugins/rss2/pages/rssfilter.php?'.$parameters.'" rel="self" type="application/rss+xml" />';
|
||||
|
||||
// Channel optionals
|
||||
if (is_array($this->optional) && count($this->optional))
|
||||
{
|
||||
foreach($this->optional as $k => $v) {
|
||||
$out .= "<$k>$v</$k>\n";
|
||||
}
|
||||
}
|
||||
|
||||
// Image
|
||||
if ($this->image['title'] && $this->image['url'] && $this->image['link'])
|
||||
{
|
||||
$out .= "<image>\n" .
|
||||
"<title>" . $this->image['title'] . "</title>\n" .
|
||||
"<url>" . $this->image['url'] . "</url>\n" .
|
||||
"<link>" . $this->image['link'] . "</link>\n";
|
||||
|
||||
if( $this->image['description'] ) {
|
||||
$out .= "<description>" . $this->image['description'] . "</description>\n";
|
||||
}
|
||||
|
||||
if ($this->image['w'] && $this->image['h']) {
|
||||
$out .= "<width>" . $this->image['w'] . "</width>\n" .
|
||||
"<height>" . $this->image['h'] . "</height>\n";
|
||||
}
|
||||
$out .= "</image>\n";
|
||||
}
|
||||
|
||||
// per ogni item stampa tutte le coppie chiave valore
|
||||
for ($i = 0, $c = count($this->Articles); $i < $c; $i++)
|
||||
{
|
||||
$out .= "<item>\n";
|
||||
foreach($this -> Articles[$i] as $k=>$v)
|
||||
{
|
||||
$k1=$k;
|
||||
if ($k=="guid"){$k1='guid isPermaLink="false"';}
|
||||
$out .= "<".$k1.">".$v."</".$k.">\n";
|
||||
}
|
||||
$out .= "</item>\n";
|
||||
}
|
||||
|
||||
$out .= "</channel>\n</rss>";
|
||||
|
||||
// True output
|
||||
if (!$save || !$path ) {
|
||||
header("Content-type: application/xml");
|
||||
echo trim($out);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$fh = fopen($path, 'w');
|
||||
if($fh) {
|
||||
fwrite($fh, $out);
|
||||
fclose($fh);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
230
plugins/rss2/pages/rssfilter.php
Executable file
230
plugins/rss2/pages/rssfilter.php
Executable file
@@ -0,0 +1,230 @@
|
||||
<?php
|
||||
|
||||
include __DIR__ . "/../../../include/boot.php";
|
||||
include_once __DIR__ . "/../../../include/image_processing.php";
|
||||
|
||||
if (!function_exists("get_api_key")) {
|
||||
include __DIR__ . "/../../../include/api_functions.php";
|
||||
}
|
||||
|
||||
include __DIR__ . "/rssfeed.php";
|
||||
|
||||
# Get parameters
|
||||
$user = base64_decode(getval("user", ""));
|
||||
$sign = getval("sign", "");
|
||||
|
||||
# Remove the sign and authmode parameters as these would not have been present when signed on the client.
|
||||
$strip_params = array("sign","authmode");
|
||||
parse_str($_SERVER["QUERY_STRING"], $params);
|
||||
foreach ($strip_params as $strip_param) {
|
||||
unset($params[$strip_param]);
|
||||
}
|
||||
$query = urldecode(http_build_query($params));
|
||||
|
||||
# Authenticate based on the provided signature.
|
||||
if (!check_api_key($user, $query, $sign)) {
|
||||
header("HTTP/1.0 403 Forbidden.");
|
||||
echo "HTTP/1.0 403 Forbidden.";
|
||||
exit;
|
||||
}
|
||||
|
||||
function xmlentities($text)
|
||||
{
|
||||
return htmlentities($text, ENT_XML1);
|
||||
}
|
||||
|
||||
# Log them in.
|
||||
setup_user(get_user(get_user_by_username($user)));
|
||||
|
||||
$search = getval("search", "");
|
||||
|
||||
# Append extra search parameters
|
||||
$country = getval("country", "");
|
||||
if ($country != "") {
|
||||
$search = (($search == "") ? "" : join(", ", split_keywords($search)) . ", ") . "country:" . $country;
|
||||
}
|
||||
$year = getval("year", "");
|
||||
if ($year != "") {
|
||||
$search = (($search == "") ? "" : join(", ", split_keywords($search)) . ", ") . "year:" . $year;
|
||||
}
|
||||
$month = getval("month", "");
|
||||
if ($month != "") {
|
||||
$search = (($search == "") ? "" : join(", ", split_keywords($search)) . ", ") . "month:" . $month;
|
||||
}
|
||||
$day = getval("day", "");
|
||||
if ($day != "") {
|
||||
$search = (($search == "") ? "" : join(", ", split_keywords($search)) . ", ") . "day:" . $day;
|
||||
}
|
||||
|
||||
|
||||
if (strpos($search, "!") === false) {
|
||||
setcookie("search", $search, 0, '', '', false, true);
|
||||
} # store the search in a cookie if not a special search
|
||||
$offset = getval("offset", 0, true);
|
||||
if (strpos($search, "!") === false) {
|
||||
setcookie("saved_offset", $offset, 0, '', '', false, true);
|
||||
}
|
||||
if ((!is_numeric($offset)) || ($offset < 0)) {
|
||||
$offset = 0;
|
||||
}
|
||||
|
||||
$order_by = getval("order_by", "date");
|
||||
if (strpos($search, "!") === false) {
|
||||
setcookie("saved_order_by", $order_by, 0, '', '', false, true);
|
||||
}
|
||||
$display = getval("display", "thumbs");
|
||||
setcookie("display", $display, 0, '', '', false, true);
|
||||
$per_page = getval("per_page", 12);
|
||||
setcookie("per_page", $per_page, 0, '', '', false, true);
|
||||
$archive = getval("archive", 0);
|
||||
if (strpos($search, "!") === false) {
|
||||
setcookie("saved_archive", $archive, 0, '', '', false, true);
|
||||
}
|
||||
$jumpcount = 0;
|
||||
|
||||
# fetch resource types from query string and generate a resource types cookie
|
||||
if (getval("resetrestypes", "") == "") {
|
||||
$restypes = getval("restypes", "");
|
||||
} else {
|
||||
$restypes = "";
|
||||
reset($_GET);foreach ($_GET as $key => $value) {
|
||||
if (substr($key, 0, 8) == "resource") {
|
||||
if ($restypes != "") {
|
||||
$restypes .= ",";
|
||||
} $restypes .= substr($key, 8);
|
||||
}
|
||||
}
|
||||
setcookie("restypes", $restypes, 0, '', '', false, true);
|
||||
|
||||
# This is a new search, log this activity
|
||||
if ($archive == 2) {
|
||||
daily_stat("Archive search", 0);
|
||||
} else {
|
||||
daily_stat("Search", 0);
|
||||
}
|
||||
}
|
||||
|
||||
# If returning to an old search, restore the page/order by
|
||||
if (!array_key_exists("search", $_GET)) {
|
||||
$offset = getval("saved_offset", 0);
|
||||
setcookie("saved_offset", $offset, 0, '', '', false, true);
|
||||
$order_by = getval("saved_order_by", "relevance");
|
||||
setcookie("saved_order_by", $order_by, 0, '', '', false, true);
|
||||
$archive = getval("saved_archive", 0);
|
||||
setcookie("saved_archive", $archive, 0, '', '', false, true);
|
||||
}
|
||||
|
||||
$refs = array();
|
||||
|
||||
# Special query? Ignore restypes
|
||||
if (strpos($search, "!") !== false) {
|
||||
$restypes = "";
|
||||
}
|
||||
|
||||
$result = do_search($search, $restypes, "relevance", $archive, 100, "desc", false, DEPRECATED_STARSEARCH);
|
||||
|
||||
# Create a title for the feed
|
||||
$searchstring = "search=" . urlencode($search) . "&restypes=" . urlencode($restypes) . "&archive=" . urlencode($archive);
|
||||
if (substr($search, 0, 11) == "!collection") {
|
||||
$collection = substr($search, 11);
|
||||
$collection = explode(" ", $collection);
|
||||
$collection = $collection[0];
|
||||
$collectiondata = get_collection($collection);
|
||||
}
|
||||
$feed_title = xmlentities($applicationname . " - " . get_search_title($searchstring));
|
||||
|
||||
$r = new RSSFeed($feed_title, $baseurl, xmlentities(str_replace("%search%", $searchstring, $lang["filtered_resource_update_for"])));
|
||||
|
||||
// rss fields can include any of thumbs, list, xlthumbs display fields, or data_joins.
|
||||
$all_field_info = get_fields_for_search_display($rss_fields);
|
||||
|
||||
$n = 0;
|
||||
$df = [];
|
||||
foreach ($rss_fields as $display_field) {
|
||||
# Find field in selected list
|
||||
for ($m = 0; $m < count($all_field_info); $m++) {
|
||||
if ($all_field_info[$m]["ref"] == $display_field) {
|
||||
$field_info = $all_field_info[$m];
|
||||
$df[$n]['ref'] = $display_field;
|
||||
$df[$n]['name'] = $field_info['name'];
|
||||
$df[$n]['title'] = $field_info['title'];
|
||||
$df[$n]['type'] = $field_info['type'];
|
||||
$df[$n]['value_filter'] = $field_info['value_filter'];
|
||||
$n++;
|
||||
}
|
||||
}
|
||||
}
|
||||
$n = 0;
|
||||
|
||||
# loop and display the results
|
||||
if (is_array($result)) {
|
||||
for ($n = 0; $n < count($result); $n++) {
|
||||
# if result item does not contain resource information continue
|
||||
if ($result[$n] == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$ref = $result[$n]["ref"];
|
||||
$title = xmlentities(i18n_get_translated($result[$n]["field" . $view_title_field]));
|
||||
$creation_date = $result[$n]["creation_date"];
|
||||
|
||||
$year = (int)substr($creation_date, 0, 4);
|
||||
$month = (int)substr($creation_date, 5, 2);
|
||||
$day = (int)substr($creation_date, 8, 2);
|
||||
$hour = (int)substr($creation_date, 11, 2);
|
||||
$min = (int)substr($creation_date, 14, 2);
|
||||
$sec = (int)substr($creation_date, 17, 2);
|
||||
$pubdate = date('D, d M Y H:i:s +0100', mktime($hour, $min, $sec, $month, $day, $year));
|
||||
|
||||
$url = $baseurl . "/pages/view.php?ref=" . $ref;
|
||||
|
||||
$imgurl = "";
|
||||
$imgurl = get_resource_path($result[$n]['ref'], true, "col", false);
|
||||
if ((int) $result[$n]['has_image'] === RESOURCE_PREVIEWS_NONE) {
|
||||
$imgurl = $baseurl . "/gfx/no_preview/default.png";
|
||||
} else {
|
||||
$imgurl = get_resource_path($result[$n]['ref'], false, "col", false);
|
||||
}
|
||||
$add_desc = "";
|
||||
foreach ($rss_fields as $rssfield) {
|
||||
if (is_array($result[$n])) {
|
||||
if (isset($result[$n]['field' . $rssfield])) {
|
||||
$value = i18n_get_translated($result[$n]['field' . $rssfield]);
|
||||
} else {
|
||||
$value = i18n_get_translated(get_data_by_field($result[$n]['ref'], $rssfield));
|
||||
}
|
||||
if ($value != "" && $value != ",") {
|
||||
// allow for value filters
|
||||
for ($x = 0; $x < count($df); $x++) {
|
||||
if ($df[$x]['ref'] == $rssfield) {
|
||||
$plugin = "../../value_filter_" . $df[$x]['name'] . ".php";
|
||||
if ($df[$x]['value_filter'] != "") {
|
||||
eval(eval_check_signed($df[$x]['value_filter']));
|
||||
} elseif (file_exists($plugin)) {
|
||||
include $plugin;
|
||||
} elseif ($df[$x]["type"] == 4 || $df[$x]["type"] == 6 || $df[$x]["type"] == 10) {
|
||||
$value = NiceDate($value, true, false);
|
||||
}
|
||||
if ($rss_show_field_titles) {
|
||||
$add_desc .= $df[$x]['title'] . ": ";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$add_desc .= xmlentities(strip_tags($value)) . "<![CDATA[<br/>]]>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$description = "<![CDATA[<img src='$imgurl' align='left' height='75' border='0' />]]>" . $add_desc;
|
||||
|
||||
$val["pubDate"] = $pubdate;
|
||||
$val["guid"] = $ref;
|
||||
|
||||
$r->AddArticle($title, $url, $description, $val);
|
||||
}
|
||||
|
||||
$r->Output();
|
||||
} else {
|
||||
$r->Output(); // empty
|
||||
}
|
29
plugins/rss2/pages/setup.php
Normal file
29
plugins/rss2/pages/setup.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
#
|
||||
# Setup page for rss2 plugin
|
||||
#
|
||||
|
||||
// Do the include and authorization checking ritual.
|
||||
include '../../../include/boot.php';
|
||||
include '../../../include/authenticate.php'; if (!checkperm('a')) {exit ($lang['error-permissiondenied']);}
|
||||
|
||||
// Specify the name of this plugin and the heading to display for the page.
|
||||
$plugin_name = 'rss2';
|
||||
if(!in_array($plugin_name, $plugins))
|
||||
{plugin_activate_for_setup($plugin_name);}
|
||||
$plugin_page_heading = $lang['rss_setup_heading'];
|
||||
|
||||
// Build the $page_def array of descriptions of each configuration variable the plugin uses.
|
||||
// Each element of $page_def describes one configuration variable. Each description is
|
||||
// created by one of the config_add_xxxx helper functions. See their definitions and
|
||||
// descriptions in include/plugin_functions for more information.
|
||||
|
||||
$page_def[] = config_add_multi_ftype_select('rss_fields', $lang['rss_fields']);
|
||||
$page_def[] = config_add_text_input('rss_ttl', $lang['rss_ttl']);
|
||||
$page_def[] = config_add_boolean_select('rss_show_field_titles', $lang['rss_show_field_titles']);
|
||||
|
||||
// Do the page generation ritual.
|
||||
config_gen_setup_post($page_def, $plugin_name);
|
||||
include '../../../include/header.php';
|
||||
config_gen_setup_html($page_def, $plugin_name, null, $plugin_page_heading);
|
||||
include '../../../include/footer.php';
|
10
plugins/rss2/rss2.yaml
Normal file
10
plugins/rss2/rss2.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
name : rss2
|
||||
title : RSS Feed
|
||||
author : Camillo Ferraris/Colorhythm LLC/Tom Gleason
|
||||
version : 0.9
|
||||
desc : Enables the authenticated generation of RSS feeds of new content, including configurable fields.
|
||||
icon : fa fa-rss
|
||||
icon-colour: orangered
|
||||
config_url: /plugins/rss2/pages/setup.php
|
||||
category: Integrations
|
||||
info_url: https://www.resourcespace.com/knowledge-base/plugins/rss-feed
|
BIN
plugins/rss2/static/logo.gif
Executable file
BIN
plugins/rss2/static/logo.gif
Executable file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
BIN
plugins/rss2/static/rss.gif
Normal file
BIN
plugins/rss2/static/rss.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 672 B |
BIN
plugins/rss2/static/rss2.gif
Normal file
BIN
plugins/rss2/static/rss2.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 1007 B |
Reference in New Issue
Block a user