Code: Alles auswählen
#################################################################
## MOD Title: Spoiler BBcode Mod
## MOD Author: elfy < elfy@tolkien.com.pl > (Marek Sliwinski) http://www.tolkien.com.pl
## MOD Description: adds a spoiler tag to your forum
## Text between spoiler tags is invisible till you highlight this block of text.
## MOD Version: 1.0.0
##
## Installation Level: easy
## Installation Time: 3 Minutes
## Files To Edit: bbcode.tpl,
## bbcode.php
## Included Files: (n/a)
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/downloads/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/downloads/
##############################################################
## Authors Notes: tested with phpBB2 ver 2.0.1
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
includes/bbcode.php
#
#-----[ FIND ]------------------------------------------
#
// [b] and [/b] for bolding text
$text = str_replace("[b:$uid]", $bbcode_tpl['b_open'], $text);
$text = str_replace("[/b:$uid]", $bbcode_tpl['b_close'], $text);
#
#-----[ BEFORE, ADD ]------------------------------------------
#
// Begin 'SPOILER BBcode MOD'
// [spoiler] and [/spoiler] for spoiler-text
$text = str_replace("[spoiler:$uid]", $bbcode_tpl['spoiler_open'], $text);
$text = str_replace("[/spoiler:$uid]", $bbcode_tpl['spoiler_close'], $text);
// End 'SPOILER BBcode MOD'
#
#-----[ FIND ]------------------------------------------
#
// [b] and [/b] for bolding text.
$text = preg_replace("#\[b\](.*?)\[/b\]#si", "[b:$uid]\\1[/b:$uid]", $text);
#
#-----[ BEFORE, ADD ]------------------------------------------
#
// Begin 'SPOILER BBcode MOD'
// [spoiler] and [/spoiler] for setting spoiler-text
$text = preg_replace("#\[spoiler\](.*?)\[/spoiler\]#si", "[spoiler:$uid]\\1[/spoiler:$uid]", $text);
// End 'SPOILER BBcode MOD'
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/bbcode.tpl
#
#
#-----[ FIND ]------------------------------------------
#
<!-- BEGIN b_open --><span style="font-weight: bold"><!-- END b_open -->
<!-- BEGIN b_close --></span><!-- END b_close -->
#
#-----[ BEFORE, ADD ]------------------------------------------
#
<!-- BEGIN spoiler_open --><br><b>spoiler:</b><br><span style="color: EFEFEF"><!-- END spoiler_open -->
<!-- BEGIN spoiler_close --></span><br><!-- END spoiler_close -->
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Kann man das einfach einbauen? Vielleicht sogar noch so, daß "Zitat" durch "Spoiler:" ersetzt wird?Bitte markieren Sie den unsichtbaren Text unterhalb dieses Satzes, um ihn zu lesen"

Gruß, Joachim