Added demo mode 📺 (#1399)

* Added demo mode 📺

* Updated

* Update main.php

* Updated

* Updated

* Update admin_cron.php

* Update admin_phpinfo.php

* Updated

* Update admin_forums.php

* Update admin_extensions.php

* Update admin_ug_auth.php

* Update index.php

* Update admin_phpinfo.php

* Update admin_forums.php

* Updated

* Update admin_extensions.php

* Update register.php

* Updated

* Update mysql.sql

* Updated

* Update demo_mode.php

* Update demo_mode.php

* Update demo_mode.php

* Updated

* Update demo_mode.php

* Update demo_mode.php

* Update demo_mode.php

* Update demo_mode.php

* Update mysql.sql

* Update mysql.sql

* Update demo_mode.php

* Update admin_cron.php

* Update admin_phpinfo.php

* Revert "Update mysql.sql"

This reverts commit d2ec089d8f.

* Revert "Update mysql.sql"

This reverts commit dd7a584c47.

* Update mysql.sql

* Update demo_mode.php

* Updated

* Update usercp_viewprofile.tpl

* Update demo_mode.php

* Update main.php

* Update demo_mode.php

* Updated

* Update admin_cron.php

* Update admin_cron.php

* Update edit_user_profile.php

* Update CHANGELOG.md

* Update viewtopic.tpl

* Update CHANGELOG.md
This commit is contained in:
Roman Kelesidis 2024-02-12 22:30:32 +07:00 committed by GitHub
commit bf7fea1f20
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 165 additions and 56 deletions

View file

@ -1,6 +1,7 @@
# Common params
APP_ENV=local
APP_CRON_ENABLED=true
APP_DEMO_MODE=false
# Database credentials
DB_CONNECTION=mysql

View file

@ -6,6 +6,7 @@
**Merged pull requests:**
- Release 2.4.2 🐯 ([belomaxorka](https://github.com/belomaxorka))
- Added demo mode 📺 [\#1399](https://github.com/torrentpier/torrentpier/pull/1399) ([belomaxorka](https://github.com/belomaxorka))
- Added ability to view post_text of topic [\#1401](https://github.com/torrentpier/torrentpier/pull/1401) ([belomaxorka](https://github.com/belomaxorka))
- Added support for rutracker font BBCode tag [\#1397](https://github.com/torrentpier/torrentpier/pull/1397) ([belomaxorka](https://github.com/belomaxorka))
- Added mod "Reason to move topic" [\#1388](https://github.com/torrentpier/torrentpier/pull/1388) ([belomaxorka](https://github.com/belomaxorka))
@ -18,7 +19,7 @@
- Used hashing for filenames generation [\#1385](https://github.com/torrentpier/torrentpier/pull/1385) ([belomaxorka](https://github.com/belomaxorka))
- Minor improvements [\#1382](https://github.com/torrentpier/torrentpier/pull/1382), [\#1383](https://github.com/torrentpier/torrentpier/pull/1383), [\#1391](https://github.com/torrentpier/torrentpier/pull/1391), [\#1398](https://github.com/torrentpier/torrentpier/pull/1398) ([belomaxorka](https://github.com/belomaxorka))
- Some bugfixes [\#1380](https://github.com/torrentpier/torrentpier/pull/1380) ([belomaxorka](https://github.com/belomaxorka))
- New Crowdin updates [\#1384](https://github.com/torrentpier/torrentpier/pull/1384), [\#1389](https://github.com/torrentpier/torrentpier/pull/1389), [\#1392](https://github.com/torrentpier/torrentpier/pull/1392) ([Exileum](https://github.com/Exileum))
- New Crowdin updates [\#1384](https://github.com/torrentpier/torrentpier/pull/1384), [\#1389](https://github.com/torrentpier/torrentpier/pull/1389), [\#1392](https://github.com/torrentpier/torrentpier/pull/1392), [\#1402](https://github.com/torrentpier/torrentpier/pull/1402) ([Exileum](https://github.com/Exileum))
## [v2.4.1](https://github.com/torrentpier/torrentpier/tree/v2.4.1) (2024-02-04)
[Full Changelog](https://github.com/torrentpier/torrentpier/compare/v2.4.0...v2.4.1)

View file

@ -29,6 +29,11 @@ if ($mode == 'run' && !$job_id) {
require __DIR__ . '/pagestart.php';
}
// Check for demo mode
if (IN_DEMO_MODE && ($submit || !in_array($mode, ['add', 'list']))) {
bb_die($lang['CANT_EDIT_IN_DEMO_MODE']);
}
if (!IS_SUPER_ADMIN) {
bb_die($lang['ONLY_FOR_SUPER_ADMIN']);
}

View file

@ -47,6 +47,11 @@ $add_forum = isset($_POST['add_forum']);
$delete_forum = isset($_POST['del_forum']);
$submit = isset($_POST['submit']);
// Check for demo mode
if (IN_DEMO_MODE && ($submit || $add_forum || $delete_forum)) {
bb_die($lang['CANT_EDIT_IN_DEMO_MODE']);
}
// Get Attachment Config
$attach_config = [];

View file

@ -72,10 +72,17 @@ if (isset($_GET['adv'])) {
unset($adv);
}
$submit = isset($_POST['submit']);
// Check for demo mode
if (IN_DEMO_MODE && $submit) {
bb_die($lang['CANT_EDIT_IN_DEMO_MODE']);
}
/**
* Start program proper
*/
if (isset($_POST['submit'])) {
if ($submit) {
$sql = '';
if (!empty($forum_id)) {

View file

@ -80,10 +80,17 @@ if (isset($_GET['adv'])) {
unset($adv);
}
//
// Start program proper
//
if (isset($_POST['submit'])) {
$submit = isset($_POST['submit']);
// Check for demo mode
if (IN_DEMO_MODE && $submit) {
bb_die($lang['CANT_EDIT_IN_DEMO_MODE']);
}
/**
* Start program proper
*/
if ($submit) {
$sql = '';
if (!empty($forum_id)) {

View file

@ -53,6 +53,20 @@ if (isset($_REQUEST['addforum']) || isset($_REQUEST['addcategory'])) {
}
}
// Check for demo mode
if (IN_DEMO_MODE && in_array($mode, [
// Category
'editcat',
'modcat',
'deletecat',
// Forum
'editforum',
'modforum',
'deleteforum'
])) {
bb_die($lang['CANT_EDIT_IN_DEMO_MODE']);
}
$show_main_page = false;
if ($mode) {

View file

@ -8,11 +8,22 @@
*/
if (!empty($setmodules)) {
$module['GENERAL']['PHP_INFO'] = basename(__FILE__);
if (IS_SUPER_ADMIN) {
$module['GENERAL']['PHP_INFO'] = basename(__FILE__);
}
return;
}
require __DIR__ . '/pagestart.php';
if (!IS_SUPER_ADMIN) {
bb_die($lang['ONLY_FOR_SUPER_ADMIN']);
}
// Check for demo mode
if (IN_DEMO_MODE) {
bb_die($lang['CANT_EDIT_IN_DEMO_MODE']);
}
/** @noinspection ForgottenDebugOutputInspection */
phpinfo();

View file

@ -26,6 +26,11 @@ $cat_id = isset($_REQUEST['c']) ? (int)$_REQUEST['c'] : 0;
$mode = isset($_REQUEST['mode']) ? (string)$_REQUEST['mode'] : '';
$submit = isset($_REQUEST['submit']);
// Check for demo mode
if (IN_DEMO_MODE && $submit) {
bb_die($lang['CANT_EDIT_IN_DEMO_MODE']);
}
$group_data = [];
$forum_auth_fields = array(
@ -166,13 +171,12 @@ elseif ($submit && $mode == 'group' && (!empty($_POST['auth']) && is_array($_POS
if ($mode == 'user' && (!empty($_POST['username']) || $user_id)) {
$page_cfg['quirks_mode'] = true;
$this_userdata = false;
if (!empty($_POST['username'])) {
$this_userdata = get_userdata($_POST['username'], true);
} elseif (!empty($user_id)) {
$user_id = $this_userdata['user_id'];
} else {
$this_userdata = get_userdata($user_id);
}
if (!$this_userdata) {
bb_die($lang['NO_SUCH_USER']);
}

View file

@ -14,7 +14,14 @@ if (!empty($setmodules)) {
require __DIR__ . '/pagestart.php';
if (isset($_POST['submit'])) {
$submit = isset($_POST['submit']);
// Check for demo mode
if (IN_DEMO_MODE && $submit) {
bb_die($lang['CANT_EDIT_IN_DEMO_MODE']);
}
if ($submit) {
// Ban action
if (!empty($_POST['username'])) {
if (!$this_userdata = get_userdata($_POST['username'], true)) {

View file

@ -166,8 +166,8 @@ if (isset($_GET['pane']) && $_GET['pane'] == 'left') {
$template->assign_block_vars('reg_user_row', [
'ROW_CLASS' => $row_class,
'USER' => profile_url($onlinerow_reg[$i], true),
'STARTED' => bb_date($onlinerow_reg[$i]['session_start'], 'H:i', false),
'LASTUPDATE' => bb_date($onlinerow_reg[$i]['user_session_time'], 'H:i', false),
'STARTED' => bb_date($onlinerow_reg[$i]['session_start'], 'd-M-Y H:i', false),
'LASTUPDATE' => bb_date($onlinerow_reg[$i]['user_session_time'], 'd-M-Y H:i', false),
'IP_ADDRESS' => $reg_ip,
'U_WHOIS_IP' => $bb_cfg['whois_info'] . $reg_ip,
]);
@ -185,8 +185,8 @@ if (isset($_GET['pane']) && $_GET['pane'] == 'left') {
$template->assign_block_vars('guest_user_row', [
'ROW_CLASS' => $row_class,
'STARTED' => bb_date($onlinerow_guest[$i]['session_start'], 'H:i', false),
'LASTUPDATE' => bb_date($onlinerow_guest[$i]['session_time'], 'H:i', false),
'STARTED' => bb_date($onlinerow_guest[$i]['session_start'], 'd-M-Y H:i', false),
'LASTUPDATE' => bb_date($onlinerow_guest[$i]['session_time'], 'd-M-Y H:i', false),
'IP_ADDRESS' => $guest_ip,
'U_WHOIS_IP' => $bb_cfg['whois_info'] . $guest_ip,
]);

View file

@ -610,20 +610,20 @@ CREATE TABLE IF NOT EXISTS `bb_cron`
INSERT INTO `bb_cron` (`cron_active`, `cron_title`, `cron_script`, `schedule`, `run_day`, `run_time`, `run_order`,
`last_run`, `next_run`, `run_interval`, `log_enabled`, `log_file`, `log_sql_queries`,
`disable_board`, `run_counter`)
VALUES ('1', 'Attach maintenance', 'attach_maintenance.php', 'daily', '', '05:00:00', '40', '', '', '', '1', '', '0',
VALUES ('1', 'Attach maintenance', 'attach_maintenance.php', 'daily', '', '05:00:00', '40', '', '', '', '0', '', '0',
'1', '0'),
('1', 'Board maintenance', 'board_maintenance.php', 'daily', '', '05:00:00', '40', '', '', '', '1', '', '0', '1',
('1', 'Board maintenance', 'board_maintenance.php', 'daily', '', '05:00:00', '40', '', '', '', '0', '', '0', '1',
'0'),
('1', 'Prune forums', 'prune_forums.php', 'daily', '', '05:00:00', '50', '', '', '', '1', '', '0', '1', '0'),
('1', 'Prune topic moved stubs', 'prune_topic_moved.php', 'daily', '', '05:00:00', '60', '', '', '', '1', '',
('1', 'Prune forums', 'prune_forums.php', 'daily', '', '05:00:00', '50', '', '', '', '0', '', '0', '1', '0'),
('1', 'Prune topic moved stubs', 'prune_topic_moved.php', 'daily', '', '05:00:00', '60', '', '', '', '0', '',
'0',
'1', '0'),
('1', 'Logs cleanup', 'clean_log.php', 'daily', '', '05:00:00', '70', '', '', '', '1', '', '0', '1', '0'),
('1', 'PM cleanup', 'clean_pm.php', 'daily', '', '05:00:00', '70', '', '', '', '1', '', '0', '1', '0'),
('1', 'Tracker maintenance', 'tr_maintenance.php', 'daily', '', '05:00:00', '90', '', '', '', '1', '', '0', '1',
('1', 'Logs cleanup', 'clean_log.php', 'daily', '', '05:00:00', '70', '', '', '', '0', '', '0', '1', '0'),
('1', 'PM cleanup', 'clean_pm.php', 'daily', '', '05:00:00', '70', '', '', '', '0', '', '0', '1', '0'),
('1', 'Tracker maintenance', 'tr_maintenance.php', 'daily', '', '05:00:00', '90', '', '', '', '0', '', '0', '1',
'0'),
('1', 'Clean dlstat', 'clean_dlstat.php', 'daily', '', '05:00:00', '100', '', '', '', '1', '', '0', '1', '0'),
('1', 'Prune inactive users', 'prune_inactive_users.php', 'daily', '', '05:00:00', '110', '', '', '', '1', '',
('1', 'Clean dlstat', 'clean_dlstat.php', 'daily', '', '05:00:00', '100', '', '', '', '0', '', '0', '1', '0'),
('1', 'Prune inactive users', 'prune_inactive_users.php', 'daily', '', '05:00:00', '110', '', '', '', '0', '',
'0', '1', '0'),
('1', 'Sessions cleanup', 'sessions_cleanup.php', 'interval', '', '', '255', '', '', '00:03:00', '0', '', '0',
'0', '0'),
@ -652,7 +652,9 @@ VALUES ('1', 'Attach maintenance', 'attach_maintenance.php', 'daily', '', '05:00
('1', 'Sitemap update', 'sitemap.php', 'daily', '', '06:00:00', '30', '', '', '', '0', '', '0', '0', '0'),
('1', 'Update forums atom', 'update_forums_atom.php', 'interval', '', '', '255', '', '', '00:15:00', '0', '',
'0',
'0', '0');
'0', '0'),
('1', 'Demo mode', 'demo_mode.php', 'daily', '', '05:00:00', '255', '', '', '', '1', 'demo_mode_cron', '1', '1',
'0');
-- ----------------------------
-- Table structure for `bb_disallow`

View file

@ -21,6 +21,11 @@ if (!$field = (string)$this->request['field']) {
$this->ajax_die('invalid profile field');
}
// Check for demo mode
if (IN_DEMO_MODE && in_array($field, ['username', 'user_email'])) {
$this->ajax_die($lang['CANT_EDIT_IN_DEMO_MODE']);
}
$table = BB_USERS;
$value = $this->request['value'] = (string)(isset($this->request['value'])) ? $this->request['value'] : 0;

View file

@ -21,9 +21,13 @@ if (!$user_id = (int)$this->request['user_id']) {
$this->ajax_die($lang['NO_USER_ID_SPECIFIED']);
}
// Check for demo mode
if (IN_DEMO_MODE) {
$this->ajax_die($lang['CANT_EDIT_IN_DEMO_MODE']);
}
switch ($mode) {
case 'delete_profile':
if ($userdata['user_id'] == $user_id) {
$this->ajax_die($lang['USER_DELETE_ME']);
}
@ -39,11 +43,8 @@ switch ($mode) {
} else {
$this->ajax_die($lang['USER_DELETE_CSV']);
}
break;
case 'delete_topics':
if (empty($this->request['confirmed']) && $userdata['user_id'] == $user_id) {
$this->prompt_for_confirm($lang['DELETE_USER_POSTS_ME']);
}
@ -60,11 +61,8 @@ switch ($mode) {
} else {
$this->ajax_die($lang['NOT_ADMIN']);
}
break;
case 'delete_message':
if (empty($this->request['confirmed']) && $userdata['user_id'] == $user_id) {
$this->prompt_for_confirm($lang['DELETE_USER_POSTS_ME']);
}
@ -79,23 +77,16 @@ switch ($mode) {
} else {
$this->ajax_die($lang['NOT_ADMIN']);
}
break;
case 'user_activate':
if (empty($this->request['confirmed'])) {
$this->prompt_for_confirm($lang['DEACTIVATE_CONFIRM']);
}
DB()->query("UPDATE " . BB_USERS . " SET user_active = '1' WHERE user_id = " . $user_id);
$this->response['info'] = $lang['USER_ACTIVATE_ON'];
break;
case 'user_deactivate':
if ($userdata['user_id'] == $user_id) {
$this->ajax_die($lang['USER_DEACTIVATE_ME']);
}
@ -105,9 +96,7 @@ switch ($mode) {
DB()->query("UPDATE " . BB_USERS . " SET user_active = '0' WHERE user_id = " . $user_id);
\TorrentPier\Sessions::delete_user_sessions($user_id);
$this->response['info'] = $lang['USER_ACTIVATE_OFF'];
break;
default:

View file

@ -0,0 +1,44 @@
<?php
/**
* TorrentPier Bull-powered BitTorrent tracker engine
*
* @copyright Copyright (c) 2005-2024 TorrentPier (https://torrentpier.com)
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
*/
if (!defined('BB_ROOT')) {
die(basename(__FILE__));
}
set_time_limit(600);
global $cron_runtime_log;
$dump_path = BB_ROOT . 'install/sql/mysql.sql';
if (!IN_DEMO_MODE || !is_file($dump_path) || !is_readable($dump_path)) {
return;
}
// Clean cache & datastore
$datastore->clean();
foreach ($bb_cfg['cache']['engines'] as $cache_name => $cache_val) {
CACHE($cache_name)->rm();
}
// Drop tables & Insert sql dump
$temp_line = '';
foreach (file($dump_path) as $line) {
if (str_starts_with($line, '--') || $line == '') {
continue;
}
$temp_line .= $line;
if (str_ends_with(trim($line), ';')) {
if (!DB()->query($temp_line)) {
$cron_runtime_log = date('Y-m-d H:i:s') . " -- Error performing query: " . $temp_line . " | " . DB()->sql_error()['message'] . "\n";
}
$temp_line = '';
}
}

View file

@ -24,6 +24,9 @@ $user_ip = \TorrentPier\Helpers\IPHelper::ip2long($client_ip);
define('CLIENT_IP', $client_ip);
define('USER_IP', $user_ip);
// Initialize demo mode
define('IN_DEMO_MODE', env('APP_DEMO_MODE', false));
/**
* @param $contents
* @return string

View file

@ -101,9 +101,9 @@ switch ($mode) {
// field => can_edit
$profile_fields = [
'user_active' => IS_ADMIN,
'username' => IS_ADMIN || $bb_cfg['allow_namechange'],
'user_password' => true,
'user_email' => true, // должен быть после user_password
'username' => (IS_ADMIN || $bb_cfg['allow_namechange']) && !IN_DEMO_MODE,
'user_password' => !IN_DEMO_MODE,
'user_email' => !IN_DEMO_MODE, // должен быть после user_password
'user_lang' => $bb_cfg['allow_change']['language'],
'user_gender' => $bb_cfg['gender'],
'user_birthday' => $bb_cfg['birthday_enabled'],
@ -164,10 +164,6 @@ $can_edit_tpl = [];
foreach ($profile_fields as $field => $can_edit) {
$can_edit = (bool)$can_edit;
$can_edit_tpl['CAN_EDIT_' . strtoupper($field)] = $can_edit;
if ($can_edit === false) {
// TODO: При continue; не устанавливаются переменные ($tp_data) шаблона прописанные в case
// continue;
}
switch ($field) {
/**
@ -187,7 +183,7 @@ foreach ($profile_fields as $field => $can_edit) {
case 'username':
$username = !empty($_POST['username']) ? clean_username($_POST['username']) : $pr_data['username'];
if ($submit) {
if ($submit && $can_edit) {
$err = \TorrentPier\Validate::username($username);
if (!$errors and $err && $mode == 'register') {
$errors[] = $err;
@ -222,7 +218,7 @@ foreach ($profile_fields as $field => $can_edit) {
* Пароль (edit, reg)
*/
case 'user_password':
if ($submit) {
if ($submit && $can_edit) {
$cur_pass = (string)@$_POST['cur_pass'];
$new_pass = (string)@$_POST['new_pass'];
$cfm_pass = (string)@$_POST['cfm_pass'];
@ -256,14 +252,13 @@ foreach ($profile_fields as $field => $can_edit) {
*/
case 'user_email':
$email = !empty($_POST['user_email']) ? (string)$_POST['user_email'] : $pr_data['user_email'];
if ($submit) {
if ($submit && $can_edit) {
if ($mode == 'register') {
if (!$errors and $err = \TorrentPier\Validate::email($email)) {
$errors[] = $err;
}
$db_data['user_email'] = $email;
} elseif ($email != $pr_data['user_email']) {
// если смена мейла юзером
if ($bb_cfg['email_change_disabled'] && !$adm_edit && !IS_ADMIN) {
$errors[] = $lang['EMAIL_CHANGING_DISABLED'];
}

View file

@ -128,6 +128,8 @@ $lang['ONLINE_ADMIN'] = 'Administrator';
$lang['ONLINE_MOD'] = 'Moderator';
$lang['ONLINE_GROUP_MEMBER'] = 'Group member';
$lang['CANT_EDIT_IN_DEMO_MODE'] = 'This action can not be performed in demo mode!';
$lang['CURRENT_TIME'] = 'Current time is: <span class="tz_time">%s</span>';
$lang['SEARCH_NEW'] = 'View newest posts';

View file

@ -64,7 +64,7 @@ class SqlDb
$this->do_explain = ($this->dbg_enabled && !empty($_COOKIE['explain']));
$this->slow_time = SQL_SLOW_QUERY_TIME;
// Links to the global vairables (for recording all the logs on all servers, counting total request count and etc)
// Links to the global variables (for recording all the logs on all servers, counting total request count and etc)
$this->DBS['log_file'] =& $DBS->log_file;
$this->DBS['log_counter'] =& $DBS->log_counter;
$this->DBS['num_queries'] =& $DBS->num_queries;

View file

@ -1,3 +1,10 @@
<!-- IF #IN_DEMO_MODE -->
<div class="tCenter">
<span class="leech">{L_TP_VERSION}: {$bb_cfg['tp_version']}</span><br>
<span class="seed">{L_USERNAME}: admin / {L_PASSWORD}: admin</span>
</div>
<!-- ENDIF -->
<!-- IF TORHELP_TOPICS -->
<!-- INCLUDE torhelp.tpl -->
<div class="spacer_6"></div>

View file

@ -80,8 +80,8 @@
<var class="ajax-params">{action: "edit_user_profile", id: "user_interests"}</var>
<var class="ajax-params">{action: "edit_user_profile", id: "user_icq"}</var>
<var class="ajax-params">{action: "edit_user_profile", id: "user_skype"}</var>
<var class="ajax-params">{action: "edit_user_profile", id: "user_twitter", editableType: "yesno-twitter"}</var>
<var class="ajax-params">{action: "edit_user_profile", id: "user_gender", editableType: "yesno-gender"}</var>
<var class="ajax-params">{action: "edit_user_profile", id: "user_twitter", editableType: "yesno-twitter"}</var>
<var class="ajax-params">{action: "edit_user_profile", id: "user_gender", editableType: "yesno-gender"}</var>
<var class="ajax-params">{action: "edit_user_profile", id: "user_birthday", editableType: "yesno-birthday"}</var>
<var class="ajax-params">{action: "edit_user_profile", id: "u_up_total"}</var>
<var class="ajax-params">{action: "edit_user_profile", id: "u_down_total"}</var>

View file

@ -424,7 +424,7 @@ function build_poll_add_form (src_el)
<!-- IF postrow.QUOTE --><a class="txtb" href="<!-- IF $bb_cfg['use_ajax_posts'] -->" onclick="ajax.exec({ action: 'posts', post_id: {postrow.POST_ID}, type: 'reply'}); return false;<!-- ELSE -->{QUOTE_URL}{postrow.POST_ID}<!-- ENDIF -->">{QUOTE_IMG}</a>{POST_BTN_SPACER}<!-- ENDIF -->
<!-- IF postrow.EDIT --><a class="txtb" href="<!-- IF $bb_cfg['use_ajax_posts'] -->" onclick="edit_post({postrow.POST_ID}, 'edit'); return false;<!-- ELSE -->{EDIT_POST_URL}{postrow.POST_ID}<!-- ENDIF -->">{EDIT_POST_IMG}</a>{POST_BTN_SPACER}<!-- ENDIF -->
<!-- IF postrow.DELETE --><a class="txtb" href="<!-- IF $bb_cfg['use_ajax_posts'] -->" onclick="ajax.exec({ action: 'posts', post_id: {postrow.POST_ID}, topic_id : {TOPIC_ID}, type: 'delete'}); return false;<!-- ELSE -->{DELETE_POST_URL}{postrow.POST_ID}<!-- ENDIF -->">{DELETE_POST_IMG}</a>{POST_BTN_SPACER}<!-- ENDIF -->
<!-- IF postrow.IS_FIRST_POST && $bb_cfg['show_post_bbcode_button'] --><a href="#" class="txtb" onclick="ajax.view_post('{TOPIC_ID}'); return false;">{CODE_IMG}</a><!-- ENDIF -->
<!-- IF postrow.IS_FIRST_POST && $bb_cfg['show_post_bbcode_button'] --><a href="#" class="txtb" onclick="ajax.view_post('{postrow.POST_ID}'); return false;">{CODE_IMG}</a><!-- ENDIF -->
<!-- IF postrow.IP --><a class="txtb" href="{IP_POST_URL}{postrow.POST_ID}&amp;t={TOPIC_ID}">{IP_POST_IMG}</a>{POST_BTN_SPACER}<!-- ENDIF -->
<!-- IF AUTH_MOD -->
<a class="menu-root menu-alt1 txtb" href="#mc_{postrow.POST_ID}">{MC_IMG}</a>{POST_BTN_SPACER}