Übersetzung der Anleitung:
#### showthread.php ####
Suchen:
---
// Lets get the pid's of the posts on this page
---
Davor einfügen:
--
$selfposted = $db->query_first("SELECT count(message) FROM ".TABLE_PREFIX."posts WHERE tid='$tid' AND uid='$mybbuser[uid]'");
--
### newreply.php ###
Suchen:
---
$username = htmlspecialchars_uni($mybb->input['username']);
---
Davor einfügen:
--
$searcharray[]="/\[hide](.*)\[\/hide\]/siU";
$replacearray[]="";
$post[message] = preg_replace($searcharray, $replacearray, $post[message]);
---
### /inc/functions_post.php ###
Suchen:
---
function doquotes($message)
---
Davor einfügen:
---
function hidetags($message) {
global $db, $n, $mybbuser, $selfposted;
// if user a guest, answered to Posting, or moderators are not the text indicated
if ( ($mybbuser[uid] != "0" && $selfposted[0]) || $mybbuser[cancp]) {
$search="/\[hide](.*)\[\/hide\]/siU";
$replace="<font color=red><b><i>Hidden Text:</i></b></font> $1";
$message = preg_replace($search, $replace, $message);
$message = str_replace("\'", "'", $message);
} else {
// sonst nix anzeigen
$searcharray[]="/\[hide](.*)\[\/hide\]/siU";
$replacearray[]="<font color=red><b><i>Hidden Text (post reply to see text)</i></b></font>";
$message = preg_replace($searcharray, $replacearray, $message);
$message = str_replace("\'", "'", $message);
}
return $message;
}
---
Suchen:
---
$message = nl2br($message);
---
Davor einfügen:
---
$message = hidetags($message);
---
Bearbeitete Dateien hochladen
Templates:
### edit codebuttons ####
---
Suchen:
---
<img name="php" src="./images/codebuttons/php.gif" onclick="insertCode('php')" class="toolbar_normal" onmouseover="toolbarHover('php')" onmouseout="toolbarUnHover('php')" onMouseDown="toolbarMouseDown('php')" alt="$lang->alt_php">
---
Danach einfügen:
---
<img name="hide" src="./images/codebuttons/hide.gif" onclick="insertCode('hide')" alt="Hidden Text" border="0" class="toolbar_normal" onmouseover="toolbarHover('hide')" onmouseout="toolbarUnHover('hide')" onMouseDown="toolbarMouseDown('hide')">
---
Die folgende Grafik in den Ordner ./images/codebuttons/ laden
hide.gif (Größe: 291 Bytes / Downloads: 397)
Fertig