BBCode Button erstellen ?
Verfasst: 17.01.2006 08:16
HI habe folgendes Problem habe z.b den Hangman Mod drin und dort gibt es auch das ganze als BBcode der Code funzt auch aber Button bekomme ich keinen angezeigt.
Wie erstellt man einen BBcode Button?
Hier mal die wie es n de Anleitung steht.
Wie erstellt man einen BBcode Button?
Hier mal die wie es n de Anleitung steht.
Code: Alles auswählen
##############################################################
## MOD Title: Hangman Mod BBCODE Addon
## MOD Author: unTouched < p.s16@web.de > Pete® http://pete.dsl-inet.com/
## MOD Description: Adds you the
## [hangman]WORD[/hangman] and
## [hangman=game_index]Hangman[/hangman]
## BBCODE (only works with Hangman Mod 1.3.0)
## MOD Version: 0.0.2
##
## MOD phpBB Version needed:
## phpbb 2.0.x or phpbbPlus 1.5x
##
## Installation Level: Extreme hard :D
## Installation Time: 3 Minutes
## Files To Edit: bbcode.php
## templates/fisubsilversh/bbcode.tpl
##
## Included Files: none
##
##
##############################################################
#############################################################
## Author Notes: Have a lot of fun, questions and ideas
## relating this mod could be posted in the
## support forum.
##
##############################################################
## MOD History:
##
## 23-09-2004: 0.0.1 only a try for people can't awaiting it ;)
## - only the window an [hangman] bbcode ;) works on every bbcode page... no anti
## spam inside!!! please note that users using
## [hangman]wort1[/hangman][hangman]wort2[/hangman][hangman]wort3[/hangman]...
## could spam your DB if you don't adjust a games_per_day Limitation
## ... this will be fixed in next version
## 22-10-2004: 0.0.2 working version without bugs( i hope ;) )
## - fixed bug creating a hangman each preview u try
## - fixed bug doubles in DB
## - fixed bug - user_id failes on creating...
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ] ------
#
includes/bbcode.php
#
#-----[ FIND ] ------
#
define("BBCODE_UID_LEN", 10);
#
#-----[AFTER,ADD] -----
#
define('IN_HANGMAN',true);
include($phpbb_root_path.'includes/functions_hangman.php');
#
#-----[ FIND ] ------
#
define("BBCODE_TPL_READY", true);
#
#-----[BEFORE,ADD] -----
#
//HANGMAN
$bbcode_tpl['hangman'] = str_replace('{ID}','\\1',"'".$bbcode_tpl['hangman']."'");
#
#-----[ FIND ] ------
# AT THE END OF BBCODE SECOND PASS FUNCTION
// Remove our padding from the string..
$text = substr($text, 1);
#
#-----[BEFORE,ADD] -----
#
// Hangman bbcode Addon [hangman=][/hangman]
$patterns[] = "#\[hangman=([0-9]+):$uid\](.*?)\[/hangman:$uid\]#sie";
$replacements[] = $bbcode_tpl['hangman'];
$text = preg_replace($patterns, $replacements, $text);
#
#-----[ FIND ] ------
#AT THE END OF BBCODE FIRST PASS FUNCTION
// Remove our padding from the string..
return substr($text, 1);
#-----[BEFORE,ADD] -----
#
//Hangman bbcode Addon
$text = bbencode_first_pass_pda($text, $uid, "#\[hangman\]#si", '[/hangman]', '', false, 'phpbb_new_hang'," ");
$text = preg_replace("#\[hangman=([0-9]+)\](.*?)\[/hangman\]#si", "[hangman=\\1:$uid]\\2[/hangman:$uid]", $text);
#
#-----[ OPEN ] ------
#
templates/fisubsilversh/bbcode.tpl
#
#-----[ FIND ] -----
#
<!-- BEGIN email --><a href="mailto:{EMAIL}">{EMAIL}</a><!-- END email -->
#
#-----[ AFTER, ADD ] -----
#
<!-- BEGIN hangman --><a href="hangman.php?mode=window&game_index={ID}" onclick="var ref = window.open(\'hangman.php?mode=window&game_index={ID}\',\'_hangman\', \'HEIGHT=400, resizeable=no,scrollbars=no,WIDTH=720\');ref.focus();return false" target="_hangman" class="postlink">Hangman</a><!-- END hangman -->
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
# EofM
# Enjoy
# Pete®