Du hast Probleme beim Einbau oder bei der Benutzung eines Mods? In diesem Forum bist du richtig.
Forumsregeln phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
ich bin gerade dabei den hide mod einzubauen.
bis zur letzten modifikation klappt auch alles,
aber mein posting_body.tpl ist völlig anders als die in der anleitung.
die helpline message z.b steht bei mir in der add_bbcode.js!
der mod läuft zwar per tastatureingabe, aber ich bekomme den button nicht zum laufen, d.h. der code wird nicht in die message-box eingetragen!
folgende teile der anleitung kann ich in meinem code nicht finden und ich weiß nicht wie ich das anpassen kann:
Find this line :
bbtags = new Array('[b]','[/b]'...
And add at the end :
'[hide]' and '[/hide]'
You will obtain something like this :
bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','
wenn's so einfach wäre.
der mod funktioniert ja per tastatureingabe [hide]text[/hide] einwandfrei.
nur eben über den button nicht.
was ich bräuchte wäre ein tip wie ich einen buttun in das posting_body.tpl
einbauen kann, der beim ersten klick [hide] ins texfenster einfügt und beim zweiten klick den befehl mit [/hide] wieder schließt.
']', $message);
$message = bbencode_third_pass($message, $bbcode_uid, $valid);
}
#
#------[ OPEN:]--------------------------------------------------
#
search.php
#
#------[ FIND:]--------------------------------------------------
#
//
// If the board has HTML off but the post has HTML
// on then we process it, else leave it alone
//
if ( $return_chars != -1 )
#
#------[ REPLACE WITH:]------------------------------------------
#
//
// If the board has HTML off but the post has HTML
// on then we process it, else leave it alone
//
if( $return_chars == -1 )
#
#------[ FIND:]--------------------------------------------------
#
if ( $bbcode_uid != '' )
{
$message = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass($message, $bbcode_uid) :
preg_replace('/\:[0-9a-z\:]+\]/si', ']', $message);
$message = bbencode_third_pass($message, $bbcode_uid, $valid);
}
#
#------[ OPEN:]--------------------------------------------------
#
includes/bbcode.php
#
#------[ FIND:]--------------------------------------------------
#
$bbcode_tpl['email'] = str_replace('{EMAIL}', '\\1', $bbcode_tpl['email']);
#
#------[ AFTER, ADD:]--------------------------------------------
#
$bbcode_tpl['show'] = str_replace('{HTEXTE}', '\\1', $bbcode_tpl['show']);
#
#------[ FIND:]--------------------------------------------------
#
/**
* Does second-pass bbencoding. This should be used before displaying the message in
* a thread. Assumes the message is already first-pass encoded, and we are given the
* correct UID as used in first-pass encoding.
*/
#
#------[ BEFORE, ADD:]-------------------------------------------
#
function hide_in_quote($text)
{
$text = preg_replace("#\[hide\](.*?)\[\/hide\]#si","--- phpBB : The Protected Message is not copied in this quote ---", $text);
return $text;
}
function bbencode_third_pass($text, $uid, $deprotect)
{
global $bbcode_tpl;
// pad it with a space so we can distinguish between FALSE and matching the 1st char (index 0).
// This is important; bbencode_quote(), bbencode_list(), and bbencode_code() all depend on it.
$text = " " . $text;
// First: If there isn't a "[" and a "]" in the message, don't bother.
if (! (strpos($text, "[") && strpos($text, "]")) )
{
// Remove padding, return.
$text = substr($text, 1);
return $text;
}
// Patterns and replacements for URL and email tags..
$patterns = array();
$replacements = array();
'\\3') . '[/img:$uid]'", $text);
#
#------[ AFTER, ADD:]--------------------------------------------
#
//[hide]message[/hide]
$text = preg_replace("#\[hide\](.*?)\[\/hide\]#si","[hide:$uid]\\1[/hide:$uid]", $text);
#
#------[ OPEN:]--------------------------------------------------
#
# you should do this for all styles you have
templates/subSilver/bbcode.tpl
#
#------[ FIND:]--------------------------------------------------
#
<!-- BEGIN ulist_open --><ul><!-- END ulist_open -->
<!-- BEGIN ulist_close --></ul><!-- END ulist_close -->
#
#------[ BEFORE, ADD:]-------------------------------------------
#
<!-- BEGIN show -->
</span>
<table border="0" align="center" width="90%" cellpadding="3" cellspacing="1">
<tr>
<td><span class="genmed"><b>Protected Message:</b></span></td>
</tr>
<tr>
<td class="quote">
{HTEXTE}
</td>
</tr>
</table>
<span class="postbody">
<!-- END show -->
<!-- BEGIN hide -->
</span>
<table border="0" align="center" width="90%" cellpadding="3" cellspacing="1">
<tr>
<td><span class="genmed"><b>Protected Message:</b></span></td>
</tr>
<tr>
<td class="quote">
<center>--- If you are a *registered user* : you need to post in this topic to see the message ---</center>
</td>
</tr>
</table>
<span class="postbody">
<!-- END hide -->
#
#------[ OPEN:]--------------------------------------------------
#
# you should do this for all styles you have