in jeder lang_main habe ich die variable "mit leben gefüllt"
in dem mod stand nichts davon dass man auch die page_header.php editieren muss
habe einfach am ende
$template->assign_vars(array(
'MODHIDE_TITLE' => $lang['Modhide_title'],
eingefügt, was natürlich nicht funktioniert :-/
naja, von php habe ich keine ahnung, deshalb ist das ganze nicht einfach für mich
hier nochmal das ganze was ich ändern musste, damit der hide auf verschiedenen sprachen funktioniert (ohne diese änderungen funktioniert der mod, aber halt nur auf 1 sprache)
Code: Alles auswählen
If you use more than one language on your board, you can do these modifications :
8a - In "lang_main.php" files (language\lang_xxxxx\lang_main.php)
At the end of the file (ie: English => language\lang_english\lang_main.php), find
//
// That's all, Folks!
// -------------------------------------------------
Add Below
// Mod "Hide"
$lang['modhide_title'] = 'Protected Message :';
$lang['modhide_info'] = '--- If you are a *registered user* : you need to post in this topic to see the message ---';
$lang['modhide_quote'] = '--- phpBB : The Protected Message is not copied in this quote ---';
$lang['bbcode_h_help'] = 'Hide: [hide]message[/hide] (alt+h)';
8b - In "bbcode.tpl" file (Templates/{Used template}/bbcode.tpl)
Find
<!-- 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 -->
Replace By
<!-- BEGIN show -->
</span>
<table border="0" align="center" width="90%" cellpadding="3" cellspacing="1">
<tr>
<td><span class="genmed"><b>{MODHIDE_TITLE}</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>{MODHIDE_TITLE}</b></span></td>
</tr>
<tr>
<td class="quote">
<center>{MODHIDE_INFO}</center>
</td>
</tr>
</table>
<span class="postbody">
<!-- END hide -->
8c - In "posting_body.tpl" (in the Templates/{Used template}/ directory)
Find
h_help = "Hide: [hide]texte[/hide] (alt+h)";
Replace by
h_help = "{L_BBCODE_H_HELP}";
8d - In "bbcode.php" ("includes/" directory)
Find
function hide_in_quote($text)
{
$text = preg_replace("#\[hide\](.*?)\[\/hide\]#si","--- phpBB : Le message protégé n'est pas recopié dans cette citation ---",$text);
return $text;
}
Replace by
function hide_in_quote($text)
{
global $lang;
$text = preg_replace("#\[hide\](.*?)\[\/hide\]#si",$lang['modhide_quote'],$text);
return $text;
} If you use more than one language on your board, you can do these modifications :
8a - In "lang_main.php" files (language\lang_xxxxx\lang_main.php)
At the end of the file (ie: English => language\lang_english\lang_main.php), find
//
// That's all, Folks!
// -------------------------------------------------
Add Below
// Mod "Hide"
$lang['modhide_title'] = 'Protected Message :';
$lang['modhide_info'] = '--- If you are a *registered user* : you need to post in this topic to see the message ---';
$lang['modhide_quote'] = '--- phpBB : The Protected Message is not copied in this quote ---';
$lang['bbcode_h_help'] = 'Hide: [hide]message[/hide] (alt+h)';
8b - In "bbcode.tpl" file (Templates/{Used template}/bbcode.tpl)
Find
<!-- 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 -->
Replace By
<!-- BEGIN show -->
</span>
<table border="0" align="center" width="90%" cellpadding="3" cellspacing="1">
<tr>
<td><span class="genmed"><b>{MODHIDE_TITLE}</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>{MODHIDE_TITLE}</b></span></td>
</tr>
<tr>
<td class="quote">
<center>{MODHIDE_INFO}</center>
</td>
</tr>
</table>
<span class="postbody">
<!-- END hide -->
8c - In "posting_body.tpl" (in the Templates/{Used template}/ directory)
Find
h_help = "Hide: [hide]texte[/hide] (alt+h)";
Replace by
h_help = "{L_BBCODE_H_HELP}";
8d - In "bbcode.php" ("includes/" directory)
Find
function hide_in_quote($text)
{
$text = preg_replace("#\[hide\](.*?)\[\/hide\]#si","--- phpBB : Le message protégé n'est pas recopié dans cette citation ---",$text);
return $text;
}
Replace by
function hide_in_quote($text)
{
global $lang;
$text = preg_replace("#\[hide\](.*?)\[\/hide\]#si",$lang['modhide_quote'],$text);
return $text;
}