Ich habe leider viel zu wenig Ahnung von php und hoffe, dass meine Anfrage nicht allzu lächerlich klingt...
Hier ist der zu modifizierende Code für ein yabb-Board - vielleicht hat jemand ne Idee, wie man den Code für das phpbb angleichen müsste?
Code: Alles auswählen
<edit file>
english.lng
</edit file>
<search for>
$txt{'706'} = qq~<B>Code:</B><table bgcolor="$color{'bordercolor'}" class="bordercolor" cellspacing="1" width="90%"><tr><td><table cellpadding="2" cellspacing="0" class="code" width="100%"><tr><td><font face="Courier New" class="code" size="1">CODE</font></td></tr></table></td></tr></table>~;
</search for>
<add after>
$txt{'706a'} = qq~<table bgcolor="$color{'bordercolor'}" class="bordercolor" cellspacing="1" width="BOXWIDTH"BOXALIGN><tr><td><table cellpadding="2" cellspacing="0" width="100%" class="messagebox"BOXSTYLE><tr><td>BOXMESSAGE</td></tr></table></td></tr></table>~;
</add after>Code: Alles auswählen
<edit file>
template.html
</edit file>
<search for>
/* Post quote/code colors */
</search for>
<add after>
.messagebox { color: #000000; background-color: #DEE7EF; }
</add after>Code: Alles auswählen
<edit file>
Sources/YaBBC.pl
</edit file>
<search for>
sub quotemsg {
</search for>
<add before>
sub box {
undef %parameter;
my ($tmpstuff, $tmpmessage) = @_;
foreach $dummy (split(/\s+/, $tmpstuff)) {
($key, $value) = split(/=/,$dummy);
$parameter{$key} = $value;
}
$parameter{'width'} =~ s~[^0-9\%]~~g;
if ($parameter{'width'} =~ m/\%/) {
my ($tmp_width, $dummy) = split(/\%/,$parameter{'width'});
if ($tmp_width > 100) {$tmp_width = 100;}
$parameter{'width'} = "$tmp_width%";
} else {
if (int $parameter{'width'} > 1000) {$parameter{'width'} = "1000";}
}
if ($parameter{'width'} eq "") {$parameter{'width'} = "90%";}
if ($parameter{'color'} ne "") {$parameter{'color'} = qq~ bgcolor="$parameter{'color'}" style="background-color:$parameter{'color'}"~;}
if ($parameter{'colour'} ne "") {$parameter{'color'} = qq~ bgcolor="$parameter{'colour'}" style="background-color:$parameter{'colour'}"~;}
if ($parameter{'align'} ne "") {$parameter{'align'} = qq~ align="$parameter{'align'}"~;}
$_ = $txt{'706a'};
$_ =~ s~BOXWIDTH~$parameter{"width"}~ig;
$_ =~ s~BOXSTYLE~$parameter{'color'}~ig;
$_ =~ s~BOXALIGN~$parameter{'align'}~ig;
$_ =~ s~BOXMESSAGE~$tmpmessage~ig;
return $_;
}
</add before>
<search for>
$message =~ s~\[quote\s+author=(.*?)link=(.*?)\s+date=(.*?)\s*\]\n*(.*?)\n*\[/quote\]~"emsg($1,$2,$3,$4)~eisg;
</search for>
<add before>
$message =~ s~\[box(.*?)\](.*?)\[/box\]~&box($1,$2)~eisg;
</add before>Code: Alles auswählen
<edit file>
Sources/Printpage.pl
</edit file>
<search for>
$threadpost =~ s~\[list\]~<ul>~isg;
</search for>
<add before>
$threadpost =~ s~\[box(.*?)\](.*?)\[\/box\]~<table bgcolor="#000000" cellspacing="1" width="90%"><tr><td width="100%"><table cellpadding="2" cellspacing="0" width="100%" bgcolor="#FFFFFF"><tr><td width="100%"><font face="Arial,Helvetica" size="1" color="#000000">$2</font></td></tr></table></td></tr></table>~isg;
</add before>Mir freundlichen Grüßen,
Ben