11-29-2011, 05:19 AM
05-02-2012, 06:58 PM
05-02-2012, 07:16 PM
ok bro, aye coba buat sekarang
05-02-2012, 07:37 PM
05-02-2012, 11:50 PM
[hidengo]
, $n, $mybb, $tid;
$result = $db->query("SELECT message FROM ".TABLE_PREFIX."posts WHERE tid='$tid' AND uid='{$mybb->user['uid']}'");
$selfposted = $db->num_rows($result);
// if user a guest, answered to Posting, or moderators are not the text indicated
if ( ($mybb->user[uid] != "0" && $selfposted > "0") || $mybb->usergroup[cancp] == "1") {
$pattern = "/\(.*)\[\/hide]/siU";
$replace = "<div class='hidetags_header'><b>Hidden:</b></div><div class='hidetags_body' style='display: block;'>\\1</div>";
$message = preg_replace($pattern, $replace, $message);
$message = str_replace("\'", "'", $message);
$message = $message;
$pattern = "/\(.*)\[\/hide]/siU";
$replace = "<div class='hidetags_header'><b>Hidden: \\1</b></div><div class='hidetags_body' style='display: block;'>\\2</div>";
$message = preg_replace($pattern, $replace, $message);
$message = str_replace("\'", "'", $message);
$message = $message;
} else {
// hide content
$pattern = "/\(.*)\[\/hide]/siU";
$replace = "<div class='hidetags_header'><b>Hidden:</b></div><div class='hidetags_body' style='display: block;'>Post reply to view.</div>";
$message = preg_replace($pattern, $replace, $message);
$message = str_replace("\'", "'", $message);
$pattern = "/\(.*)\[\/hide]/siU";
$replace = "<div class='hidetags_header'><b>Hidden: \\1</b></div><div class='hidetags_body' style='display: block;'>Post reply to view.</div>";
$message = preg_replace($pattern, $replace, $message);
$message = str_replace("\'", "'", $message);
}
return $message;
}
?>
[/hidengo]
, $n, $mybb, $tid;
$result = $db->query("SELECT message FROM ".TABLE_PREFIX."posts WHERE tid='$tid' AND uid='{$mybb->user['uid']}'");
$selfposted = $db->num_rows($result);
// if user a guest, answered to Posting, or moderators are not the text indicated
if ( ($mybb->user[uid] != "0" && $selfposted > "0") || $mybb->usergroup[cancp] == "1") {
$pattern = "/\(.*)\[\/hide]/siU";
$replace = "<div class='hidetags_header'><b>Hidden:</b></div><div class='hidetags_body' style='display: block;'>\\1</div>";
$message = preg_replace($pattern, $replace, $message);
$message = str_replace("\'", "'", $message);
$message = $message;
$pattern = "/\(.*)\[\/hide]/siU";
$replace = "<div class='hidetags_header'><b>Hidden: \\1</b></div><div class='hidetags_body' style='display: block;'>\\2</div>";
$message = preg_replace($pattern, $replace, $message);
$message = str_replace("\'", "'", $message);
$message = $message;
} else {
// hide content
$pattern = "/\(.*)\[\/hide]/siU";
$replace = "<div class='hidetags_header'><b>Hidden:</b></div><div class='hidetags_body' style='display: block;'>Post reply to view.</div>";
$message = preg_replace($pattern, $replace, $message);
$message = str_replace("\'", "'", $message);
$pattern = "/\(.*)\[\/hide]/siU";
$replace = "<div class='hidetags_header'><b>Hidden: \\1</b></div><div class='hidetags_body' style='display: block;'>Post reply to view.</div>";
$message = preg_replace($pattern, $replace, $message);
$message = str_replace("\'", "'", $message);
}
return $message;
}
?>
[/hidengo]
05-02-2012, 11:59 PM
test