punbb-1.3.2/admin/db_update.php |
punbb-1.3.3/admin/db_update.php |
4: * | 4: * |
5: * Updates the database to the latest version. | 5: * Updates the database to the latest version. |
6: * | 6: * |
7: * @copyright Copyright (C) 2008 PunBB, partially based on code copyright (C) 2008 FluxBB.org | 7: * @copyright (C) 2008-2009 PunBB, partially based on code (C) 2008-2009 FluxBB.org |
8: * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher | 8: * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher |
9: * @package PunBB | 9: * @package PunBB |
10: */ | 10: */ |
11: | 11: |
12: | 12: |
13: define('UPDATE_TO', '1.3.2'); | 13: define('UPDATE_TO', '1.3.3'); |
14: define('UPDATE_TO_DB_REVISION', 3); | 14: define('UPDATE_TO_DB_REVISION', 4); |
15: | 15: |
16: // The number of items to process per pageview (lower this if the update script times out during UTF-8 conversion) | 16: // The number of items to process per pageview (lower this if the update script times out during UTF-8 conversion) |
17: define('PER_PAGE', 300); | 17: define('PER_PAGE', 300); |
39: exit('Cannot find config.php, are you sure it exists?'); | 39: exit('Cannot find config.php, are you sure it exists?'); |
40: | 40: |
41: // Enable debug mode | 41: // Enable debug mode |
42: define('FORUM_DEBUG', 1); | 42: if (!defined('FORUM_DEBUG')) |
| 43: define('FORUM_DEBUG', 1); |
43: | 44: |
44: // Turn on full PHP error reporting | 45: // Turn on full PHP error reporting |
45: error_reporting(E_ALL); | 46: error_reporting(E_ALL); |
284: $seems_utf8 = true; | 285: $seems_utf8 = true; |
285: | 286: |
286: $query = array( | 287: $query = array( |
287: 'SELECT' => 'MIN(id), MAX(id)', | 288: 'SELECT' => 'MIN(id), MAX(id), COUNT(id)', |
288: 'FROM' => 'posts' | 289: 'FROM' => 'posts' |
289: ); | 290: ); |
290: | 291: |
291: $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); | 292: $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); |
292: list($min_id, $max_id) = $forum_db->fetch_row($result); | 293: list($min_id, $max_id, $count_id) = $forum_db->fetch_row($result); |
| 294: |
| 295: if ($count_id == 0) |
| 296: return false; |
293: | 297: |
294: // Get a random soup of data and check if it appears to be UTF-8 | 298: // Get a random soup of data and check if it appears to be UTF-8 |
295: for ($i = 0; $i < 100; ++$i) | 299: for ($i = 0; $i < 100; ++$i) |
416: <ul class="spaced"> | 420: <ul class="spaced"> |
417: <li class="warn"><span><strong>WARNING!</strong> This script will update your PunBB forum database. The update procedure might take anything from a few seconds to a few minutes (or in extreme cases, hours) depending on the speed of the server, the size of the forum database and the number of changes required.</span></li> | 421: <li class="warn"><span><strong>WARNING!</strong> This script will update your PunBB forum database. The update procedure might take anything from a few seconds to a few minutes (or in extreme cases, hours) depending on the speed of the server, the size of the forum database and the number of changes required.</span></li> |
418: <li><span>Do not forget to make a backup of the database before continuing.</span></li> | 422: <li><span>Do not forget to make a backup of the database before continuing.</span></li> |
419: <li><span> Did you read the update instructions in the documentation? If not, start there.</span></li> | 423: <li><span>Did you read the update instructions in the documentation? If not, start there.</span></li> |
420: <?php | 424: <?php |
421: | 425: |
422: if (strpos($cur_version, '1.2') === 0 && (!$db_seems_utf8 || isset($_GET['force']))) | 426: if (strpos($cur_version, '1.2') === 0 && (!$db_seems_utf8 || isset($_GET['force']))) |
725: | 729: |
726: // Make all IP fields VARCHAR(39) to support IPv6 | 730: // Make all IP fields VARCHAR(39) to support IPv6 |
727: $forum_db->alter_field('posts', 'poster_ip', 'VARCHAR(39)', true); | 731: $forum_db->alter_field('posts', 'poster_ip', 'VARCHAR(39)', true); |
728: $forum_db->alter_field('user', 'registration_ip', 'VARCHAR(39)', false, '0.0.0.0'); | 732: $forum_db->alter_field('users', 'registration_ip', 'VARCHAR(39)', false, '0.0.0.0'); |
729: | 733: |
730: // Add the DST option to the users table | 734: // Add the DST option to the users table |
731: $forum_db->add_field('users', 'dst', 'TINYINT(1)', false, 0, 'timezone'); | 735: $forum_db->add_field('users', 'dst', 'TINYINT(1)', false, 0, 'timezone'); |
1991: <div class="main-content frm"> | 1995: <div class="main-content frm"> |
1992: <div class="ct-box info-box"> | 1996: <div class="ct-box info-box"> |
1993: <p>Your forum database was updated successfully.</p> | 1997: <p>Your forum database was updated successfully.</p> |
1994: <?php if (isset($new_config) && !$written): ?> <p>In order to complete the process, you must now update your config.php script. <strong>Copy and paste the text in the text box below into the file called config.php in the root directory of your PunBB installation</strong>. The file already exists, so you must edit/overwrite the contents of the old file. You may then <a href="<?php echo $base_url ?>/index.php">go to the forum index</a> once config.php has been updated.</p> | 1998: <?php if (isset($new_config) && !$written): ?> |
1995: <?php else: ?> <p>You may <a href="<?php echo $base_url ?>/index.php">go to the forum index</a> now.</p> | 1999: <p>In order to complete the process, you must now update your config.php script. <strong>Copy and paste the text in the text box below into the file called config.php in the root directory of your PunBB installation</strong>. The file already exists, so you must edit/overwrite the contents of the old file. You may then <a href="<?php echo $base_url ?>/index.php">go to the forum index</a> once config.php has been updated.</p> |
| 2000: <?php else: ?> |
| 2001: <p>You may <a href="<?php echo $base_url ?>/index.php">go to the forum index</a> now.</p> |
1996: <?php endif; ?> </div> | 2002: <?php endif; ?> </div> |
1997: <?php if (isset($new_config) && !$written): ?> <form class="frm-form" action="foo"> | 2003: <?php if (isset($new_config) && !$written): ?> |
| 2004: <form class="frm-form" action="foo"> |
1998: <fieldset class="frm-group group1"> | 2005: <fieldset class="frm-group group1"> |
1999: <legend class="group-legend"><span>New config.php contents</span></legend> | 2006: <legend class="group-legend"><span>New config.php contents</span></legend> |
2000: <div class="txt-set set1"> | 2007: <div class="txt-set set1"> |
punbb-1.3.2/admin/install.php |
punbb-1.3.3/admin/install.php |
4: * | 4: * |
5: * Used to actually install PunBB. | 5: * Used to actually install PunBB. |
6: * | 6: * |
7: * @copyright Copyright (C) 2008 PunBB, partially based on code copyright (C) 2008 FluxBB.org | 7: * @copyright (C) 2008-2009 PunBB, partially based on code (C) 2008-2009 FluxBB.org |
8: * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher | 8: * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher |
9: * @package PunBB | 9: * @package PunBB |
10: */ | 10: */ |
11: | 11: |
12: | 12: |
13: define('FORUM_VERSION', '1.3.2'); | 13: define('FORUM_VERSION', '1.3.3'); |
14: define('FORUM_DB_REVISION', 3); | 14: define('FORUM_DB_REVISION', 4); |
15: define('MIN_PHP_VERSION', '4.3.0'); | 15: define('MIN_PHP_VERSION', '4.3.0'); |
16: define('MIN_MYSQL_VERSION', '4.1.2'); | 16: define('MIN_MYSQL_VERSION', '4.1.2'); |
17: | 17: |
57: return '<?php'."\n\n".'$db_type = \''.$db_type."';\n".'$db_host = \''.$db_host."';\n".'$db_name = \''.addslashes($db_name)."';\n".'$db_username = \''.addslashes($db_username)."';\n".'$db_password = \''.addslashes($db_password)."';\n".'$db_prefix = \''.addslashes($db_prefix)."';\n".'$p_connect = false;'."\n\n".'$base_url = \''.$base_url.'\';'."\n\n".'$cookie_name = '."'".$cookie_name."';\n".'$cookie_domain = '."'';\n".'$cookie_path = '."'/';\n".'$cookie_secure = 0;'."\n\ndefine('FORUM', 1);"; | 57: return '<?php'."\n\n".'$db_type = \''.$db_type."';\n".'$db_host = \''.$db_host."';\n".'$db_name = \''.addslashes($db_name)."';\n".'$db_username = \''.addslashes($db_username)."';\n".'$db_password = \''.addslashes($db_password)."';\n".'$db_prefix = \''.addslashes($db_prefix)."';\n".'$p_connect = false;'."\n\n".'$base_url = \''.$base_url.'\';'."\n\n".'$cookie_name = '."'".$cookie_name."';\n".'$cookie_domain = '."'';\n".'$cookie_path = '."'/';\n".'$cookie_secure = 0;'."\n\ndefine('FORUM', 1);"; |
58: } | 58: } |
59: | 59: |
60: $language = isset($_GET['lang']) ? preg_replace('#[\.\\\/]#', '', $_GET['lang']) : 'English'; | 60: $language = isset($_GET['lang']) ? $_GET['lang'] : (isset($_POST['req_language']) ? forum_trim($_POST['req_language']) : 'English'); |
| 61: $language = preg_replace('#[\.\\\/]#', '', $language); |
61: if (!file_exists(FORUM_ROOT.'lang/'.$language.'/install.php')) | 62: if (!file_exists(FORUM_ROOT.'lang/'.$language.'/install.php')) |
62: exit('The language pack you have chosen doesn\'t seem to exist or is corrupt. Please recheck and try again.'); | 63: exit('The language pack you have chosen doesn\'t seem to exist or is corrupt. Please recheck and try again.'); |
63: | 64: |
83: exit; | 84: exit; |
84: } | 85: } |
85: | 86: |
| 87: header('Content-Type: text/xml; charset=utf-8'); |
86: | 88: |
87: if (!isset($_POST['form_sent'])) | 89: if (!isset($_POST['form_sent'])) |
88: { | 90: { |
459: break; | 461: break; |
460: | 462: |
461: default: | 463: default: |
462: error(sprintf($lang_install['No such database type'], $db_type)); | 464: error(sprintf($lang_install['No such database type'], forum_htmlencode($db_type))); |
463: } | 465: } |
464: | 466: |
465: // Create the database object (and connect/select db) | 467: // Create the database object (and connect/select db) |
1746: $alerts = array(); | 1748: $alerts = array(); |
1747: // Check if the cache directory is writable | 1749: // Check if the cache directory is writable |
1748: if (!is_writable('./cache/')) | 1750: if (!is_writable('./cache/')) |
1749: $alerts[] = '<li>'.$lang_install['No cache write'].'</li>'; | 1751: $alerts[] = '<li><span>'.$lang_install['No cache write'].'</span></li>'; |
1750: | 1752: |
1751: // Check if default avatar directory is writable | 1753: // Check if default avatar directory is writable |
1752: if (!is_writable('./img/avatars/')) | 1754: if (!is_writable('./img/avatars/')) |
1753: $alerts[] = '<li>'.$lang_install['No avatar write'].'</li>'; | 1755: $alerts[] = '<li><span>'.$lang_install['No avatar write'].'</span></li>'; |
1754: | 1756: |
1755: // Check if we disabled uploading avatars because file_uploads was disabled | 1757: // Check if we disabled uploading avatars because file_uploads was disabled |
1756: if ($avatars == '0') | 1758: if ($avatars == '0') |
1757: $alerts[] = '<li>'.$lang_install['File upload alert'].'</li>'; | 1759: $alerts[] = '<li><span>'.$lang_install['File upload alert'].'</span></li>'; |
1758: | 1760: |
1759: // Add some random bytes at the end of the cookie name to prevent collisions | 1761: // Add some random bytes at the end of the cookie name to prevent collisions |
1760: $cookie_name = 'forum_cookie_'.random_key(6, false, true); | 1762: $cookie_name = 'forum_cookie_'.random_key(6, false, true); |
punbb-1.3.2/extern.php |
punbb-1.3.3/extern.php |
5: * Allows forum content to be syndicated outside of the site in various formats | 5: * Allows forum content to be syndicated outside of the site in various formats |
6: * (ie: RSS, Atom, XML, HTML). | 6: * (ie: RSS, Atom, XML, HTML). |
7: * | 7: * |
8: * @copyright Copyright (C) 2008 PunBB, partially based on code copyright (C) 2008 FluxBB.org | 8: * @copyright (C) 2008-2009 PunBB, partially based on code (C) 2008-2009 FluxBB.org |
9: * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher | 9: * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher |
10: * @package PunBB | 10: * @package PunBB |
11: */ | 11: */ |
120: else | 120: else |
121: echo "\t\t".'<generator>PunBB</generator>'."\n"; | 121: echo "\t\t".'<generator>PunBB</generator>'."\n"; |
122: | 122: |
123: foreach ($feed['items'] as $item) | 123: ($hook = get_hook('ex_add_new_rss_info')) ? eval($hook) : null; |
124: | 124: |
| 125: foreach ($feed['items'] as $item) |
125: { | 126: { |
126: echo "\t\t".'<item>'."\n"; | 127: echo "\t\t".'<item>'."\n"; |
127: echo "\t\t\t".'<title><![CDATA['.escape_cdata($item['title']).']]></title>'."\n"; | 128: echo "\t\t\t".'<title><![CDATA['.escape_cdata($item['title']).']]></title>'."\n"; |
131: echo "\t\t\t".'<pubDate>'.gmdate('r', $item['pubdate']).'</pubDate>'."\n"; | 132: echo "\t\t\t".'<pubDate>'.gmdate('r', $item['pubdate']).'</pubDate>'."\n"; |
132: echo "\t\t\t".'<guid>'.$item['link'].'</guid>'."\n"; | 133: echo "\t\t\t".'<guid>'.$item['link'].'</guid>'."\n"; |
133: | 134: |
| 135: ($hook = get_hook('ex_add_new_rss_item_info')) ? eval($hook) : null; |
| 136: |
134: echo "\t\t".'</item>'."\n"; | 137: echo "\t\t".'</item>'."\n"; |
135: } | 138: } |
136: | 139: |
164: else | 167: else |
165: echo "\t".'<generator>PunBB</generator>'."\n"; | 168: echo "\t".'<generator>PunBB</generator>'."\n"; |
166: | 169: |
| 170: ($hook = get_hook('ex_add_new_atom_info')) ? eval($hook) : null; |
| 171: |
167: echo "\t".'<id>'.$feed['link'].'</id>'."\n"; | 172: echo "\t".'<id>'.$feed['link'].'</id>'."\n"; |
168: | 173: |
169: $content_tag = ($feed['type'] == 'posts') ? 'content' : 'summary'; | 174: $content_tag = ($feed['type'] == 'posts') ? 'content' : 'summary'; |
186: echo "\t\t\t".'</author>'."\n"; | 191: echo "\t\t\t".'</author>'."\n"; |
187: echo "\t\t\t".'<updated>'.gmdate('Y-m-d\TH:i:s\Z', $item['pubdate']).'</updated>'."\n"; | 192: echo "\t\t\t".'<updated>'.gmdate('Y-m-d\TH:i:s\Z', $item['pubdate']).'</updated>'."\n"; |
188: | 193: |
| 194: ($hook = get_hook('ex_add_new_atom_item_info')) ? eval($hook) : null; |
| 195: |
189: echo "\t\t\t".'<id>'.$item['link'].'</id>'."\n"; | 196: echo "\t\t\t".'<id>'.$item['link'].'</id>'."\n"; |
190: echo "\t\t".'</entry>'."\n"; | 197: echo "\t\t".'</entry>'."\n"; |
191: } | 198: } |
202: global $lang_common, $forum_config; | 209: global $lang_common, $forum_config; |
203: | 210: |
204: // Send XML/no cache headers | 211: // Send XML/no cache headers |
205: header('Content-Type: text/xml; charset=utf-8'); | 212: header('Content-Type: application/xml; charset=utf-8'); |
206: header('Expires: '.gmdate('D, d M Y H:i:s').' GMT'); | 213: header('Expires: '.gmdate('D, d M Y H:i:s').' GMT'); |
207: header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); | 214: header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); |
208: header('Pragma: public'); | 215: header('Pragma: public'); |
211: echo '<source>'."\n"; | 218: echo '<source>'."\n"; |
212: echo "\t".'<url>'.$feed['link'].'</url>'."\n"; | 219: echo "\t".'<url>'.$feed['link'].'</url>'."\n"; |
213: | 220: |
| 221: ($hook = get_hook('ex_add_new_xml_info')) ? eval($hook) : null; |
| 222: |
214: $forum_tag = ($feed['type'] == 'posts') ? 'post' : 'topic'; | 223: $forum_tag = ($feed['type'] == 'posts') ? 'post' : 'topic'; |
215: | 224: |
216: foreach ($feed['items'] as $item) | 225: foreach ($feed['items'] as $item) |
232: echo "\t\t".'</author>'."\n"; | 241: echo "\t\t".'</author>'."\n"; |
233: echo "\t\t".'<posted>'.gmdate('r', $item['pubdate']).'</posted>'."\n"; | 242: echo "\t\t".'<posted>'.gmdate('r', $item['pubdate']).'</posted>'."\n"; |
234: | 243: |
| 244: ($hook = get_hook('ex_add_new_xml_item_info')) ? eval($hook) : null; |
| 245: |
235: echo "\t".'</'.$forum_tag.'>'."\n"; | 246: echo "\t".'</'.$forum_tag.'>'."\n"; |
236: } | 247: } |
237: | 248: |
247: | 258: |
248: // Send the Content-type header in case the web server is setup to send something else | 259: // Send the Content-type header in case the web server is setup to send something else |
249: header('Content-type: text/html; charset=utf-8'); | 260: header('Content-type: text/html; charset=utf-8'); |
| 261: header('Expires: '.gmdate('D, d M Y H:i:s').' GMT'); |
| 262: header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); |
| 263: header('Pragma: public'); |
250: | 264: |
251: foreach ($feed['items'] as $item) | 265: foreach ($feed['items'] as $item) |
252: { | 266: { |
269: if ($show < 1 || $show > 50) | 283: if ($show < 1 || $show > 50) |
270: $show = 15; | 284: $show = 15; |
271: | 285: |
| 286: ($hook = get_hook('ex_set_syndication_type')) ? eval($hook) : null; |
| 287: |
272: // Was a topic ID supplied? | 288: // Was a topic ID supplied? |
273: if (isset($_GET['tid'])) | 289: if (isset($_GET['tid'])) |
274: { | 290: { |
276: | 292: |
277: // Fetch topic subject | 293: // Fetch topic subject |
278: $query = array( | 294: $query = array( |
279: 'SELECT' => 't.subject, t.num_replies, t.first_post_id', | 295: 'SELECT' => 't.subject, t.first_post_id', |
280: 'FROM' => 'topics AS t', | 296: 'FROM' => 'topics AS t', |
281: 'JOINS' => array( | 297: 'JOINS' => array( |
282: array( | 298: array( |
297: | 313: |
298: $cur_topic = $forum_db->fetch_assoc($result); | 314: $cur_topic = $forum_db->fetch_assoc($result); |
299: | 315: |
| 316: if (!defined('FORUM_PARSER_LOADED')) |
| 317: require FORUM_ROOT.'include/parser.php'; |
| 318: |
300: if ($forum_config['o_censoring'] == '1') | 319: if ($forum_config['o_censoring'] == '1') |
301: $cur_topic['subject'] = censor_words($cur_topic['subject']); | 320: $cur_topic['subject'] = censor_words($cur_topic['subject']); |
302: | 321: |
303: // Setup the feed | 322: // Setup the feed |
304: $feed = array( | 323: $feed = array( |
305: 'title' => $forum_config['o_board_title'].' - '.$cur_topic['subject'], | 324: 'title' => $forum_config['o_board_title'].$lang_common['Title separator'].$cur_topic['subject'], |
306: 'link' => forum_link($forum_url['topic'], array($tid, sef_friendly($cur_topic['subject']))), | 325: 'link' => forum_link($forum_url['topic'], array($tid, sef_friendly($cur_topic['subject']))), |
307: 'description' => sprintf($lang_common['RSS description topic'], $cur_topic['subject']), | 326: 'description' => sprintf($lang_common['RSS description topic'], $cur_topic['subject']), |
308: 'items' => array(), | 327: 'items' => array(), |
311: | 330: |
312: // Fetch $show posts | 331: // Fetch $show posts |
313: $query = array( | 332: $query = array( |
314: 'SELECT' => 'p.id, p.poster, p.message, p.posted, p.poster_id, u.email_setting, u.email, p.poster_email', | 333: 'SELECT' => 'p.id, p.poster, p.message, p.hide_smilies, p.posted, p.poster_id, u.email_setting, u.email, p.poster_email', |
315: 'FROM' => 'posts AS p', | 334: 'FROM' => 'posts AS p', |
316: 'JOINS' => array( | 335: 'JOINS' => array( |
317: array( | 336: array( |
331: if ($forum_config['o_censoring'] == '1') | 350: if ($forum_config['o_censoring'] == '1') |
332: $cur_post['message'] = censor_words($cur_post['message']); | 351: $cur_post['message'] = censor_words($cur_post['message']); |
333: | 352: |
| 353: $cur_post['message'] = parse_message($cur_post['message'], $cur_post['hide_smilies']); |
| 354: |
334: $item = array( | 355: $item = array( |
335: 'id' => $cur_post['id'], | 356: 'id' => $cur_post['id'], |
336: 'title' => $cur_topic['first_post_id'] == $cur_post['id'] ? $cur_topic['subject'] : $lang_common['RSS reply'].$cur_topic['subject'], | 357: 'title' => $cur_topic['first_post_id'] == $cur_post['id'] ? $cur_topic['subject'] : $lang_common['RSS reply'].$cur_topic['subject'], |
344: | 365: |
345: if ($cur_post['poster_id'] > 1) | 366: if ($cur_post['poster_id'] > 1) |
346: { | 367: { |
347: if ($cur_post['email_setting'] == '0') | 368: if ($cur_post['email_setting'] == '0' && !$forum_user['is_guest']) |
348: $item['author']['email'] = $cur_post['email']; | 369: $item['author']['email'] = $cur_post['email']; |
349: | 370: |
350: $item['author']['uri'] = forum_link($forum_url['user'], $cur_post['poster_id']); | 371: $item['author']['uri'] = forum_link($forum_url['user'], $cur_post['poster_id']); |
351: } | 372: } |
352: else if ($cur_post['poster_email'] != '') | 373: else if ($cur_post['poster_email'] != '' && !$forum_user['is_guest']) |
353: $item['author']['email'] = $cur_post['poster_email']; | 374: $item['author']['email'] = $cur_post['poster_email']; |
354: | 375: |
355: $feed['items'][] = $item; | 376: $feed['items'][] = $item; |
364: } | 385: } |
365: else | 386: else |
366: { | 387: { |
| 388: $forum_name = ''; |
| 389: |
| 390: if (!defined('FORUM_PARSER_LOADED')) |
| 391: require FORUM_ROOT.'include/parser.php'; |
| 392: |
367: // Were any forum ID's supplied? | 393: // Were any forum ID's supplied? |
368: if (isset($_GET['fid']) && is_scalar($_GET['fid']) && $_GET['fid'] != '') | 394: if (isset($_GET['fid']) && is_scalar($_GET['fid']) && $_GET['fid'] != '') |
369: { | 395: { |
372: | 398: |
373: if (!empty($fids)) | 399: if (!empty($fids)) |
374: $forum_sql = ' AND t.forum_id IN('.implode(',', $fids).')'; | 400: $forum_sql = ' AND t.forum_id IN('.implode(',', $fids).')'; |
| 401: |
| 402: if (count($fids) == 1) |
| 403: { |
| 404: // Fetch forum name |
| 405: $query = array( |
| 406: 'SELECT' => 'f.forum_name', |
| 407: 'FROM' => 'forums AS f', |
| 408: 'JOINS' => array( |
| 409: array( |
| 410: 'LEFT JOIN' => 'forum_perms AS fp', |
| 411: 'ON' => '(fp.forum_id=f.id AND fp.group_id='.$forum_user['g_id'].')' |
| 412: ) |
| 413: ), |
| 414: 'WHERE' => '(fp.read_forum IS NULL OR fp.read_forum=1) AND f.id='.$fids[0] |
| 415: ); |
| 416: |
| 417: $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); |
| 418: if ($forum_db->num_rows($result)) |
| 419: $forum_name = $lang_common['Title separator'].$forum_db->result($result); |
| 420: } |
375: } | 421: } |
376: | 422: |
377: // Any forum ID's to exclude? | 423: // Any forum ID's to exclude? |
386: | 432: |
387: // Setup the feed | 433: // Setup the feed |
388: $feed = array( | 434: $feed = array( |
389: 'title' => $forum_config['o_board_title'], | 435: 'title' => $forum_config['o_board_title'].$forum_name, |
390: 'link' => forum_link($forum_url['index']), | 436: 'link' => forum_link($forum_url['index']), |
391: 'description' => sprintf($lang_common['RSS description'], $forum_config['o_board_title']), | 437: 'description' => sprintf($lang_common['RSS description'], $forum_config['o_board_title']), |
392: 'items' => array(), | 438: 'items' => array(), |
395: | 441: |
396: // Fetch $show topics | 442: // Fetch $show topics |
397: $query = array( | 443: $query = array( |
398: 'SELECT' => 't.id, t.poster, t.subject, t.last_post, t.last_poster, p.message, u.email_setting, u.email, p.poster_id, p.poster_email', | 444: 'SELECT' => 't.id, t.poster, t.subject, t.last_post, t.last_poster, p.message, p.hide_smilies, u.email_setting, u.email, p.poster_id, p.poster_email', |
399: 'FROM' => 'topics AS t', | 445: 'FROM' => 'topics AS t', |
400: 'JOINS' => array( | 446: 'JOINS' => array( |
401: array( | 447: array( |
429: $cur_topic['message'] = censor_words($cur_topic['message']); | 475: $cur_topic['message'] = censor_words($cur_topic['message']); |
430: } | 476: } |
431: | 477: |
| 478: $cur_topic['message'] = parse_message($cur_topic['message'], $cur_topic['hide_smilies']); |
| 479: |
432: $item = array( | 480: $item = array( |
433: 'id' => $cur_topic['id'], | 481: 'id' => $cur_topic['id'], |
434: 'title' => $cur_topic['subject'], | 482: 'title' => $cur_topic['subject'], |
435: 'link' => forum_link($forum_url['topic_new_posts'], array($cur_topic['id'], sef_friendly($cur_topic['subject']))), | 483: 'link' => forum_link($forum_url['topic_new_posts'], array($cur_topic['id'], sef_friendly($cur_topic['subject']))), |
436: 'description' => $cur_topic['message'], | 484: 'description' => $cur_topic['message'], |
437: 'author' => array( | 485: 'author' => array( |
438: 'name' => $cur_topic['last_poster'] | 486: 'name' => $cur_topic['last_poster'] |
439: ), | 487: ), |
442: | 490: |
443: if ($cur_topic['poster_id'] > 1) | 491: if ($cur_topic['poster_id'] > 1) |
444: { | 492: { |
445: if ($cur_topic['email_setting'] == '0') | 493: if ($cur_topic['email_setting'] == '0' && !$forum_user['is_guest']) |
446: $item['author']['email'] = $cur_topic['email']; | 494: $item['author']['email'] = $cur_topic['email']; |
447: | 495: |
448: $item['author']['uri'] = forum_link($forum_url['user'], $cur_topic['poster_id']); | 496: $item['author']['uri'] = forum_link($forum_url['user'], $cur_topic['poster_id']); |
449: } | 497: } |
450: else if ($cur_topic['poster_email'] != '') | 498: else if ($cur_topic['poster_email'] != '' && !$forum_user['is_guest']) |
451: $item['author']['email'] = $cur_topic['poster_email']; | 499: $item['author']['email'] = $cur_topic['poster_email']; |
452: | 500: |
453: $feed['items'][] = $item; | 501: $feed['items'][] = $item; |
487: { | 535: { |
488: if ($forum_user_online['user_id'] > 1) | 536: if ($forum_user_online['user_id'] > 1) |
489: { | 537: { |
490: $users[] = '<a href="'.forum_link($forum_url['user'], $forum_user_online['user_id']).'">'.forum_htmlencode($forum_user_online['ident']).'</a>'; | 538: $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']); |
491: ++$num_users; | 539: ++$num_users; |
492: } | 540: } |
493: else | 541: else |
495: } | 543: } |
496: | 544: |
497: ($hook = get_hook('ex_pre_online_output')) ? eval($hook) : null; | 545: ($hook = get_hook('ex_pre_online_output')) ? eval($hook) : null; |
| 546: // Send the Content-type header in case the web server is setup to send something else |
| 547: header('Content-type: text/html; charset=utf-8'); |
| 548: header('Expires: '.gmdate('D, d M Y H:i:s').' GMT'); |
| 549: header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); |
| 550: header('Pragma: public'); |
| 551: |
498: | 552: |
499: echo $lang_index['Guests online'].': '.forum_number_format($num_guests).'<br />'."\n"; | 553: echo $lang_index['Guests online'].': '.forum_number_format($num_guests).'<br />'."\n"; |
500: | 554: |
501: if ($_GET['action'] == 'online_full') | 555: if ($_GET['action'] == 'online_full' && !empty($users)) |
502: echo $lang_index['Users online'].': '.implode(', ', $users).'<br />'."\n"; | 556: echo $lang_index['Users online'].': '.implode($lang_index['Online list separator'], $users).'<br />'."\n"; |
503: else | 557: else |
504: echo $lang_index['Users online'].': '.forum_number_format($num_users).'<br />'."\n"; | 558: echo $lang_index['Users online'].': '.forum_number_format($num_users).'<br />'."\n"; |
505: | 559: |
544: $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); | 598: $result = $forum_db->query_build($query) or error(__FILE__, __LINE__); |
545: list($stats['total_topics'], $stats['total_posts']) = $forum_db->fetch_row($result); | 599: list($stats['total_topics'], $stats['total_posts']) = $forum_db->fetch_row($result); |
546: | 600: |
| 601: // Send the Content-type header in case the web server is setup to send something else |
| 602: header('Content-type: text/html; charset=utf-8'); |
| 603: header('Expires: '.gmdate('D, d M Y H:i:s').' GMT'); |
| 604: header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); |
| 605: header('Pragma: public'); |
| 606: |
547: ($hook = get_hook('ex_pre_stats_output')) ? eval($hook) : null; | 607: ($hook = get_hook('ex_pre_stats_output')) ? eval($hook) : null; |
548: | 608: |
549: echo sprintf($lang_index['No of users'], forum_number_format($stats['total_users'])).'<br />'."\n"; | 609: echo sprintf($lang_index['No of users'], forum_number_format($stats['total_users'])).'<br />'."\n"; |
punbb-1.3.2/include/functions.php |
punbb-1.3.3/include/functions.php |
2: /** | 2: /** |
3: * Loads common functions used throughout the site. | 3: * Loads common functions used throughout the site. |
4: * | 4: * |
5: * @copyright Copyright (C) 2008 PunBB, partially based on code copyright (C) 2008 FluxBB.org | 5: * @copyright (C) 2008-2009 PunBB, partially based on code (C) 2008-2009 FluxBB.org |
6: * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher | 6: * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher |
7: * @package PunBB | 7: * @package PunBB |
8: */ | 8: */ |
631: <div id="brd-debug" class="main"> | 631: <div id="brd-debug" class="main"> |
632: | 632: |
633: <div class="main-head"> | 633: <div class="main-head"> |
634: <h2><span><?php echo $lang_common['Debug table'] ?></span></h2> | 634: <h2 class="hn"><span><?php echo $lang_common['Debug table'] ?></span></h2> |
635: </div> | 635: </div> |
636: | 636: |
637: <div class="main-content debug"> | 637: <div class="main-content debug"> |
1360: | 1360: |
1361: $forum_user = $forum_db->fetch_assoc($result); | 1361: $forum_user = $forum_db->fetch_assoc($result); |
1362: | 1362: |
1363: // Update online list | 1363: if (!defined('FORUM_QUIET_VISIT')) |
1364: if (!$forum_user['logged']) | |
1365: { | 1364: { |
1366: $forum_user['logged'] = time(); | 1365: // Update online list |
1367: $forum_user['csrf_token'] = random_key(40, false, true); | 1366: if (!$forum_user['logged']) |
1368: $forum_user['prev_url'] = get_current_url(255); | 1367: { |
| 1368: $forum_user['logged'] = time(); |
| 1369: $forum_user['csrf_token'] = random_key(40, false, true); |
| 1370: $forum_user['prev_url'] = get_current_url(255); |
1369: | 1371: |
1370: // REPLACE INTO avoids a user having two rows in the online table | 1372: // REPLACE INTO avoids a user having two rows in the online table |
1371: $query = array( | 1373: $query = array( |
1372: 'REPLACE' => 'user_id, ident, logged, csrf_token', | 1374: 'REPLACE' => 'user_id, ident, logged, csrf_token', |
1373: 'INTO' => 'online', | 1375: 'INTO' => 'online', |
1374: 'VALUES' => '1, \''.$forum_db->escape($remote_addr).'\', '.$forum_user['logged'].', \''.$forum_user['csrf_token'].'\'', | 1376: 'VALUES' => '1, \''.$forum_db->escape($remote_addr).'\', '.$forum_user['logged'].', \''.$forum_user['csrf_token'].'\'', |
1375: 'UNIQUE' => 'user_id=1 AND ident=\''.$forum_db->escape($remote_addr).'\'' | 1377: 'UNIQUE' => 'user_id=1 AND ident=\''.$forum_db->escape($remote_addr).'\'' |
1376: ); | 1378: ); |
1377: | 1379: |
1378: if ($forum_user['prev_url'] != null) | 1380: if ($forum_user['prev_url'] != null) |
1379: { | 1381: { |
1380: $query['REPLACE'] .= ', prev_url'; | 1382: $query['REPLACE'] .= ', prev_url'; |
1381: $query['VALUES'] .= ', \''.$forum_db->escape($forum_user['prev_url']).'\''; | 1383: $query['VALUES'] .= ', \''.$forum_db->escape($forum_user['prev_url']).'\''; |
1382: } | 1384: } |
1383: | 1385: |
1384: ($hook = get_hook('fn_set_default_user_qr_add_online_guest_user')) ? eval($hook) : null; | 1386: ($hook = get_hook('fn_set_default_user_qr_add_online_guest_user')) ? eval($hook) : null; |
1385: $forum_db->query_build($query) or error(__FILE__, __LINE__); | 1387: $forum_db->query_build($query) or error(__FILE__, __LINE__); |
1386: } | 1388: } |
1387: else | 1389: else |
1388: { | 1390: { |
1389: $query = array( | 1391: $query = array( |
1390: 'UPDATE' => 'online', | 1392: 'UPDATE' => 'online', |
1391: 'SET' => 'logged='.time(), | 1393: 'SET' => 'logged='.time(), |
1392: 'WHERE' => 'ident=\''.$forum_db->escape($remote_addr).'\'' | 1394: 'WHERE' => 'ident=\''.$forum_db->escape($remote_addr).'\'' |
1393: ); | 1395: ); |
1394: | 1396: |
1395: $current_url = get_current_url(255); | 1397: $current_url = get_current_url(255); |
1396: if ($current_url != null) | 1398: if ($current_url != null) |
1397: $query['SET'] .= ', prev_url=\''.$forum_db->escape($current_url).'\''; | 1399: $query['SET'] .= ', prev_url=\''.$forum_db->escape($current_url).'\''; |
1398: | 1400: |
1399: ($hook = get_hook('fn_set_default_user_qr_update_online_guest_user')) ? eval($hook) : null; | 1401: ($hook = get_hook('fn_set_default_user_qr_update_online_guest_user')) ? eval($hook) : null; |
1400: $forum_db->query_build($query) or error(__FILE__, __LINE__); | 1402: $forum_db->query_build($query) or error(__FILE__, __LINE__); |
| 1403: } |
1401: } | 1404: } |
1402: | 1405: |
1403: $forum_user['disp_topics'] = $forum_config['o_disp_topics_default']; | 1406: $forum_user['disp_topics'] = $forum_config['o_disp_topics_default']; |
1408: $forum_user['style'] = $forum_config['o_default_style']; | 1411: $forum_user['style'] = $forum_config['o_default_style']; |
1409: $forum_user['is_guest'] = true; | 1412: $forum_user['is_guest'] = true; |
1410: $forum_user['is_admmod'] = false; | 1413: $forum_user['is_admmod'] = false; |
| 1414: |
| 1415: ($hook = get_hook('fn_set_default_user_end')) ? eval($hook) : null; |
1411: } | 1416: } |
1412: | 1417: |
1413: | 1418: |
2775: ob_start(); | 2780: ob_start(); |
2776: | 2781: |
2777: ?> | 2782: ?> |
2778: <title><?php echo $lang_common['Maintenance'].' - '.forum_htmlencode($forum_config['o_board_title']) ?></title> | 2783: <title><?php echo $lang_common['Maintenance'].$lang_common['Title separator'].forum_htmlencode($forum_config['o_board_title']) ?></title> |
2779: <link rel="stylesheet" type="text/css" media="screen" href="<?php echo $base_url ?>/style/<?php echo $forum_user['style'] ?>/<?php echo $forum_user['style'].'.css' ?>" /> | 2784: <link rel="stylesheet" type="text/css" media="screen" href="<?php echo $base_url ?>/style/<?php echo $forum_user['style'] ?>/<?php echo $forum_user['style'].'.css' ?>" /> |
2780: <link rel="stylesheet" type="text/css" media="screen" href="<?php echo $base_url ?>/style/<?php echo $forum_user['style'] ?>/<?php echo $forum_user['style'].'_cs.css' ?>" /> | 2785: <link rel="stylesheet" type="text/css" media="screen" href="<?php echo $base_url ?>/style/<?php echo $forum_user['style'] ?>/<?php echo $forum_user['style'].'_cs.css' ?>" /> |
2781: <!--[if lte IE 6]><link rel="stylesheet" type="text/css" href="<?php echo $base_url ?>/style/<?php echo $forum_user['style'] ?>/<?php echo $forum_user['style'].'_fix.css' ?>" /><![endif]--> | 2786: <!--[if lte IE 6]><link rel="stylesheet" type="text/css" href="<?php echo $base_url ?>/style/<?php echo $forum_user['style'] ?>/<?php echo $forum_user['style'].'_fix.css' ?>" /><![endif]--> |
2792: ob_start(); | 2797: ob_start(); |
2793: | 2798: |
2794: ?> | 2799: ?> |
2795: <div id="brd-main" class="main basic"> | 2800: <div id="brd-maint" class="main basic"> |
2796: | 2801: |
2797: <div class="main-head"> | 2802: <div class="main-head"> |
2798: <h1 class="hn"><span><?php echo $lang_common['Maintenance mode'] ?></span></h1> | 2803: <h1 class="hn"><span><?php echo $lang_common['Maintenance mode'] ?></span></h1> |
2887: // START SUBST - <!-- forum_head --> | 2892: // START SUBST - <!-- forum_head --> |
2888: | 2893: |
2889: $forum_head['refresh'] = '<meta http-equiv="refresh" content="'.$forum_config['o_redirect_delay'].';URL='.str_replace(array('<', '>', '"'), array('<', '>', '"'), $destination_url).'" />'; | 2894: $forum_head['refresh'] = '<meta http-equiv="refresh" content="'.$forum_config['o_redirect_delay'].';URL='.str_replace(array('<', '>', '"'), array('<', '>', '"'), $destination_url).'" />'; |
2890: $forum_head['title'] = '<title>'.$lang_common['Redirecting'].' - '.forum_htmlencode($forum_config['o_board_title']).'</title>'; | 2895: $forum_head['title'] = '<title>'.$lang_common['Redirecting'].$lang_common['Title separator'].forum_htmlencode($forum_config['o_board_title']).'</title>'; |
2891: | 2896: |
2892: ob_start(); | 2897: ob_start(); |
2893: | 2898: |
2966: // Display a simple error message | 2971: // Display a simple error message |
2967: function error() | 2972: function error() |
2968: { | 2973: { |
| 2974: global $forum_config; |
| 2975: |
2969: if (!headers_sent()) | 2976: if (!headers_sent()) |
2970: { | 2977: { |
| 2978: // if no HTTP responce code is set we send 503 |
| 2979: if (!defined('FORUM_HTTP_RESPONSE_CODE_SET')) |
| 2980: header('HTTP/1.1 503 Service Temporarily Unavailable'); |
2971: header('Content-type: text/html; charset=utf-8'); | 2981: header('Content-type: text/html; charset=utf-8'); |
2972: header('HTTP/1.1 503 Service Temporarily Unavailable'); | |
2973: } | 2982: } |
2974: | 2983: |
2975: global $forum_config; | |
2976: | |
2977: /* | 2984: /* |
2978: Parse input parameters. Possible function signatures: | 2985: Parse input parameters. Possible function signatures: |
2979: error('Error message.'); | 2986: error('Error message.'); |
3006: while (@ob_end_clean()); | 3013: while (@ob_end_clean()); |
3007: | 3014: |
3008: // "Restart" output buffering if we are using ob_gzhandler (since the gzip header is already sent) | 3015: // "Restart" output buffering if we are using ob_gzhandler (since the gzip header is already sent) |
3009: if (!empty($forum_config['o_gzip']) && extension_loaded('zlib') && (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false || strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'deflate') !== false)) | 3016: if (!empty($forum_config['o_gzip']) && extension_loaded('zlib') && !empty($_SERVER['HTTP_ACCEPT_ENCODING']) && (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false || strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'deflate') !== false)) |
3010: ob_start('ob_gzhandler'); | 3017: ob_start('ob_gzhandler'); |
3011: | 3018: |
3012: ?> | 3019: ?> |
punbb-1.3.2/lang/English/common.php |
punbb-1.3.3/lang/English/common.php |
8: 'lang_identifier' => 'en', | 8: 'lang_identifier' => 'en', |
9: | 9: |
10: // Number formatting | 10: // Number formatting |
11: 'lang_decimal_point' => '.', | 11: 'lang_decimal_point' => '.', |
12: 'lang_thousands_sep' => ',', | 12: 'lang_thousands_sep' => ',', |
13: | 13: |
14: // Notices | 14: // Notices |
15: 'Bad request' => 'Bad request. The link you followed is incorrect or outdated.', | 15: 'Bad request' => 'Bad request. The link you followed is incorrect or outdated.', |
85: 'Item info single' => '%s [ %s ]', | 85: 'Item info single' => '%s [ %s ]', |
86: 'Item info plural' => '%s [ %s to %s of %s ]', // e.g. Topics [ 10 to 20 of 30 ] | 86: 'Item info plural' => '%s [ %s to %s of %s ]', // e.g. Topics [ 10 to 20 of 30 ] |
87: 'Info separator' => ' ', // e.g. 1 Page | 10 Topics | 87: 'Info separator' => ' ', // e.g. 1 Page | 10 Topics |
88: 'Powered by' => 'Powered by <strong>%s</strong>', | 88: 'Powered by' => 'Powered by <strong>%s</strong>, supported by <strong>%s</strong>.', |
89: 'Maintenance' => 'Maintenance', | 89: 'Maintenance' => 'Maintenance', |
90: | 90: |
91: // CSRF confirmation form | 91: // CSRF confirmation form |
146: 'Jump to' => 'Jump to forum:', | 146: 'Jump to' => 'Jump to forum:', |
147: | 147: |
148: // For extern.php RSS feed | 148: // For extern.php RSS feed |
149: 'ATOM Feed' => 'Atom', | |
150: 'RSS Feed' => 'RSS', | |
151: 'RSS description' => 'The most recent topics at %s.', | 149: 'RSS description' => 'The most recent topics at %s.', |
152: 'RSS description topic' => 'The most recent posts in %s.', | 150: 'RSS description topic' => 'The most recent posts in %s.', |
153: 'RSS reply' => 'Re: ', // The topic subject will be appended to this string (to signify a reply) | 151: 'RSS reply' => 'Re: ', // The topic subject will be appended to this string (to signify a reply) |
154: | 152: |
155: // Accessibility | 153: // Accessibility |
156: 'Skip to content' => 'Skip to forum content', | 154: 'Skip to content' => 'Skip to forum content', |
157: | 155: |
158: // Debug information | 156: // Debug information |
159: 'Querytime' => 'Generated in %1$s seconds, %2$s queries executed', | 157: 'Querytime' => 'Generated in %1$s seconds, %2$s queries executed', |
160: 'Debug table' => 'Debug information', | 158: 'Debug table' => 'Debug information', |
161: 'Debug summary' => 'Database query performance information', | 159: 'Debug summary' => 'Database query performance information', |
162: 'Query times' => 'Time (s)', | 160: 'Query times' => 'Time (s)', |
163: 'Query' => 'Query', | 161: 'Query' => 'Query', |
164: 'Total query time' => 'Total query time', | 162: 'Total query time' => 'Total query time', |
| 163: |
| 164: // For official extensions |
| 165: 'Official extensions inst' => '<span id="extensions-used" title="%1$s">Official extensions: %2$s installed.</span>', |
165: | 166: |
166: ); | 167: ); |
punbb-1.3.2/lang/English/install.php |
punbb-1.3.3/lang/English/install.php |
21: 'Table prefix' => 'Table prefix', | 21: 'Table prefix' => 'Table prefix', |
22: 'Database type info' => 'PunBB currently supports MySQL, PostgreSQL and SQLite. If your database of choice is missing from the drop-down menu below, it means this PHP environment does not have support for that particular database. More information regarding support for particular versions of each database can be found in the FAQ.', | 22: 'Database type info' => 'PunBB currently supports MySQL, PostgreSQL and SQLite. If your database of choice is missing from the drop-down menu below, it means this PHP environment does not have support for that particular database. More information regarding support for particular versions of each database can be found in the FAQ.', |
23: 'Mysql type info' => 'PunBB has detected that your PHP environment supports two different ways of communicating with MySQL. The two options are called "<em>standard</em>" and "<em>improved</em>". If you are uncertain which one to use, start by trying improved and if that fails, try standard.', | 23: 'Mysql type info' => 'PunBB has detected that your PHP environment supports two different ways of communicating with MySQL. The two options are called "<em>standard</em>" and "<em>improved</em>". If you are uncertain which one to use, start by trying improved and if that fails, try standard.', |
24: 'MySQL InnoDB info' => 'PunBB has detected that your MySQL server might support <a href="http://dev.mysql.com/doc/refman/5.0/en/innodb-overview.html">InnoDB</a>. This would be a good choice if you are planning to run a large forum. If you are uncertain, it is recommended to not use InnoDB.', | |
25: 'Database server info' => 'Enter the address of the database server (example: <em>localhost</em>, <em>mysql1.example.com</em> or <em>208.77.188.166</em>). You can specify a custom port number if your database doesn\'t run on the default port (example: <em>localhost:3580</em>). For SQLite support, just enter anything or leave it at \'localhost\'.', | 24: 'Database server info' => 'Enter the address of the database server (example: <em>localhost</em>, <em>mysql1.example.com</em> or <em>208.77.188.166</em>). You can specify a custom port number if your database doesn\'t run on the default port (example: <em>localhost:3580</em>). For SQLite support, just enter anything or leave it at \'localhost\'.', |
26: 'Database name info' => 'Enter the name of the database that PunBB will be installed into. The database must exist. For SQLite, this is the relative path to the database file. If the SQLite database file does not exist, PunBB will attempt to create it.', | 25: 'Database name info' => 'Enter the name of the database that PunBB will be installed into. The database must exist. For SQLite, this is the relative path to the database file. If the SQLite database file does not exist, PunBB will attempt to create it.', |
27: 'Database username info' => 'Enter the username and password used for connecting to the selected database. Ignore for SQLite.', | 26: 'Database username info' => 'Enter the username and password used for connecting to the selected database. Ignore for SQLite.', |
78: 'Invalid table prefix' => 'The table prefix \'%s\' contains illegal characters or is too long. The prefix may contain the letters a to z, any numbers and the underscore character. They must however not start with a number. The maximum length is 40 characters. Please choose a different prefix.', | 77: 'Invalid table prefix' => 'The table prefix \'%s\' contains illegal characters or is too long. The prefix may contain the letters a to z, any numbers and the underscore character. They must however not start with a number. The maximum length is 40 characters. Please choose a different prefix.', |
79: 'SQLite prefix collision' => 'The table prefix \'sqlite_\' is reserved for use by the SQLite engine. Please choose a different prefix.', | 78: 'SQLite prefix collision' => 'The table prefix \'sqlite_\' is reserved for use by the SQLite engine. Please choose a different prefix.', |
80: 'PunBB already installed' => 'A table called "%1$susers" is already present in the database "%2$s". This could mean that PunBB is already installed or that another piece of software is installed and is occupying one or more of the table names PunBB requires. If you want to install multiple copies of PunBB in the same database, you must choose a different table prefix.', | 79: 'PunBB already installed' => 'A table called "%1$susers" is already present in the database "%2$s". This could mean that PunBB is already installed or that another piece of software is installed and is occupying one or more of the table names PunBB requires. If you want to install multiple copies of PunBB in the same database, you must choose a different table prefix.', |
81: 'InnoDB not enabled' => 'InnoDB does not seem to be enabled. Please choose a database layer that does not have InnoDB support, or enable InnoDB on your MySQL server.', | 80: 'Invalid language' => 'The language pack you have chosen doesn\'t seem to exist or is corrupt. Please recheck and try again.', |
82: | 81: |
83: // Used in the install | 82: // Used in the install |
| 83: 'Default language' => 'Default language', |
| 84: 'Default language help' => '(If you remove a language pack you must update this setting)', |
84: 'Default announce heading' => 'Sample announcement', | 85: 'Default announce heading' => 'Sample announcement', |
85: 'Default announce message' => '<p>Enter your announcement here.</p>', | 86: 'Default announce message' => '<p>Enter your announcement here.</p>', |
86: 'Default maint message' => "The forums are temporarily down for maintenance. Please try again in a few minutes.<br />\\n<br />\\n/Administrator", | 87: 'Default maint message' => "The forums are temporarily down for maintenance. Please try again in a few minutes.<br />\\n<br />\\n/Administrator", |
punbb-1.3.2/lang/English/profile.php |
punbb-1.3.3/lang/English/profile.php |
44: 'Too wide or high' => 'The file you tried to upload is wider and/or higher than the maximum allowed %sx%s pixels.', | 44: 'Too wide or high' => 'The file you tried to upload is wider and/or higher than the maximum allowed %sx%s pixels.', |
45: 'Unknown failure' => 'An unknown error occurred. Please try again.', | 45: 'Unknown failure' => 'An unknown error occurred. Please try again.', |
46: 'Avatar' => 'Avatar', | 46: 'Avatar' => 'Avatar', |
47: 'Current avatar' => 'Current Avatar', | 47: 'Current avatar' => 'Current avatar', |
48: 'No avatar info' => 'No avatar is currently uploaded.', | 48: 'No avatar info' => 'No avatar is currently uploaded.', |
49: 'Avatar info replace' => 'Uploading a new avatar will replace your existing avatar.', | 49: 'Avatar info replace' => 'Uploading a new avatar will replace your existing avatar.', |
50: 'Avatar info none' => 'To display an avatar you first need to upload one.', | 50: 'Avatar info none' => 'To display an avatar you first need to upload one.', |
51: 'Avatar info type' => 'The allowed image file types are gif, jpeg and png.', | 51: 'Avatar info type' => 'The allowed image file types are gif, jpeg and png.', |
52: 'Avatar info size' => 'The maximum image size allowed is %sx%s pixels and %s bytes (%s KB).', | 52: 'Avatar info size' => 'The maximum image size allowed is %sx%s pixels and %s bytes (%s KB).', |
53: 'Delete avatar info' => 'Delete avatar to cease displaying any avatar.', | 53: 'Delete avatar info' => 'Delete avatar to stop displaying any avatar.', |
54: 'Upload avatar file' => 'Upload avatar file', | 54: 'Upload avatar file' => 'Upload avatar file', |
55: 'Avatar upload help' => 'Select file then update your profile to install.', | 55: 'Avatar upload help' => 'Select file then update your profile to install.', |
56: 'No upload warn' => '<strong>IMPORTANT! </strong> You must choose a file to upload before updating your profile.', | 56: 'No upload warn' => '<strong>IMPORTANT! </strong> You must choose a file to upload before updating your profile.', |
183: 'Change e-mail errors' => '<strong>Warning!</strong> The following errors must be corrected before your e-mail address can be updated:', | 183: 'Change e-mail errors' => '<strong>Warning!</strong> The following errors must be corrected before your e-mail address can be updated:', |
184: 'E-mail key bad' => 'The specified e-mail activation key was incorrect or has expired. Please re-request change of e-mail address. If that fails, contact the forum administrator at %s.', | 184: 'E-mail key bad' => 'The specified e-mail activation key was incorrect or has expired. Please re-request change of e-mail address. If that fails, contact the forum administrator at %s.', |
185: 'E-mail updated' => 'Your e-mail address has been updated.', | 185: 'E-mail updated' => 'Your e-mail address has been updated.', |
| 186: 'E-mail updated redirect' => 'Your e-mail address has been updated. Redirecting…', |
186: 'Wrong password' => 'The password you entered was incorrect.', | 187: 'Wrong password' => 'The password you entered was incorrect.', |
187: 'Activate e-mail sent' => 'An email has been sent to the specified address with instructions on how to activate the new e-mail address. If it doesn\'t arrive you can contact the forum administrator at %s.', | 188: 'Activate e-mail sent' => 'An email has been sent to the specified address with instructions on how to activate the new e-mail address. If it doesn\'t arrive you can contact the forum administrator at %s.', |
188: 'Change your e-mail' => 'Change your e-mail address', | 189: 'Change your e-mail' => 'Change your e-mail address', |
punbb-1.3.2/lang/English/topic.php |
punbb-1.3.3/lang/English/topic.php |
8: 'Search replies' => '(%s replies, posted in %s)', | 8: 'Search replies' => '(%s replies, posted in %s)', |
9: 'Post reply' => 'Post reply', | 9: 'Post reply' => 'Post reply', |
10: 'Topic closed' => '[ Closed ]', | 10: 'Topic closed' => '[ Closed ]', |
| 11: 'Topic closed info' => 'This topic is closed', |
11: 'No permission' => 'Sorry! no permission to post a reply', | 12: 'No permission' => 'Sorry! no permission to post a reply', |
12: 'Topic title' => 'Topic: %s', | 13: 'Topic title' => 'Topic: %s', |
13: 'Reply title' => 'Re: %s', | 14: 'Reply title' => 'Re: %s', |
14: 'Login to post' => 'You must %1$s or %2$s to post a reply', | 15: 'Login to post' => 'You must %1$s or %2$s to post a reply', |
15: 'From' => 'From:', // User location | 16: 'From' => 'From:', // User location |
16: 'Registered' => 'Registered:', | 17: 'Registered' => 'Registered:', |
17: 'Note' => 'Note:', // Admin note | 18: 'Note' => 'Note:', // Admin note |
18: 'IP' => 'IP:', | 19: 'IP' => 'IP:', |
19: 'Posts' => 'Posts', | 20: 'Posts' => 'Posts', |
20: 'Posts info' => 'Posts:', | 21: 'Posts info' => 'Posts:', |
32: 'Unsubscribe' => 'Unsubscribe', | 33: 'Unsubscribe' => 'Unsubscribe', |
33: 'Subscribe' => 'Subscribe', | 34: 'Subscribe' => 'Subscribe', |
34: 'Subscribe info' => 'Receive email notification of new posts.', | 35: 'Subscribe info' => 'Receive email notification of new posts.', |
35: 'RSS topic feed' => 'RSS Topic Feed', | 36: 'RSS topic feed' => 'RSS topic feed', |
36: 'Quick post' => 'Quick reply to this topic', | 37: 'Quick post' => 'Quick reply to this topic', |
37: 'Post' => 'Post', | 38: 'Post' => 'Post', |
38: 'Permalink post' => 'Permanent link to this post', | 39: 'Permalink post' => 'Permanent link to this post', |
40: 'Go to profile' => 'Go to %s\'s profile', | 41: 'Go to profile' => 'Go to %s\'s profile', |
41: 'Move' => 'Move topic', | 42: 'Move' => 'Move topic', |
42: 'Topic options' => 'Topic options', | 43: 'Topic options' => 'Topic options', |
43: 'Open' => 'Open topic', | 44: 'Open' => 'Open topic', |
44: 'Close' => 'Close topic', | 45: 'Close' => 'Close topic', |
45: 'Unstick' => 'Unstick topic', | 46: 'Unstick' => 'Unstick topic', |
46: 'Stick' => 'Stick topic', | 47: 'Stick' => 'Stick topic', |
47: 'Moderate topic' => 'Moderate topic', | 48: 'Moderate topic' => 'Moderate topic', |
48: 'Required warn' => 'You cannot submit or preview an empty message.', | 49: 'Required warn' => 'You cannot submit or preview an empty message.', |
49: | 50: |
punbb-1.3.2/moderate.php |
punbb-1.3.3/moderate.php |
2: /** | 2: /** |
3: * Provides various mass-moderation tools to moderators. | 3: * Provides various mass-moderation tools to moderators. |
4: * | 4: * |
5: * @copyright Copyright (C) 2008 PunBB, partially based on code copyright (C) 2008 FluxBB.org | 5: * @copyright (C) 2008-2009 PunBB, partially based on code (C) 2008-2009 FluxBB.org |
6: * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher | 6: * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher |
7: * @package PunBB | 7: * @package PunBB |
8: */ | 8: */ |
373: <?php ($hook = get_hook('mr_confirm_split_posts_pre_subject')) ? eval($hook) : null; ?> | 373: <?php ($hook = get_hook('mr_confirm_split_posts_pre_subject')) ? eval($hook) : null; ?> |
374: <div class="sf-box text required"> | 374: <div class="sf-box text required"> |
375: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_misc['New subject'] ?> <em><?php echo $lang_common['Required'] ?></em></span></label><br /> | 375: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_misc['New subject'] ?> <em><?php echo $lang_common['Required'] ?></em></span></label><br /> |
376: <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="new_subject" value="" size="80" maxlength="70" /></span> | 376: <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="new_subject" value="" size="70" maxlength="70" /></span> |
377: </div> | 377: </div> |
378: <?php ($hook = get_hook('mr_confirm_split_posts_pre_confirm_checkbox')) ? eval($hook) : null; ?> | 378: <?php ($hook = get_hook('mr_confirm_split_posts_pre_confirm_checkbox')) ? eval($hook) : null; ?> |
379: <div class="sf-box checkbox"> | 379: <div class="sf-box checkbox"> |
416: | 416: |
417: // Determine the post offset (based on $_GET['p']) | 417: // Determine the post offset (based on $_GET['p']) |
418: $forum_page['num_pages'] = ceil(($cur_topic['num_replies'] + 1) / $forum_user['disp_posts']); | 418: $forum_page['num_pages'] = ceil(($cur_topic['num_replies'] + 1) / $forum_user['disp_posts']); |
419: $forum_page['page'] = (!isset($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $forum_page['num_pages']) ? 1 : intval($_GET['p']); | 419: $forum_page['page'] = (!isset($_GET['p']) || !is_numeric($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $forum_page['num_pages']) ? 1 : intval($_GET['p']); |
420: $forum_page['start_from'] = $forum_user['disp_posts'] * ($forum_page['page'] - 1); | 420: $forum_page['start_from'] = $forum_user['disp_posts'] * ($forum_page['page'] - 1); |
421: $forum_page['finish_at'] = min(($forum_page['start_from'] + $forum_user['disp_posts']), ($cur_topic['num_replies'] + 1)); | 421: $forum_page['finish_at'] = min(($forum_page['start_from'] + $forum_user['disp_posts']), ($cur_topic['num_replies'] + 1)); |
422: $forum_page['items_info'] = generate_items_info($lang_misc['Posts'], ($forum_page['start_from'] + 1), ($cur_topic['num_replies'] + 1)); | 422: $forum_page['items_info'] = generate_items_info($lang_misc['Posts'], ($forum_page['start_from'] + 1), ($cur_topic['num_replies'] + 1)); |
521: | 521: |
522: $forum_page['post_ident'] = array(); | 522: $forum_page['post_ident'] = array(); |
523: $forum_page['message'] = array(); | 523: $forum_page['message'] = array(); |
524: $forum_page['author_title'] = ''; | |
525: $forum_page['user_ident'] = array(); | 524: $forum_page['user_ident'] = array(); |
526: $cur_post['username'] = $cur_post['poster']; | 525: $cur_post['username'] = $cur_post['poster']; |
527: | 526: |
1039: </div> | 1038: </div> |
1040: <?php ($hook = get_hook('mr_merge_topics_pre_fieldset')) ? eval($hook) : null; ?> | 1039: <?php ($hook = get_hook('mr_merge_topics_pre_fieldset')) ? eval($hook) : null; ?> |
1041: <fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>"> | 1040: <fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>"> |
1042: <legend class="group-legend"><strong><?php echo $lang_misc['Merge topic'] ?></strong></legend> | 1041: <legend class="group-legend"><strong><?php echo $lang_misc['Merge topics'] ?></strong></legend> |
1043: <?php ($hook = get_hook('mr_merge_topics_pre_redirect_checkbox')) ? eval($hook) : null; ?> | 1042: <?php ($hook = get_hook('mr_merge_topics_pre_redirect_checkbox')) ? eval($hook) : null; ?> |
1044: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> | 1043: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> |
1045: <div class="sf-box checkbox"> | 1044: <div class="sf-box checkbox"> |
1424: // Determine the topic offset (based on $_GET['p']) | 1423: // Determine the topic offset (based on $_GET['p']) |
1425: $forum_page['num_pages'] = ceil($cur_forum['num_topics'] / $forum_user['disp_topics']); | 1424: $forum_page['num_pages'] = ceil($cur_forum['num_topics'] / $forum_user['disp_topics']); |
1426: | 1425: |
1427: $forum_page['page'] = (!isset($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $forum_page['num_pages']) ? 1 : $_GET['p']; | 1426: $forum_page['page'] = (!isset($_GET['p']) || !is_numeric($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $forum_page['num_pages']) ? 1 : $_GET['p']; |
1428: $forum_page['start_from'] = $forum_user['disp_topics'] * ($forum_page['page'] - 1); | 1427: $forum_page['start_from'] = $forum_user['disp_topics'] * ($forum_page['page'] - 1); |
1429: $forum_page['finish_at'] = min(($forum_page['start_from'] + $forum_user['disp_topics']), ($cur_forum['num_topics'])); | 1428: $forum_page['finish_at'] = min(($forum_page['start_from'] + $forum_user['disp_topics']), ($cur_forum['num_topics'])); |
1430: $forum_page['items_info'] = generate_items_info($lang_misc['Topics'], ($forum_page['start_from'] + 1), $cur_forum['num_topics']); | 1429: $forum_page['items_info'] = generate_items_info($lang_misc['Topics'], ($forum_page['start_from'] + 1), $cur_forum['num_topics']); |
1535: ++$forum_page['item_count']; | 1534: ++$forum_page['item_count']; |
1536: | 1535: |
1537: // Start from scratch | 1536: // Start from scratch |
1538: $forum_page['item_subject'] = $forum_page['item_body'] = $forum_page['item_status'] = $forum_page['item_nav'] = $forum_page['item_title'] = $forum_page['item_subject_status'] = array(); | 1537: $forum_page['item_subject'] = $forum_page['item_body'] = $forum_page['item_status'] = $forum_page['item_nav'] = $forum_page['item_title'] = $forum_page['item_title_status'] = array(); |
1539: $forum_page['item_indicator'] = ''; | |
1540: | 1538: |
1541: if ($forum_config['o_censoring'] == '1') | 1539: if ($forum_config['o_censoring'] == '1') |
1542: $cur_topic['subject'] = censor_words($cur_topic['subject']); | 1540: $cur_topic['subject'] = censor_words($cur_topic['subject']); |
1543: | 1541: |
| 1542: $forum_page['item_subject']['starter'] = '<span class="item-starter">'.sprintf($lang_forum['Topic starter'], forum_htmlencode($cur_topic['poster'])).'</span>'; |
| 1543: |
1544: if ($cur_topic['moved_to'] != null) | 1544: if ($cur_topic['moved_to'] != null) |
1545: { | 1545: { |
1546: $forum_page['item_status']['moved'] = 'moved'; | 1546: $forum_page['item_status']['moved'] = 'moved'; |
1547: $forum_page['item_title']['link'] = '<a href="'.forum_link($forum_url['topic'], array($cur_topic['moved_to'], sef_friendly($cur_topic['subject']))).'"><span>'.$lang_forum['Moved'].'</span> '.forum_htmlencode($cur_topic['subject']).'</a>'; | 1547: $forum_page['item_title']['link'] = '<span class="item-status"><em class="moved">'.sprintf($lang_forum['Item status'], $lang_forum['Moved']).'</em></span> <a href="'.forum_link($forum_url['topic'], array($cur_topic['moved_to'], sef_friendly($cur_topic['subject']))).'">'.forum_htmlencode($cur_topic['subject']).'</a>'; |
1548: | 1548: |
1549: // Combine everything to produce the Topic heading | 1549: // Combine everything to produce the Topic heading |
1550: $forum_page['item_body']['subject']['title'] = '<h3 class="hn"><span class="item-num">'.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span> <strong>'.$forum_page['item_title']['link'].'</strong></h3>'; | 1550: $forum_page['item_body']['subject']['title'] = '<h3 class="hn"><span class="item-num">'.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span> <strong>'.$forum_page['item_title']['link'].'</strong></h3>'; |
1573: $forum_page['item_status']['posted'] = 'posted'; | 1573: $forum_page['item_status']['posted'] = 'posted'; |
1574: } | 1574: } |
1575: | 1575: |
| 1576: if ($cur_topic['sticky'] == '1') |
| 1577: { |
| 1578: $forum_page['item_title_status']['sticky'] = '<em class="sticky">'.$lang_forum['Sticky'].'</em>'; |
| 1579: $forum_page['item_status']['sticky'] = 'sticky'; |
| 1580: } |
| 1581: |
| 1582: if ($cur_topic['closed'] == '1') |
| 1583: { |
| 1584: $forum_page['item_title_status']['closed'] = '<em class="closed">'.$lang_forum['Closed'].'</em>'; |
| 1585: $forum_page['item_status']['closed'] = 'closed'; |
| 1586: } |
| 1587: |
| 1588: ($hook = get_hook('mr_topic_loop_normal_topic_pre_item_title_status_merge')) ? eval($hook) : null; |
| 1589: |
| 1590: if (!empty($forum_page['item_title_status'])) |
| 1591: $forum_page['item_title']['status'] = '<span class="item-status">'.sprintf($lang_forum['Item status'], implode(', ', $forum_page['item_title_status'])).'</span>'; |
| 1592: |
1576: $forum_page['item_title']['link'] = '<strong><a href="'.forum_link($forum_url['topic'], array($cur_topic['id'], sef_friendly($cur_topic['subject']))).'">'.forum_htmlencode($cur_topic['subject']).'</a></strong>'; | 1593: $forum_page['item_title']['link'] = '<strong><a href="'.forum_link($forum_url['topic'], array($cur_topic['id'], sef_friendly($cur_topic['subject']))).'">'.forum_htmlencode($cur_topic['subject']).'</a></strong>'; |
1577: | 1594: |
| 1595: ($hook = get_hook('mr_topic_loop_normal_topic_pre_item_title_merge')) ? eval($hook) : null; |
| 1596: |
| 1597: $forum_page['item_body']['subject']['title'] = '<h3 class="hn"><span class="item-num">'.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span> '.implode(' ', $forum_page['item_title']).'</h3>'; |
| 1598: |
| 1599: |
| 1600: if (empty($forum_page['item_status'])) |
| 1601: $forum_page['item_status']['normal'] = 'normal'; |
| 1602: |
1578: $forum_page['item_pages'] = ceil(($cur_topic['num_replies'] + 1) / $forum_user['disp_posts']); | 1603: $forum_page['item_pages'] = ceil(($cur_topic['num_replies'] + 1) / $forum_user['disp_posts']); |
1579: | 1604: |
1580: if ($forum_page['item_pages'] > 1) | 1605: if ($forum_page['item_pages'] > 1) |
1587: $forum_page['item_status']['new'] = 'new'; | 1612: $forum_page['item_status']['new'] = 'new'; |
1588: } | 1613: } |
1589: | 1614: |
1590: if (!empty($forum_page['item_nav'])) | 1615: ($hook = get_hook('mr_topic_loop_normal_topic_pre_item_nav_merge')) ? eval($hook) : null; |
1591: $forum_page['item_title']['nav'] = '<span class="item-nav">'.sprintf($lang_forum['Topic navigation'], implode('  ', $forum_page['item_nav'])).'</span>'; | |
1592: | |
1593: ($hook = get_hook('mr_topic_actions_moved_row_pre_item_title_merge')) ? eval($hook) : null; | |
1594: | 1616: |
1595: $forum_page['item_body']['subject']['title'] = '<h3 class="hn"><span class="item-num">'.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span> '.implode(' ', $forum_page['item_title']).'</h3>'; | 1617: if (!empty($forum_page['item_nav'])) |
| 1618: $forum_page['item_subject']['nav'] = '<span class="item-nav">'.sprintf($lang_forum['Topic navigation'], implode('  ', $forum_page['item_nav'])).'</span>'; |
1596: | 1619: |
1597: // Assemble the Topic subject | 1620: // Assemble the Topic subject |
1598: | 1621: |
1599: if ($cur_topic['sticky'] == '1') | |
1600: { | |
1601: $forum_page['item_subject_status']['sticky'] = $lang_forum['Sticky']; | |
1602: $forum_page['item_status']['sticky'] = 'sticky'; | |
1603: } | |
1604: | |
1605: if ($cur_topic['closed'] == '1') | |
1606: { | |
1607: $forum_page['item_subject_status']['closed'] = $lang_forum['Closed']; | |
1608: $forum_page['item_status']['closed'] = 'closed'; | |
1609: } | |
1610: | |
1611: ($hook = get_hook('mr_topic_actions_moved_row_pre_item_subject_status_merge')) ? eval($hook) : null; | |
1612: | |
1613: if (!empty($forum_page['item_subject_status'])) | |
1614: $forum_page['item_subject']['status'] = '<span class="item-status">'.sprintf($lang_forum['Item status'], implode(' ', $forum_page['item_subject_status'])).'</span>'; | |
1615: | |
1616: if (empty($forum_page['item_status'])) | |
1617: $forum_page['item_status']['normal'] = 'normal'; | |
1618: | |
1619: $forum_page['item_body']['info']['replies'] = '<li class="info-replies"><strong>'.forum_number_format($cur_topic['num_replies']).'</strong> <span class="label">'.(($cur_topic['num_replies'] == 1) ? $lang_forum['Reply'] : $lang_forum['Replies']).'</span></li>'; | 1622: $forum_page['item_body']['info']['replies'] = '<li class="info-replies"><strong>'.forum_number_format($cur_topic['num_replies']).'</strong> <span class="label">'.(($cur_topic['num_replies'] == 1) ? $lang_forum['Reply'] : $lang_forum['Replies']).'</span></li>'; |
1620: | 1623: |
1621: if ($forum_config['o_topic_views'] == '1') | 1624: if ($forum_config['o_topic_views'] == '1') |
1627: ($hook = get_hook('mr_topic_actions_normal_row_pre_output')) ? eval($hook) : null; | 1630: ($hook = get_hook('mr_topic_actions_normal_row_pre_output')) ? eval($hook) : null; |
1628: } | 1631: } |
1629: | 1632: |
1630: $forum_page['item_subject']['starter'] = '<span class="item-starter">'.sprintf($lang_forum['Topic starter'], '<cite>'.forum_htmlencode($cur_topic['poster']).'</cite>').'</span>'; | 1633: $forum_page['item_body']['subject']['desc'] = '<p>'.implode(' ', $forum_page['item_subject']).'</p>'; |
1631: $forum_page['item_body']['subject']['desc'] = implode(' ', $forum_page['item_subject']); | 1634: |
| 1635: ($hook = get_hook('mr_topic_actions_row_pre_item_status_merge')) ? eval($hook) : null; |
1632: | 1636: |
1633: $forum_page['item_style'] = (($forum_page['item_count'] % 2 != 0) ? ' odd' : ' even').(($forum_page['item_count'] == 1) ? ' main-first-item' : '').((!empty($forum_page['item_status'])) ? ' '.implode(' ', $forum_page['item_status']) : ''); | 1637: $forum_page['item_style'] = (($forum_page['item_count'] % 2 != 0) ? ' odd' : ' even').(($forum_page['item_count'] == 1) ? ' main-first-item' : '').((!empty($forum_page['item_status'])) ? ' '.implode(' ', $forum_page['item_status']) : ''); |
1634: | 1638: |
punbb-1.3.2/profile.php |
punbb-1.3.3/profile.php |
2: /** | 2: /** |
3: * Allows users to view and edit their details. | 3: * Allows users to view and edit their details. |
4: * | 4: * |
5: * @copyright Copyright (C) 2008 PunBB, partially based on code copyright (C) 2008 FluxBB.org | 5: * @copyright (C) 2008-2009 PunBB, partially based on code (C) 2008-2009 FluxBB.org |
6: * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher | 6: * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher |
7: * @package PunBB | 7: * @package PunBB |
8: */ | 8: */ |
430: if (!is_valid_email($new_email)) | 430: if (!is_valid_email($new_email)) |
431: $errors[] = $lang_common['Invalid e-mail']; | 431: $errors[] = $lang_common['Invalid e-mail']; |
432: | 432: |
433: // Check it it's a banned e-mail address | 433: // Check if it's a banned e-mail address |
434: if (is_banned_email($new_email)) | 434: if (is_banned_email($new_email)) |
435: { | 435: { |
436: ($hook = get_hook('pf_change_email_normal_banned_email')) ? eval($hook) : null; | 436: ($hook = get_hook('pf_change_email_normal_banned_email')) ? eval($hook) : null; |
476: // Did everything go according to plan? | 476: // Did everything go according to plan? |
477: if (empty($errors)) | 477: if (empty($errors)) |
478: { | 478: { |
| 479: if ($forum_config['o_regs_verify'] != '1') |
| 480: { |
| 481: // We have no confirmed e-mail so we change e-mail right now |
| 482: $query = array( |
| 483: 'UPDATE' => 'users', |
| 484: 'SET' => 'email=\''.$forum_db->escape($new_email).'\'', |
| 485: 'WHERE' => 'id='.$id |
| 486: ); |
| 487: |
| 488: ($hook = get_hook('pf_change_email_key_qr_update_email')) ? eval($hook) : null; |
| 489: $forum_db->query_build($query) or error(__FILE__, __LINE__); |
| 490: |
| 491: redirect(forum_link($forum_url['profile_about'], $id), $lang_profile['E-mail updated redirect']); |
| 492: } |
| 493: |
| 494: // We have a confirmed e-mail so we going to send an activation link |
| 495: |
479: $new_email_key = random_key(8, true); | 496: $new_email_key = random_key(8, true); |
480: | 497: |
481: // Save new e-mail and activation key | 498: // Save new e-mail and activation key |
889: $form['num_posts'] = intval($_POST['num_posts']); | 906: $form['num_posts'] = intval($_POST['num_posts']); |
890: } | 907: } |
891: | 908: |
892: if ($forum_config['o_regs_verify'] == '0' || $forum_user['is_admmod']) | 909: if ($forum_user['is_admmod']) |
893: { | 910: { |
894: if (!defined('FORUM_EMAIL_FUNCTIONS_LOADED')) | 911: if (!defined('FORUM_EMAIL_FUNCTIONS_LOADED')) |
895: require FORUM_ROOT.'include/email.php'; | 912: require FORUM_ROOT.'include/email.php'; |
1284: $forum_user['g_id'] != FORUM_ADMIN && | 1301: $forum_user['g_id'] != FORUM_ADMIN && |
1285: ($forum_user['g_moderator'] != '1' || $forum_user['g_mod_edit_users'] == '0' || $user['g_id'] == FORUM_ADMIN || $user['g_moderator'] == '1')) | 1302: ($forum_user['g_moderator'] != '1' || $forum_user['g_mod_edit_users'] == '0' || $user['g_id'] == FORUM_ADMIN || $user['g_moderator'] == '1')) |
1286: { | 1303: { |
1287: ($hook = get_hook('pf_view_details_selected')) ? eval($hook) : null; | |
1288: | |
1289: // Setup user identification | 1304: // Setup user identification |
1290: $forum_page['user_ident'] = array(); | 1305: $forum_page['user_ident'] = array(); |
1291: | 1306: |
1292: ($hook = get_hook('pf_view_details_selected')) ? eval($hook) : null; | 1307: ($hook = get_hook('pf_view_details_selected')) ? eval($hook) : null; |
1293: | 1308: |
1294: $forum_page['user_ident']['username'] = '<li class="username'.(($user['realname'] =='') ? ' fn nickname' : ' nickname').'"><strong>'.forum_htmlencode($user['username']).'</strong></li>'; | 1309: $forum_page['user_ident']['username'] = '<li class="username'.(($user['realname'] =='') ? ' fn nickname' : ' nickname').'"><strong>'.forum_htmlencode($user['username']).'</strong></li>'; |
1295: $forum_page['user_ident']['usertitle'] = '<li class="usertitle"><span>'.get_title($user).'</span></li>'; | |
1296: | 1310: |
1297: if ($forum_config['o_avatars'] == '1') | 1311: if ($forum_config['o_avatars'] == '1') |
1298: { | 1312: { |
1302: $forum_page['user_ident']['avatar'] = '<li class="useravatar">'.$forum_page['avatar_markup'].'</li>'; | 1316: $forum_page['user_ident']['avatar'] = '<li class="useravatar">'.$forum_page['avatar_markup'].'</li>'; |
1303: } | 1317: } |
1304: | 1318: |
| 1319: $forum_page['user_ident']['usertitle'] = '<li class="usertitle"><span>'.get_title($user).'</span></li>'; |
| 1320: |
1305: // Setup user information | 1321: // Setup user information |
1306: $forum_page['user_info'] = array(); | 1322: $forum_page['user_info'] = array(); |
1307: | 1323: |
1407: </ul> | 1423: </ul> |
1408: </div> | 1424: </div> |
1409: </div> | 1425: </div> |
1410: <?php ($hook = get_hook('pf_view_details_pre_user_activity_info')) ? eval($hook) : null; ?> | 1426: <?php endif; ($hook = get_hook('pf_view_details_pre_user_activity_info')) ? eval($hook) : null; ?> |
1411: <?php endif; if (!empty($forum_page['user_activity'])): ?> | 1427: <?php if (!empty($forum_page['user_activity'])): ?> |
1412: <div class="ct-set data-set set<?php echo ++$forum_page['item_count'] ?>"> | 1428: <div class="ct-set data-set set<?php echo ++$forum_page['item_count'] ?>"> |
1413: <div class="ct-box data-box"> | 1429: <div class="ct-box data-box"> |
1414: <h3 class="ct-legend hn"><span><?php echo $lang_profile['Posts and topics'] ?></span></h3> | 1430: <h3 class="ct-legend hn"><span><?php echo $lang_profile['Posts and topics'] ?></span></h3> |
1417: </ul> | 1433: </ul> |
1418: </div> | 1434: </div> |
1419: </div> | 1435: </div> |
1420: <?php ($hook = get_hook('pf_view_details_pre_user_sig_info')) ? eval($hook) : null; ?> | 1436: <?php endif; ($hook = get_hook('pf_view_details_pre_user_sig_info')) ? eval($hook) : null; ?> |
1421: <?php endif; if (isset($forum_page['sig_demo'])): ?> | 1437: <?php if (isset($forum_page['sig_demo'])): ?> |
1422: <div class="ct-set data-set set<?php echo ++$forum_page['item_count'] ?>"> | 1438: <div class="ct-set data-set set<?php echo ++$forum_page['item_count'] ?>"> |
1423: <div class="ct-box data-box"> | 1439: <div class="ct-box data-box"> |
1424: <h3 class="ct-legend hn"><span><?php echo $lang_profile['Current signature'] ?></span></h3> | 1440: <h3 class="ct-legend hn"><span><?php echo $lang_profile['Current signature'] ?></span></h3> |
1486: ($hook = get_hook('pf_change_details_about_selected')) ? eval($hook) : null; | 1502: ($hook = get_hook('pf_change_details_about_selected')) ? eval($hook) : null; |
1487: | 1503: |
1488: $forum_page['user_ident']['username'] = '<li class="username'.(($user['realname'] =='') ? ' fn nickname' : ' nickname').'"><strong>'.forum_htmlencode($user['username']).'</strong></li>'; | 1504: $forum_page['user_ident']['username'] = '<li class="username'.(($user['realname'] =='') ? ' fn nickname' : ' nickname').'"><strong>'.forum_htmlencode($user['username']).'</strong></li>'; |
1489: $forum_page['user_ident']['usertitle'] = '<li class="usertitle"><span>'.get_title($user).'</span></li>'; | |
1490: | 1505: |
1491: if ($forum_config['o_avatars'] == '1') | 1506: if ($forum_config['o_avatars'] == '1') |
1492: { | 1507: { |
1496: $forum_page['user_ident']['avatar'] = '<li class="useravatar">'.$forum_page['avatar_markup'].'</li>'; | 1511: $forum_page['user_ident']['avatar'] = '<li class="useravatar">'.$forum_page['avatar_markup'].'</li>'; |
1497: } | 1512: } |
1498: | 1513: |
| 1514: $forum_page['user_ident']['usertitle'] = '<li class="usertitle"><span>'.get_title($user).'</span></li>'; |
| 1515: |
1499: // Create array for private information | 1516: // Create array for private information |
1500: $forum_page['user_private'] = array(); | 1517: $forum_page['user_private'] = array(); |
1501: | 1518: |
1549: | 1566: |
1550: // Setup user messaging | 1567: // Setup user messaging |
1551: if ($user['jabber'] !='') | 1568: if ($user['jabber'] !='') |
1552: $forum_page['user_contact']['jabber'] = '<li><span><strong>'.$lang_profile['Jabber'].':</strong> '.forum_htmlencode(($forum_config['o_censoring'] == '1') ? censor_words($user['jabber']) : $user['jabber']).'</span></li>'; | 1569: $forum_page['user_contact']['jabber'] = '<li><span>'.$lang_profile['Jabber'].': <strong>'.forum_htmlencode(($forum_config['o_censoring'] == '1') ? censor_words($user['jabber']) : $user['jabber']).'</strong></span></li>'; |
1553: if ($user['icq'] !='') | 1570: if ($user['icq'] !='') |
1554: $forum_page['user_contact']['icq'] = '<li><span><strong>'.$lang_profile['ICQ'].':</strong> '.forum_htmlencode($user['icq']).'</span></li>'; | 1571: $forum_page['user_contact']['icq'] = '<li><span>'.$lang_profile['ICQ'].': <strong>'.forum_htmlencode($user['icq']).'</strong></span></li>'; |
1555: if ($user['msn'] !='') | 1572: if ($user['msn'] !='') |
1556: $forum_page['user_contact']['msn'] = '<li><span><strong>'.$lang_profile['MSN'].':</strong> '.forum_htmlencode(($forum_config['o_censoring'] == '1') ? censor_words($user['msn']) : $user['msn']).'</span></li>'; | 1573: $forum_page['user_contact']['msn'] = '<li><span>'.$lang_profile['MSN'].': <strong>'.forum_htmlencode(($forum_config['o_censoring'] == '1') ? censor_words($user['msn']) : $user['msn']).'</strong></span></li>'; |
1557: if ($user['aim'] !='') | 1574: if ($user['aim'] !='') |
1558: $forum_page['user_contact']['aim'] = '<li><span><strong>'.$lang_profile['AOL IM'].':</strong> '.forum_htmlencode(($forum_config['o_censoring'] == '1') ? censor_words($user['aim']) : $user['aim']).'</span></li>'; | 1575: $forum_page['user_contact']['aim'] = '<li><span>'.$lang_profile['AOL IM'].': <strong>'.forum_htmlencode(($forum_config['o_censoring'] == '1') ? censor_words($user['aim']) : $user['aim']).'</strong></span></li>'; |
1559: if ($user['yahoo'] !='') | 1576: if ($user['yahoo'] !='') |
1560: $forum_page['user_contact']['yahoo'] = '<li><span><strong>'.$lang_profile['Yahoo'].':</strong> '.forum_htmlencode(($forum_config['o_censoring'] == '1') ? censor_words($user['yahoo']) : $user['yahoo']).'</span></li>'; | 1577: $forum_page['user_contact']['yahoo'] = '<li><span>'.$lang_profile['Yahoo'].': <strong>'.forum_htmlencode(($forum_config['o_censoring'] == '1') ? censor_words($user['yahoo']) : $user['yahoo']).'</strong></span></li>'; |
1561: | 1578: |
1562: // Setup signature demo | 1579: // Setup signature demo |
1563: if ($forum_config['o_signatures'] == '1' && isset($parsed_signature)) | 1580: if ($forum_config['o_signatures'] == '1' && isset($parsed_signature)) |
1580: if ($forum_page['own_profile'] || $forum_user['g_id'] == FORUM_ADMIN || ($forum_user['g_moderator'] == '1' && $forum_user['g_mod_change_passwords'] == '1')) | 1597: if ($forum_page['own_profile'] || $forum_user['g_id'] == FORUM_ADMIN || ($forum_user['g_moderator'] == '1' && $forum_user['g_mod_change_passwords'] == '1')) |
1581: $forum_page['user_options']['change_password'] = '<span'.(empty($forum_page['user_options']) ? ' class="first-item"' : '').'><a href="'.forum_link($forum_url['change_password'], $id).'">'.(($forum_page['own_profile']) ? $lang_profile['Change your password'] : sprintf($lang_profile['Change user password'], forum_htmlencode($user['username']))).'</a></span>'; | 1598: $forum_page['user_options']['change_password'] = '<span'.(empty($forum_page['user_options']) ? ' class="first-item"' : '').'><a href="'.forum_link($forum_url['change_password'], $id).'">'.(($forum_page['own_profile']) ? $lang_profile['Change your password'] : sprintf($lang_profile['Change user password'], forum_htmlencode($user['username']))).'</a></span>'; |
1582: | 1599: |
1583: if (!$forum_user['is_admmod'] && $forum_config['o_regs_verify'] == '1') | 1600: if (!$forum_user['is_admmod']) |
1584: $forum_page['user_options']['change_email'] = '<span'.(empty($forum_page['user_options']) ? ' class="first-item"' : '').'><a href="'.forum_link($forum_url['change_email'], $id).'">'.(($forum_page['own_profile']) ? $lang_profile['Change your e-mail'] : sprintf($lang_profile['Change user e-mail'], forum_htmlencode($user['username']))).'</a></span>'; | 1601: $forum_page['user_options']['change_email'] = '<span'.(empty($forum_page['user_options']) ? ' class="first-item"' : '').'><a href="'.forum_link($forum_url['change_email'], $id).'">'.(($forum_page['own_profile']) ? $lang_profile['Change your e-mail'] : sprintf($lang_profile['Change user e-mail'], forum_htmlencode($user['username']))).'</a></span>'; |
1585: | 1602: |
1586: $forum_page['group_count'] = $forum_page['item_count'] = $forum_page['fld_count'] = 0; | 1603: $forum_page['group_count'] = $forum_page['item_count'] = $forum_page['fld_count'] = 0; |
1690: $forum_page['hidden_fields']['old_username'] = '<input type="hidden" name="old_username" value="'.forum_htmlencode($user['username']).'" />'; | 1707: $forum_page['hidden_fields']['old_username'] = '<input type="hidden" name="old_username" value="'.forum_htmlencode($user['username']).'" />'; |
1691: | 1708: |
1692: // Does the form have required fields | 1709: // Does the form have required fields |
1693: $forum_page['has_required'] = ((($forum_user['is_admmod'] && ($forum_user['g_id'] == FORUM_ADMIN || $forum_user['g_mod_rename_users'] == '1')) || ($forum_user['is_admmod'] || $forum_config['o_regs_verify'] != '1')) ? true : false); | 1710: $forum_page['has_required'] = ((($forum_user['is_admmod'] && ($forum_user['g_id'] == FORUM_ADMIN || $forum_user['g_mod_rename_users'] == '1')) || $forum_user['is_admmod']) ? true : false); |
1694: | 1711: |
1695: ($hook = get_hook('pf_change_details_identity_pre_header_load')) ? eval($hook) : null; | 1712: ($hook = get_hook('pf_change_details_identity_pre_header_load')) ? eval($hook) : null; |
1696: | 1713: |
1750: </div> | 1767: </div> |
1751: </div> | 1768: </div> |
1752: <?php endif; ($hook = get_hook('pf_change_details_identity_pre_email')) ? eval($hook) : null; ?> | 1769: <?php endif; ($hook = get_hook('pf_change_details_identity_pre_email')) ? eval($hook) : null; ?> |
1753: <?php if ($forum_user['is_admmod'] || $forum_config['o_regs_verify'] != '1'): ?> | 1770: <?php if ($forum_user['is_admmod']): ?> |
1754: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> | 1771: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> |
1755: <div class="sf-box text required"> | 1772: <div class="sf-box text required"> |
1756: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_profile['E-mail'] ?> <em><?php echo $lang_common['Required'] ?></em></span> <small><?php echo $lang_profile['E-mail help'] ?></small></label><br /> | 1773: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_profile['E-mail'] ?> <em><?php echo $lang_common['Required'] ?></em></span> <small><?php echo $lang_profile['E-mail help'] ?></small></label><br /> |
2532: | 2549: |
2533: echo "\t\t\t".implode("\n\t\t\t", $forum_page['user_management'])."\n"; | 2550: echo "\t\t\t".implode("\n\t\t\t", $forum_page['user_management'])."\n"; |
2534: | 2551: |
2535: ($hook = get_hook('pf_change_details_admin_pre_group_membership')) ? eval($hook) : null; | 2552: ($hook = get_hook('pf_change_details_admin_pre_membership')) ? eval($hook) : null; |
2536: | 2553: |
2537: if ($forum_user['g_moderator'] != '1' && !$forum_page['own_profile']) | 2554: if ($forum_user['g_moderator'] != '1' && !$forum_page['own_profile']) |
2538: { | 2555: { |
punbb-1.3.2/search.php |
punbb-1.3.3/search.php |
2: /** | 2: /** |
3: * Allows users to search the forum based on various criteria. | 3: * Allows users to search the forum based on various criteria. |
4: * | 4: * |
5: * @copyright Copyright (C) 2008 PunBB, partially based on code copyright (C) 2008 FluxBB.org | 5: * @copyright (C) 2008-2009 PunBB, partially based on code (C) 2008-2009 FluxBB.org |
6: * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher | 6: * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher |
7: * @package PunBB | 7: * @package PunBB |
8: */ | 8: */ |
42: // We aren't just grabbing a cached search | 42: // We aren't just grabbing a cached search |
43: else if (isset($_GET['action'])) | 43: else if (isset($_GET['action'])) |
44: { | 44: { |
45: $action = (isset($_GET['action'])) ? $_GET['action'] : null; | 45: $action = $_GET['action']; |
46: | 46: |
47: // Validate action | 47: // Validate action |
48: if (!validate_search_action($action)) | 48: if (!validate_search_action($action)) |
191: <div class="main-subhead"> | 191: <div class="main-subhead"> |
192: <p class="item-summary forum-noview"><span><?php printf($lang_forum['Search subtitle'], implode(' ', $forum_page['item_header']['subject']), implode(', ', $forum_page['item_header']['info'])) ?></span></p> | 192: <p class="item-summary forum-noview"><span><?php printf($lang_forum['Search subtitle'], implode(' ', $forum_page['item_header']['subject']), implode(', ', $forum_page['item_header']['info'])) ?></span></p> |
193: </div> | 193: </div> |
194: <div class="main-content main-forum forum-noview"> | 194: <div class="main-content main-forum forum-forums"> |
195: <?php | 195: <?php |
196: | 196: |
197: } | 197: } |
237: { | 237: { |
238: // Generate the result heading | 238: // Generate the result heading |
239: $forum_page['post_ident'] = array(); | 239: $forum_page['post_ident'] = array(); |
240: $forum_page['post_ident']['num'] = '<span class="post-num">'.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span>'; | 240: $forum_page['post_ident']['num'] = '<span class="post-num">'.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span>'; |
241: $forum_page['post_ident']['byline'] = '<span class="post-byline">'.sprintf((($cur_set['pid'] == $cur_set['first_post_id']) ? $lang_topic['Topic byline'] : $lang_topic['Reply byline']), '<strong>'.forum_htmlencode($cur_set['pposter']).'</strong>').'</span>'; | 241: $forum_page['post_ident']['byline'] = '<span class="post-byline">'.sprintf((($cur_set['pid'] == $cur_set['first_post_id']) ? $lang_topic['Topic byline'] : $lang_topic['Reply byline']), '<strong>'.forum_htmlencode($cur_set['pposter']).'</strong>').'</span>'; |
242: $forum_page['post_ident']['link'] = '<span class="post-link"><a class="permalink" rel="bookmark" title="'.$lang_topic['Permalink post'].'" href="'.forum_link($forum_url['post'], $cur_set['pid']).'">'.format_time($cur_set['pposted']).'</a></span>'; | 242: $forum_page['post_ident']['link'] = '<span class="post-link"><a class="permalink" rel="bookmark" title="'.$lang_topic['Permalink post'].'" href="'.forum_link($forum_url['post'], $cur_set['pid']).'">'.format_time($cur_set['pposted']).'</a></span>'; |
243: | 243: |
305: { | 305: { |
306: // Start from scratch | 306: // Start from scratch |
307: $forum_page['item_subject'] = $forum_page['item_body'] = $forum_page['item_status'] = $forum_page['item_nav'] = $forum_page['item_title'] = $forum_page['item_title_status'] = array(); | 307: $forum_page['item_subject'] = $forum_page['item_body'] = $forum_page['item_status'] = $forum_page['item_nav'] = $forum_page['item_title'] = $forum_page['item_title_status'] = array(); |
308: $forum_page['item_indicator'] = ''; | |
309: | 308: |
310: // Assemble the Topic heading | 309: // Assemble the Topic heading |
311: | 310: |
335: | 334: |
336: $forum_page['item_title']['link'] = '<a href="'.forum_link($forum_url['topic'], array($cur_set['tid'], sef_friendly($cur_set['subject']))).'">'.forum_htmlencode($cur_set['subject']).'</a>'; | 335: $forum_page['item_title']['link'] = '<a href="'.forum_link($forum_url['topic'], array($cur_set['tid'], sef_friendly($cur_set['subject']))).'">'.forum_htmlencode($cur_set['subject']).'</a>'; |
337: | 336: |
| 337: ($hook = get_hook('se_results_topics_row_pre_item_title_merge')) ? eval($hook) : null; |
| 338: |
| 339: $forum_page['item_body']['subject']['title'] = '<h3 class="hn"><span class="item-num">'.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span> '.implode(' ', $forum_page['item_title']).'</h3>'; |
| 340: |
338: $forum_page['item_pages'] = ceil(($cur_set['num_replies'] + 1) / $forum_user['disp_posts']); | 341: $forum_page['item_pages'] = ceil(($cur_set['num_replies'] + 1) / $forum_user['disp_posts']); |
339: | 342: |
340: if ($forum_page['item_pages'] > 1) | 343: if ($forum_page['item_pages'] > 1) |
349: | 352: |
350: ($hook = get_hook('se_results_topics_row_pre_item_nav_merge')) ? eval($hook) : null; | 353: ($hook = get_hook('se_results_topics_row_pre_item_nav_merge')) ? eval($hook) : null; |
351: | 354: |
352: if (!empty($forum_page['item_nav'])) | 355: $forum_page['item_subject']['starter'] = '<span class="item-starter">'.sprintf($lang_forum['Topic starter'], forum_htmlencode($cur_set['poster'])).'</span>'; |
353: $forum_page['item_title']['nav'] = '<span class="item-nav">'.sprintf($lang_forum['Topic navigation'], implode('  ', $forum_page['item_nav'])).'</span>'; | |
354: | |
355: ($hook = get_hook('se_results_topics_row_pre_item_title_merge')) ? eval($hook) : null; | |
356: | |
357: $forum_page['item_body']['subject']['title'] = '<h3 class="hn"><span class="item-num">'.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span> '.implode(' ', $forum_page['item_title']).'</h3>'; | |
358: | 356: |
359: $forum_page['item_subject']['starter'] = '<span class="item-starter">'.sprintf($lang_forum['Topic starter'], '<cite>'.forum_htmlencode($cur_set['poster']).'</cite>').'</span>'; | 357: if (!empty($forum_page['item_nav'])) |
| 358: $forum_page['item_subject']['nav'] = '<span class="item-nav">'.sprintf($lang_forum['Topic navigation'], implode('  ', $forum_page['item_nav'])).'</span>'; |
360: | 359: |
361: ($hook = get_hook('se_results_topics_row_pre_item_subject_merge')) ? eval($hook) : null; | 360: ($hook = get_hook('se_results_topics_row_pre_item_subject_merge')) ? eval($hook) : null; |
362: | 361: |
363: $forum_page['item_body']['subject']['desc'] = implode(' ', $forum_page['item_subject']); | 362: $forum_page['item_body']['subject']['desc'] = '<p>'.implode(' ', $forum_page['item_subject']).'</p>'; |
364: | 363: |
365: if (empty($forum_page['item_status'])) | 364: if (empty($forum_page['item_status'])) |
366: $forum_page['item_status']['normal'] = 'normal'; | 365: $forum_page['item_status']['normal'] = 'normal'; |
369: | 368: |
370: $forum_page['item_style'] = (($forum_page['item_count'] % 2 != 0) ? ' odd' : ' even').(($forum_page['item_count'] == 1) ? ' main-first-item' : '').((!empty($forum_page['item_status'])) ? ' '.implode(' ', $forum_page['item_status']) : ''); | 369: $forum_page['item_style'] = (($forum_page['item_count'] % 2 != 0) ? ' odd' : ' even').(($forum_page['item_count'] == 1) ? ' main-first-item' : '').((!empty($forum_page['item_status'])) ? ' '.implode(' ', $forum_page['item_status']) : ''); |
371: | 370: |
372: $forum_page['item_body']['info']['forum'] = '<li class="info-forum"><strong>'.$cur_set['forum_name'].'</strong> <span class="label">'.(($cur_set['num_replies'] == 1) ? $lang_forum['Reply'] : $lang_forum['Replies']).'</span></li>'; | 371: $forum_page['item_body']['info']['forum'] = '<li class="info-forum"><span class="label">'.$lang_search['Posted in'].'</span><a href="'.forum_link($forum_url['forum'], array($cur_set['forum_id'], sef_friendly($cur_set['forum_name']))).'">'.$cur_set['forum_name'].'</a></li>'; |
373: $forum_page['item_body']['info']['replies'] = '<li class="info-replies"><strong>'.forum_number_format($cur_set['num_replies']).'</strong> <span class="label">'.(($cur_set['num_replies'] == 1) ? $lang_forum['Reply'] : $lang_forum['Replies']).'</span></li>'; | 372: $forum_page['item_body']['info']['replies'] = '<li class="info-replies"><strong>'.forum_number_format($cur_set['num_replies']).'</strong> <span class="label">'.(($cur_set['num_replies'] == 1) ? $lang_forum['Reply'] : $lang_forum['Replies']).'</span></li>'; |
374: $forum_page['item_body']['info']['lastpost'] = '<li class="info-lastpost"><span class="label">'.$lang_forum['Last post'].'</span> <strong><a href="'.forum_link($forum_url['post'], $cur_set['last_post_id']).'">'.format_time($cur_set['last_post']).'</a></strong> <cite>'.sprintf($lang_forum['by poster'], forum_htmlencode($cur_set['last_poster'])).'</cite></li>'; | 373: $forum_page['item_body']['info']['lastpost'] = '<li class="info-lastpost"><span class="label">'.$lang_forum['Last post'].'</span> <strong><a href="'.forum_link($forum_url['post'], $cur_set['last_post_id']).'">'.format_time($cur_set['last_post']).'</a></strong> <cite>'.sprintf($lang_forum['by poster'], forum_htmlencode($cur_set['last_poster'])).'</cite></li>'; |
375: | 374: |
393: ?> | 392: ?> |
394: </div> | 393: </div> |
395: | 394: |
396: <div class="main-foot"> | 395: <div class="main-foot"> |
397: <?php | 396: <?php |
398: | 397: |
399: if (!empty($forum_page['main_foot_options'])) | 398: if (!empty($forum_page['main_foot_options'])) |
400: echo "\n\t\t\t".'<p class="options">'.implode(' ', $forum_page['main_foot_options']).'</p>'; | 399: echo "\n\t\t\t".'<p class="options">'.implode(' ', $forum_page['main_foot_options']).'</p>'; |
401: | 400: |
402: ?> | 401: ?> |
403: <p><?php echo $forum_page['items_info'] ?></p> | 402: <h2 class="hn"><span><?php echo $forum_page['items_info'] ?></span></h2> |
404: </div> | 403: </div> |
405: <?php | 404: <?php |
406: | 405: |
494: <span class="fld-input"><input id="fld<?php echo $forum_page['fld_count'] ?>" type="text" name="author" size="25" maxlength="25" /></span> | 493: <span class="fld-input"><input id="fld<?php echo $forum_page['fld_count'] ?>" type="text" name="author" size="25" maxlength="25" /></span> |
495: </div> | 494: </div> |
496: </div> | 495: </div> |
| 496: <?php ($hook = get_hook('se_pre_search_in')) ? eval($hook) : null; ?> |
| 497: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> |
| 498: <div class="sf-box select"> |
| 499: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_search['Search in'] ?></span></label><br /> |
| 500: <span class="fld-input"><select id="fld<?php echo $forum_page['fld_count'] ?>" name="search_in"> |
| 501: <option value="all"><?php echo $lang_search['Message and subject'] ?></option> |
| 502: <option value="message"><?php echo $lang_search['Message only'] ?></option> |
| 503: <option value="topic"><?php echo $lang_search['Topic only'] ?></option> |
| 504: </select></span> |
| 505: </div> |
| 506: </div> |
497: <?php ($hook = get_hook('se_pre_forum_fieldset')) ? eval($hook) : null; ?> | 507: <?php ($hook = get_hook('se_pre_forum_fieldset')) ? eval($hook) : null; ?> |
498: <fieldset class="mf-set set<?php echo ++$forum_page['item_count'] ?>"> | 508: <fieldset class="mf-set set<?php echo ++$forum_page['item_count'] ?>"> |
499: <legend><span><?php echo $lang_search['Forum search'] ?> <em><?php echo ($forum_config['o_search_all_forums'] == '1' || $forum_user['is_admmod']) ? $lang_search['Forum search default'] : $lang_search['Forum search require'] ?></em></span></legend> | 509: <legend><span><?php echo $lang_search['Forum search'] ?> <em><?php echo ($forum_config['o_search_all_forums'] == '1' || $forum_user['is_admmod']) ? $lang_search['Forum search default'] : $lang_search['Forum search require'] ?></em></span></legend> |
punbb-1.3.2/style/Oxygen/Oxygen.css |
punbb-1.3.3/style/Oxygen/Oxygen.css |
83: line-height: 0.0; | 83: line-height: 0.0; |
84: overflow:hidden; | 84: overflow:hidden; |
85: visibility: hidden; | 85: visibility: hidden; |
86: clear: both; | 86: clear: both; |
87: } | 87: } |
88: | 88: |
89: /* Hidden items | 89: /* Hidden items |
112: .brd .main-head .hn small, | 112: .brd .main-head .hn small, |
113: .brd .entry-title, | 113: .brd .entry-title, |
114: .brd .menu-page .main-head { | 114: .brd .menu-page .main-head { |
115: font-size: 0; | 115: font-size: 0; |
116: left: -999em; | 116: left: -999em; |
117: text-indent: -999em; | 117: text-indent: -999em; |
118: position:absolute; | 118: position:absolute; |
119: line-height: 0em; | 119: line-height: 0em; |
120: visibility: hidden; | 120: visibility: hidden; |
121: } | 121: } |
122: | 122: |
123: | 123: |
124: /************************************************************* | 124: /************************************************************* |
211: border-bottom-width: 1px; | 211: border-bottom-width: 1px; |
212: } | 212: } |
213: | 213: |
214: .brd .main-head { | 214: .brd .main-head, .brd .main-foot { |
215: border-style: solid; | 215: border-style: solid; |
216: border-width: 1px; | 216: border-width: 1px; |
217: padding: 0 1.417em; | 217: padding: 0 1.417em; |
218: } | 218: } |
219: | 219: |
220: .brd .main-head .hn, .brd .main-foot .hn{ | 220: .brd .main-head .hn, .brd .main-foot .hn { |
221: font-size: 1.084em; | 221: font-size: 1.084em; |
222: padding-right: 10em; | 222: padding-right: 10em; |
223: } | 223: } |
225: .brd h2.main-subhead { | 225: .brd h2.main-subhead { |
226: border-style: solid; | 226: border-style: solid; |
227: border-width: 1px; | 227: border-width: 1px; |
228: padding: 0 1.417em; | |
229: font-size: 1.084em; | 228: font-size: 1.084em; |
230: padding: 0.462em 10em 0.426em 1.417em; | 229: padding: 0.462em 10em 0.426em 1.417em; |
231: } | 230: } |
249: position: relative; | 248: position: relative; |
250: } | 249: } |
251: | 250: |
252: .brd .main-head, | |
253: .brd .main-foot { | |
254: padding: 0 1.5em; | |
255: border-style: none; | |
256: border-width: 1px; | |
257: } | |
258: | |
259: .brd .main-foot { | 251: .brd .main-foot { |
260: margin-top: -1em; | 252: margin-top: -1em; |
261: } | 253: } |
306: } | 298: } |
307: | 299: |
308: .brd .extension .options, .brd .hotfix .options { | 300: .brd .extension .options, .brd .hotfix .options { |
309: border-top-style:dashed; | 301: border-top-style: dashed; |
310: border-top-width:1px; | 302: border-top-width: 1px; |
311: } | 303: } |
312: | 304: |
313: /* Content Containers | 305: /* Content Containers |
314: -------------------------------------------------------------*/ | 306: -------------------------------------------------------------*/ |
652: | 644: |
653: .brd .crumbs { | 645: .brd .crumbs { |
654: margin: 0.5em 0em; | 646: margin: 0.5em 0em; |
655: padding: 0em 1.5em; | 647: padding: 0em 1.417em; |
656: font-size: 1.084em; | 648: font-size: 1.084em; |
657: } | 649: } |
658: | 650: |
669: } | 661: } |
670: | 662: |
671: #brd-stats ul li.st-users { | 663: #brd-stats ul li.st-users { |
672: float: left; | 664: float: left; |
673: clear: both; | 665: clear: both; |
674: white-space: nowrap; | 666: white-space: nowrap; |
675: } | 667: } |
676: | 668: |
677: #brd-stats ul li.st-activity { | 669: #brd-stats ul li.st-activity { |
678: text-align: right; | 670: text-align: right; |
679: display: block; | 671: display: block; |
680: white-space: nowrap; | 672: white-space: nowrap; |
681: } | 673: } |
682: | 674: |
683: #brd-stats li strong { | 675: #brd-stats li strong { |
684: font-weight: bold; | 676: font-weight: bold; |
685: } | 677: } |
686: | 678: |
687: #brd-online { | 679: #brd-online { |
688: padding-top: 0.5em; | 680: padding-top: 0.5em; |
695: } | 687: } |
696: | 688: |
697: #brd-online .hn { | 689: #brd-online .hn { |
698: float: left; | 690: float: left; |
699: margin-right: 0.5em; | 691: margin-right: 0.5em; |
700: } | 692: } |
701: | 693: |
702: /* Footer | 694: /* Footer |
703: -------------------------------------------------------------*/ | 695: -------------------------------------------------------------*/ |
704: | 696: |
705: #brd-about p { | |
706: float: left; | |
707: margin: 0 1em; | |
708: } | |
709: | |
710: #brd-about #qjump { | 697: #brd-about #qjump { |
711: float: left; | 698: float: left; |
712: padding: 0.5em 0; | 699: padding: 0.5em 0; |
719: | 706: |
720: #brd-about #copyright { | 707: #brd-about #copyright { |
721: text-align: right; | 708: text-align: right; |
722: float: right; | |
723: margin: 0; | 709: margin: 0; |
724: } | 710: } |
725: | 711: |
726: #brd-about #querytime { | 712: #querytime { |
727: text-align: center; | 713: text-align: center; |
728: font-size: 0.9em; | 714: font-size: 0.9em; |
729: } | 715: } |
730: | 716: |
| 717: #extensions-used { |
| 718: border-bottom: 1px dotted; |
| 719: } |
| 720: |
731: /* Main and Content Options | 721: /* Main and Content Options |
732: -------------------------------------------------------------*/ | 722: -------------------------------------------------------------*/ |
733: | 723: |
851: | 841: |
852: .brd .main-content .main-item p, | 842: .brd .main-content .main-item p, |
853: .brd .main-content .main-item .hn { | 843: .brd .main-content .main-item .hn { |
854: padding: 0; | 844: padding: 0; |
855: } | 845: } |
856: | 846: |
857: .brd .main-content .main-item .hn .item-status { | 847: .brd .main-content .main-item .hn .item-status { |
858: font-weight:normal; | 848: font-weight:normal; |
859: } | 849: } |
860: | 850: |
861: .brd .main-content .main-item .hn .item-status em { | 851: .brd .main-content .main-item .hn .item-status em { |
862: font-style:normal; | 852: font-style:normal; |
863: } | 853: } |
864: | 854: |
865: .brd .main-content .main-item .item-subject, | 855: .brd .main-content .main-item .item-subject, |
866: .brd .main-content .main-item li { | 856: .brd .main-content .main-item li { |
867: float: left; | 857: float: left; |
868: border-left-style: solid; | 858: border-left-style: solid; |
869: border-left-width: 1px; | 859: border-left-width: 1px; |
870: margin: 0 -2px -9.7em 0; | 860: margin: 0 -2px -9.7em 0; |
871: position: relative; | 861: position: relative; |
872: padding-top: 0.6em; | 862: padding-top: 0.6em; |
873: padding-bottom: 10.4em; | 863: padding-bottom: 10.4em; |
874: } | 864: } |
875: | 865: |
876: .brd .main-content .main-item .item-subject { | 866: .brd .main-content .main-item .item-subject { |
877: overflow: hidden; | 867: overflow: hidden; |
878: width: 100%; | 868: width: 100%; |
879: } | 869: } |
880: | 870: |
881: .brd .main-content .main-item li.info-topics, | 871: .brd .main-content .main-item li.info-topics, |
882: .brd .main-content .main-item li.info-forum, | 872: .brd .main-content .main-item li.info-forum, |
883: .brd .main-content .main-item li.info-posts, | 873: .brd .main-content .main-item li.info-posts, |
884: .brd .main-content .main-item li.info-views, | 874: .brd .main-content .main-item li.info-views, |
885: .brd .main-content .main-item li.info-replies { | 875: .brd .main-content .main-item li.info-replies { |
886: width: 7em; | 876: width: 7em; |
887: text-align:center; | 877: text-align: center; |
888: } | 878: } |
889: | 879: |
890: .brd .main-content .main-item li.info-forum { | 880: .brd .main-content .main-item li.info-forum { |
891: width: 20em; | 881: width: 20em; |
892: } | 882: } |
893: | 883: |
894: .brd .main-content .main-item li.info-lastpost { | 884: .brd .main-content .main-item li.info-lastpost { |
895: width: 20em; | 885: width: 20em; |
896: } | 886: } |
897: | 887: |
898: .brd .main-content .main-item li.info-lastpost cite { | 888: .brd .main-content .main-item li.info-lastpost cite { |
899: overflow: hidden; | 889: overflow: hidden; |
924: } | 914: } |
925: | 915: |
926: .brd .forum-noview .main-item { | 916: .brd .forum-noview .main-item { |
927: padding-right: 48em; | 917: padding-right: 28em; |
928: } | 918: } |
929: | 919: |
930: .brd .forum-noview .main-item ul { | 920: .brd .forum-noview .main-item ul { |
| 921: width: 27em; |
| 922: right: -28em; |
| 923: margin-left: -27em; |
| 924: } |
| 925: |
| 926: .brd .forum-forums .main-item { |
| 927: padding-right: 48em; |
| 928: } |
| 929: |
| 930: .brd .forum-forums .main-item ul { |
931: width: 47em; | 931: width: 47em; |
932: right: -48em; | 932: right: -48em; |
933: margin-left: -47em; | 933: margin-left: -47em; |
934: } | 934: } |
935: | 935: |
936: .brd .main-content .main-item .item-subject span.modlist { | 936: .brd .main-content .main-item .item-subject span.modlist { |
937: display: block; | 937: display: block; |
938: } | 938: } |
939: | 939: |
940: .brd .main-content .main-item .hn strong { | 940: .brd .main-content .main-item .hn strong { |
941: font-size: 1em; | 941: font-size: 1em; |
942: } | 942: } |
943: | 943: |
944: .brd .main-content .main-item .hn strong span { | 944: .brd .main-content .main-item .hn strong span { |
945: font-weight: normal; | 945: font-weight: normal; |
948: #brd-index .main-content .main-item .hn span { | 948: #brd-index .main-content .main-item .hn span { |
949: font-size: 1.084em; | 949: font-size: 1.084em; |
950: font-weight: bold; | 950: font-weight: bold; |
951: } | 951: } |
952: #brd-index .main-content .main-item .hn small { | 952: #brd-index .main-content .main-item .hn small { |
953: font-size: 1em; | 953: font-size: 1em; |
954: } | 954: } |
967: font-style: normal; | 967: font-style: normal; |
968: } | 968: } |
969: | 969: |
970: .brd .main-content .main-item .item-subject .hn { | 970: .brd .main-content .main-item .item-subject .hn, |
971: display:inline; | |
972: margin: 0 0 0 1.5em; | |
973: } | |
974: | |
975: .brd .main-content .main-item .item-subject p { | 971: .brd .main-content .main-item .item-subject p { |
976: margin: 0 0 0 1.5em; | 972: margin: 0 0 0 1.5em; |
977: } | 973: } |
978: | 974: |
979: .brd .main-content .main-item li.info-lastpost cite, | 975: .brd .main-content .main-item li.info-lastpost cite, |
980: .brd .main-content .main-item li.info-lastpost span { | 976: .brd .main-content .main-item li.info-lastpost span, |
981: display: block; | 977: .brd .main-content .main-item li.info-forum a { |
982: padding: 0 1em; | 978: display: block; |
983: font-style: normal; | 979: padding: 0 1em; |
984: font-weight: normal; | 980: font-style: normal; |
985: } | 981: font-weight: normal; |
| 982: } |
986: | 983: |
987: .brd .main-content .main-item li.info-lastpost strong { | 984: .brd .main-content .main-item li.info-lastpost strong { |
988: padding: 0 0 0 1em; | 985: padding: 0 0 0 1em; |
989: font-style: normal; | 986: font-style: normal; |
990: font-weight: normal; | 987: font-weight: normal; |
991: } | 988: } |
992: | 989: |
993: .brd .main-content .main-item li.info-select { | 990: .brd .main-content .main-item li.info-select { |
994: position: absolute; | 991: position: absolute; |
995: right: 0; | 992: right: 0; |
996: top: 0; | 993: top: 0; |
997: padding: 0.3em; | 994: padding: 0.3em; |
998: border-style: none none solid solid; | 995: border-style: none none solid solid; |
999: border-width: 1px; | 996: border-width: 1px; |
1000: } | 997: } |
1001: | 998: |
1002: .brd .main-content .main-item .icon { | 999: .brd .main-content .main-item .icon { |
1003: border-style: solid; | 1000: border-style: solid; |
1004: border-width: 0.5833em; | 1001: border-width: 0.5833em; |
1005: height: 0; | 1002: height: 0; |
1006: width: 0; | 1003: width: 0; |
1007: float: left; | 1004: float: left; |
1008: margin-top: 0.667em; | 1005: margin-top: 0.667em; |
1009: margin-left: -2.417em; | 1006: margin-left: -2.417em; |
1010: } | 1007: } |
1011: | 1008: |
1012: .brd .main-content .main-item .hn .posted-mark { | 1009: .brd .main-content .main-item .hn .posted-mark { |
1013: position: absolute; | 1010: position: absolute; |
1014: font-size: 2em; | 1011: font-size: 2em; |
1015: width: 1em; | 1012: width: 1em; |
1016: left: -0.5em; | 1013: left: -0.5em; |
1017: top: 0; | 1014: top: 0; |
1018: } | 1015: } |
1019: | 1016: |
1020: /************************************************************* | 1017: /************************************************************* |
1021: F - MAIN CONTENT - FORMS | 1018: F - MAIN CONTENT - FORMS |
1160: | 1157: |
1161: .brd .mf-box .mf-item { | 1158: .brd .mf-box .mf-item { |
1162: position: relative; | 1159: position: relative; |
1163: top: -0.15em; | 1160: top: -0.166em; |
1164: padding: 0.25em 0; | 1161: padding: 0.25em 0; |
1165: } | 1162: } |
1166: | 1163: |
1419: margin-left: 18em; | 1416: margin-left: 18em; |
1420: border-style: none none none solid; | 1417: border-style: none none none solid; |
1421: border-width: 1px; | 1418: border-width: 1px; |
1422: zoom: 1; | |
1423: } | 1419: } |
1424: | 1420: |
1425: .brd .posthead .hn { | 1421: .brd .posthead .hn { |
1631: padding: 1em 0.75em; | 1627: padding: 1em 0.75em; |
1632: } | 1628: } |
1633: | 1629: |
1634: .brd .entry-content .codebox code { | 1630: .brd .entry-content .codebox code, #brd-debug table .tcl, #brd-debug table .tcr { |
1635: font-family: monospace; | 1631: font-family: monospace; |
1636: } | 1632: } |
1637: | 1633: |
1714: text-align: center; | 1710: text-align: center; |
1715: } | 1711: } |
1716: | 1712: |
1717: #brd-debug table .tc0 { | 1713: #brd-debug table .tc1 { |
1718: white-space:normal; | 1714: white-space: normal; |
1719: width: 15%; | 1715: width: 10%; |
1720: } | 1716: } |
1721: | 1717: |
1722: #brd-debug table .tc1 { | 1718: #brd-debug table .tcr { |
1723: white-space: normal; | 1719: white-space: normal; |
1724: width: 90%; | 1720: width: 90%; |
1725: } | 1721: } |
punbb-1.3.2/userlist.php |
punbb-1.3.3/userlist.php |
2: /** | 2: /** |
3: * Provides a list of forum users that can be sorted based on various criteria. | 3: * Provides a list of forum users that can be sorted based on various criteria. |
4: * | 4: * |
5: * @copyright Copyright (C) 2008 PunBB, partially based on code copyright (C) 2008 FluxBB.org | 5: * @copyright (C) 2008-2009 PunBB, partially based on code (C) 2008-2009 FluxBB.org |
6: * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher | 6: * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher |
7: * @package PunBB | 7: * @package PunBB |
8: */ | 8: */ |
27: $forum_page['username'] = (isset($_GET['username']) && $_GET['username'] != '-' && $forum_user['g_search_users'] == '1') ? $_GET['username'] : ''; | 27: $forum_page['username'] = (isset($_GET['username']) && $_GET['username'] != '-' && $forum_user['g_search_users'] == '1') ? $_GET['username'] : ''; |
28: $forum_page['show_group'] = (!isset($_GET['show_group']) || intval($_GET['show_group']) < -1 && intval($_GET['show_group']) > 2) ? -1 : intval($_GET['show_group']); | 28: $forum_page['show_group'] = (!isset($_GET['show_group']) || intval($_GET['show_group']) < -1 && intval($_GET['show_group']) > 2) ? -1 : intval($_GET['show_group']); |
29: $forum_page['sort_by'] = (!isset($_GET['sort_by']) || $_GET['sort_by'] != 'username' && $_GET['sort_by'] != 'registered' && ($_GET['sort_by'] != 'num_posts' || !$forum_page['show_post_count'])) ? 'username' : $_GET['sort_by']; | 29: $forum_page['sort_by'] = (!isset($_GET['sort_by']) || $_GET['sort_by'] != 'username' && $_GET['sort_by'] != 'registered' && ($_GET['sort_by'] != 'num_posts' || !$forum_page['show_post_count'])) ? 'username' : $_GET['sort_by']; |
30: $forum_page['sort_dir'] = (!isset($_GET['sort_dir']) || $_GET['sort_dir'] != 'ASC' && $_GET['sort_dir'] != 'DESC') ? 'ASC' : strtoupper($_GET['sort_dir']); | 30: $forum_page['sort_dir'] = (!isset($_GET['sort_dir']) || strtoupper($_GET['sort_dir']) != 'ASC' && strtoupper($_GET['sort_dir']) != 'DESC') ? 'ASC' : strtoupper($_GET['sort_dir']); |
31: | 31: |
32: | 32: |
33: // Create any SQL for the WHERE clause | 33: // Create any SQL for the WHERE clause |
42: | 42: |
43: // Fetch user count | 43: // Fetch user count |
44: $query = array( | 44: $query = array( |
45: 'SELECT' => 'COUNT(u.id) - 1', | 45: 'SELECT' => 'COUNT(u.id)', |
46: 'FROM' => 'users AS u', | 46: 'FROM' => 'users AS u', |
47: 'WHERE' => 'u.group_id != '.FORUM_UNVERIFIED | 47: 'WHERE' => 'u.id > 1 AND u.group_id != '.FORUM_UNVERIFIED |
48: ); | 48: ); |
49: | 49: |
50: if (!empty($where_sql)) | 50: if (!empty($where_sql)) |
56: | 56: |
57: // Determine the user offset (based on $_GET['p']) | 57: // Determine the user offset (based on $_GET['p']) |
58: $forum_page['num_pages'] = ceil($forum_page['num_users'] / 50); | 58: $forum_page['num_pages'] = ceil($forum_page['num_users'] / 50); |
59: $forum_page['page'] = (!isset($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $forum_page['num_pages']) ? 1 : intval($_GET['p']); | 59: $forum_page['page'] = (!isset($_GET['p']) || !is_numeric($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $forum_page['num_pages']) ? 1 : intval($_GET['p']); |
60: $forum_page['start_from'] = 50 * ($forum_page['page'] - 1); | 60: $forum_page['start_from'] = 50 * ($forum_page['page'] - 1); |
61: $forum_page['finish_at'] = min(($forum_page['start_from'] + 50), ($forum_page['num_users'])); | 61: $forum_page['finish_at'] = min(($forum_page['start_from'] + 50), ($forum_page['num_users'])); |
62: | 62: |
68: $forum_page['items_info'] = $lang_ul['Users']; | 68: $forum_page['items_info'] = $lang_ul['Users']; |
69: | 69: |
70: // Generate paging links | 70: // Generate paging links |
71: $forum_page['page_post']['paging'] = '<p class="paging"><span class="pages">'.$lang_common['Pages'].'</span> '.paginate($forum_page['num_pages'], $forum_page['page'], $forum_url['users_browse'], $lang_common['Paging separator'], array($forum_page['show_group'], $forum_page['sort_by'], strtoupper($forum_page['sort_dir']), ($forum_page['username'] != '') ? urlencode($forum_page['username']) : '-')).'</p>'; | 71: $forum_page['page_post']['paging'] = '<p class="paging"><span class="pages">'.$lang_common['Pages'].'</span> '.paginate($forum_page['num_pages'], $forum_page['page'], $forum_url['users_browse'], $lang_common['Paging separator'], array($forum_page['show_group'], $forum_page['sort_by'], $forum_page['sort_dir'], ($forum_page['username'] != '') ? urlencode($forum_page['username']) : '-')).'</p>'; |
72: | 72: |
73: // Navigation links for header and page numbering for title/meta description | 73: // Navigation links for header and page numbering for title/meta description |
74: if ($forum_page['page'] < $forum_page['num_pages']) | 74: if ($forum_page['page'] < $forum_page['num_pages']) |
75: { | 75: { |
76: $forum_page['nav']['last'] = '<link rel="last" href="'.forum_sublink($forum_url['users_browse'], $forum_url['page'], $forum_page['num_pages'], array($forum_page['show_group'], $forum_page['sort_by'], strtoupper($forum_page['sort_dir']), ($forum_page['username'] != '') ? urlencode($forum_page['username']) : '-')).'" title="'.$lang_common['Page'].' '.$forum_page['num_pages'].'" />'; | 76: $forum_page['nav']['last'] = '<link rel="last" href="'.forum_sublink($forum_url['users_browse'], $forum_url['page'], $forum_page['num_pages'], array($forum_page['show_group'], $forum_page['sort_by'], $forum_page['sort_dir'], ($forum_page['username'] != '') ? urlencode($forum_page['username']) : '-')).'" title="'.$lang_common['Page'].' '.$forum_page['num_pages'].'" />'; |
77: $forum_page['nav']['next'] = '<link rel="next" href="'.forum_sublink($forum_url['users_browse'], $forum_url['page'], ($forum_page['page'] + 1), array($forum_page['show_group'], $forum_page['sort_by'], strtoupper($forum_page['sort_dir']), ($forum_page['username'] != '') ? urlencode($forum_page['username']) : '-')).'" title="'.$lang_common['Page'].' '.($forum_page['page'] + 1).'" />'; | 77: $forum_page['nav']['next'] = '<link rel="next" href="'.forum_sublink($forum_url['users_browse'], $forum_url['page'], ($forum_page['page'] + 1), array($forum_page['show_group'], $forum_page['sort_by'], $forum_page['sort_dir'], ($forum_page['username'] != '') ? urlencode($forum_page['username']) : '-')).'" title="'.$lang_common['Page'].' '.($forum_page['page'] + 1).'" />'; |
78: } | 78: } |
79: if ($forum_page['page'] > 1) | 79: if ($forum_page['page'] > 1) |
80: { | 80: { |
81: $forum_page['nav']['prev'] = '<link rel="prev" href="'.forum_sublink($forum_url['users_browse'], $forum_url['page'], ($forum_page['page'] - 1), array($forum_page['show_group'], $forum_page['sort_by'], strtoupper($forum_page['sort_dir']), ($forum_page['username'] != '') ? urlencode($forum_page['username']) : '-')).'" title="'.$lang_common['Page'].' '.($forum_page['page'] - 1).'" />'; | 81: $forum_page['nav']['prev'] = '<link rel="prev" href="'.forum_sublink($forum_url['users_browse'], $forum_url['page'], ($forum_page['page'] - 1), array($forum_page['show_group'], $forum_page['sort_by'], $forum_page['sort_dir'], ($forum_page['username'] != '') ? urlencode($forum_page['username']) : '-')).'" title="'.$lang_common['Page'].' '.($forum_page['page'] - 1).'" />'; |
82: $forum_page['nav']['first'] = '<link rel="first" href="'.forum_link($forum_url['users_browse'], array($forum_page['show_group'], $forum_page['sort_by'], strtoupper($forum_page['sort_dir']), ($forum_page['username'] != '') ? urlencode($forum_page['username']) : '-')).'" title="'.$lang_common['Page'].' 1" />'; | 82: $forum_page['nav']['first'] = '<link rel="first" href="'.forum_link($forum_url['users_browse'], array($forum_page['show_group'], $forum_page['sort_by'], $forum_page['sort_dir'], ($forum_page['username'] != '') ? urlencode($forum_page['username']) : '-')).'" title="'.$lang_common['Page'].' 1" />'; |
83: } | 83: } |
84: | 84: |
85: // Setup main options | 85: // Setup main options |
121: <?php | 121: <?php |
122: | 122: |
123: if (!empty($forum_page['main_head_options'])) | 123: if (!empty($forum_page['main_head_options'])) |
124: echo "\n\t\t\t".'<p class="options">'.implode(' ', $forum_page['main_head_options']).'</p>'; | 124: echo "\t\t".'<p class="options">'.implode(' ', $forum_page['main_head_options']).'</p>'."\n"; |
125: | 125: |
126: ?> | 126: ?> |
127: <h2 class="hn"><span><?php echo $forum_page['items_info'] ?></span></h2> | 127: <h2 class="hn"><span><?php echo $forum_page['items_info'] ?></span></h2> |
133: <fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>"> | 133: <fieldset class="frm-group group<?php echo ++$forum_page['group_count'] ?>"> |
134: <legend class="group-legend"><strong><?php echo $lang_ul['User find legend'] ?></strong></legend> | 134: <legend class="group-legend"><strong><?php echo $lang_ul['User find legend'] ?></strong></legend> |
135: <?php ($hook = get_hook('ul_pre_username')) ? eval($hook) : null; ?> | 135: <?php ($hook = get_hook('ul_pre_username')) ? eval($hook) : null; ?> |
136: <?php if ($forum_user['g_search_users'] == '1'): ?> <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> | 136: <?php if ($forum_user['g_search_users'] == '1'): ?> |
| 137: <div class="sf-set set<?php echo ++$forum_page['item_count'] ?>"> |
137: <div class="sf-box text"> | 138: <div class="sf-box text"> |
138: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_ul['Search for username'] ?></span> <small><?php echo $lang_ul['Username help'] ?></small></label><br /> | 139: <label for="fld<?php echo ++$forum_page['fld_count'] ?>"><span><?php echo $lang_ul['Search for username'] ?></span> <small><?php echo $lang_ul['Username help'] ?></small></label><br /> |
139: <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="username" value="<?php echo forum_htmlencode($forum_page['username']) ?>" size="35" maxlength="25" /></span> | 140: <span class="fld-input"><input type="text" id="fld<?php echo $forum_page['fld_count'] ?>" name="username" value="<?php echo forum_htmlencode($forum_page['username']) ?>" size="35" maxlength="25" /></span> |
180: <span class="fld-input"><select id="fld<?php echo $forum_page['fld_count'] ?>" name="sort_by"> | 181: <span class="fld-input"><select id="fld<?php echo $forum_page['fld_count'] ?>" name="sort_by"> |
181: <option value="username"<?php if ($forum_page['sort_by'] == 'username') echo ' selected="selected"' ?>><?php echo $lang_ul['Username'] ?></option> | 182: <option value="username"<?php if ($forum_page['sort_by'] == 'username') echo ' selected="selected"' ?>><?php echo $lang_ul['Username'] ?></option> |
182: <option value="registered"<?php if ($forum_page['sort_by'] == 'registered') echo ' selected="selected"' ?>><?php echo $lang_ul['Registered'] ?></option> | 183: <option value="registered"<?php if ($forum_page['sort_by'] == 'registered') echo ' selected="selected"' ?>><?php echo $lang_ul['Registered'] ?></option> |
183: <?php if ($forum_page['show_post_count']): ?> <option value="num_posts"<?php if ($forum_page['sort_by'] == 'num_posts') echo ' selected="selected"' ?>><?php echo $lang_ul['No of posts'] ?></option> | 184: <?php if ($forum_page['show_post_count']): ?> |
184: <?php endif; ($hook = get_hook('ul_new_sort_by_option')) ? eval($hook) : null; ?> </select></span> | 185: <option value="num_posts"<?php if ($forum_page['sort_by'] == 'num_posts') echo ' selected="selected"' ?>><?php echo $lang_ul['No of posts'] ?></option> |
| 186: <?php endif; ($hook = get_hook('ul_new_sort_by_option')) ? eval($hook) : null; ?> |
| 187: </select></span> |
185: </div> | 188: </div> |
186: </div> | 189: </div> |
187: <?php ($hook = get_hook('ul_pre_sort_order_fieldset')) ? eval($hook) : null; ?> | 190: <?php ($hook = get_hook('ul_pre_sort_order_fieldset')) ? eval($hook) : null; ?> |
310: echo "\n\t\t\t".'<p class="options">'.implode(' ', $forum_page['main_foot_options']).'</p>'; | 313: echo "\n\t\t\t".'<p class="options">'.implode(' ', $forum_page['main_foot_options']).'</p>'; |
311: | 314: |
312: ?> | 315: ?> |
313: <p><?php echo $forum_page['items_info'] ?></p> | 316: <h2 class="hn"><span><?php echo $forum_page['items_info'] ?></span></h2> |
314: </div> | 317: </div> |
315: <?php | 318: <?php |
316: | 319: |
punbb-1.3.2/viewforum.php |
punbb-1.3.3/viewforum.php |
2: /** | 2: /** |
3: * Lists the topics in the specified forum. | 3: * Lists the topics in the specified forum. |
4: * | 4: * |
5: * @copyright Copyright (C) 2008 PunBB, partially based on code copyright (C) 2008 FluxBB.org | 5: * @copyright (C) 2008-2009 PunBB, partially based on code (C) 2008-2009 FluxBB.org |
6: * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher | 6: * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher |
7: * @package PunBB | 7: * @package PunBB |
8: */ | 8: */ |
70: | 70: |
71: // Determine the topic offset (based on $_GET['p']) | 71: // Determine the topic offset (based on $_GET['p']) |
72: $forum_page['num_pages'] = ceil($cur_forum['num_topics'] / $forum_user['disp_topics']); | 72: $forum_page['num_pages'] = ceil($cur_forum['num_topics'] / $forum_user['disp_topics']); |
73: $forum_page['page'] = (!isset($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $forum_page['num_pages']) ? 1 : $_GET['p']; | 73: $forum_page['page'] = (!isset($_GET['p']) || !is_numeric($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $forum_page['num_pages']) ? 1 : $_GET['p']; |
74: $forum_page['start_from'] = $forum_user['disp_topics'] * ($forum_page['page'] - 1); | 74: $forum_page['start_from'] = $forum_user['disp_topics'] * ($forum_page['page'] - 1); |
75: $forum_page['finish_at'] = min(($forum_page['start_from'] + $forum_user['disp_topics']), ($cur_forum['num_topics'])); | 75: $forum_page['finish_at'] = min(($forum_page['start_from'] + $forum_user['disp_topics']), ($cur_forum['num_topics'])); |
76: $forum_page['items_info'] = generate_items_info($lang_forum['Topics'], ($forum_page['start_from'] + 1), $cur_forum['num_topics']); | 76: $forum_page['items_info'] = generate_items_info($lang_forum['Topics'], ($forum_page['start_from'] + 1), $cur_forum['num_topics']); |
204: | 204: |
205: // Start from scratch | 205: // Start from scratch |
206: $forum_page['item_subject'] = $forum_page['item_body'] = $forum_page['item_status'] = $forum_page['item_nav'] = $forum_page['item_title'] = $forum_page['item_title_status'] = array(); | 206: $forum_page['item_subject'] = $forum_page['item_body'] = $forum_page['item_status'] = $forum_page['item_nav'] = $forum_page['item_title'] = $forum_page['item_title_status'] = array(); |
207: $forum_page['item_indicator'] = ''; | |
208: | 207: |
209: if ($forum_config['o_censoring'] == '1') | 208: if ($forum_config['o_censoring'] == '1') |
210: $cur_topic['subject'] = censor_words($cur_topic['subject']); | 209: $cur_topic['subject'] = censor_words($cur_topic['subject']); |
211: | 210: |
| 211: $forum_page['item_subject']['starter'] = '<span class="item-starter">'.sprintf($lang_forum['Topic starter'], forum_htmlencode($cur_topic['poster'])).'</span>'; |
| 212: |
212: if ($cur_topic['moved_to'] != null) | 213: if ($cur_topic['moved_to'] != null) |
213: { | 214: { |
214: $forum_page['item_status']['moved'] = 'moved'; | 215: $forum_page['item_status']['moved'] = 'moved'; |
259: | 260: |
260: $forum_page['item_body']['subject']['title'] = '<h3 class="hn"><span class="item-num">'.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span> '.implode(' ', $forum_page['item_title']).'</h3>'; | 261: $forum_page['item_body']['subject']['title'] = '<h3 class="hn"><span class="item-num">'.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span> '.implode(' ', $forum_page['item_title']).'</h3>'; |
261: | 262: |
262: // Assemble the Topic subject | |
263: | |
264: if (empty($forum_page['item_status'])) | 263: if (empty($forum_page['item_status'])) |
265: $forum_page['item_status']['normal'] = 'normal'; | 264: $forum_page['item_status']['normal'] = 'normal'; |
266: | 265: |
281: if (!empty($forum_page['item_nav'])) | 280: if (!empty($forum_page['item_nav'])) |
282: $forum_page['item_subject']['nav'] = '<span class="item-nav">'.sprintf($lang_forum['Topic navigation'], implode('  ', $forum_page['item_nav'])).'</span>'; | 281: $forum_page['item_subject']['nav'] = '<span class="item-nav">'.sprintf($lang_forum['Topic navigation'], implode('  ', $forum_page['item_nav'])).'</span>'; |
283: | 282: |
284: ($hook = get_hook('vf_topic_loop_normal_topic_pre_item_subject_merge')) ? eval($hook) : null; | 283: // Assemble the Topic subject |
285: | 284: |
286: $forum_page['item_body']['info']['replies'] = '<li class="info-replies"><strong>'.forum_number_format($cur_topic['num_replies']).'</strong> <span class="label">'.(($cur_topic['num_replies'] == 1) ? $lang_forum['reply'] : $lang_forum['replies']).'</span></li>'; | 285: $forum_page['item_body']['info']['replies'] = '<li class="info-replies"><strong>'.forum_number_format($cur_topic['num_replies']).'</strong> <span class="label">'.(($cur_topic['num_replies'] == 1) ? $lang_forum['reply'] : $lang_forum['replies']).'</span></li>'; |
287: | 286: |
291: $forum_page['item_body']['info']['lastpost'] = '<li class="info-lastpost"><span class="label">'.$lang_forum['Last post'].'</span> <strong><a href="'.forum_link($forum_url['post'], $cur_topic['last_post_id']).'">'.format_time($cur_topic['last_post']).'</a></strong> <cite>'.sprintf($lang_forum['by poster'], forum_htmlencode($cur_topic['last_poster'])).'</cite></li>'; | 290: $forum_page['item_body']['info']['lastpost'] = '<li class="info-lastpost"><span class="label">'.$lang_forum['Last post'].'</span> <strong><a href="'.forum_link($forum_url['post'], $cur_topic['last_post_id']).'">'.format_time($cur_topic['last_post']).'</a></strong> <cite>'.sprintf($lang_forum['by poster'], forum_htmlencode($cur_topic['last_poster'])).'</cite></li>'; |
292: } | 291: } |
293: | 292: |
294: $forum_page['item_subject']['starter'] = '<span class="item-starter">'.sprintf($lang_forum['Topic starter'], '<cite>'.forum_htmlencode($cur_topic['poster']).'</cite>').'</span>'; | 293: ($hook = get_hook('vf_row_pre_item_subject_merge')) ? eval($hook) : null; |
295: $forum_page['item_body']['subject']['desc'] = implode(' ', $forum_page['item_subject']); | 294: |
| 295: $forum_page['item_body']['subject']['desc'] = '<p>'.implode(' ', $forum_page['item_subject']).'</p>'; |
296: | 296: |
297: ($hook = get_hook('vf_row_pre_item_status_merge')) ? eval($hook) : null; | 297: ($hook = get_hook('vf_row_pre_item_status_merge')) ? eval($hook) : null; |
298: | 298: |
316: | 316: |
317: ?> | 317: ?> |
318: </div> | 318: </div> |
319: <div class="main-foot"> | 319: <div class="main-foot"> |
320: <?php | 320: <?php |
321: | 321: |
322: if (!empty($forum_page['main_foot_options'])) | 322: if (!empty($forum_page['main_foot_options'])) |
323: echo "\n\t\t\t".'<p class="options">'.implode(' ', $forum_page['main_foot_options']).'</p>'; | 323: echo "\n\t\t\t".'<p class="options">'.implode(' ', $forum_page['main_foot_options']).'</p>'; |
324: | 324: |
325: ?> | 325: ?> |
326: <p><?php echo $forum_page['items_info'] ?></p> | 326: <h2 class="hn"><span><?php echo $forum_page['items_info'] ?></span></h2> |
327: </div> | 327: </div> |
328: <?php | 328: <?php |
329: | 329: |
349: </div> | 349: </div> |
350: </div> | 350: </div> |
351: <div class="main-foot"> | 351: <div class="main-foot"> |
352: <p><?php echo $lang_forum['Empty forum'] ?></p> | 352: <h2 class="hn"><span><?php echo $lang_forum['Empty forum'] ?></span></h2> |
353: </div> | 353: </div> |
354: <?php | 354: <?php |
355: | 355: |
punbb-1.3.2/viewtopic.php |
punbb-1.3.3/viewtopic.php |
2: /** | 2: /** |
3: * Lists the posts in the specified topic. | 3: * Lists the posts in the specified topic. |
4: * | 4: * |
5: * @copyright Copyright (C) 2008 PunBB, partially based on code copyright (C) 2008 FluxBB.org | 5: * @copyright (C) 2008-2009 PunBB, partially based on code (C) 2008-2009 FluxBB.org |
6: * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher | 6: * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher |
7: * @package PunBB | 7: * @package PunBB |
8: */ | 8: */ |
113: | 113: |
114: // Fetch some info about the topic | 114: // Fetch some info about the topic |
115: $query = array( | 115: $query = array( |
116: 'SELECT' => 't.subject, t.posted, t.poster, t.first_post_id, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies', | 116: 'SELECT' => 't.subject, t.first_post_id, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies', |
117: 'FROM' => 'topics AS t', | 117: 'FROM' => 'topics AS t', |
118: 'JOINS' => array( | 118: 'JOINS' => array( |
119: array( | 119: array( |
128: 'WHERE' => '(fp.read_forum IS NULL OR fp.read_forum=1) AND t.id='.$id.' AND t.moved_to IS NULL' | 128: 'WHERE' => '(fp.read_forum IS NULL OR fp.read_forum=1) AND t.id='.$id.' AND t.moved_to IS NULL' |
129: ); | 129: ); |
130: | 130: |
131: if (!$forum_user['is_guest']) | 131: if (!$forum_user['is_guest'] && $forum_config['o_subscriptions'] == '1') |
132: { | 132: { |
133: $query['SELECT'] .= ', s.user_id AS is_subscribed'; | 133: $query['SELECT'] .= ', s.user_id AS is_subscribed'; |
134: $query['JOINS'][] = array( | 134: $query['JOINS'][] = array( |
166: | 166: |
167: // Determine the post offset (based on $_GET['p']) | 167: // Determine the post offset (based on $_GET['p']) |
168: $forum_page['num_pages'] = ceil(($cur_topic['num_replies'] + 1) / $forum_user['disp_posts']); | 168: $forum_page['num_pages'] = ceil(($cur_topic['num_replies'] + 1) / $forum_user['disp_posts']); |
169: $forum_page['page'] = (!isset($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $forum_page['num_pages']) ? 1 : $_GET['p']; | 169: $forum_page['page'] = (!isset($_GET['p']) || !is_numeric($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $forum_page['num_pages']) ? 1 : $_GET['p']; |
170: $forum_page['start_from'] = $forum_user['disp_posts'] * ($forum_page['page'] - 1); | 170: $forum_page['start_from'] = $forum_user['disp_posts'] * ($forum_page['page'] - 1); |
171: $forum_page['finish_at'] = min(($forum_page['start_from'] + $forum_user['disp_posts']), ($cur_topic['num_replies'] + 1)); | 171: $forum_page['finish_at'] = min(($forum_page['start_from'] + $forum_user['disp_posts']), ($cur_topic['num_replies'] + 1)); |
172: $forum_page['items_info'] = generate_items_info($lang_topic['Posts'], ($forum_page['start_from'] + 1), ($cur_topic['num_replies'] + 1)); | 172: $forum_page['items_info'] = generate_items_info($lang_topic['Posts'], ($forum_page['start_from'] + 1), ($cur_topic['num_replies'] + 1)); |
193: | 193: |
194: if ($forum_user['may_post']) | 194: if ($forum_user['may_post']) |
195: $forum_page['page_post']['posting'] = '<p class="posting"><a class="newpost" href="'.forum_link($forum_url['new_reply'], $id).'"><span>'.$lang_topic['Post reply'].'</span></a></p>'; | 195: $forum_page['page_post']['posting'] = '<p class="posting"><a class="newpost" href="'.forum_link($forum_url['new_reply'], $id).'"><span>'.$lang_topic['Post reply'].'</span></a></p>'; |
196: else if (!$forum_user['may_post'] && !$forum_user['is_guest'] && $cur_topic['closed'] != '1') | 196: else if ($forum_user['is_guest']) |
197: $forum_page['page_post']['posting'] = '<p class="posting">'.$lang_topic['No permission'].'</p>'; | |
198: if (!$forum_user['may_post'] && $forum_user['is_guest']) | |
199: $forum_page['page_post']['posting'] = '<p class="posting">'.sprintf($lang_topic['Login to post'], '<a href="'.forum_link($forum_url['login']).'">'.$lang_common['login'].'</a>', '<a href="'.forum_link($forum_url['register']).'">'.$lang_common['register'].'</a>').'</p>'; | 197: $forum_page['page_post']['posting'] = '<p class="posting">'.sprintf($lang_topic['Login to post'], '<a href="'.forum_link($forum_url['login']).'">'.$lang_common['login'].'</a>', '<a href="'.forum_link($forum_url['register']).'">'.$lang_common['register'].'</a>').'</p>'; |
| 198: else if ($cur_topic['closed'] == '1') |
| 199: $forum_page['page_post']['posting'] = '<p class="posting">'.$lang_topic['Topic closed info'].'</p>'; |
| 200: else |
| 201: $forum_page['page_post']['posting'] = '<p class="posting">'.$lang_topic['No permission'].'</p>'; |
200: | 202: |
201: // Setup main options | 203: // Setup main options |
202: $forum_page['main_title'] = $lang_topic['Topic options']; | 204: $forum_page['main_title'] = $lang_topic['Topic options']; |
203: $forum_page['main_head_options'] = array( | 205: $forum_page['main_head_options'] = array( |
204: 'rss' => '<span class="feed first-item"><a class="feed-option" href="'.forum_link($forum_url['topic_rss'], $id).'">'.$lang_topic['RSS topic feed'].'</a></span>' | 206: 'rss' => '<span class="feed first-item"><a class="feed" href="'.forum_link($forum_url['topic_rss'], $id).'">'.$lang_topic['RSS topic feed'].'</a></span>' |
205: ); | 207: ); |
206: | 208: |
207: if (!$forum_user['is_guest'] && $forum_config['o_subscriptions'] == '1') | 209: if (!$forum_user['is_guest'] && $forum_config['o_subscriptions'] == '1') |
331: if ($cur_post['poster_id'] > 1) | 333: if ($cur_post['poster_id'] > 1) |
332: { | 334: { |
333: if ($forum_config['o_avatars'] == '1' && $forum_user['show_avatars'] != '0') | 335: if ($forum_config['o_avatars'] == '1' && $forum_user['show_avatars'] != '0') |
| 336: { |
334: $forum_page['avatar_markup'] = generate_avatar_markup($cur_post['poster_id']); | 337: $forum_page['avatar_markup'] = generate_avatar_markup($cur_post['poster_id']); |
335: | 338: |
336: if (!empty($forum_page['avatar_markup'])) | 339: if (!empty($forum_page['avatar_markup'])) |
337: $forum_page['author_ident']['avatar'] = '<li class="useravatar">'.$forum_page['avatar_markup'].'</li>'; | 340: $forum_page['author_ident']['avatar'] = '<li class="useravatar">'.$forum_page['avatar_markup'].'</li>'; |
| 341: } |
338: | 342: |
339: $forum_page['author_ident']['username'] = '<li class="username">'.(($forum_user['g_view_users'] == '1') ? '<a title="'.sprintf($lang_topic['Go to profile'], forum_htmlencode($cur_post['username'])).'" href="'.forum_link($forum_url['user'], $cur_post['poster_id']).'">'.forum_htmlencode($cur_post['username']).'</a>' : '<strong>'.forum_htmlencode($cur_post['username']).'</strong>').'</li>'; | 343: $forum_page['author_ident']['username'] = '<li class="username">'.(($forum_user['g_view_users'] == '1') ? '<a title="'.sprintf($lang_topic['Go to profile'], forum_htmlencode($cur_post['username'])).'" href="'.forum_link($forum_url['user'], $cur_post['poster_id']).'">'.forum_htmlencode($cur_post['username']).'</a>' : '<strong>'.forum_htmlencode($cur_post['username']).'</strong>').'</li>'; |
340: $forum_page['author_ident']['usertitle'] = '<li class="usertitle"><span>'.get_title($cur_post).'</span></li>'; | 344: $forum_page['author_ident']['usertitle'] = '<li class="usertitle"><span>'.get_title($cur_post).'</span></li>'; |
365: if ($forum_config['o_censoring'] == '1') | 369: if ($forum_config['o_censoring'] == '1') |
366: $cur_post['location'] = censor_words($cur_post['location']); | 370: $cur_post['location'] = censor_words($cur_post['location']); |
367: | 371: |
368: $forum_page['author_info']['from'] = '<li><span>'.$lang_topic['From'].' <strong> '.forum_htmlencode($cur_post['location']).'</strong></span></li>'; | 372: $forum_page['author_info']['from'] = '<li><span>'.$lang_topic['From'].' <strong>'.forum_htmlencode($cur_post['location']).'</strong></span></li>'; |
369: } | 373: } |
370: | 374: |
371: $forum_page['author_info']['registered'] = '<li><span>'.$lang_topic['Registered'].' <strong> '.format_time($cur_post['registered'], 1).'</strong></span></li>'; | 375: $forum_page['author_info']['registered'] = '<li><span>'.$lang_topic['Registered'].' <strong>'.format_time($cur_post['registered'], 1).'</strong></span></li>'; |
372: | 376: |
373: if ($forum_config['o_show_post_count'] == '1' || $forum_user['is_admmod']) | 377: if ($forum_config['o_show_post_count'] == '1' || $forum_user['is_admmod']) |
374: $forum_page['author_info']['posts'] = '<li><span>'.$lang_topic['Posts info'].' <strong> '.forum_number_format($cur_post['num_posts']).'</strong></span></li>'; | 378: $forum_page['author_info']['posts'] = '<li><span>'.$lang_topic['Posts info'].' <strong>'.forum_number_format($cur_post['num_posts']).'</strong></span></li>'; |
375: } | 379: } |
376: | 380: |
377: if ($forum_user['is_admmod']) | 381: if ($forum_user['is_admmod']) |
378: { | 382: { |
379: if ($cur_post['admin_note'] != '') | 383: if ($cur_post['admin_note'] != '') |
380: $forum_page['author_info']['note'] = '<li><span>'.$lang_topic['Note'].' <strong> '.forum_htmlencode($cur_post['admin_note']).'</strong></span></li>'; | 384: $forum_page['author_info']['note'] = '<li><span>'.$lang_topic['Note'].' <strong>'.forum_htmlencode($cur_post['admin_note']).'</strong></span></li>'; |
381: } | 385: } |
382: } | 386: } |
383: } | 387: } |
396: if ($cur_post['poster_id'] > 1) | 400: if ($cur_post['poster_id'] > 1) |
397: { | 401: { |
398: if ($cur_post['url'] != '') | 402: if ($cur_post['url'] != '') |
399: $forum_page['post_contacts']['url'] = '<span class="user-url'.(!empty($forum_page['post_contacts']) ? ' first-item' : '').'"><a class="external" href="'.forum_htmlencode(($forum_config['o_censoring'] == '1') ? censor_words($cur_post['url']) : $cur_post['url']).'">'.sprintf($lang_topic['Visit website'], '<span>'.sprintf($lang_topic['User possessive'], forum_htmlencode($cur_post['username'])).'</span>').'</a></span>'; | 403: $forum_page['post_contacts']['url'] = '<span class="user-url'.(empty($forum_page['post_contacts']) ? ' first-item' : '').'"><a class="external" href="'.forum_htmlencode(($forum_config['o_censoring'] == '1') ? censor_words($cur_post['url']) : $cur_post['url']).'">'.sprintf($lang_topic['Visit website'], '<span>'.sprintf($lang_topic['User possessive'], forum_htmlencode($cur_post['username'])).'</span>').'</a></span>'; |
400: if ((($cur_post['email_setting'] == '0' && !$forum_user['is_guest']) || $forum_user['is_admmod']) && $forum_user['g_send_email'] == '1') | 404: if ((($cur_post['email_setting'] == '0' && !$forum_user['is_guest']) || $forum_user['is_admmod']) && $forum_user['g_send_email'] == '1') |
401: $forum_page['post_contacts']['email'] = '<span class="user-email'.(!empty($forum_page['post_contacts']) ? ' first-item' : '').'"><a href="mailto:'.forum_htmlencode($cur_post['email']).'">'.$lang_topic['E-mail'].'<span> '.forum_htmlencode($cur_post['username']).'</span></a></span>'; | 405: $forum_page['post_contacts']['email'] = '<span class="user-email'.(empty($forum_page['post_contacts']) ? ' first-item' : '').'"><a href="mailto:'.forum_htmlencode($cur_post['email']).'">'.$lang_topic['E-mail'].'<span> '.forum_htmlencode($cur_post['username']).'</span></a></span>'; |
402: else if ($cur_post['email_setting'] == '1' && !$forum_user['is_guest'] && $forum_user['g_send_email'] == '1') | 406: else if ($cur_post['email_setting'] == '1' && !$forum_user['is_guest'] && $forum_user['g_send_email'] == '1') |
403: $forum_page['post_contacts']['email'] = '<span class="user-email'.(!empty($forum_page['post_contacts']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['email'], $cur_post['poster_id']).'">'.$lang_topic['E-mail'].'<span> '.forum_htmlencode($cur_post['username']).'</span></a></span>'; | 407: $forum_page['post_contacts']['email'] = '<span class="user-email'.(empty($forum_page['post_contacts']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['email'], $cur_post['poster_id']).'">'.$lang_topic['E-mail'].'<span> '.forum_htmlencode($cur_post['username']).'</span></a></span>'; |
404: } | 408: } |
405: else | 409: else |
406: { | 410: { |
407: if ($cur_post['poster_email'] != '' && !$forum_user['is_guest'] && $forum_user['g_send_email'] == '1') | 411: if ($cur_post['poster_email'] != '' && !$forum_user['is_guest'] && $forum_user['g_send_email'] == '1') |
408: $forum_page['post_contacts']['email'] = '<span class="user-email'.(!empty($forum_page['post_contacts']) ? ' first-item' : '').'"><a href="mailto:'.forum_htmlencode($cur_post['poster_email']).'">'.$lang_topic['E-mail'].'<span> '.forum_htmlencode($cur_post['username']).'</span></a></span>'; | 412: $forum_page['post_contacts']['email'] = '<span class="user-email'.(empty($forum_page['post_contacts']) ? ' first-item' : '').'"><a href="mailto:'.forum_htmlencode($cur_post['poster_email']).'">'.$lang_topic['E-mail'].'<span> '.forum_htmlencode($cur_post['username']).'</span></a></span>'; |
409: } | 413: } |
410: } | 414: } |
411: | 415: |
418: // Generate the post options links | 422: // Generate the post options links |
419: if (!$forum_user['is_guest']) | 423: if (!$forum_user['is_guest']) |
420: { | 424: { |
421: $forum_page['post_actions']['report'] = '<span class="report-post'.(!empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['report'], $cur_post['id']).'">'.$lang_topic['Report'].'<span> '.$lang_topic['Post'].' '.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span></a></span>'; | 425: $forum_page['post_actions']['report'] = '<span class="report-post'.(empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['report'], $cur_post['id']).'">'.$lang_topic['Report'].'<span> '.$lang_topic['Post'].' '.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span></a></span>'; |
422: | 426: |
423: if (!$forum_page['is_admmod']) | 427: if (!$forum_page['is_admmod']) |
424: { | 428: { |
427: if ($cur_post['poster_id'] == $forum_user['id']) | 431: if ($cur_post['poster_id'] == $forum_user['id']) |
428: { | 432: { |
429: if (($forum_page['start_from'] + $forum_page['item_count']) == 1 && $forum_user['g_delete_topics'] == '1') | 433: if (($forum_page['start_from'] + $forum_page['item_count']) == 1 && $forum_user['g_delete_topics'] == '1') |
430: $forum_page['post_actions']['delete'] = '<span class="delete-topic'.(!empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['delete'], $cur_topic['first_post_id']).'">'.$lang_topic['Delete topic'].'</a></span>'; | 434: $forum_page['post_actions']['delete'] = '<span class="delete-topic'.(empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['delete'], $cur_topic['first_post_id']).'">'.$lang_topic['Delete topic'].'</a></span>'; |
431: if (($forum_page['start_from'] + $forum_page['item_count']) > 1 && $forum_user['g_delete_posts'] == '1') | 435: if (($forum_page['start_from'] + $forum_page['item_count']) > 1 && $forum_user['g_delete_posts'] == '1') |
432: $forum_page['post_actions']['delete'] = '<span class="delete-post'.(!empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['delete'], $cur_post['id']).'">'.$lang_topic['Delete'].'<span> '.$lang_topic['Post'].' '.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span></a></span>'; | 436: $forum_page['post_actions']['delete'] = '<span class="delete-post'.(empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['delete'], $cur_post['id']).'">'.$lang_topic['Delete'].'<span> '.$lang_topic['Post'].' '.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span></a></span>'; |
433: if ($forum_user['g_edit_posts'] == '1') | 437: if ($forum_user['g_edit_posts'] == '1') |
434: $forum_page['post_actions']['edit'] = '<span class="edit-post'.(!empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['edit'], $cur_post['id']).'">'.$lang_topic['Edit'].'<span> '.$lang_topic['Post'].' '.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span></a></span>'; | 438: $forum_page['post_actions']['edit'] = '<span class="edit-post'.(empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['edit'], $cur_post['id']).'">'.$lang_topic['Edit'].'<span> '.$lang_topic['Post'].' '.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span></a></span>'; |
435: } | 439: } |
436: | 440: |
437: if (($cur_topic['post_replies'] == '' && $forum_user['g_post_replies'] == '1') || $cur_topic['post_replies'] == '1') | 441: if (($cur_topic['post_replies'] == '' && $forum_user['g_post_replies'] == '1') || $cur_topic['post_replies'] == '1') |
438: $forum_page['post_actions']['quote'] = '<span class="quote-post'.(!empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['quote'], array($id, $cur_post['id'])).'">'.$lang_topic['Quote'].'<span> '.$lang_topic['Post'].' '.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span></a></span>'; | 442: $forum_page['post_actions']['quote'] = '<span class="quote-post'.(empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['quote'], array($id, $cur_post['id'])).'">'.$lang_topic['Quote'].'<span> '.$lang_topic['Post'].' '.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span></a></span>'; |
439: } | 443: } |
440: } | 444: } |
441: else | 445: else |
442: { | 446: { |
443: if (($forum_page['start_from'] + $forum_page['item_count']) == 1) | 447: if (($forum_page['start_from'] + $forum_page['item_count']) == 1) |
444: $forum_page['post_actions']['delete'] = '<span class="delete-topic'.(!empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['delete'], $cur_topic['first_post_id']).'">'.$lang_topic['Delete topic'].'</a></span>'; | 448: $forum_page['post_actions']['delete'] = '<span class="delete-topic'.(empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['delete'], $cur_topic['first_post_id']).'">'.$lang_topic['Delete topic'].'</a></span>'; |
445: else | 449: else |
446: $forum_page['post_actions']['delete'] = '<span class="delete-post'.(!empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['delete'], $cur_post['id']).'">'.$lang_topic['Delete'].'<span> '.$lang_topic['Post'].' '.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span></a></span>'; | 450: $forum_page['post_actions']['delete'] = '<span class="delete-post'.(empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['delete'], $cur_post['id']).'">'.$lang_topic['Delete'].'<span> '.$lang_topic['Post'].' '.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span></a></span>'; |
447: | 451: |
448: $forum_page['post_actions']['edit'] = '<span class="edit-post'.(!empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['edit'], $cur_post['id']).'">'.$lang_topic['Edit'].'<span> '.$lang_topic['Post'].' '.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span></a></span>'; | 452: $forum_page['post_actions']['edit'] = '<span class="edit-post'.(empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['edit'], $cur_post['id']).'">'.$lang_topic['Edit'].'<span> '.$lang_topic['Post'].' '.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span></a></span>'; |
449: $forum_page['post_actions']['quote'] = '<span class="quote-post'.(!empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['quote'], array($id, $cur_post['id'])).'">'.$lang_topic['Quote'].'<span> '.$lang_topic['Post'].' '.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span></a></span>'; | 453: $forum_page['post_actions']['quote'] = '<span class="quote-post'.(empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['quote'], array($id, $cur_post['id'])).'">'.$lang_topic['Quote'].'<span> '.$lang_topic['Post'].' '.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span></a></span>'; |
450: } | 454: } |
451: } | 455: } |
452: else | 456: else |
454: if ($cur_topic['closed'] == '0') | 458: if ($cur_topic['closed'] == '0') |
455: { | 459: { |
456: if (($cur_topic['post_replies'] == '' && $forum_user['g_post_replies'] == '1') || $cur_topic['post_replies'] == '1') | 460: if (($cur_topic['post_replies'] == '' && $forum_user['g_post_replies'] == '1') || $cur_topic['post_replies'] == '1') |
457: $forum_page['post_actions']['quote'] = '<span class="report-post'.(!empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['quote'], array($id, $cur_post['id'])).'">'.$lang_topic['Quote'].'<span> '.$lang_topic['Post'].' '.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span></a></span>'; | 461: $forum_page['post_actions']['quote'] = '<span class="report-post'.(empty($forum_page['post_actions']) ? ' first-item' : '').'"><a href="'.forum_link($forum_url['quote'], array($id, $cur_post['id'])).'">'.$lang_topic['Quote'].'<span> '.$lang_topic['Post'].' '.forum_number_format($forum_page['start_from'] + $forum_page['item_count']).'</span></a></span>'; |
458: } | 462: } |
459: } | 463: } |
460: | 464: |
540: <?php ($hook = get_hook('vt_row_new_post_entry_data')) ? eval($hook) : null; ?> | 544: <?php ($hook = get_hook('vt_row_new_post_entry_data')) ? eval($hook) : null; ?> |
541: </div> | 545: </div> |
542: </div> | 546: </div> |
543: <?php if (!empty($forum_page['post_options'])): ?> <div class="postfoot"> | 547: <?php if (!empty($forum_page['post_options'])): ?> |
| 548: <div class="postfoot"> |
544: <div class="post-options"> | 549: <div class="post-options"> |
545: <?php echo implode("\n\t\t\t\t\t", $forum_page['post_options'])."\n" ?> | 550: <?php echo implode("\n\t\t\t\t\t", $forum_page['post_options'])."\n" ?> |
546: </div> | 551: </div> |
547: </div> | 552: </div> |
548: <?php endif; ?> </div> | 553: <?php endif; ?> |
| 554: </div> |
549: <?php | 555: <?php |
550: | 556: |
551: } | 557: } |
553: ?> | 559: ?> |
554: </div> | 560: </div> |
555: | 561: |
556: <div class="main-foot"> | 562: <div class="main-foot"> |
557: <?php | 563: <?php |
558: | 564: |
559: if (!empty($forum_page['main_foot_options'])) | 565: if (!empty($forum_page['main_foot_options'])) |
560: echo "\n\t\t\t".'<p class="options">'.implode(' ', $forum_page['main_foot_options']).'</p>'; | 566: echo "\n\t\t\t".'<p class="options">'.implode(' ', $forum_page['main_foot_options']).'</p>'; |
561: | 567: |
562: ?> | 568: ?> |
563: <p><?php echo $forum_page['items_info'] ?></p> | 569: <h2 class="hn"><span><?php echo $forum_page['items_info'] ?></span></h2> |
564: </div> | 570: </div> |
565: <?php | 571: <?php |
566: | 572: |