Seite 1 von 1
"BBcode moderation" ein wenig anpassen..
Verfasst: 24.12.2005 14:11
von johnny-legend
Kann jemand diesen Mod (
http://www.phpbbhacks.com/download/812) so anpassen das automatisch beim benutzen vom [mod]...[/mod] Tag der Moderator und die Zeit eingetragen wird?
Im Moment muss man um das zu erreichen das selber dort reinschreiben.
Z.B.: [mod="johnny-legend (24.12.2005 14:09)"]...[/mod]
Sieht dann so aus:
[ externes Bild ]
Ohne den Text in den Anführungszeichen steht dort einfach nur Moderation.
Verfasst: 09.01.2006 17:33
von IPB_Flüchtling
Ja, so etwas hätte ich auch gerne, wenn auch für einen
etwas anderen Moderator-Tags-Mod.
@johnny-legend:
Funktioniert bei Dir nach dem Update auf 2.0.19 das [mod="Name"] .... [/mod] noch? Bei mir wird es nämlich
nicht mehr geparst. Wäre sehr nett von Dir, wenn Du das überprüfen könntest!
LG, IPB_Flüchtling
Verfasst: 09.01.2006 17:42
von johnny-legend
Funktioniert leider nicht mehr.
Nur noch [mod]Text[/mod] ist möglich.
Verfasst: 09.01.2006 18:03
von IPB_Flüchtling
Aha,
dachte es mir fast. Dann haben wir ja jetzt das gleiche Problem.
Ich habe versuchsweise die Änderung in der functions_post.php von 2.0.18 auf 2.0.19 rückgängig gemacht. Zur Erinnerung:
Code: Alles auswählen
#
#-----[ OPEN ]---------------------------------------------
#
includes/functions_post.php
#
#-----[ FIND ]---------------------------------------------
# Line 28
$html_entities_match = array('#&(?!(\#[0-9]+;))#', '#<#', '#>#');
$html_entities_replace = array('&', '<', '>');
#
#-----[ REPLACE WITH ]---------------------------------------------
#
$html_entities_match = array('#&(?!(\#[0-9]+;))#', '#<#', '#>#', '#"#');
$html_entities_replace = array('&', '<', '>', '"');
Daraufhin klappte zwar das [mod="Name"] .... [/mod] wieder,
nicht aber das
Also verbrüdern wir uns und schreien gemeinsam ganz herzzerreißend nach
Hilfe!
(Vielleicht werden wir ja erhört...)
LG, IPB_Flüchtling
Verfasst: 09.01.2006 19:43
von IPB_Flüchtling
Ahoi,
habe es von selbst geschafft! *superstolzbin*
Es müssen noch zwei Änderungen in der bbcode.php vorgenommen werden - dann klappt es wieder!
Für den
Moderator Tags Mod lauten die Änderungen in der
bbcode.php wie folgt:
Code: Alles auswählen
#
#-----[ OPEN ]---------------------------------------------
#
includes/bbcode.php
#
#-----[ FIND ]---------------------------------------------
#
$text = bbencode_first_pass_pda($text, $uid, '/\[mod=(\\\".*?\\\")\]/is', '[/mod]', '', false, '', "[mod:$uid=\\1]");
#
#-----[ REPLACE WITH ]---------------------------------------------
#
$text = bbencode_first_pass_pda($text, $uid, '/\[mod=\\\\"(.*?)\\\\"\]/is', '[/mod]', '', false, '', "[mod:$uid=\\\"\\1\\\"]");
#
#-----[ FIND ]---------------------------------------------
#
if( preg_match('#\[mod=\\\"#si', $possible_start, $match) && !preg_match('#\[mod=\\\"(.*?)\\\"\]#si', $possible_start) )
{
// OK we are in a mod tag that probably contains a ] bracket.
// Grab a bit more of the string to hopefully get all of it..
if ($close_pos = strpos($text, '"]', $curr_pos + 9))
{
if (strpos(substr($text, $curr_pos + 9, $close_pos - ($curr_pos + 9)), '[mod') === false)
{
$possible_start = substr($text, $curr_pos, $close_pos - $curr_pos + 2);
#
#-----[ REPLACE WITH ]---------------------------------------------
#
if( preg_match('#\[mod=\\\"#si', $possible_start, $match) && !preg_match('#\[mod=\\\"(.*?)\\\"\]#si', $possible_start) )
{
// OK we are in a mod tag that probably contains a ] bracket.
// Grab a bit more of the string to hopefully get all of it..
if ($close_pos = strpos($text, '"]', $curr_pos + 14))
{
if (strpos(substr($text, $curr_pos + 14, $close_pos - ($curr_pos + 14)), '[mod') === false)
{
$possible_start = substr($text, $curr_pos, $close_pos - $curr_pos + 7);
Nachdem jetzt alles wieder funktioniert, bleibt natürlich noch die eingangs gestellte Bitte, ob der Mod vielleicht verbessert werden könnte, aktuell.
LG, IPB_Flüchtling
Verfasst: 09.01.2006 20:12
von johnny-legend
Besten Dank.
Ja, wär schön wenn sich jemand der "Herausforderung" annehmen würde.

Verfasst: 24.01.2006 04:18
von michi-w.
Im Prinzip müsste man doch eigentlich nur die Zitat Funktion abändern, bis auf die Uhrzeit natürlich.
Nur wo versteckt sich dieser Teil?
Gruß
michi-w.