mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-08 05:36:10 +00:00
fix forum BBCode problems
This commit is contained in:
@@ -38,7 +38,7 @@ foreach($posts as $pos) {
|
||||
<a href="javascript:void(0);" bbType="d" bbTag="u" ><div title="underlined" alt="underlined" class="bbButton bbUnderscore"></div></a>
|
||||
<a href="javascript:void(0);" bbType="d" bbTag="alliance" ><div title="Alliance" alt="Alliance" class="bbButton bbAlliance"></div></a>
|
||||
<a href="javascript:void(0);" bbType="d" bbTag="Player" ><div title="Player" alt="Player" class="bbButton bbPlayer"></div></a>
|
||||
<a href="javascript:void(0);" bbType="d" bbTag="x|y" ><div title="Coordinates" alt="Coordinates" class="bbButton bbCoordinate"></div></a>
|
||||
<a href="javascript:void(0);" bbType="d" bbTag="coor" ><div title="Coordinates" alt="Coordinates" class="bbButton bbCoordinate"></div></a>
|
||||
<a href="javascript:void(0);" bbType="d" bbTag="report" ><div title="Report" alt="Report" class="bbButton bbReport"></div></a>
|
||||
<a href="javascript:void(0);" bbWin="resources" id="text_resourceButton"><div title="Resources" alt="Resources" class="bbButton bbResource"></div></a>
|
||||
<a href="javascript:void(0);" bbWin="smilies" id="text_smilieButton"><div title="Smilies" alt="Smilies" class="bbButton bbSmilie"></div></a>
|
||||
@@ -70,6 +70,7 @@ foreach($posts as $pos) {
|
||||
</tbody></table>
|
||||
|
||||
<p class="btn"><input type="image" id="fbtn_ok" value="ok" name="s1" class="dynamic_img" src="img/x.gif" alt="OK" /></form></p>
|
||||
<span style="color: #DD0000"><b>Warning:</b> you can't use the values <b>[message]</b> or <b>[/message]</b> in your post because it can cause problem with bbcode system.</span>
|
||||
<?php }else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ if($session->access!=BANNED){
|
||||
<a href="javascript:void(0);" bbType="d" bbTag="u" ><div title="underlined" alt="underlined" class="bbButton bbUnderscore"></div></a>
|
||||
<a href="javascript:void(0);" bbType="d" bbTag="alliance" ><div title="Alliance" alt="Alliance" class="bbButton bbAlliance"></div></a>
|
||||
<a href="javascript:void(0);" bbType="d" bbTag="Player" ><div title="Player" alt="Player" class="bbButton bbPlayer"></div></a>
|
||||
<a href="javascript:void(0);" bbType="d" bbTag="x|y" ><div title="Coordinates" alt="Coordinates" class="bbButton bbCoordinate"></div></a>
|
||||
<a href="javascript:void(0);" bbType="d" bbTag="coor" ><div title="Coordinates" alt="Coordinates" class="bbButton bbCoordinate"></div></a>
|
||||
<a href="javascript:void(0);" bbType="d" bbTag="report" ><div title="Report" alt="Report" class="bbButton bbReport"></div></a>
|
||||
<a href="javascript:void(0);" bbWin="resources" id="text_resourceButton"><div title="Resources" alt="Resources" class="bbButton bbResource"></div></a>
|
||||
|
||||
@@ -122,6 +122,7 @@ if($session->access!=BANNED){
|
||||
|
||||
|
||||
<p class="btn"><input type="image" id="fbtn_ok" value="ok" name="s1" class="dynamic_img" src="img/x.gif" alt="OK" /></form></p>
|
||||
<span style="color: #DD0000"><b>Warning:</b> you can't use the values <b>[message]</b> or <b>[/message]</b> in your post because it can cause problem with bbcode system.</span>
|
||||
<?php }else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ foreach($topics as $arr) {
|
||||
<a href="javascript:void(0);" bbType="d" bbTag="u" ><div title="underlined" alt="underlined" class="bbButton bbUnderscore"></div></a>
|
||||
<a href="javascript:void(0);" bbType="d" bbTag="alliance" ><div title="Alliance" alt="Alliance" class="bbButton bbAlliance"></div></a>
|
||||
<a href="javascript:void(0);" bbType="d" bbTag="Player" ><div title="Player" alt="Player" class="bbButton bbPlayer"></div></a>
|
||||
<a href="javascript:void(0);" bbType="d" bbTag="x|y" ><div title="Coordinates" alt="Coordinates" class="bbButton bbCoordinate"></div></a>
|
||||
<a href="javascript:void(0);" bbType="d" bbTag="coor" ><div title="Coordinates" alt="Coordinates" class="bbButton bbCoordinate"></div></a>
|
||||
<a href="javascript:void(0);" bbType="d" bbTag="report" ><div title="Report" alt="Report" class="bbButton bbReport"></div></a>
|
||||
<a href="javascript:void(0);" bbWin="resources" id="text_resourceButton"><div title="Resources" alt="Resources" class="bbButton bbResource"></div></a>
|
||||
<a href="javascript:void(0);" bbWin="smilies" id="text_smilieButton"><div title="Smilies" alt="Smilies" class="bbButton bbSmilie"></div></a>
|
||||
@@ -69,6 +69,7 @@ foreach($topics as $arr) {
|
||||
</tbody></table>
|
||||
|
||||
<p class="btn"><input type="image" id="fbtn_ok" value="ok" name="s1" class="dynamic_img" src="img/x.gif" alt="OK" /></form></p>
|
||||
<span style="color: #DD0000"><b>Warning:</b> you can't use the values <b>[message]</b> or <b>[/message]</b> in your post because it can cause problem with bbcode system.</span>
|
||||
<?php }else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ foreach($topics as $top) {
|
||||
<a href="javascript:void(0);" bbType="d" bbTag="u" ><div title="underlined" alt="underlined" class="bbButton bbUnderscore"></div></a>
|
||||
<a href="javascript:void(0);" bbType="d" bbTag="alliance" ><div title="Alliance" alt="Alliance" class="bbButton bbAlliance"></div></a>
|
||||
<a href="javascript:void(0);" bbType="d" bbTag="Player" ><div title="Player" alt="Player" class="bbButton bbPlayer"></div></a>
|
||||
<a href="javascript:void(0);" bbType="d" bbTag="x|y" ><div title="Coordinates" alt="Coordinates" class="bbButton bbCoordinate"></div></a>
|
||||
<a href="javascript:void(0);" bbType="d" bbTag="coor" ><div title="Coordinates" alt="Coordinates" class="bbButton bbCoordinate"></div></a>
|
||||
<a href="javascript:void(0);" bbType="d" bbTag="report" ><div title="Report" alt="Report" class="bbButton bbReport"></div></a>
|
||||
<a href="javascript:void(0);" bbWin="resources" id="text_resourceButton"><div title="Resources" alt="Resources" class="bbButton bbResource"></div></a>
|
||||
<a href="javascript:void(0);" bbWin="smilies" id="text_smilieButton"><div title="Smilies" alt="Smilies" class="bbButton bbSmilie"></div></a>
|
||||
@@ -65,6 +65,7 @@ foreach($topics as $top) {
|
||||
</tbody></table>
|
||||
|
||||
<p class="btn"><input type="image" id="fbtn_ok" value="ok" name="s1" class="dynamic_img" src="img/x.gif" alt="OK" /></form></p>
|
||||
<span style="color: #DD0000"><b>Warning:</b> you can't use the values <b>[message]</b> or <b>[/message]</b> in your post because it can cause problem with bbcode system.</span>
|
||||
<?php }else{
|
||||
header("Location: banned.php");
|
||||
}
|
||||
|
||||
@@ -52,7 +52,10 @@ if(isset($_POST['newtopic'])){
|
||||
}else{
|
||||
$ends = '';
|
||||
}
|
||||
if(!preg_match('/\[message\]/',$post) && !preg_match('/\[\/message\]/',$post)){
|
||||
$post = "[message]".$post."[/message]";
|
||||
$database->CreatTopic($title,$post,$cat,$owner,$alli,$ends);
|
||||
}
|
||||
}
|
||||
if(isset($_POST['newpost'])){
|
||||
$post = $_POST['text'];
|
||||
@@ -60,22 +63,29 @@ if(isset($_POST['newpost'])){
|
||||
$tids = $_POST['tid'];
|
||||
$owner = $session->uid;
|
||||
if($post != ""){
|
||||
if(!preg_match('/\[message\]/',$post) && !preg_match('/\[\/message\]/',$post)){
|
||||
$post = "[message]".$post."[/message]";
|
||||
$database->UpdatePostDate($tids);
|
||||
$database->CreatPost($post,$tids,$owner);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(isset($_POST['editans'])){
|
||||
$post = $_POST['text'];
|
||||
$topic_id = $_POST['tid'];
|
||||
|
||||
if(!preg_match('/\[message\]/',$post) && !preg_match('/\[\/message\]/',$post)){
|
||||
$post = "[message]".$post."[/message]";
|
||||
$database->EditUpdateTopic($topic_id,$post);
|
||||
}
|
||||
}
|
||||
if(isset($_POST['editpost'])){
|
||||
$post = $_POST['text'];
|
||||
$post = htmlspecialchars($post);
|
||||
$posts_id = $_POST['pod'];
|
||||
|
||||
if(!preg_match('/\[message\]/',$post) && !preg_match('/\[\/message\]/',$post)){
|
||||
$post = "[message]".$post."[/message]";
|
||||
$database->EditUpdatePost($posts_id,$post);
|
||||
}
|
||||
}
|
||||
if(!isset($_GET['admin'])) {
|
||||
$_GET['admin'] = null;
|
||||
|
||||
Reference in New Issue
Block a user