mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-04-29 10:49:23 +02:00
Fix #152 Added forum config; Allow thread bumping (true/false).
This commit is contained in:
parent
5e21a2b8a9
commit
89a775c23f
@ -1,4 +1,4 @@
|
||||
-- Znote Shop v1.0 for Znote AAC on TFS 0.2.13+ Mystic Spirit.
|
||||
-- Znote Shop v1.0 for Znote AAC on TFS 1.0+.
|
||||
function onSay(cid, words, param)
|
||||
local storage = 54073 -- Make sure to select non-used storage. This is used to prevent SQL load attacks.
|
||||
local cooldown = 15 -- in seconds.
|
||||
|
@ -232,7 +232,7 @@
|
||||
|
||||
$config['level'] = 8;
|
||||
$config['health'] = 185;
|
||||
$config['mana'] = 35;
|
||||
$config['mana'] = 40;
|
||||
$config['cap'] = 470;
|
||||
$config['soul'] = 100;
|
||||
|
||||
@ -348,6 +348,7 @@
|
||||
'level' => 5,
|
||||
'cooldownPost' => 1,//60,
|
||||
'cooldownCreate' => 1,//180,
|
||||
'newPostsBumpThreads' => true,
|
||||
'hidden' => '<font color="orange">[H]</font>',
|
||||
'closed' => '<font color="red">[C]</font>',
|
||||
'sticky' => '<font color="green">[S]</font>',
|
||||
|
@ -369,6 +369,7 @@ if (!empty($_GET)) {
|
||||
|
||||
if ($access) {
|
||||
mysql_insert("INSERT INTO `znote_forum_posts` (`thread_id`, `player_id`, `player_name`, `text`, `created`, `updated`) VALUES ('$reply_thread', '$reply_cid', '". $charData[$reply_cid]['name'] ."', '$reply_text', '". time() ."', '". time() ."');");
|
||||
if ($config['forum']['newPostsBumpThreads']) mysql_update("UPDATE `znote_forum_threads` SET `updated`='". time() ."' WHERE `id`='$reply_thread';");
|
||||
} else echo '<p><b><font color="red">You don\'t have permission to post on this thread. [Thread: Closed]</font></b></p>';
|
||||
} else {
|
||||
?>
|
||||
@ -434,7 +435,7 @@ if (!empty($_GET)) {
|
||||
//if ($thread === false) $access = false;
|
||||
|
||||
if ($access) {
|
||||
mysql_update("UPDATE `znote_forum_posts` SET `text`='$update_post_text' WHERE `id`='$update_post_id';");
|
||||
mysql_update("UPDATE `znote_forum_posts` SET `text`='$update_post_text', `updated`='". time() ."' WHERE `id`='$update_post_id';");
|
||||
echo '<h1>post has been updated.</h1>';
|
||||
} else echo "<p><font color='red'>Your permission to edit this post has been denied.</font></p>";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user