Skip to content
Newer
Older
100644 626 lines (495 sloc) 20.8 KB
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
1 <?php
619e67e Added phpDoc comments to the start of every PHP file, replacing the e…
Anatoly authored Oct 21, 2008
2 /**
81238cd extern.php: Added missing forum_html_encode call. Removed the 15 feed…
Roman authored Oct 24, 2008
3 * External syndication script
619e67e Added phpDoc comments to the start of every PHP file, replacing the e…
Anatoly authored Oct 21, 2008
4 *
81238cd extern.php: Added missing forum_html_encode call. Removed the 15 feed…
Roman authored Oct 24, 2008
5 * Allows forum content to be syndicated outside of the site in various formats
6 * (ie: RSS, Atom, XML, HTML).
619e67e Added phpDoc comments to the start of every PHP file, replacing the e…
Anatoly authored Oct 21, 2008
7 *
e2caa53 @dimkalinux Update copyright.
dimkalinux authored Jan 2, 2012
8 * @copyright (C) 2008-2012 PunBB, partially based on code (C) 2008-2009 FluxBB.org
619e67e Added phpDoc comments to the start of every PHP file, replacing the e…
Anatoly authored Oct 21, 2008
9 * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
10 * @package PunBB
11 */
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
12
619e67e Added phpDoc comments to the start of every PHP file, replacing the e…
Anatoly authored Oct 21, 2008
13 /***********************************************************************
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
14
d537dde @Shutnik Fix code style: remove unneeded spaces
Shutnik authored Jan 11, 2012
15 INSTRUCTIONS
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
16
d537dde @Shutnik Fix code style: remove unneeded spaces
Shutnik authored Jan 10, 2012
17 This script is used to include information about your board from
18 pages outside the forums and to syndicate news about recent
19 discussions via RSS/Atom/XML. The script can display a list of
20 recent discussions, a list of active users or a collection of
21 general board statistics. The script can be called directly via
22 an URL, from a PHP include command or through the use of Server
23 Side Includes (SSI).
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
24
d537dde @Shutnik Fix code style: remove unneeded spaces
Shutnik authored Jan 10, 2012
25 The scripts behaviour is controlled via variables supplied in the
26 URL to the script. The different variables are: action (what to
27 do), show (how many items to display), fid (the ID or ID's of
28 the forum(s) to poll for topics), nfid (the ID or ID's of forums
29 that should be excluded), tid (the ID of the topic from which to
30 display posts) and type (output as HTML or RSS). The only
31 mandatory variable is action. Possible/default values are:
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
32
d537dde @Shutnik Fix code style: remove unneeded spaces
Shutnik authored Jan 10, 2012
33 action: feed - show most recent topics/posts (HTML or RSS)
34 online - show users online (HTML)
35 online_full - as above, but includes a full list (HTML)
36 stats - show board statistics (HTML)
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
37
d537dde @Shutnik Fix code style: remove unneeded spaces
Shutnik authored Jan 10, 2012
38 type: rss - output as RSS 2.0
39 atom - output as Atom 1.0
40 xml - output as XML
41 html - output as HTML (<li>'s)
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
42
d537dde @Shutnik Fix code style: remove unneeded spaces
Shutnik authored Jan 10, 2012
43 fid: One or more forum ID's (comma-separated). If ignored,
44 topics from all readable forums will be pulled.
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
45
d537dde @Shutnik Fix code style: remove unneeded spaces
Shutnik authored Jan 10, 2012
46 nfid: One or more forum ID's (comma-separated) that are to be
47 excluded. E.g. the ID of a a test forum.
e14c95e @dimkalinux extern.php: add sort parameter for change topics order
dimkalinux authored Jun 27, 2011
48
d537dde @Shutnik Fix code style: remove unneeded spaces
Shutnik authored Jan 10, 2012
49 tid: A topic ID from which to show posts. If a tid is supplied,
50 fid and nfid are ignored.
e14c95e @dimkalinux extern.php: add sort parameter for change topics order
dimkalinux authored Jun 27, 2011
51
d537dde @Shutnik Fix code style: remove unneeded spaces
Shutnik authored Jan 10, 2012
52 show: Any integer value between 1 and 50. The default is 15.
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
53
d537dde @Shutnik Fix code style: remove unneeded spaces
Shutnik authored Jan 10, 2012
54 sort: posted - sort topics by posted time (default)
55 last_post - sort topics by last post
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
56
57 /***********************************************************************/
58
59 define('FORUM_QUIET_VISIT', 1);
60
61 if (!defined('FORUM_ROOT'))
62 define('FORUM_ROOT', './');
63 require FORUM_ROOT.'include/common.php';
64
65 ($hook = get_hook('ex_start')) ? eval($hook) : null;
66
67 // The length at which topic subjects will be truncated (for HTML output)
68 if (!defined('FORUM_EXTERN_MAX_SUBJECT_LENGTH'))
d537dde @Shutnik Fix code style: remove unneeded spaces
Shutnik authored Jan 10, 2012
69 define('FORUM_EXTERN_MAX_SUBJECT_LENGTH', 30);
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
70
71 // If we're a guest and we've sent a username/pass, we can try to authenticate using those details
72 if ($forum_user['is_guest'] && isset($_SERVER['PHP_AUTH_USER']))
73 authenticate_user($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']);
74
75 if ($forum_user['g_read_board'] == '0')
76 {
77 http_authenticate_user();
78 exit($lang_common['No view']);
79 }
80
81238cd extern.php: Added missing forum_html_encode call. Removed the 15 feed…
Roman authored Oct 24, 2008
81 $action = isset($_GET['action']) ? $_GET['action'] : 'feed';
e14c95e @dimkalinux extern.php: add sort parameter for change topics order
dimkalinux authored Jun 27, 2011
82 $sort_by = isset($_GET['sort']) ? $_GET['sort'] : 'posted';
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
83
84 //
85 // Sends the proper headers for Basic HTTP Authentication
86 //
87 function http_authenticate_user()
88 {
89 global $forum_config, $forum_user;
90
91 if (!$forum_user['is_guest'])
92 return;
93
94 header('WWW-Authenticate: Basic realm="'.$forum_config['o_board_title'].' External Syndication"');
95 header('HTTP/1.0 401 Unauthorized');
96 }
97
98
99 //
100 // Output $feed as RSS 2.0
101 //
102 function output_rss($feed)
103 {
104 global $lang_common, $forum_config;
105
106 // Send XML/no cache headers
107 header('Content-Type: text/xml; charset=utf-8');
108 header('Expires: '.gmdate('D, d M Y H:i:s').' GMT');
109 header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
110 header('Pragma: public');
111
55d99fc extern.php: changed EOL style in generated output ('\r\n' -> '\n'), a…
Roman authored Oct 24, 2008
112 echo '<?xml version="1.0" encoding="utf-8"?>'."\n";
4838013 @dimkalinux Make RSS feed more validate - fix #issue/4
dimkalinux authored Mar 25, 2011
113 echo '<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">'."\n";
55d99fc extern.php: changed EOL style in generated output ('\r\n' -> '\n'), a…
Roman authored Oct 24, 2008
114 echo "\t".'<channel>'."\n";
115 echo "\t\t".'<title><![CDATA['.escape_cdata($feed['title']).']]></title>'."\n";
116 echo "\t\t".'<link>'.$feed['link'].'</link>'."\n";
4838013 @dimkalinux Make RSS feed more validate - fix #issue/4
dimkalinux authored Mar 25, 2011
117 echo "\t\t".'<atom:link href="'.forum_htmlencode(get_current_url()).'" rel="self" type="application/rss+xml" />'."\n";
55d99fc extern.php: changed EOL style in generated output ('\r\n' -> '\n'), a…
Roman authored Oct 24, 2008
118 echo "\t\t".'<description><![CDATA['.escape_cdata($feed['description']).']]></description>'."\n";
119 echo "\t\t".'<lastBuildDate>'.gmdate('r', count($feed['items']) ? $feed['items'][0]['pubdate'] : time()).'</lastBuildDate>'."\n";
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
120
121 if ($forum_config['o_show_version'] == '1')
55d99fc extern.php: changed EOL style in generated output ('\r\n' -> '\n'), a…
Roman authored Oct 24, 2008
122 echo "\t\t".'<generator>PunBB '.$forum_config['o_cur_version'].'</generator>'."\n";
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
123 else
55d99fc extern.php: changed EOL style in generated output ('\r\n' -> '\n'), a…
Roman authored Oct 24, 2008
124 echo "\t\t".'<generator>PunBB</generator>'."\n";
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
125
c22a0aa Various changes. Imported from FluxBB.
Roman authored Mar 18, 2009
126 ($hook = get_hook('ex_add_new_rss_info')) ? eval($hook) : null;
81238cd extern.php: Added missing forum_html_encode call. Removed the 15 feed…
Roman authored Oct 24, 2008
127
c22a0aa Various changes. Imported from FluxBB.
Roman authored Mar 18, 2009
128 foreach ($feed['items'] as $item)
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
129 {
55d99fc extern.php: changed EOL style in generated output ('\r\n' -> '\n'), a…
Roman authored Oct 24, 2008
130 echo "\t\t".'<item>'."\n";
131 echo "\t\t\t".'<title><![CDATA['.escape_cdata($item['title']).']]></title>'."\n";
132 echo "\t\t\t".'<link>'.$item['link'].'</link>'."\n";
133 echo "\t\t\t".'<description><![CDATA['.escape_cdata($item['description']).']]></description>'."\n";
3d0df66 Changed quest e-mail from dummy@example.com to null@example.com in ex…
Roman authored Apr 29, 2010
134 echo "\t\t\t".'<author><![CDATA['.(isset($item['author']['email']) ? escape_cdata($item['author']['email']) : 'null@example.com').' ('.escape_cdata($item['author']['name']).')]]></author>'."\n";
55d99fc extern.php: changed EOL style in generated output ('\r\n' -> '\n'), a…
Roman authored Oct 24, 2008
135 echo "\t\t\t".'<pubDate>'.gmdate('r', $item['pubdate']).'</pubDate>'."\n";
136 echo "\t\t\t".'<guid>'.$item['link'].'</guid>'."\n";
137
c22a0aa Various changes. Imported from FluxBB.
Roman authored Mar 18, 2009
138 ($hook = get_hook('ex_add_new_rss_item_info')) ? eval($hook) : null;
139
55d99fc extern.php: changed EOL style in generated output ('\r\n' -> '\n'), a…
Roman authored Oct 24, 2008
140 echo "\t\t".'</item>'."\n";
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
141 }
142
55d99fc extern.php: changed EOL style in generated output ('\r\n' -> '\n'), a…
Roman authored Oct 24, 2008
143 echo "\t".'</channel>'."\n";
144 echo '</rss>'."\n";
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
145 }
146
147
148 //
149 // Output $feed as Atom 1.0
150 //
151 function output_atom($feed)
152 {
153 global $lang_common, $forum_config;
154
155 // Send XML/no cache headers
156 header('Content-Type: text/xml; charset=utf-8');
157 header('Expires: '.gmdate('D, d M Y H:i:s').' GMT');
158 header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
159 header('Pragma: public');
160
55d99fc extern.php: changed EOL style in generated output ('\r\n' -> '\n'), a…
Roman authored Oct 24, 2008
161 echo '<?xml version="1.0" encoding="utf-8"?>'."\n";
162 echo '<feed xmlns="http://www.w3.org/2005/Atom">'."\n";
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
163
55d99fc extern.php: changed EOL style in generated output ('\r\n' -> '\n'), a…
Roman authored Oct 24, 2008
164 echo "\t".'<title type="html"><![CDATA['.escape_cdata($feed['title']).']]></title>'."\n";
c4bb7b6 @Shutnik Fix code style: use space before closing single tags
Shutnik authored Jan 11, 2012
165 echo "\t".'<link rel="self" href="'.forum_htmlencode(get_current_url()).'" />'."\n";
55d99fc extern.php: changed EOL style in generated output ('\r\n' -> '\n'), a…
Roman authored Oct 24, 2008
166 echo "\t".'<updated>'.gmdate('Y-m-d\TH:i:s\Z', count($feed['items']) ? $feed['items'][0]['pubdate'] : time()).'</updated>'."\n";
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
167
168 if ($forum_config['o_show_version'] == '1')
55d99fc extern.php: changed EOL style in generated output ('\r\n' -> '\n'), a…
Roman authored Oct 24, 2008
169 echo "\t".'<generator version="'.$forum_config['o_cur_version'].'">PunBB</generator>'."\n";
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
170 else
55d99fc extern.php: changed EOL style in generated output ('\r\n' -> '\n'), a…
Roman authored Oct 24, 2008
171 echo "\t".'<generator>PunBB</generator>'."\n";
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
172
c22a0aa Various changes. Imported from FluxBB.
Roman authored Mar 18, 2009
173 ($hook = get_hook('ex_add_new_atom_info')) ? eval($hook) : null;
174
55d99fc extern.php: changed EOL style in generated output ('\r\n' -> '\n'), a…
Roman authored Oct 24, 2008
175 echo "\t".'<id>'.$feed['link'].'</id>'."\n";
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
176
177 $content_tag = ($feed['type'] == 'posts') ? 'content' : 'summary';
178
81238cd extern.php: Added missing forum_html_encode call. Removed the 15 feed…
Roman authored Oct 24, 2008
179 foreach ($feed['items'] as $item)
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
180 {
55d99fc extern.php: changed EOL style in generated output ('\r\n' -> '\n'), a…
Roman authored Oct 24, 2008
181 echo "\t\t".'<entry>'."\n";
182 echo "\t\t\t".'<title type="html"><![CDATA['.escape_cdata($item['title']).']]></title>'."\n";
c4bb7b6 @Shutnik Fix code style: use space before closing single tags
Shutnik authored Jan 10, 2012
183 echo "\t\t\t".'<link rel="alternate" href="'.$item['link'].'" />'."\n";
55d99fc extern.php: changed EOL style in generated output ('\r\n' -> '\n'), a…
Roman authored Oct 24, 2008
184 echo "\t\t\t".'<'.$content_tag.' type="html"><![CDATA['.escape_cdata($item['description']).']]></'.$content_tag.'>'."\n";
185 echo "\t\t\t".'<author>'."\n";
186 echo "\t\t\t\t".'<name><![CDATA['.escape_cdata($item['author']['name']).']]></name>'."\n";
187
188 if (isset($item['author']['email']))
189 echo "\t\t\t\t".'<email><![CDATA['.escape_cdata($item['author']['email']).']]></email>'."\n";
190
191 if (isset($item['author']['uri']))
192 echo "\t\t\t\t".'<uri>'.$item['author']['uri'].'</uri>'."\n";
193
194 echo "\t\t\t".'</author>'."\n";
195 echo "\t\t\t".'<updated>'.gmdate('Y-m-d\TH:i:s\Z', $item['pubdate']).'</updated>'."\n";
196
c22a0aa Various changes. Imported from FluxBB.
Roman authored Mar 18, 2009
197 ($hook = get_hook('ex_add_new_atom_item_info')) ? eval($hook) : null;
198
55d99fc extern.php: changed EOL style in generated output ('\r\n' -> '\n'), a…
Roman authored Oct 24, 2008
199 echo "\t\t\t".'<id>'.$item['link'].'</id>'."\n";
200 echo "\t\t".'</entry>'."\n";
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
201 }
202
55d99fc extern.php: changed EOL style in generated output ('\r\n' -> '\n'), a…
Roman authored Oct 24, 2008
203 echo '</feed>'."\n";
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
204 }
205
206
207 //
208 // Output $feed as XML
209 //
210 function output_xml($feed)
211 {
212 global $lang_common, $forum_config;
213
214 // Send XML/no cache headers
cd730f7 Changed XML type to application/xml.
Garciat authored Dec 24, 2008
215 header('Content-Type: application/xml; charset=utf-8');
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
216 header('Expires: '.gmdate('D, d M Y H:i:s').' GMT');
217 header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
218 header('Pragma: public');
219
55d99fc extern.php: changed EOL style in generated output ('\r\n' -> '\n'), a…
Roman authored Oct 24, 2008
220 echo '<?xml version="1.0" encoding="utf-8"?>'."\n";
221 echo '<source>'."\n";
222 echo "\t".'<url>'.$feed['link'].'</url>'."\n";
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
223
c22a0aa Various changes. Imported from FluxBB.
Roman authored Mar 18, 2009
224 ($hook = get_hook('ex_add_new_xml_info')) ? eval($hook) : null;
225
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
226 $forum_tag = ($feed['type'] == 'posts') ? 'post' : 'topic';
227
81238cd extern.php: Added missing forum_html_encode call. Removed the 15 feed…
Roman authored Oct 24, 2008
228 foreach ($feed['items'] as $item)
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
229 {
55d99fc extern.php: changed EOL style in generated output ('\r\n' -> '\n'), a…
Roman authored Oct 24, 2008
230 echo "\t".'<'.$forum_tag.' id="'.$item['id'].'">'."\n";
231
232 echo "\t\t".'<title><![CDATA['.escape_cdata($item['title']).']]></title>'."\n";
233 echo "\t\t".'<link>'.$item['link'].'</link>'."\n";
234 echo "\t\t".'<content><![CDATA['.escape_cdata($item['description']).']]></content>'."\n";
235 echo "\t\t".'<author>'."\n";
236 echo "\t\t\t".'<name><![CDATA['.escape_cdata($item['author']['name']).']]></name>'."\n";
237
238 if (isset($item['author']['email']))
239 echo "\t\t\t".'<email><![CDATA['.escape_cdata($item['author']['email']).']]></email>'."\n";
240
241 if (isset($item['author']['uri']))
242 echo "\t\t\t".'<uri>'.$item['author']['uri'].'</uri>'."\n";
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
243
55d99fc extern.php: changed EOL style in generated output ('\r\n' -> '\n'), a…
Roman authored Oct 24, 2008
244 echo "\t\t".'</author>'."\n";
245 echo "\t\t".'<posted>'.gmdate('r', $item['pubdate']).'</posted>'."\n";
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
246
c22a0aa Various changes. Imported from FluxBB.
Roman authored Mar 18, 2009
247 ($hook = get_hook('ex_add_new_xml_item_info')) ? eval($hook) : null;
248
55d99fc extern.php: changed EOL style in generated output ('\r\n' -> '\n'), a…
Roman authored Oct 24, 2008
249 echo "\t".'</'.$forum_tag.'>'."\n";
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
250 }
251
55d99fc extern.php: changed EOL style in generated output ('\r\n' -> '\n'), a…
Roman authored Oct 24, 2008
252 echo '</source>'."\n";
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
253 }
254
255
256 //
257 // Output $feed as HTML (using <li> tags)
258 //
259 function output_html($feed)
260 {
261
81238cd extern.php: Added missing forum_html_encode call. Removed the 15 feed…
Roman authored Oct 24, 2008
262 // Send the Content-type header in case the web server is setup to send something else
263 header('Content-type: text/html; charset=utf-8');
c22a0aa Various changes. Imported from FluxBB.
Roman authored Mar 18, 2009
264 header('Expires: '.gmdate('D, d M Y H:i:s').' GMT');
265 header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
266 header('Pragma: public');
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
267
81238cd extern.php: Added missing forum_html_encode call. Removed the 15 feed…
Roman authored Oct 24, 2008
268 foreach ($feed['items'] as $item)
269 {
270 if (utf8_strlen($item['title']) > FORUM_EXTERN_MAX_SUBJECT_LENGTH)
a7d00a4 Removed a space before '...' in all strings.
Roman authored Nov 26, 2008
271 $subject_truncated = forum_htmlencode(forum_trim(utf8_substr($item['title'], 0, (FORUM_EXTERN_MAX_SUBJECT_LENGTH - 5)))).'';
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
272 else
81238cd extern.php: Added missing forum_html_encode call. Removed the 15 feed…
Roman authored Oct 24, 2008
273 $subject_truncated = forum_htmlencode($item['title']);
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
274
81238cd extern.php: Added missing forum_html_encode call. Removed the 15 feed…
Roman authored Oct 24, 2008
275 echo '<li><a href="'.$item['link'].'" title="'.forum_htmlencode($item['title']).'">'.$subject_truncated.'</a></li>'."\n";
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
276 }
277 }
278
279 // Show recent discussions
81238cd extern.php: Added missing forum_html_encode call. Removed the 15 feed…
Roman authored Oct 24, 2008
280 if ($action == 'feed')
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
281 {
282 // Determine what type of feed to output
81238cd extern.php: Added missing forum_html_encode call. Removed the 15 feed…
Roman authored Oct 24, 2008
283 $type = isset($_GET['type']) && in_array($_GET['type'], array('html', 'rss', 'atom', 'xml')) ? $_GET['type'] : 'html';
619e67e Added phpDoc comments to the start of every PHP file, replacing the e…
Anatoly authored Oct 21, 2008
284
81238cd extern.php: Added missing forum_html_encode call. Removed the 15 feed…
Roman authored Oct 24, 2008
285 $show = isset($_GET['show']) ? intval($_GET['show']) : 15;
286 if ($show < 1 || $show > 50)
287 $show = 15;
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
288
c22a0aa Various changes. Imported from FluxBB.
Roman authored Mar 18, 2009
289 ($hook = get_hook('ex_set_syndication_type')) ? eval($hook) : null;
290
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
291 // Was a topic ID supplied?
292 if (isset($_GET['tid']))
293 {
294 $tid = intval($_GET['tid']);
295
296 // Fetch topic subject
297 $query = array(
de31fcc Various changes. Imported from FluxBB.
Roman authored Apr 2, 2009
298 'SELECT' => 't.subject, t.first_post_id',
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
299 'FROM' => 'topics AS t',
300 'JOINS' => array(
301 array(
302 'LEFT JOIN' => 'forum_perms AS fp',
303 'ON' => '(fp.forum_id=t.forum_id AND fp.group_id='.$forum_user['g_id'].')'
304 )
305 ),
306 'WHERE' => '(fp.read_forum IS NULL OR fp.read_forum=1) AND t.moved_to IS NULL and t.id='.$tid
307 );
308
309 ($hook = get_hook('ex_qr_get_topic_data')) ? eval($hook) : null;
310 $result = $forum_db->query_build($query) or error(__FILE__, __LINE__);
c926ce5 @dimkalinux Remove num_rows from extern.php
dimkalinux authored Mar 22, 2011
311
312 $cur_topic = $forum_db->fetch_assoc($result);
313 if (!$cur_topic)
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
314 {
315 http_authenticate_user();
316 exit($lang_common['Bad request']);
317 }
318
2faad3c Added parser call before output messages to the feeds.
Roman authored Mar 11, 2009
319 if (!defined('FORUM_PARSER_LOADED'))
320 require FORUM_ROOT.'include/parser.php';
321
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
322 if ($forum_config['o_censoring'] == '1')
323 $cur_topic['subject'] = censor_words($cur_topic['subject']);
324
325 // Setup the feed
326 $feed = array(
d537dde @Shutnik Fix code style: remove unneeded spaces
Shutnik authored Jan 10, 2012
327 'title' => $forum_config['o_board_title'].$lang_common['Title separator'].$cur_topic['subject'],
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
328 'link' => forum_link($forum_url['topic'], array($tid, sef_friendly($cur_topic['subject']))),
329 'description' => sprintf($lang_common['RSS description topic'], $cur_topic['subject']),
330 'items' => array(),
331 'type' => 'posts'
332 );
333
81238cd extern.php: Added missing forum_html_encode call. Removed the 15 feed…
Roman authored Oct 24, 2008
334 // Fetch $show posts
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
335 $query = array(
2faad3c Added parser call before output messages to the feeds.
Roman authored Mar 11, 2009
336 'SELECT' => 'p.id, p.poster, p.message, p.hide_smilies, p.posted, p.poster_id, u.email_setting, u.email, p.poster_email',
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
337 'FROM' => 'posts AS p',
55d99fc extern.php: changed EOL style in generated output ('\r\n' -> '\n'), a…
Roman authored Oct 24, 2008
338 'JOINS' => array(
339 array(
340 'INNER JOIN' => 'users AS u',
da1ff9b Started improving of extern.php.
Roman authored Apr 23, 2010
341 'ON' => 'u.id = p.poster_id'
55d99fc extern.php: changed EOL style in generated output ('\r\n' -> '\n'), a…
Roman authored Oct 24, 2008
342 )
343 ),
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
344 'WHERE' => 'p.topic_id='.$tid,
345 'ORDER BY' => 'p.posted DESC',
81238cd extern.php: Added missing forum_html_encode call. Removed the 15 feed…
Roman authored Oct 24, 2008
346 'LIMIT' => $show
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
347 );
348 ($hook = get_hook('ex_qr_get_posts')) ? eval($hook) : null;
349 $result = $forum_db->query_build($query) or error(__FILE__, __LINE__);
da1ff9b Started improving of extern.php.
Roman authored Apr 23, 2010
350
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
351 while ($cur_post = $forum_db->fetch_assoc($result))
352 {
81238cd extern.php: Added missing forum_html_encode call. Removed the 15 feed…
Roman authored Oct 24, 2008
353 if ($forum_config['o_censoring'] == '1')
5aa63c1 extern.php: the message contents is displayed when viewing a forum fe…
Roman authored Oct 24, 2008
354 $cur_post['message'] = censor_words($cur_post['message']);
355
2faad3c Added parser call before output messages to the feeds.
Roman authored Mar 11, 2009
356 $cur_post['message'] = parse_message($cur_post['message'], $cur_post['hide_smilies']);
357
55d99fc extern.php: changed EOL style in generated output ('\r\n' -> '\n'), a…
Roman authored Oct 24, 2008
358 $item = array(
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
359 'id' => $cur_post['id'],
81238cd extern.php: Added missing forum_html_encode call. Removed the 15 feed…
Roman authored Oct 24, 2008
360 'title' => $cur_topic['first_post_id'] == $cur_post['id'] ? $cur_topic['subject'] : $lang_common['RSS reply'].$cur_topic['subject'],
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
361 'link' => forum_link($forum_url['post'], $cur_post['id']),
55d99fc extern.php: changed EOL style in generated output ('\r\n' -> '\n'), a…
Roman authored Oct 24, 2008
362 'description' => $cur_post['message'],
363 'author' => array(
364 'name' => $cur_post['poster'],
365 ),
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
366 'pubdate' => $cur_post['posted']
367 );
368
55d99fc extern.php: changed EOL style in generated output ('\r\n' -> '\n'), a…
Roman authored Oct 24, 2008
369 if ($cur_post['poster_id'] > 1)
370 {
c22a0aa Various changes. Imported from FluxBB.
Roman authored Mar 18, 2009
371 if ($cur_post['email_setting'] == '0' && !$forum_user['is_guest'])
55d99fc extern.php: changed EOL style in generated output ('\r\n' -> '\n'), a…
Roman authored Oct 24, 2008
372 $item['author']['email'] = $cur_post['email'];
373
374 $item['author']['uri'] = forum_link($forum_url['user'], $cur_post['poster_id']);
375 }
c22a0aa Various changes. Imported from FluxBB.
Roman authored Mar 18, 2009
376 else if ($cur_post['poster_email'] != '' && !$forum_user['is_guest'])
55d99fc extern.php: changed EOL style in generated output ('\r\n' -> '\n'), a…
Roman authored Oct 24, 2008
377 $item['author']['email'] = $cur_post['poster_email'];
378
379 $feed['items'][] = $item;
380
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
381 ($hook = get_hook('ex_modify_cur_post_item')) ? eval($hook) : null;
382 }
383
384 ($hook = get_hook('ex_pre_topic_output')) ? eval($hook) : null;
385
386 $output_func = 'output_'.$type;
387 $output_func($feed);
388 }
389 else
390 {
c22a0aa Various changes. Imported from FluxBB.
Roman authored Mar 18, 2009
391 $forum_name = '';
392
2faad3c Added parser call before output messages to the feeds.
Roman authored Mar 11, 2009
393 if (!defined('FORUM_PARSER_LOADED'))
394 require FORUM_ROOT.'include/parser.php';
395
81238cd extern.php: Added missing forum_html_encode call. Removed the 15 feed…
Roman authored Oct 24, 2008
396 // Were any forum ID's supplied?
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
397 if (isset($_GET['fid']) && is_scalar($_GET['fid']) && $_GET['fid'] != '')
398 {
399 $fids = explode(',', forum_trim($_GET['fid']));
400 $fids = array_map('intval', $fids);
401
402 if (!empty($fids))
5aa63c1 extern.php: the message contents is displayed when viewing a forum fe…
Roman authored Oct 24, 2008
403 $forum_sql = ' AND t.forum_id IN('.implode(',', $fids).')';
c22a0aa Various changes. Imported from FluxBB.
Roman authored Mar 18, 2009
404
405 if (count($fids) == 1)
406 {
da1ff9b Started improving of extern.php.
Roman authored Apr 23, 2010
407 // Fetch forum name
408 $query = array(
409 'SELECT' => 'f.forum_name',
410 'FROM' => 'forums AS f',
411 'JOINS' => array(
412 array(
413 'LEFT JOIN' => 'forum_perms AS fp',
414 'ON' => '(fp.forum_id=f.id AND fp.group_id='.$forum_user['g_id'].')'
415 )
416 ),
417 'WHERE' => '(fp.read_forum IS NULL OR fp.read_forum=1) AND f.id='.$fids[0]
418 );
419
420 $result = $forum_db->query_build($query) or error(__FILE__, __LINE__);
c926ce5 @dimkalinux Remove num_rows from extern.php
dimkalinux authored Mar 22, 2011
421 $forum_name_in_db = $forum_db->result($result);
18eedf1 @dimkalinux extern.php: add better checking for $forum_name_in_db result
dimkalinux authored Jul 9, 2011
422 if (!is_null($forum_name_in_db) && $forum_name_in_db !== false)
c926ce5 @dimkalinux Remove num_rows from extern.php
dimkalinux authored Mar 22, 2011
423 $forum_name = $lang_common['Title separator'].$forum_name_in_db;
c22a0aa Various changes. Imported from FluxBB.
Roman authored Mar 18, 2009
424 }
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
425 }
426
427 // Any forum ID's to exclude?
428 if (isset($_GET['nfid']) && is_scalar($_GET['nfid']) && $_GET['nfid'] != '')
429 {
430 $nfids = explode(',', forum_trim($_GET['nfid']));
431 $nfids = array_map('intval', $nfids);
432
433 if (!empty($nfids))
5aa63c1 extern.php: the message contents is displayed when viewing a forum fe…
Roman authored Oct 24, 2008
434 $forum_sql = ' AND t.forum_id NOT IN('.implode(',', $nfids).')';
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
435 }
436
4a00be3 Undid changesets [1645], [1646], [1648], [1649]. Posts RSS feed is to…
Roman authored Apr 27, 2010
437 // Setup the feed
438 $feed = array(
d537dde @Shutnik Fix code style: remove unneeded spaces
Shutnik authored Jan 10, 2012
439 'title' => $forum_config['o_board_title'].$forum_name,
4a00be3 Undid changesets [1645], [1646], [1648], [1649]. Posts RSS feed is to…
Roman authored Apr 27, 2010
440 'link' => forum_link($forum_url['index']),
441 'description' => sprintf($lang_common['RSS description'], $forum_config['o_board_title']),
442 'items' => array(),
443 'type' => 'topics'
444 );
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
445
4a00be3 Undid changesets [1645], [1646], [1648], [1649]. Posts RSS feed is to…
Roman authored Apr 27, 2010
446 // Fetch $show topics
447 $query = array(
448 'SELECT' => 't.id, t.poster, t.posted, t.subject, p.message, p.hide_smilies, u.email_setting, u.email, p.poster_id, p.poster_email',
449 'FROM' => 'topics AS t',
450 'JOINS' => array(
451 array(
452 'INNER JOIN' => 'posts AS p',
453 'ON' => 'p.id = t.first_post_id'
55d99fc extern.php: changed EOL style in generated output ('\r\n' -> '\n'), a…
Roman authored Oct 24, 2008
454 ),
4a00be3 Undid changesets [1645], [1646], [1648], [1649]. Posts RSS feed is to…
Roman authored Apr 27, 2010
455 array(
456 'INNER JOIN' => 'users AS u',
457 'ON' => 'u.id = p.poster_id'
458 ),
459 array(
460 'LEFT JOIN' => 'forum_perms AS fp',
461 'ON' => '(fp.forum_id = t.forum_id AND fp.group_id = '.$forum_user['g_id'].')'
462 )
463 ),
464 'WHERE' => '(fp.read_forum IS NULL OR fp.read_forum = 1) AND t.moved_to IS NULL',
e14c95e @dimkalinux extern.php: add sort parameter for change topics order
dimkalinux authored Jun 27, 2011
465 'ORDER BY' => (($sort_by == 'last_post') ? 't.last_post' : 't.posted').' DESC',
4a00be3 Undid changesets [1645], [1646], [1648], [1649]. Posts RSS feed is to…
Roman authored Apr 27, 2010
466 'LIMIT' => $show
467 );
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
468
4a00be3 Undid changesets [1645], [1646], [1648], [1649]. Posts RSS feed is to…
Roman authored Apr 27, 2010
469 if (isset($forum_sql))
470 $query['WHERE'] .= $forum_sql;
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
471
4a00be3 Undid changesets [1645], [1646], [1648], [1649]. Posts RSS feed is to…
Roman authored Apr 27, 2010
472 ($hook = get_hook('ex_qr_get_topics')) ? eval($hook) : null;
473 $result = $forum_db->query_build($query) or error(__FILE__, __LINE__);
474 while ($cur_topic = $forum_db->fetch_assoc($result))
475 {
476 if ($forum_config['o_censoring'] == '1')
5aa63c1 extern.php: the message contents is displayed when viewing a forum fe…
Roman authored Oct 24, 2008
477 {
4a00be3 Undid changesets [1645], [1646], [1648], [1649]. Posts RSS feed is to…
Roman authored Apr 27, 2010
478 $cur_topic['subject'] = censor_words($cur_topic['subject']);
479 $cur_topic['message'] = censor_words($cur_topic['message']);
5aa63c1 extern.php: the message contents is displayed when viewing a forum fe…
Roman authored Oct 24, 2008
480 }
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
481
4a00be3 Undid changesets [1645], [1646], [1648], [1649]. Posts RSS feed is to…
Roman authored Apr 27, 2010
482 $cur_topic['message'] = parse_message($cur_topic['message'], $cur_topic['hide_smilies']);
483
484 $item = array(
485 'id' => $cur_topic['id'],
486 'title' => $cur_topic['subject'],
487 'link' => forum_link($forum_url['topic_new_posts'], array($cur_topic['id'], sef_friendly($cur_topic['subject']))),
488 'description' => $cur_topic['message'],
489 'author' => array(
490 'name' => $cur_topic['poster']
55d99fc extern.php: changed EOL style in generated output ('\r\n' -> '\n'), a…
Roman authored Oct 24, 2008
491 ),
4a00be3 Undid changesets [1645], [1646], [1648], [1649]. Posts RSS feed is to…
Roman authored Apr 27, 2010
492 'pubdate' => $cur_topic['posted']
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
493 );
494
4a00be3 Undid changesets [1645], [1646], [1648], [1649]. Posts RSS feed is to…
Roman authored Apr 27, 2010
495 if ($cur_topic['poster_id'] > 1)
da1ff9b Started improving of extern.php.
Roman authored Apr 23, 2010
496 {
4a00be3 Undid changesets [1645], [1646], [1648], [1649]. Posts RSS feed is to…
Roman authored Apr 27, 2010
497 if ($cur_topic['email_setting'] == '0' && !$forum_user['is_guest'])
498 $item['author']['email'] = $cur_topic['email'];
da1ff9b Started improving of extern.php.
Roman authored Apr 23, 2010
499
4a00be3 Undid changesets [1645], [1646], [1648], [1649]. Posts RSS feed is to…
Roman authored Apr 27, 2010
500 $item['author']['uri'] = forum_link($forum_url['user'], $cur_topic['poster_id']);
501 }
502 else if ($cur_topic['poster_email'] != '' && !$forum_user['is_guest'])
503 $item['author']['email'] = $cur_topic['poster_email'];
da1ff9b Started improving of extern.php.
Roman authored Apr 23, 2010
504
4a00be3 Undid changesets [1645], [1646], [1648], [1649]. Posts RSS feed is to…
Roman authored Apr 27, 2010
505 $feed['items'][] = $item;
da1ff9b Started improving of extern.php.
Roman authored Apr 23, 2010
506
4a00be3 Undid changesets [1645], [1646], [1648], [1649]. Posts RSS feed is to…
Roman authored Apr 27, 2010
507 ($hook = get_hook('ex_modify_cur_topic_item')) ? eval($hook) : null;
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
508 }
509
510 ($hook = get_hook('ex_pre_forum_output')) ? eval($hook) : null;
511
512 $output_func = 'output_'.$type;
513 $output_func($feed);
514 }
515
81238cd extern.php: Added missing forum_html_encode call. Removed the 15 feed…
Roman authored Oct 24, 2008
516 exit;
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
517 }
518
519 // Show users online
81238cd extern.php: Added missing forum_html_encode call. Removed the 15 feed…
Roman authored Oct 24, 2008
520 else if ($action == 'online' || $action == 'online_full')
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
521 {
522 // Load the index.php language file
523 require FORUM_ROOT.'lang/'.$forum_config['o_default_lang'].'/index.php';
524
525 // Fetch users online info and generate strings for output
526 $num_guests = $num_users = 0;
527 $users = array();
528
529 $query = array(
530 'SELECT' => 'o.user_id, o.ident',
531 'FROM' => 'online AS o',
532 'WHERE' => 'o.idle=0',
533 'ORDER BY' => 'o.ident'
534 );
535
536 ($hook = get_hook('ex_qr_get_users_online')) ? eval($hook) : null;
537 $result = $forum_db->query_build($query) or error(__FILE__, __LINE__);
538 while ($forum_user_online = $forum_db->fetch_assoc($result))
539 {
540 if ($forum_user_online['user_id'] > 1)
541 {
de31fcc Various changes. Imported from FluxBB.
Roman authored Apr 2, 2009
542 $users[] = $forum_user['g_view_users'] == '1' ?'<a href="'.forum_link($forum_url['user'], $forum_user_online['user_id']).'">'.forum_htmlencode($forum_user_online['ident']).'</a>' : forum_htmlencode($forum_user_online['ident']);
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
543 ++$num_users;
544 }
545 else
546 ++$num_guests;
547 }
548
549 ($hook = get_hook('ex_pre_online_output')) ? eval($hook) : null;
c22a0aa Various changes. Imported from FluxBB.
Roman authored Mar 18, 2009
550 // Send the Content-type header in case the web server is setup to send something else
551 header('Content-type: text/html; charset=utf-8');
552 header('Expires: '.gmdate('D, d M Y H:i:s').' GMT');
553 header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
554 header('Pragma: public');
555
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
556
81238cd extern.php: Added missing forum_html_encode call. Removed the 15 feed…
Roman authored Oct 24, 2008
557 echo $lang_index['Guests online'].': '.forum_number_format($num_guests).'<br />'."\n";
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
558
de31fcc Various changes. Imported from FluxBB.
Roman authored Apr 2, 2009
559 if ($_GET['action'] == 'online_full' && !empty($users))
560 echo $lang_index['Users online'].': '.implode($lang_index['Online list separator'], $users).'<br />'."\n";
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
561 else
81238cd extern.php: Added missing forum_html_encode call. Removed the 15 feed…
Roman authored Oct 24, 2008
562 echo $lang_index['Users online'].': '.forum_number_format($num_users).'<br />'."\n";
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
563
81238cd extern.php: Added missing forum_html_encode call. Removed the 15 feed…
Roman authored Oct 24, 2008
564 exit;
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
565 }
566
567 // Show board statistics
81238cd extern.php: Added missing forum_html_encode call. Removed the 15 feed…
Roman authored Oct 24, 2008
568 else if ($action == 'stats')
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
569 {
570 // Load the index.php language file
571 require FORUM_ROOT.'lang/'.$forum_config['o_default_lang'].'/index.php';
572
573 // Collect some statistics from the database
574 $query = array(
9be40fb Changed the registered user count in index.php to not include unverif…
Anatoly authored Oct 30, 2008
575 'SELECT' => 'COUNT(u.id) - 1',
576 'FROM' => 'users AS u',
577 'WHERE' => 'u.group_id != '.FORUM_UNVERIFIED
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
578 );
579
580 ($hook = get_hook('ex_qr_get_user_count')) ? eval($hook) : null;
581 $result = $forum_db->query_build($query) or error(__FILE__, __LINE__);
582 $stats['total_users'] = $forum_db->result($result);
583
584 $query = array(
585 'SELECT' => 'u.id, u.username',
586 'FROM' => 'users AS u',
9be40fb Changed the registered user count in index.php to not include unverif…
Anatoly authored Oct 30, 2008
587 'WHERE' => 'u.group_id != '.FORUM_UNVERIFIED,
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
588 'ORDER BY' => 'u.registered DESC',
589 'LIMIT' => '1'
590 );
591
592 ($hook = get_hook('ex_qr_get_newest_user')) ? eval($hook) : null;
593 $result = $forum_db->query_build($query) or error(__FILE__, __LINE__);
594 $stats['last_user'] = $forum_db->fetch_assoc($result);
595
596 $query = array(
597 'SELECT' => 'SUM(f.num_topics), SUM(f.num_posts)',
598 'FROM' => 'forums AS f'
599 );
600
601 ($hook = get_hook('ex_qr_get_post_stats')) ? eval($hook) : null;
602 $result = $forum_db->query_build($query) or error(__FILE__, __LINE__);
603 list($stats['total_topics'], $stats['total_posts']) = $forum_db->fetch_row($result);
604
c22a0aa Various changes. Imported from FluxBB.
Roman authored Mar 18, 2009
605 // Send the Content-type header in case the web server is setup to send something else
606 header('Content-type: text/html; charset=utf-8');
607 header('Expires: '.gmdate('D, d M Y H:i:s').' GMT');
608 header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
609 header('Pragma: public');
610
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
611 ($hook = get_hook('ex_pre_stats_output')) ? eval($hook) : null;
612
3214abe Fixed logging in in login.php. Based on FluxBB patch.
Anatoly authored Oct 30, 2008
613 echo sprintf($lang_index['No of users'], forum_number_format($stats['total_users'])).'<br />'."\n";
614 echo sprintf($lang_index['Newest user'], '<a href="'.forum_link($forum_url['user'], $stats['last_user']['id']).'">'.forum_htmlencode($stats['last_user']['username']).'</a>').'<br />'."\n";
615 echo sprintf($lang_index['No of topics'], forum_number_format($stats['total_topics'])).'<br />'."\n";
616 echo sprintf($lang_index['No of posts'], forum_number_format($stats['total_posts'])).'<br />'."\n";
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
617
81238cd extern.php: Added missing forum_html_encode call. Removed the 15 feed…
Roman authored Oct 24, 2008
618 exit;
6e6f91e Fixed incorrect EOL in multiple files.
Anatoly authored Oct 16, 2008
619 }
620
621
622 ($hook = get_hook('ex_new_action')) ? eval($hook) : null;
623
624 // If we end up here, the script was called with some wacky parameters
625 exit($lang_common['Bad request']);
Something went wrong with that request. Please try again.