Spoilermod

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.
Antworten
Desperado123
Mitglied
Beiträge: 240
Registriert: 24.03.2006 12:45

Spoilermod

Beitrag von Desperado123 »

der Spoilermod hat mir mein ganzes Forum zerbombt.

An der Stelle beim Einbau:

Code: Alles auswählen

#-----[ FIND ]------------------------------------------ 
# 
	// place the quote back into the main text
	$text .= $end_text;

	return $text;
}


# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
/**
 * Start Spoiler BBCode
 * Does second-pass bbencoding of the [spoiler] tags. This includes
 * seperating out any [footnote] tags there may be in any pair of 
 * [spoiler] tags.
 */
function bbencode_second_pass_spoiler($text, $uid, $bbcode_tpl)
{
	// determine if any spoilers are in the text a make nda recursive call on it if there is
	preg_match("#\[spoiler:$uid(=\".*\")?\](.*?)\[/spoiler:$uid\]#si", substr($text, 1), $match);

	if( $match[0] )
	{
		$start_pos = strpos($text, $match[0], 1);
		$text = substr($text, 0, $start_pos) . bbencode_second_pass_spoiler(substr($text, $start_pos), $uid, $bbcode_tpl);
	}
	
	$end_text = "";
	$end_pos = strpos($text, "[/spoiler:$uid]");
	
	
	// select just the spoiler itself and strip the closing spoiler tag (if there is a spoiler in the text)
	if( $end_pos )
	{
		$end_text = substr($text, ($end_pos + strlen("[/spoiler:$uid]")));
		$text = substr($text, 0, ($end_pos + strlen("[/spoiler:$uid]")));
		
		$text = str_replace("[/spoiler:$uid]", "", $text);

	}

	// [footnote] and [/footnote] for footnote text
	preg_match_all("#\[footnote:$uid\](.*?)\[/footnote:$uid\]#si", $text, $footnotes, PREG_PATTERN_ORDER);
	
	if(count($footnotes[1]) != 0)
	{
		$count = 1;
		$text .= $bbcode_tpl['footnote_open'];
	
		foreach($footnotes[1] as $key => $note)
		{
			$text = str_replace($footnotes[0][$key], $bbcode_tpl['super_open'] . $count . $bbcode_tpl['super_close'], $text);
			$text .= '<br />' . $bbcode_tpl['super_open'] . $count . $bbcode_tpl['super_close'] . ' ' . $note;
			$count++;
		}

		$text .= $bbcode_tpl['footnote_close'];
	}

	// add the closing spoiler tag again (if this was a spoiler)
	if( $end_pos )
	{
		$text .= $bbcode_tpl['spoiler_close'];
	}
	
	// substiture the opening spoiler tag with the correct template code
	$text = str_replace("[spoiler:$uid]", $bbcode_tpl['spoiler_open'], $text);
	$text = preg_replace("/\[spoiler:$uid=\"(.*?)\"\]/si", $bbcode_tpl['spoiler_username_open'], $text);

	// place the spoiler back into the main text
	$text .= $end_text;

	return $text;
}
// End Spoiler BBCode
habe ich nichts gefunden unter "find". Ich habe das dann reingebaut, wo ich dachte. Alles in includes/bbcode.php . Jetzt kommt jedes mal, wenn ich auf mein Forum gehe.

Code: Alles auswählen

Parse error: syntax error, unexpected '}' in /usr/export/www/vhosts/funnetwork/hosting/cstbforum3/includes/bbcode.php on line 559
was muss ich machen? Ich brauche schnelle Hilfe!
Antworten

Zurück zu „phpBB 2.0: Mod Support“