]> git.wh0rd.org - tt-rss.git/commitdiff
enable 4th field in plugin->about() to serve as a more info link
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 27 Mar 2013 14:16:30 +0000 (18:16 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Wed, 27 Mar 2013 14:16:30 +0000 (18:16 +0400)
classes/pref/prefs.php
plugins/example/init.php

index 28a19f72999e7194b825fedf8b325307bef18b49..a5d7300d2350d75bf60b54e9e5446bdd77940658 100644 (file)
@@ -629,7 +629,7 @@ class Pref_Prefs extends Handler_Protected {
 
                print "<h2>".__("Plugins")."</h2>";
 
-               print_notice(__("Download more plugins at <a class=\"visibleLink\" target=\"_blank\" href=\"http://tt-rss.org/forum/viewforum.php?f=22\">Tiny Tiny RSS forums</a>."));
+               print_notice(__("Download more plugins at tt-rss.org <a class=\"visibleLink\" target=\"_blank\" href=\"http://tt-rss.org/forum/viewforum.php?f=22\">forums</a> or <a target=\"_blank\" class=\"visibleLink\" href=\"http://tt-rss.org/wiki/Plugins\">wiki</a>."));
 
                print "<p class='insensitive'>" . __("You will need to reload Tiny Tiny RSS for plugin changes to take effect.") . "</p>";
 
@@ -690,7 +690,12 @@ class Pref_Prefs extends Handler_Protected {
                                                type=\"checkbox\"></td>";
 
                                print "<td>$name</td>";
-                               print "<td>" . htmlspecialchars($about[1]) . "</td>";
+                               print "<td>" . htmlspecialchars($about[1]);
+                               if (@$about[4]) {
+                                       print " &mdash; <a target=\"_blank\" class=\"visibleLink\"
+                                               href=\"".htmlspecialchars($about[4])."\">".__("more info")."</a>";
+                               }
+                               print "</td>";
                                print "<td>" . htmlspecialchars(sprintf("%.2f", $about[0])) . "</td>";
                                print "<td>" . htmlspecialchars($about[2]) . "</td>";
 
@@ -742,7 +747,13 @@ class Pref_Prefs extends Handler_Protected {
                                        type=\"checkbox\"></td>";
 
                                print "<td><label for='FPCHK-$name'>$name</label></td>";
-                               print "<td><label for='FPCHK-$name'>" . htmlspecialchars($about[1]) . "</label></td>";
+                               print "<td><label for='FPCHK-$name'>" . htmlspecialchars($about[1]) . "</label>";
+                               if (@$about[4]) {
+                                       print " &mdash; <a target=\"_blank\" class=\"visibleLink\"
+                                               href=\"".htmlspecialchars($about[4])."\">".__("more info")."</a>";
+                               }
+                               print "</td>";
+
                                print "<td>" . htmlspecialchars(sprintf("%.2f", $about[0])) . "</td>";
                                print "<td>" . htmlspecialchars($about[2]) . "</td>";
 
index 926a57da82b9ed1d6c71d61c3d7f10f44c65c54a..333efd92da7705c8760e3daa033f2adf3834c06b 100644 (file)
@@ -10,7 +10,8 @@ class Example extends Plugin {
                return array(1.0,
                        "Example plugin #1",
                        "fox",
-                       true);
+                       true,
+                       "http://site.com");
        }
 
        function init($host) {