diff options
author | Andrew Dolgov <[email protected]> | 2005-11-27 11:56:53 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2005-11-27 11:56:53 +0100 |
commit | 01c9c74ab7a1a961d38dfe8201fcb0b17d795ae8 (patch) | |
tree | 9260eb79bb2f2e7f57788679007034a2f286beea /backend.php | |
parent | 76332f3c90a276f8ffb20a5f55d573542c85700f (diff) |
label help uses infoboxes, real help system
Diffstat (limited to 'backend.php')
-rw-r--r-- | backend.php | 61 |
1 files changed, 21 insertions, 40 deletions
diff --git a/backend.php b/backend.php index 1ffa40863..567bbf7ba 100644 --- a/backend.php +++ b/backend.php @@ -1939,7 +1939,7 @@ print "<tr class=\"title\"> <td width=\"5%\">Select</td><td width=\"40%\">SQL expression - <a class=\"helpLink\" href=\"javascript:popupHelp(1)\">(?)</a> + <a class=\"helpLink\" href=\"javascript:displayHelpInfobox(1)\">(?)</a> </td> <td width=\"40%\">Caption</td></tr>"; @@ -2044,53 +2044,34 @@ } if ($op == "help") { - print "<html><head> - <title>Tiny Tiny RSS : Help</title> - <link rel=\"stylesheet\" href=\"tt-rss.css\" type=\"text/css\"> - <script type=\"text/javascript\" src=\"functions.js\"></script> - <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"> - </head><body>"; + if (!$_GET["noheaders"]) { + print "<html><head> + <title>Tiny Tiny RSS : Help</title> + <link rel=\"stylesheet\" href=\"tt-rss.css\" type=\"text/css\"> + <script type=\"text/javascript\" src=\"functions.js\"></script> + <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"> + </head><body>"; + } $tid = sprintf("%d", $_GET["tid"]); - /* FIXME this badly needs real implementation */ - - print "<div class='helpResponse'>"; - - ?> - - <h1>Help for SQL expressions</h1> - - <h2>Description</h2> - - <p>The «SQL expression» is added to WHERE clause of - view feed query. You can match on ttrss_entries table fields - and even use subselect to query additional information. This - functionality is considered to be advanced and requires basic - understanding of SQL.</p> - - <h2>Examples</h2> - - <pre>unread = true</pre> - - Matches all unread articles - - <pre>title like '%Linux%'</pre> - - Matches all articles which mention Linux in the title. You get the idea. + print "<div class='infoBoxContents'>"; - <p>See the database schema included in the distribution package for gruesome - details.</p> + if (file_exists("help/$tid.php")) { + include("help/$tid.php"); + } else { + print "<p>Help topic not found.</p>"; + } - <? + print "</div>"; print "<div align='center'> - <a class=\"helpLink\" - href=\"javascript:window.close()\">(Close this window)</a></div>"; - - print "</div>"; + <input type='submit' class='button' + onclick=\"closeInfoBox()\" value=\"Close this window\"></div>"; - print "</body></html>"; + if (!$_GET["noheaders"]) { + print "</body></html>"; + } } |