]>
Commit | Line | Data |
---|---|---|
611efae7 AD |
1 | <?php |
2 | class Backend extends Handler { | |
611efae7 AD |
3 | function loading() { |
4 | header("Content-type: text/html"); | |
5 | print __("Loading, please wait...") . " " . | |
6 | "<img src='images/indicator_tiny.gif'>"; | |
7 | } | |
4f09f594 | 8 | |
8437c066 AD |
9 | function digestTest() { |
10 | header("Content-type: text/html"); | |
11 | ||
f1611683 AD |
12 | require_once "digest.php"; |
13 | ||
8437c066 AD |
14 | $rv = prepare_headlines_digest($this->link, $_SESSION['uid'], 1, 1000); |
15 | ||
16 | $rv[3] = "<pre>" . $rv[3] . "</pre>"; | |
17 | ||
18 | print_r($rv); | |
4f09f594 AD |
19 | } |
20 | ||
b8cb4d08 AD |
21 | private function display_main_help() { |
22 | $info = get_hotkeys_info($this->link); | |
23 | $imap = get_hotkeys_map($this->link); | |
24 | $omap = array(); | |
25 | ||
b8cb4d08 | 26 | foreach ($imap[1] as $sequence => $action) { |
c2e4e8fe AD |
27 | if (!isset($omap[$action])) $omap[$action] = array(); |
28 | ||
29 | array_push($omap[$action], $sequence); | |
b8cb4d08 AD |
30 | } |
31 | ||
32 | print "<ul class='helpKbList' id='helpKbList'>"; | |
33 | ||
34 | print "<h2>" . __("Keyboard Shortcuts") . "</h2>"; | |
35 | ||
36 | foreach ($info as $section => $hotkeys) { | |
37 | ||
38 | print "<li><h3>" . $section . "</h3></li>"; | |
39 | ||
40 | foreach ($hotkeys as $action => $description) { | |
e5e2cf3b | 41 | |
7d272e5c AD |
42 | if (is_array($omap[$action])) { |
43 | foreach ($omap[$action] as $sequence) { | |
44 | if (strpos($sequence, "|") !== FALSE) { | |
45 | $sequence = substr($sequence, | |
46 | strpos($sequence, "|")+1, | |
47 | strlen($sequence)); | |
48 | } | |
49 | ||
50 | print "<li>"; | |
51 | print "<span class='hksequence'>$sequence</span>"; | |
52 | print $description; | |
53 | print "</li>"; | |
c2e4e8fe | 54 | } |
c2e4e8fe AD |
55 | } |
56 | } | |
b8cb4d08 AD |
57 | } |
58 | ||
59 | print "</ul>"; | |
60 | ||
61 | print "<p><a target=\"_blank\" href=\"http://tt-rss.org/wiki/InterfaceTips\">". | |
62 | __("Other interface tips are available in the Tiny Tiny RSS wiki.") . | |
63 | "</a></p>"; | |
64 | } | |
65 | ||
4f09f594 | 66 | function help() { |
66be620a | 67 | $topic = basename($_REQUEST["topic"]); |
4f09f594 | 68 | |
b8cb4d08 AD |
69 | switch ($topic) { |
70 | case "main": | |
71 | $this->display_main_help(); | |
72 | break; | |
73 | case "prefs": | |
74 | //$this->display_prefs_help(); | |
75 | break; | |
76 | default: | |
77 | print "<p>".__("Help topic not found.")."</p>"; | |
78 | } | |
79 | ||
80 | print "<div align='center'>"; | |
81 | print "<button dojoType=\"dijit.form.Button\" | |
82 | onclick=\"return dijit.byId('helpDlg').hide()\">". | |
83 | __('Close this window')."</button>"; | |
84 | print "</div>"; | |
85 | ||
86 | /* if (file_exists("help/$topic.php")) { | |
66be620a | 87 | include("help/$topic.php"); |
4f09f594 AD |
88 | } else { |
89 | print "<p>".__("Help topic not found.")."</p>"; | |
b8cb4d08 | 90 | } */ |
66be620a | 91 | /* print "<div align='center'> |
4f09f594 | 92 | <button onclick=\"javascript:window.close()\">". |
66be620a | 93 | __('Close this window')."</button></div>"; */ |
4f09f594 AD |
94 | |
95 | } | |
611efae7 AD |
96 | } |
97 | ?> |