From: Andrew Dolgov Date: Sun, 27 Nov 2005 10:56:53 +0000 (+0100) Subject: label help uses infoboxes, real help system X-Git-Tag: schema_feature_freeze_for_1.1~70 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=01c9c74ab7a1a961d38dfe8201fcb0b17d795ae8;p=tt-rss.git label help uses infoboxes, real help system --- diff --git a/backend.php b/backend.php index 1ffa4086..567bbf7b 100644 --- a/backend.php +++ b/backend.php @@ -1939,7 +1939,7 @@ print " SelectSQL expression - (?) + (?) Caption"; @@ -2044,53 +2044,34 @@ } if ($op == "help") { - print " - Tiny Tiny RSS : Help - - - - "; + if (!$_GET["noheaders"]) { + print " + Tiny Tiny RSS : Help + + + + "; + } $tid = sprintf("%d", $_GET["tid"]); - /* FIXME this badly needs real implementation */ - - print "
"; - - ?> - -

Help for SQL expressions

- -

Description

- -

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.

- -

Examples

- -
unread = true
- - Matches all unread articles - -
title like '%Linux%'
- - Matches all articles which mention Linux in the title. You get the idea. + print "
"; -

See the database schema included in the distribution package for gruesome - details.

+ if (file_exists("help/$tid.php")) { + include("help/$tid.php"); + } else { + print "

Help topic not found.

"; + } - "; print "
- (Close this window)
"; - - print "
"; +
"; - print ""; + if (!$_GET["noheaders"]) { + print ""; + } } diff --git a/help/1.php b/help/1.php new file mode 100644 index 00000000..b6174812 --- /dev/null +++ b/help/1.php @@ -0,0 +1,23 @@ +

Help for SQL expressions

+ +

Description

+ +

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.

+ +

Examples

+ +

Match all unread articles:

+ +
unread = true
+ +

Matches all articles which mention Linux in the title:

+ +
title like '%Linux%'
+ +

See the database schema included in the distribution package for gruesome +details.

+ diff --git a/prefs.js b/prefs.js index b69369ba..5c699f23 100644 --- a/prefs.js +++ b/prefs.js @@ -695,6 +695,16 @@ function labelTest() { } +function displayHelpInfobox(topic_id) { + + xmlhttp.open("GET", "backend.php?op=help&tid=" + + param_escape(topic_id) + "&noheaders=1", true); + + xmlhttp.onreadystatechange=infobox_callback; + xmlhttp.send(null); + +} + function labelEditCancel() { if (!xmlhttp_ready(xmlhttp)) { diff --git a/tt-rss.css b/tt-rss.css index f6f3ae6c..d7c90573 100644 --- a/tt-rss.css +++ b/tt-rss.css @@ -534,6 +534,7 @@ pre { border : 1px solid #c0c0c0; padding : 5px; background : #f0f0f0; + margin : 5px 10px 5px 10px; } input.extSearch {