commentSpice: Hide announce description, if nothing was found to

announce.
This commit is contained in:
Grischa Brockhaus 2012-07-08 15:58:43 +02:00
parent d6893eceee
commit 50fe5277d1
5 changed files with 7 additions and 3 deletions

View file

@ -1,6 +1,7 @@
Version 1.03
* Optional allow the commentor to announce a single article only once per page.
* "Choose article" was displayed in the language of the last user who triggered RSS fetching.
* Announce description will be hidden, if nothing is left to announce.
Version 1.02
* Removed all antispam related and put it into a new plugin "Spamblock Bee".

View file

@ -74,7 +74,7 @@
@define('PLUGIN_EVENT_COMMENTSPICE_PROMOTE_ARTICLE_LABEL', 'Bewirb einen Deiner Artikel');
@define('PLUGIN_EVENT_COMMENTSPICE_PROMOTE_ARTICLE_CHOOSE', '- Artikel wählen -');
@define('PLUGIN_EVENT_COMMENTSPICE_PROMOTE_ARTICLE_RECENT', '%s schrieb auch');
@define('PLUGIN_EVENT_COMMENTSPICE_PROMOTE_ARTICLE_FOOTER', '<b>Bewirb einen Deiner letzten Artikel</b><br/>Dieses Blog erlaubt Dir mit Deinem Kommentar einen Deiner letzten Artikel zu bewerben. Bitte gib Deine Blog URL als Homepage ein, dann wird eine Auswahl erscheinen, in der Du einen Artikel auswählen kannst.');
@define('PLUGIN_EVENT_COMMENTSPICE_PROMOTE_ARTICLE_FOOTER', '<b>Bewirb einen Deiner letzten Artikel</b><br/>Dieses Blog erlaubt Dir mit Deinem Kommentar einen Deiner letzten Artikel zu bewerben. Bitte gib Deine Blog URL als Homepage ein, dann wird eine Auswahl erscheinen, in der Du einen Artikel auswählen kannst. (Javascript erforderlich)');
@define('PLUGIN_EVENT_COMMENTSPICE_PROMOTE_ARTICLE_CORRUPTED', 'Entschuldigung, bei der Übergabe "Deines letzten Artikels" ist etwas schief gegangen.');
@define('PLUGIN_EVENT_COMMENTSPICE_CONFIG_BOO','Audio Kommentare mittels audioboo.fm');

View file

@ -42,6 +42,7 @@ function fetch_rss_ready(httpRequest){
var divSelectRss = document.getElementById("serendipity_commentspice_rss");
var selectRss = document.getElementById("serendipity_commentform_rss");
if (selectRss==null) return;
var divDescription = document.getElementById("serendipity_commentspice_rss_desc");
var articles = jsonResponse.articles;
if (!comentspice_fetchrss_emailchanges && lastUrlChecked == jsonResponse.url) {
// nothing to do
@ -51,6 +52,7 @@ function fetch_rss_ready(httpRequest){
selectRss.options.length = 0;
if (articles==null || articles.length==0) {
hideSpiceElement(divSelectRss);
if (divDescription!=null) hideSpiceElement(divDescription);
}
else {
for (idx in articles) {
@ -67,6 +69,7 @@ function fetch_rss_ready(httpRequest){
}
selectRss.selectedIndex = 0;
showSpiceElement(divSelectRss);
if (divDescription!=null) showSpiceElement(divDescription);
reloadSelection();
}
lastUrlChecked = jsonResponse.url;

View file

@ -74,7 +74,7 @@
@define('PLUGIN_EVENT_COMMENTSPICE_PROMOTE_ARTICLE_LABEL', 'Bewirb einen Deiner Artikel');
@define('PLUGIN_EVENT_COMMENTSPICE_PROMOTE_ARTICLE_CHOOSE', '- Artikel wählen -');
@define('PLUGIN_EVENT_COMMENTSPICE_PROMOTE_ARTICLE_RECENT', '%s schrieb auch');
@define('PLUGIN_EVENT_COMMENTSPICE_PROMOTE_ARTICLE_FOOTER', '<b>Bewirb einen Deiner letzten Artikel</b><br/>Dieses Blog erlaubt Dir mit Deinem Kommentar einen Deiner letzten Artikel zu bewerben. Bitte gib Deine Blog URL als Homepage ein, dann wird eine Auswahl erscheinen, in der Du einen Artikel auswählen kannst.');
@define('PLUGIN_EVENT_COMMENTSPICE_PROMOTE_ARTICLE_FOOTER', '<b>Bewirb einen Deiner letzten Artikel</b><br/>Dieses Blog erlaubt Dir mit Deinem Kommentar einen Deiner letzten Artikel zu bewerben. Bitte gib Deine Blog URL als Homepage ein, dann wird eine Auswahl erscheinen, in der Du einen Artikel auswählen kannst. (Javascript erforderlich)');
@define('PLUGIN_EVENT_COMMENTSPICE_PROMOTE_ARTICLE_CORRUPTED', 'Entschuldigung, bei der Übergabe "Deines letzten Artikels" ist etwas schief gegangen.');
@define('PLUGIN_EVENT_COMMENTSPICE_CONFIG_BOO','Audio Kommentare mittels audioboo.fm');

View file

@ -74,7 +74,7 @@
@define('PLUGIN_EVENT_COMMENTSPICE_PROMOTE_ARTICLE_LABEL', 'Promote recent article');
@define('PLUGIN_EVENT_COMMENTSPICE_PROMOTE_ARTICLE_CHOOSE', '- choose an article -');
@define('PLUGIN_EVENT_COMMENTSPICE_PROMOTE_ARTICLE_RECENT', '%s wrote about');
@define('PLUGIN_EVENT_COMMENTSPICE_PROMOTE_ARTICLE_FOOTER', '<b>Promote one of your recent articles</b><br/>This blog allows you to announce one of your recent blog articles with your comment. Please enter your the corresponding URL as homepage and a selection box will pop up letting you choose an article.');
@define('PLUGIN_EVENT_COMMENTSPICE_PROMOTE_ARTICLE_FOOTER', '<b>Promote one of your recent articles</b><br/>This blog allows you to announce one of your recent blog articles with your comment. Please enter your the corresponding URL as homepage and a selection box will pop up letting you choose an article. (Javascript needed)');
@define('PLUGIN_EVENT_COMMENTSPICE_PROMOTE_ARTICLE_CORRUPTED', 'Sorry, unable to verify your "recent post" datas..');
@define('PLUGIN_EVENT_COMMENTSPICE_CONFIG_BOO','Audio comments using audioboo.fm');