Code: Selecteer alles
##############################################################
## MOD Title: Smilie Creator
## MOD Author: esperitox < bockelmann@powerforum.de > ( Marcel Bockelmann ) http://www.powerforum.de/
## BBCode collecting main: saerdnaer
## MOD Description: Diese Mod fügt einen BBCode [schild=1]text[/schild] hinzu der es den Usern
## erlaubt Schilder-Smilies mit eigenem Text in ihre Postings einzufügen.
## MOD Version: 1.0.3
##
## Installation Level: moderate
## Installation Time: 5-10 minutes
## Files To Edit: posting.php, privmsg.php, bbcode.php, lang_main.php, posting_body.tpl, bbcode.tpl
##############################################################
## 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/
##############################################################
#
# Achtung!!! Damit diese Modifikation einwandfrei läuft muss auf deinem Server GD Lib installiert und FreeType Support Aktiviert sein!!!
#
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]-----
#
posting.php
#
#-----[ FIND ]-----
#
'L_BBCODE_F_HELP' => $lang['bbcode_f_help'],
#
#-----[ AFTER ADD ]-----
#
'L_BBCODE_SC_HELP' => $lang['bbcode_sc_help'],
'L_SMILIE_CREATOR' => $lang['Smilie_creator'],
#
#-----[ OPEN ]-----
#
privmsg.php
#
#-----[ FIND ]-----
#
'L_BBCODE_F_HELP' => $lang['bbcode_f_help'],
#
#-----[ AFTER ADD ]-----
#
'L_BBCODE_SC_HELP' => $lang['bbcode_sc_help'],
'L_SMILIE_CREATOR' => $lang['Smilie_creator'],
#
#-----[ OPEN ]-----
#
includes/bbcode.php
#
#-----[ FIND ]-----
#
/**
* Loads bbcode templates from the bbcode.tpl file of the current template set.
* Creates an array, keys are bbcode names like "b_open" or "url", values
* are the associated template.
* Probably pukes all over the place if there's something really screwed
* with the bbcode.tpl file.
*
* Nathan Codding, Sept 26 2001.
*/
#
#-----[ BEFORE ADD ]-----
#
function phpbb_schild($smilie, $parameter, $text)
{
$text = trim(urlencode($text));
$fontcolor = '000000';
$shadowcolor = "";
$shieldshadow = '1';
$parameter = trim($parameter);
if ( !empty($parameter) )
{
$parameter = explode(' ', $parameter);
$parameter2 = array();
if ( !empty($parameter) )
{
reset($parameter);
while ( list( , $line) = each($parameter) )
{
if ( ( $pos = strpos(' ' . $line, '=') ) )
{
$name = substr($line, 0, $pos - 1);
$value = substr($line, $pos);
$parameter2[$name] = $value;
}
}
if ( !empty($parameter2['fontcolor']) )
{
$fontcolor = $parameter2['fontcolor'];
}
if ( !empty($parameter2['shadowcolor']) )
{
$shadowcolor = $parameter2['shadowcolor'];
}
if ( $parameter2['shieldshadow'] == '0' )
{
$shieldshadow = '0';
}
else
{
if ( !empty($parameter2['shieldshadow']) )
{
$shieldshadow = $shieldshadow;
}
}
}
}
return "text2schild.php?smilie=$smilie&fontcolor=$fontcolor&shadowcolor=$shadowcolor&shieldshadow=$shieldshadow&text=$text";
}
#
#-----[ FIND ]-----
#
$bbcode_tpl['email'] = str_replace('{EMAIL}', '\\1', $bbcode_tpl['email']);
#
#-----[ AFTER ADD ]-----
#
//Begin Smilie Creator Mod Copyright esperitox 2003
$bbcode_tpl['schild'] = str_replace('{URL}', "' . phpbb_schild('\\1', '\\2', '\\3') . '", "'" . $bbcode_tpl['schild'] . "'");
#
#-----[ FIND ]-----
#
// [email]user@domain.tld[/email] code..
$patterns[] = "#\[email\]([a-z0-9\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+)\[/email\]#si";
$replacements[] = $bbcode_tpl['email'];
#
#-----[ AFTER ADD ]-----
#
//Begin Smilie Creator Mod Copyright esperitox 2003 [schild=] and [/schild] code..
$patterns[] = "#\[schild=([a-z0-9]+)([a-z0-9\-\.,\?!% \*_\#:;~\\&$@\/=\+\\\\)]*)\](.*?)\[/schild\]#sie";
$replacements[] = $bbcode_tpl['schild'];
#
#-----[ OPEN ]-----
#
language/lang_german/lang_main.php
#
#-----[ FIND ]-----
#
$lang['bbcode_f_help'] = 'Schriftgröße: [size=x-small]Kleiner Text[/size]';
#
#-----[ AFTER ADD ]-----
#
$lang['bbcode_sc_help'] = 'Smilie Creator: [schild=1]Text[/schild] Erstellt einen Smilie mit Schild';
#
#-----[ FIND ]-----
#
$lang['Emoticons'] = 'Smilies';
#
#-----[ AFTER ADD ]-----
#
$lang['Smilie_creator'] = 'Smilie Creator';
#
#-----[ FIND ]-----
#
//
//
// That's all Folks!
// -------------------------------------------------
#
#-----[ BEFORE ADD ]-----
#
//smilie creator
$lang['SC_shieldtext'] = 'Schildtext';
$lang['SC_fontcolor'] = 'Textfarbe';
$lang['SC_shadowcolor'] = 'Schattenfarbe';
$lang['SC_shieldshadow'] = 'Schildschatten';
$lang['SC_shieldshadow_on'] = 'Aktivieren';
$lang['SC_shieldshadow_off'] = 'Deaktivieren';
$lang['SC_smiliechooser'] = 'Smilieauswahl';
$lang['SC_random_smilie'] = 'zufalls Smilie';
$lang['SC_default_smilie'] = 'standard Smilie';
$lang['SC_create_smilie'] = 'Erstellen';
$lang['SC_stop_creating'] = 'Verwerfen';
$lang['SC_error'] = 'Hier ist dein Schild - du hast den Text vergessen...';
#
#-----[ OPEN ]-----
#
templates/<dein-Template>/posting_body.tpl
#
#-----[ FIND ]-----
#
<td><span class="genmed">
<input type="button" class="button" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px" onClick="bbstyle(16)" onMouseOver="helpline('w')" />
</span></td>
#
#-----[ AFTER ADD ]-----
#
<td><span class="genmed">
<input type="button" class="button" value="{L_SMILIE_CREATOR}" style="width: 100px" onclick="window.open('smilie_creator.php?mode=text2schild', '_phpbbcreatesmilies', 'HEIGHT=300,resizable=yes,scrollbars=yes,WIDTH=450');return false;" target="_phpbbcreatesmilies" onMouseOver="helpline('sc')" />
</span></td>
#
#-----[ FIND ]-----
#
f_help = "{L_BBCODE_F_HELP}";
#
#-----[ AFTER ADD ]-----
#
sc_help = "{L_BBCODE_SC_HELP}";
#
#-----[ OPEN ]-----
#
templates/<dein-Template>/bbcode.tpl
#
#-----[ FIND ]-----
#
<!-- BEGIN email --><a href="mailto:{EMAIL}">{EMAIL}</A><!-- END email -->
#
#-----[ AFTER ADD ]-----
#
<!-- BEGIN schild --><img src="{URL}" border="0"><!-- END schild -->
####################################################################
#
#-------- [ ADD FILE ]------------------------
#
text2schild.php --> phpbb-root/text2schild.php
#
#-------- [ ADD FILE ]------------------------
#
smilie_creator.php --> phpbb-root/smilie_creator.php
#
#-------- [ ADD FILE ]------------------------
#
smilie_creator.tpl --> phpbb-root/templates/<dein-Template>/smilie_creator.tpl
#
#-------- [ ADD FOLDER ]------------------------
#
smilie_creator --> phpbb-root/smilie_creator
#
# EoM
#


kan er iemand dit vertallen ??
