From 73495fd16f6e89c5eeefb6a9c2fdc11b14fa57d4 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 23 Jan 2009 06:53:31 +0100 Subject: [PATCH] tweak new version notification stuff --- functions.php | 19 ++++++------------- images/new_version.png | Bin 264 -> 625 bytes modules/popup-dialog.php | 24 ++++++++++++------------ modules/pref-prefs.php | 2 -- tt-rss.css | 8 ++++++++ tt-rss.js | 4 +++- tt-rss.php | 4 +++- 7 files changed, 32 insertions(+), 29 deletions(-) diff --git a/functions.php b/functions.php index d920498c..23144f53 100644 --- a/functions.php +++ b/functions.php @@ -3699,7 +3699,7 @@ return array($tmp, $headlines_count, $affected_ids, $tmp_t); } - function check_for_update($link, $brief_fmt = true) { + function check_for_update($link) { $releases_feed = "http://tt-rss.org/releases.rss"; if (!CHECK_FOR_NEW_VERSION || $_SESSION["access_level"] < 10) { @@ -3753,18 +3753,11 @@ } if (version_compare(VERSION, $latest_version) == -1) { - if ($brief_fmt) { - return format_notice(" - New version of Tiny-Tiny RSS ($latest_version) is available (click for details) -
$content
"); - } else { - return "New version of Tiny-Tiny RSS ($latest_version) is available: -
$content
- Visit official site for - download and update information."; - } - - } + return sprintf("New version of Tiny-Tiny RSS (%s) is available:", + $latest_version)."
$content
"; + } else { + return false; + } } } diff --git a/images/new_version.png b/images/new_version.png index 769369066d45d9007fbfe312e92d811c7ca8a47b..3956089b510c8e6d5af16ce048e263b24f9f4dfb 100644 GIT binary patch literal 625 zcmV-%0*?KOP)4Tx0C)kdl08eqKp4mWiHJqi#ri@)$RJvwO0^&g zBGe2jIz%Z{-O?ncg_?%se8bsIL~s)aU%*L39K^97KnD>7K@`7%P;e26&*hK`3N9Yp z<#+#kUh>>?fLzvHw*cXF zBFc9EYtQpm5Q`38+(dr!_@*^@ln{`jq(yDPan3oxBb-;6%g9FKY~*#5m?jclW>zKM zA#Sn-A8^hIKIgn**xa{FoOH~BL;OlSWLmxf$UGM_T#szzed11DKYeMiDPXh%sJX6c z3qEjq03Mu z*zn;$1F3*iO(6A5xGceE7*15h+!QvgzgE)Lg(E&)=E43Onn zU=kGp0*o*=vI1mrm^|Djm;f;}{WQV-gzPMA{y>&zMD{eY1U@zZvz{)$b*JuvV*iCq w-^E_3#~%LI6?VHR$C_>S;`8VC7I7Oe+*!o#Y*SP`2WSg}r>mdKI;Vst0N##ja{vGU diff --git a/modules/popup-dialog.php b/modules/popup-dialog.php index d6ed6885..465d3bcd 100644 --- a/modules/popup-dialog.php +++ b/modules/popup-dialog.php @@ -8,10 +8,10 @@ print "
".__('Notice')."
"; print "
"; + print "
"; + if ($param == 1) { - print __("Update daemon is enabled in configuration, but daemon - process is not running, which prevents all feeds from updating. Please - start the daemon process or contact instance owner."); + print __("Update daemon is enabled in configuration, but daemon process is not running, which prevents all feeds from updating. Please start the daemon process or contact instance owner."); $stamp = (int)read_stampfile("update_daemon.stamp"); @@ -20,11 +20,10 @@ } if ($param == 2) { - $msg = check_for_update($link, false); + $msg = check_for_update($link); if (!$msg) { - print __("You are running the latest version of Tiny Tiny RSS. The - fact that you are seeing this dialog is probably a bug."); + print __("You are running the latest version of Tiny Tiny RSS. The fact that you are seeing this dialog is probably a bug."); } else { print $msg; } @@ -32,10 +31,7 @@ } if ($param == 3) { - print __("TT-RSS has detected that update daemon is taking too long to - perform a feed update. This could indicate a problem like crash - or a hang. Please check the daemon process or contact instance - owner."); + print __("Update daemon is taking too long to perform a feed update. This could indicate a problem like crash or a hang. Please check the daemon process or contact instance owner."); $stamp = (int)read_stampfile("update_daemon.stamp"); @@ -44,14 +40,18 @@ } print "
"; - + print "
"; + print " "; + print ""; - print "
"; + print "
"; return; } diff --git a/modules/pref-prefs.php b/modules/pref-prefs.php index 80a63cb9..a09c7f20 100644 --- a/modules/pref-prefs.php +++ b/modules/pref-prefs.php @@ -186,8 +186,6 @@ } else { -// print check_for_update($link); - set_pref($link, "_PREFS_ACTIVE_TAB", "genConfig"); if (!SINGLE_USER_MODE) { diff --git a/tt-rss.css b/tt-rss.css index 137ea892..9ecc3880 100644 --- a/tt-rss.css +++ b/tt-rss.css @@ -1156,6 +1156,13 @@ div.tagCloudContainer { text-align : center; } +div.errorExplained { + border : 1px solid #99d67a; + background-color : white; + margin : 5px 0px 5px 0px; + padding : 5px; +} + ul.feedErrorsList { height : 300px; overflow : auto; @@ -1728,6 +1735,7 @@ a.feedUpdErrLink { #newVersionIcon { vertical-align : middle; cursor : pointer; + margin-left : 10px; } a.helpLinkPic { diff --git a/tt-rss.js b/tt-rss.js index 37b6a47b..1717cfbe 100644 --- a/tt-rss.js +++ b/tt-rss.js @@ -1419,4 +1419,6 @@ function addLabel() { } } - +function visitOfficialSite() { + window.open("http://tt-rss.org/"); +} diff --git a/tt-rss.php b/tt-rss.php index f01723f3..f56c1431 100644 --- a/tt-rss.php +++ b/tt-rss.php @@ -108,6 +108,7 @@ window.onload = init; -- 2.39.5