
2.) Könnte bitte jemand meinen Mod überprüfen?
3.) Könnte ihn jemand ins Englische übersetzen, da mein Englisch nicht besonders ist?
Code: Alles auswählen
##############################################################
## MOD Title: Farbige Rangtitel
## MOD Author: Z_Beeblebrox <glash2o@breisnet-online.de> (Axel Lehmann)
## MOD Beschreibung:
## Mit diesem Mod kann der Rangtitel farbig gemacht werden.
##
## MOD Version: 0.0.5
## Kompatibilität: 2.0.11
##
## Installation Level: Einfach
## Installation Time: ?
## Dateien zu Editiren: (5)
## admin/admin_ranks.php
## viewtopic.php
## includes/usercp_viewprofile.php
## templates/xxx/admin/ranks_edit_body.tpl
## templates/xxx/admin/admin/ranks_list_body.tpl
## templates/xxx/admin/viewtopic_body.tpl
## templates/xxx/profile_view_body.tpl
## Enthaltene Dateien: (1)
## language/lang_german/lang_rang_mod.php
##
##############################################################
## Vor dem Hinzufügen, sichere alle Daten
##############################################################
#
#-----[ SQL ]-----
#
ALTER TABLE phpbb_ranks ADD rank_color int(11) DEFAULT '#000000' NOT NULL;
#
#-----[ ÖFFNE ]-----
#
admin/admin_ranks.php
#
#-----[ SUCHE ]------
#
require('./pagestart.' . $phpEx);
#
#-----[ FÜGE DANACHE EIN ]-----
#
include($phpbb_root_path . 'language/lang_' . $userdata['user_lang'] . '/lang_rang_mod.' . $phpEx);
#
#-----[ SUCHE ]------
#
"IMAGE_DISPLAY" => ( $rank_info['rank_image'] != "" ) ? '<img src="../' . $images['rank_path'] . $rank_info['rank_image'] . '" />' : "",
#
#-----[ FÜGE DANACHE EIN ]-----
#
"RANK_COLOR" => ( $rank_info['rank_color'] != "" ) ? $rank_info['rank_color'] : "",
#
#-----[ SUCHE ]------
#
"L_RESET" => $lang['Reset'],
#
#-----[ FÜGE DANACHE EIN ]-----
#
"L_RANK_COLOR" => $lang['color'],
"L_COLOR_DARK_RED" => $lang['color_dark_red'],
"L_COLOR_RED" => $lang['color_red'],
"L_COLOR_ORANGE" => $lang['color_orange'],
"L_COLOR_BROWN" => $lang['color_brown'],
"L_COLOR_YELLOW" => $lang['color_yellow'],
"L_COLOR_GREEN" => $lang['color_green'],
"L_COLOR_OLIVE" => $lang['color_olive'],
"L_COLOR_CYAN" => $lang['color_cyan'],
"L_COLOR_BLUE" => $lang['color_blue'],
"L_COLOR_DARK_BLUE" => $lang['color_dark_blue'],
"L_COLOR_INDIGO" => $lang['color_indigo'],
"L_COLOR_VIOLET" => $lang['color_violet'],
"L_COLOR_WHITE" => $lang['color_white'],
"L_COLOR_BLACK" => $lang['color_black'],
"L_USE_COLOR_EXPLAIN" => $lang['use_colour_explain'],
#
#-----[ SUCHE ]------
#
$rank_image = ( (isset($HTTP_POST_VARS['rank_image'])) ) ? trim($HTTP_POST_VARS['rank_image']) : "";
#
#-----[ FÜGE DANACHE EIN ]-----
#
$rank_color = ( (isset($HTTP_POST_VARS['rank_color'])) ) ? trim($HTTP_POST_VARS['rank_color']) : "";
#
#-----[ SUCHE ]------
#
# Dies ist ein Ausschnitt, die Zeile ist länger
#
SET rank_title = '" . str_replace("\'", "''", $rank_title) . "',
#
#-----[ SUCHE IN DER ZEILE ]-----
#
, rank_image = '" . str_replace("\'", "''", $rank_image) . "'
#
#-----[ FÜGE,IN DER ZEILE, DANACHE EIN ]-----
#
, rank_color = '" . str_replace("\'", "''", $rank_color) . "'
#
#-----[ SUCHE ]------
#
# Dies ist ein Ausschnitt, die Zeile ist länger
#
$sql = "INSERT INTO " . RANKS_TABLE . " (rank_title, rank_special, rank_min, rank_image, rank_color)
VALUES ('" . str_replace("\'", "''", $rank_title) . "', $special_rank, $min_posts, '" . str_replace("\'", "''", $rank_image) . "')";
#
#-----[ SUCHE IN DER ZEILE ]-----
#
, '" . str_replace("\'", "''", $rank_color) . "'
#
#-----[ FÜGE, IN DER ZEILE, DANACH EIN ]-----
#
, rank_color = '" . str_replace("\'", "''", $rank_color) . "'
#
#-----[ SUCHE ]------
#
$rank = $rank_rows[$i]['rank_title'];
#
#-----[ FÜGE DANACHE EIN ]-----
#
$rank_color = $rank_rows[$i]['rank_color'];
#
#-----[ SUCHE ]------
#
"L_RANK" => $lang['Rank_title'],
#
#-----[ FÜGE DANACHE EIN ]-----
#
"L_COLOR" => $lang['color'],
#
#-----[ SUCHE ]------
#
$rank = $rank_rows[$i]['rank_title'];
#
#-----[ FÜGE DANACHE EIN ]-----
#
$rank_color = $rank_rows[$i]['rank_color'];
#
#-----[ SUCHE ]------
#
"RANK" => $rank,
#
#-----[ FÜGE DANACHE EIN ]-----
#
"RANK_COLOR" => $rank_color,
#
#-----[ ÖFFNE ]-----
#
templates/xxx/admin/ranks_edit_body.tpl
#
#-----[ SUCHE ]------
#
<tr>
<td class="row1" width="38%"><span class="gen">{L_RANK_IMAGE}:</span><br />
<span class="gensmall">{L_RANK_IMAGE_EXPLAIN}</span></td>
<td class="row2"><input class="post" type="text" name="rank_image" size="40" maxlength="255" value="{IMAGE}" /><br />{IMAGE_DISPLAY}</td>
</tr>
#
#-----[ FÜGE DANACHE EIN ]-----
#
<tr>
<td class="row1" width="38%"><span class="gen">{L_RANK_COLOR}:</span><br /><span class="gensmall">{L_USE_COLOR_EXPLAIN}</span></td>
<td class="row2">
<select name="select_color" onchange="document.poster.rank_color.value=document.poster.select_color.value">
<option selected>{L_RANK_COLOR} :</option>
<option style="color:darkred" value="darkred" class="genmed">{L_COLOR_DARK_RED}</option>
<option style="color:red" value="red" class="genmed">{L_COLOR_RED}</option>
<option style="color:orange" value="orange" class="genmed">{L_COLOR_ORANGE}</option>
<option style="color:brown" value="brown" class="genmed">{L_COLOR_BROWN}</option>
<option style="color:yellow" value="yellow" class="genmed">{L_COLOR_YELLOW}</option>
<option style="color:green" value="green" class="genmed">{L_COLOR_GREEN}</option>
<option style="color:olive" value="olive" class="genmed">{L_COLOR_OLIVE}</option>
<option style="color:cyan" value="cyan" class="genmed">{L_COLOR_CYAN}</option>
<option style="color:blue" value="blue" class="genmed">{L_COLOR_BLUE}</option>
<option style="color:darkblue" value="darkblue" class="genmed">{L_COLOR_DARK_BLUE}</option>
<option style="color:indigo" value="indigo" class="genmed">{L_COLOR_INDIGO}</option>
<option style="color:violet" value="violet" class="genmed">{L_COLOR_VIOLET}</option>
<option style="color:white" value="white" class="genmed">{L_COLOR_WHITE}</option>
<option style="color:black" value="black" class="genmed">{L_COLOR_BLACK}</option>
</select>
<input class="post" type="text" name="rank_color" size="10" maxlength="9" value="{RANK_COLOR}" /></td>
</tr>
#
#-----[ ÖFFNE ]-----
#
templates/xxx/admin/ranks_list_body.tpl
#
#-----[ SUCHE ]------
#
<tr>
<th class="thCornerL">{L_RANK}</th>
#
#-----[ FÜGE DANACHE EIN ]-----
#
<th class="thTop">{L_COLOR}</th>
#
#-----[ SUCHE ]------
#
<tr>
<td class="{ranks.ROW_CLASS}" align="center">{ranks.RANK}</td>
#
#-----[ FÜGE DANACHE EIN ]-----
#
<td class="{ranks.ROW_CLASS}" align="center">{ranks.RANK_COLOR}</td>
#
#-----[ ÖFFNE ]-----
#
viewtopic.php
#
#-----[ SUCHE ]------
#
if ( $postrow[$i]['user_rank'] == $ranksrow[$j]['rank_id'] && $ranksrow[$j]['rank_special'] )
{
$poster_rank = $ranksrow[$j]['rank_title'];
#
#-----[ FÜGE DANACHE EIN ]-----
#
$poster_rank_color = $ranksrow[$j]['rank_color'];
#
#-----[ SUCHE ]------
#
if ( $postrow[$i]['user_rank'] == $ranksrow[$j]['rank_id'] && $ranksrow[$j]['rank_special'] )
{
$poster_rank = $ranksrow[$j]['rank_title'];
#
#-----[ FÜGE DANACHE EIN ]-----
#
$poster_rank_color = $ranksrow[$j]['rank_color'];
#
#-----[ SUCHE ]------
#
$poster = $postrow[$i]['post_username'];
$poster_rank = $lang['Guest'];
#
#-----[ FÜGE DANACHE EIN ]-----
#
$poster_rank_color = '#000000';
#
#-----[ SUCHE ]------
#
'POSTER_RANK' => $poster_rank,
#
#-----[ FÜGE DANACHE EIN ]-----
#
'POSTER_RANK_COLOR' => $poster_rank_color,
#
#-----[ ÖFFNE ]-----
#
templates/xxx/viewtopic_body.tpl
#
#-----[ SUCHE ]------
#
<td width="150" align="left" valign="top" class="{postrow.ROW_CLASS}"><span class="name"><a name="{postrow.U_POST_ID}"></a><b>{postrow.POSTER_NAME}</b></span><br /><span class="postdetails">{postrow.POSTER_RANK}<br />{postrow.RANK_IMAGE}{postrow.POSTER_AVATAR}<br /><br />{postrow.POSTER_JOINED}<br />{postrow.POSTER_POSTS}<br />{postrow.POSTER_FROM}</span><br /></td>
#
#-----[ SUCHE IN DER ZEILE ]-----
#
{postrow.POSTER_RANK}
#
#-----[ ERSETZE MIT ]-----
#
<font color="{postrow.POSTER_RANK_COLOR}">{postrow.POSTER_RANK}</font>
includes/usercp_viewprofile.php
#
#-----[ SUCHE ]------
#
if ( $profiledata['user_rank'] == $ranksrow[$i]['rank_id'] && $ranksrow[$i]['rank_special'] )
{
$poster_rank = $ranksrow[$i]['rank_title'];
#
#-----[ FÜGE DANACHE EIN ]-----
#
$poster_rank_color = $ranksrow[$i]['rank_color'];
#
#-----[ SUCHE ]------
#
if ( $profiledata['user_rank'] == $ranksrow[$i]['rank_id'] && $ranksrow[$i]['rank_special'] )
{
$poster_rank = $ranksrow[$i]['rank_title'];
#
#-----[ FÜGE DANACHE EIN ]-----
#
$poster_rank_color = $ranksrow[$i]['rank_color'];
#
#-----[ SUCHE ]------
#
'POSTER_RANK' => $poster_rank,
#
#-----[ FÜGE DANACHE EIN ]-----
#
'POSTER_RANK_COLOR' => $poster_rank_color,
#
#-----[ ÖFFNE ]-----
#
templates/xxx/viewtopic_body.tpl
#
#-----[ SUCHE ]------
#
<td class="row1" height="6" valign="top" align="center">{AVATAR_IMG}<br /><span class="postdetails">{POSTER_RANK}</span></td>
#
#-----[ SUCHE IN DER ZEILE]-----
#
{POSTER_RANK}
#
#-----[ ERSETZE MIT ]-----
#
<font color="{POSTER_RANK_COLOR}">{POSTER_RANK}</font>
##############################################################
## Speichere und schliese alle Dateien
##############################################################
Code: Alles auswählen
<?php
$lang['color'] = 'Farbe';
$lang['color_dark_red'] = 'Dunkel Rot';
$lang['color_red'] = 'Rot';
$lang['color_orange'] = 'Orange';
$lang['color_brown'] = 'Braun';
$lang['color_yellow'] = 'Gelb';
$lang['color_green'] = 'Grün';
$lang['color_olive'] = 'Olive';
$lang['color_cyan'] = 'Cyan';
$lang['color_blue'] = 'Blau';
$lang['color_dark_blue'] = 'Dunkel Blau';
$lang['color_indigo'] = 'Indigo';
$lang['color_violet'] = 'Violet';
$lang['color_white'] = 'Weiss';
$lang['color_black'] = 'Schwarz';
$lang['use_colour_explain'] = 'Du kannst auch Hex-Werte wie: #000099 oder #FF0000, angeben.';
?>