miz
04-16-2004, 10:00 PM
ok this hack added new bbcode
for exsample if some user want to say something only that only admins will see
then he do what he want to say
and "what he want to say" will be viewable only for admins
so lets start :
open admin/functions.php
find :
"/(\[)(php)(])(\r\n)*(.*)(\[\/php\])/esiU",
After add :
"/(\[)(admin)(])(\r\n)*(.*)(\[\/admin\])/esiU",
find :
// ###################### Start stripbrsfromcode #######################
function stripbrsfromcode($foundcode) {
$foundcode = str_replace("\\\"","\"",$foundcode);
return "</normalfont><blockquote><pre><smallfont>code:</smallfont><hr>" . str_replace("<br>", "", str_replace("<br />", "", $foundcode) ) . "<hr></pre></blockquote><normalfont>";
}
After Add :
// ###################### Start Admin ########################
function admin($admintext) {
global $post, $bbuserinfo, $DB_site;
if ($bbuserinfo['usergroupid']!=6) {
$admintext="";
}
return "$admintext";
}
Save the file and upload it back to your server
open root/newreply.php
Find :
$pagetext = trim(preg_replace("/(\[quote])(.*)(\[\/quote])/siU", "", $pagetext));
After Add :
$pagetext = trim(preg_replace("/(\[admin])(.*)(\[\/admin])/siU", "", $pagetext));
Thats All
Enjoy.
for exsample if some user want to say something only that only admins will see
then he do what he want to say
and "what he want to say" will be viewable only for admins
so lets start :
open admin/functions.php
find :
"/(\[)(php)(])(\r\n)*(.*)(\[\/php\])/esiU",
After add :
"/(\[)(admin)(])(\r\n)*(.*)(\[\/admin\])/esiU",
find :
// ###################### Start stripbrsfromcode #######################
function stripbrsfromcode($foundcode) {
$foundcode = str_replace("\\\"","\"",$foundcode);
return "</normalfont><blockquote><pre><smallfont>code:</smallfont><hr>" . str_replace("<br>", "", str_replace("<br />", "", $foundcode) ) . "<hr></pre></blockquote><normalfont>";
}
After Add :
// ###################### Start Admin ########################
function admin($admintext) {
global $post, $bbuserinfo, $DB_site;
if ($bbuserinfo['usergroupid']!=6) {
$admintext="";
}
return "$admintext";
}
Save the file and upload it back to your server
open root/newreply.php
Find :
$pagetext = trim(preg_replace("/(\[quote])(.*)(\[\/quote])/siU", "", $pagetext));
After Add :
$pagetext = trim(preg_replace("/(\[admin])(.*)(\[\/admin])/siU", "", $pagetext));
Thats All
Enjoy.