Seite 1 von 1

Message Icon Mod 1.0.2 kompatibel zu phpBB 2.0.20?

Verfasst: 05.05.2006 12:59
von Simpson
Ich habe Probleme mit dem Message Icon Mod 1.0.2 und phpBB 2.0.20. Wäre klasse wenn mir da jemand helfen könnte. Der Mod ist nicht mehr der Neuste.

Versuche schon seit einiger Zeit den Mod zum laufen zu bekommen, aber es passiert immer folgendes...

Ich erstelle ein neues Posting, wähle ein beliebiges Icon aus und klicke auf Absenden und werde dann weitergeleitet ins Posting (soweit okay). Im Posting wird mir dann aber grundsätzlich das erste Icon "Icon1.gif" angezeigt.

Darauf habe ich das Posting editiert und mal "No Icon" oder auch ein anderes Icon ausgewählt. Gleiches Spiel, es bleibt immer beim ersten Icon "Icon1.gif".

Dann habe ich in die Posts Table reingeschaut und tatsächlich dort steht "1", ändere ich dort auf "2" zeigt er mir auch Icon 2 im Topic an.

Demnach liegt die Fehlerhafte übermittlung wahrscheinlich an der posting.php oder posting_body.tpl.

Ist schon jemanden dieser Fehler bekannt oder sieht vielleicht jemand im Mod einen Fehler warum das so ist?

Code: Alles auswählen

################################################################# 
## Mod Title: Message Icons 
## Mod Version: 1.0.2 
## Author: steveurkel <spam@stefand.de> - http://www.austauschforum.de 
## Description: Adds a message icon right before the topic title in viewforum.php 
##              and viewtopic.php to give user the possibility to show his/her 
##              meaning of his/her post. 
## 
## Installation Level: moderate 
## Installation Time: 20 Minutes 
## Files To Edit: posting.php 
##                includes/functions_post.php 
##                viewforum.php 
##                viewtopic.php 
##                language/lang_english/lang_main.php 
##                templates/subSilver/posting_body.tpl 
##                templates/subSilver/viewforum_body.tpl 
##                templates/subSilver/viewtopic_body.tpl 
## 
## Included Files: [optional]14 GIF-Files 
################################################################# 
## Security Disclaimer: This MOD Cannot Be Posted To Or Added At Any Non-Official phpBB Sites 
################################################################# 
## 
## Author Note: 
## This Mod assumes that you add 14 message icons. If you want more you have to 
## adjust the number at the appropriate spots. 
## You have to get the icons. 
## 
## Place the icons in a new folder images/icon. 
## Name the icons icon1.gif, icon2.gif ... You get the idea. 
## 
## Special thanks go to Exciter who wrote the hack for phpBB 1.4.x since I used 
## some of his ideas for this mod. 
## 
################################################################# 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
################################################################# 
## 
##  Revision History: 
## 
##  v1.0.2 
##  - added additional option, that no icon is shown 
## 
##  v1.0.1 
##  - renamed some variables to obey the phpBB Coding Standards. 
## 
##  v1.0.0 
##  - First Release and Final. 
## 
################################################################# 

# 
#-----[ DATABASE CHANGES ]------------------------------------------ 
# 

ALTER TABLE phpbb_posts ADD COLUMN post_icon TINYINT (2) UNSIGNED DEFAULT '0' NOT NULL; 
ALTER TABLE phpbb_topics ADD COLUMN topic_icon TINYINT (2) UNSIGNED DEFAULT '0' NOT NULL; 

# 
#-----[ OPEN ]------------------------------------------ 
# 

phpBB2/posting.php 

# 
#-----[ FIND ]------------------------------------------ 
# 

$refresh = $preview || $poll_add || $poll_edit || $poll_delete; 

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

if ($HTTP_POST_VARS['msg_icon']) { 
  $msg_icon_checked = $HTTP_POST_VARS['msg_icon']; 
  $msg_icon = $HTTP_POST_VARS['msg_icon']; 
} 
else 
  $msg_icon_checked = 0; 

# 
#-----[ FIND ]------------------------------------------ 
# 

$select_sql = ( !$submit ) ? ", t.topic_title, p.enable_bbcode, p.enable_html, p.enable_smilies, p.enable_sig, p.post_username, pt.post_subject, pt.post_text, pt.bbcode_uid, u.username, u.user_id, u.user_sig" : ''; 

# 
#-----[ REPLACE WITH ]------------------------------------------ 
# 

$select_sql = ( !$submit ) ? ", t.topic_title, p.enable_bbcode, p.enable_html, p.enable_smilies, p.enable_sig, p.post_username, pt.post_subject, pt.post_text, pt.bbcode_uid, u.username, u.user_id, u.user_sig, p.post_icon" : ''; 

# 
#-----[ FIND ]------------------------------------------ 
# 

submit_post($mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id, $topic_type, $bbcode_on, $html_on, $smilies_on, $attach_sig, $bbcode_uid, str_replace("\'", "''", $username), str_replace("\'", "''", $subject), str_replace("\'", "''", $message), str_replace("\'", "''", $poll_title), $poll_options, $poll_length); 

# 
#-----[ REPLACE WITH ]------------------------------------------ 
# 

submit_post($mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id, $topic_type, $bbcode_on, $html_on, $smilies_on, $attach_sig, $bbcode_uid, str_replace("\'", "''", $username), str_replace("\'", "''", $subject), str_replace("\'", "''", $message), str_replace("\'", "''", $poll_title), $poll_options, $poll_length, $msg_icon); 

# 
#-----[ FIND ]------------------------------------------ 
# 

$smilies_on = ( $post_info['enable_smilies'] ) ? true : false; 

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

switch ($post_info['post_icon']) { 
                          case 1 : $msg_icon_checked = 1; break; 
                          case 2 : $msg_icon_checked = 2; break; 
                          case 3 : $msg_icon_checked = 3; break; 
                          case 4 : $msg_icon_checked = 4; break; 
                          case 5 : $msg_icon_checked = 5; break; 
                          case 6 : $msg_icon_checked = 6; break; 
                          case 7 : $msg_icon_checked = 7; break; 
                          case 8 : $msg_icon_checked = 8; break; 
                          case 9 : $msg_icon_checked = 9; break; 
                          case 10 : $msg_icon_checked = 10; break; 
                          case 11 : $msg_icon_checked = 11; break; 
                          case 12 : $msg_icon_checked = 12; break; 
                          case 13 : $msg_icon_checked = 13; break; 
                          case 14 : $msg_icon_checked = 14; break; 
                          default : $msg_icon_checked = 0; break; 
                        } 

# 
#-----[ FIND ]------------------------------------------ 
# 

if( $user_sig != '' ) 
{ 
        $template->assign_block_vars('switch_signature_checkbox', array()); 
} 

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

$template->assign_block_vars('switch_msgicon_checkbox', array()); 

# 
#-----[ FIND ]------------------------------------------ 
# 

'U_REVIEW_TOPIC' => ( $mode == 'reply' ) ? append_sid("posting.$phpEx?mode=topicreview&" . POST_TOPIC_URL . "=$topic_id") : '', 

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

        'L_MSG_ICON_NO_ICON' => $lang['Msg_Icon_No_Icon'], 
        'MSG_ICON_CHECKED0' => ( $msg_icon_checked==0) ? 'CHECKED' : '', 
        'MSG_ICON_CHECKED1' => ( $msg_icon_checked==1) ? 'CHECKED' : '', 
        'MSG_ICON_CHECKED2' => ( $msg_icon_checked==2) ? 'CHECKED' : '', 
        'MSG_ICON_CHECKED3' => ( $msg_icon_checked==3) ? 'CHECKED' : '', 
        'MSG_ICON_CHECKED4' => ( $msg_icon_checked==4) ? 'CHECKED' : '', 
        'MSG_ICON_CHECKED5' => ( $msg_icon_checked==5) ? 'CHECKED' : '', 
        'MSG_ICON_CHECKED6' => ( $msg_icon_checked==6) ? 'CHECKED' : '', 
        'MSG_ICON_CHECKED7' => ( $msg_icon_checked==7) ? 'CHECKED' : '', 
        'MSG_ICON_CHECKED8' => ( $msg_icon_checked==8) ? 'CHECKED' : '', 
        'MSG_ICON_CHECKED9' => ( $msg_icon_checked==9) ? 'CHECKED' : '', 
        'MSG_ICON_CHECKED10' => ( $msg_icon_checked==10) ? 'CHECKED' : '', 
        'MSG_ICON_CHECKED11' => ( $msg_icon_checked==11) ? 'CHECKED' : '', 
        'MSG_ICON_CHECKED12' => ( $msg_icon_checked==12) ? 'CHECKED' : '', 
        'MSG_ICON_CHECKED13' => ( $msg_icon_checked==13) ? 'CHECKED' : '', 
        'MSG_ICON_CHECKED14' => ( $msg_icon_checked==14) ? 'CHECKED' : '', 

# 
#-----[ OPEN ]------------------------------------------ 
# 

phpBB2/includes/functions_post.php 

# 
#-----[ FIND ]------------------------------------------ 
# 

function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_id, &$post_id, &$poll_id, &$topic_type, &$bbcode_on, &$html_on, &$smilies_on, &$attach_sig, &$bbcode_uid, &$post_username, &$post_subject, &$post_message, &$poll_title, &$poll_options, &$poll_length) 

# 
#-----[ REPLACE WITH ]------------------------------------------ 
# 

function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_id, &$post_id, &$poll_id, &$topic_type, &$bbcode_on, &$html_on, &$smilies_on, &$attach_sig, &$bbcode_uid, &$post_username, &$post_subject, &$post_message, &$poll_title, &$poll_options, &$poll_length, &$msg_icon) 

# 
#-----[ FIND ]------------------------------------------ 
# 

include($phpbb_root_path . 'includes/functions_search.'.$phpEx); 

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

//code to get rid of some quick-reply-mod problems 
if (!$msg_icon) $msg_icon=0; 

# 
#-----[ FIND ]------------------------------------------ 
# 

$sql  = ( $mode != "editpost" ) ? "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote)" : "UPDATE " . TOPICS_TABLE . " SET topic_title = '$post_subject', topic_type = $topic_type, topic_vote = $topic_vote WHERE topic_id = $topic_id"; 

# 
#-----[ REPLACE WITH ]------------------------------------------ 
# 

$sql  = ( $mode != "editpost" ) ? "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote, topic_icon) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote, $msg_icon)" : "UPDATE " . TOPICS_TABLE . " SET topic_title = '$post_subject', topic_type = $topic_type, topic_vote = $topic_vote, topic_icon = $msg_icon WHERE topic_id = $topic_id"; 

# 
#-----[ FIND ]------------------------------------------ 
# 

$sql = ( $mode != "editpost" ) ? "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, post_username, post_time, poster_ip, enable_bbcode, enable_html, enable_smilies, enable_sig) VALUES ($topic_id, $forum_id, " . $userdata['user_id'] . ", '$post_username', $current_time, '$user_ip', $bbcode_on, $html_on, $smilies_on, $attach_sig)" : "UPDATE " . POSTS_TABLE . " SET enable_bbcode = $bbcode_on, enable_html = $html_on, enable_smilies = $smilies_on, enable_sig = $attach_sig" . $edited_sql . " WHERE post_id = $post_id"; 

# 
#-----[ REPLACE WITH ]------------------------------------------ 
# 

$sql = ( $mode != "editpost" ) ? "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, post_username, post_time, poster_ip, enable_bbcode, enable_html, enable_smilies, enable_sig, post_icon) VALUES ($topic_id, $forum_id, " . $userdata['user_id'] . ", '$post_username', $current_time, '$user_ip', $bbcode_on, $html_on, $smilies_on, $attach_sig, $msg_icon)" : "UPDATE " . POSTS_TABLE . " SET enable_bbcode = $bbcode_on, enable_html = $html_on, enable_smilies = $smilies_on, enable_sig = $attach_sig" . $edited_sql . ", post_icon = $msg_icon WHERE post_id = $post_id"; 

# 
#-----[ OPEN ]------------------------------------------ 
# 

phpBB2/viewforum.php 

# 
#-----[ FIND ]------------------------------------------ 
# 

$topic_type = $topic_rowset[$i]['topic_type']; 

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

if ( $topic_rowset[$i]['topic_icon'] == 0 ) { 
                  $icon = " "; //Attention you should replace the whitespace with & nbsp; (remove the whitespace between & and nbsp;) 
                } 
                else { 
                  $icon = "<img width=\"15\" height=\"15\" src=\"images/icon/icon" . $topic_rowset[$i]['topic_icon']. ".gif\" alt=\"Messageicon\" border=\"0\">"; 
                } 

# 
#-----[ FIND ]------------------------------------------ 
# 

$template->assign_block_vars('topicrow', array( 
                        'ROW_COLOR' => $row_color, 
                        'ROW_CLASS' => $row_class, 
                        'FORUM_ID' => $forum_id, 

# 
#-----[ REPLACE WITH ]------------------------------------------ 
# 

$template->assign_block_vars('topicrow', array( 
                        'ICON' => $icon, 
                        'ROW_COLOR' => $row_color, 
                        'ROW_CLASS' => $row_class, 
                        'FORUM_ID' => $forum_id, 

# 
#-----[ OPEN ]------------------------------------------ 
# 

phpBB2/viewtopic.php 

# 
#-----[ FIND ]------------------------------------------ 
# 

else 
        { 
                $l_edited_by = ''; 
        } 

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

if ( $postrow[$i]['post_icon'] == 0 ) { 
          $icon = ""; 
        } 
        else { 
          $icon = "<img width=\"15\" height=\"15\" src=\"images/icon/icon" . $postrow[$i]['post_icon'] . ".gif\" alt=\"Messageicon\" border=\"0\">"; 
        } 

# 
#-----[ FIND ]------------------------------------------ 
# 

$template->assign_block_vars('postrow', array( 
                'ROW_COLOR' => '#' . $row_color, 
                'ROW_CLASS' => $row_class, 
                'POSTER_NAME' => $poster, 

# 
#-----[ REPLACE WITH ]------------------------------------------ 
# 

$template->assign_block_vars('postrow', array( 
                'ICON' => $icon, 
                'ROW_COLOR' => '#' . $row_color, 
                'ROW_CLASS' => $row_class, 
                'POSTER_NAME' => $poster, 

# 
#-----[ OPEN ]------------------------------------------ 
# 

phpBB2/lang_english/lang_main.php 

# 
#-----[ FIND ]------------------------------------------ 
# 

// 
// That's all Folks! 

# 
#-----[ BEFORE, ADD ]------------------------------------ 
# 

//MsgIcon Mod 
$lang['Msg_Icon_No_Icon'] = 'No Icon'; 

##### - Template alterations - #### 
# Directions are given for SubSilver, use as a guide for other templates # 

# 
#-----[ OPEN ]------------------------------------------ 
# 

phpBB2/templates/subSilver/posting_body.tpl 

# 
#-----[ FIND ]------------------------------------------ 
# 

<tr> 
          <td class="row1" width="22%"><span class="gen"><b>{L_SUBJECT}</b></span></td> 
          <td class="row2" width="78%"><span class="gen"> 
                <input type="text" name="subject" size="45" maxlength="60" style="width:450px" tabindex="2" class="post" value="{SUBJECT}" /> 
                </span> </td> 
        </tr> 

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

<!-- BEGIN switch_msgicon_checkbox --> 
<tr> 
         <td valign="top" class="row1"><span class="gen"><b>Messageicon</b></td> 
         <td class="row2"><span class="gen"> 
         <table width="450" border="0" cellspacing="0" cellpadding="2"> 
         <tr><td><INPUT type="radio" name="msg_icon" value="0" {MSG_ICON_CHECKED0}><span class="gen">{L_MSG_ICON_NO_ICON}</td><td><span class="gen"> 
<INPUT type="radio" name="msg_icon" value="1" {MSG_ICON_CHECKED1}>  <IMG SRC="images/icon/icon1.gif" HEIGHT=15 WIDTH=15 ALIGN=ABSCENTER> 
<INPUT type="radio" name="msg_icon" value="2" {MSG_ICON_CHECKED2}>  <IMG SRC="images/icon/icon2.gif" HEIGHT=15 WIDTH=15 ALIGN=ABSCENTER> 
<INPUT type="radio" name="msg_icon" value="3" {MSG_ICON_CHECKED3}>  <IMG SRC="images/icon/icon3.gif" HEIGHT=15 WIDTH=15 ALIGN=ABSCENTER> 
<INPUT type="radio" name="msg_icon" value="4" {MSG_ICON_CHECKED4}>  <IMG SRC="images/icon/icon4.gif" HEIGHT=15 WIDTH=15 ALIGN=ABSCENTER> 
<INPUT type="radio" name="msg_icon" value="5" {MSG_ICON_CHECKED5}>  <IMG SRC="images/icon/icon5.gif" HEIGHT=15 WIDTH=15 ALIGN=ABSCENTER> 
<INPUT type="radio" name="msg_icon" value="6" {MSG_ICON_CHECKED6}>  <IMG SRC="images/icon/icon6.gif" HEIGHT=15 WIDTH=15 ALIGN=ABSCENTER> 
<INPUT type="radio" name="msg_icon" value="7" {MSG_ICON_CHECKED7}>  <IMG SRC="images/icon/icon7.gif" HEIGHT=15 WIDTH=15 ALIGN=ABSCENTER></span></td></tr> 
<tr><td>&</td><td><span class="gen"><INPUT type="radio" name="msg_icon" value="8" {MSG_ICON_CHECKED8}>  <IMG SRC="images/icon/icon8.gif" HEIGHT=15 WIDTH=15 ALIGN=ABSCENTER> 
<INPUT type="radio" name="msg_icon" value="9" {MSG_ICON_CHECKED9}>  <IMG SRC="images/icon/icon9.gif" HEIGHT=15 WIDTH=15 ALIGN=ABSCENTER> 
<INPUT type="radio" name="msg_icon" value="10" {MSG_ICON_CHECKED10}>  <IMG SRC="images/icon/icon10.gif" HEIGHT=15 WIDTH=15 ALIGN=ABSCENTER> 
<INPUT type="radio" name="msg_icon" value="11" {MSG_ICON_CHECKED11}>  <IMG SRC="images/icon/icon11.gif" HEIGHT=15 WIDTH=15 ALIGN=ABSCENTER> 
<INPUT type="radio" name="msg_icon" value="12" {MSG_ICON_CHECKED12}>  <IMG SRC="images/icon/icon12.gif" HEIGHT=15 WIDTH=15 ALIGN=ABSCENTER> 
<INPUT type="radio" name="msg_icon" value="13" {MSG_ICON_CHECKED13}>  <IMG SRC="images/icon/icon13.gif" HEIGHT=15 WIDTH=15 ALIGN=ABSCENTER> 
<INPUT type="radio" name="msg_icon" value="14" {MSG_ICON_CHECKED14}>  <IMG SRC="images/icon/icon14.gif" HEIGHT=15 WIDTH=15 ALIGN=ABSCENTER></span></td></tr></table></span></td> 
        </tr> 
<!-- END switch_msgicon_checkbox --> 

# 
#-----[ OPEN ]------------------------------------------ 
# 

phpBB2/templates/subSilver/viewforum_body.tpl 

# 
#-----[ FIND ]------------------------------------------ 
# 

<th colspan="2" align="center" height="25" class="thCornerL" nowrap="nowrap">&{L_TOPICS}&</th> 

# 
#-----[ REPLACE WITH ]------------------------------------------ 
# 

<th colspan="3" align="center" height="25" class="thCornerL" nowrap="nowrap">&{L_TOPICS}&</th> 

# 
#-----[ FIND ]------------------------------------------ 
# 

<td class="row1" align="center" valign="middle" width="20"><img src="{topicrow.TOPIC_FOLDER_IMG}" width="19" height="18" alt="{topicrow.L_TOPIC_FOLDER_ALT}" title="{topicrow.L_TOPIC_FOLDER_ALT}" /></td> 

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

<td class="row1" align="center" valign="middle" width="16">{topicrow.ICON}</td> 

# 
#-----[ FIND ]------------------------------------------ 
# 

<td class="row1" colspan="6" height="30" align="center" valign="middle"><span class="gen">{L_NO_TOPICS}</span></td> 

# 
#-----[ REPLACE WITH ]------------------------------------------ 
# 

<td class="row1" colspan="7" height="30" align="center" valign="middle"><span class="gen">{L_NO_TOPICS}</span></td> 

# 
#-----[ FIND ]------------------------------------------ 
# 

<td class="catBottom" align="center" valign="middle" colspan="6" height="28"><span class="genmed">{L_DISPLAY_TOPICS}:&{S_SELECT_TOPIC_DAYS}& 

# 
#-----[ REPLACE WITH ]------------------------------------------ 
# 

<td class="catBottom" align="center" valign="middle" colspan="7" height="28"><span class="genmed">{L_DISPLAY_TOPICS}:&{S_SELECT_TOPIC_DAYS}& 

# 
#-----[ OPEN ]------------------------------------------ 
# 

phpBB2/templates/subSilver/viewtopic_body.tpl 

# 
#-----[ FIND ]------------------------------------------ 
# 

<td width="100%"><a href="{postrow.U_MINI_POST}"><img src="{postrow.MINI_POST_IMG}" width="12" height="9" alt="{postrow.L_MINI_POST_ALT}" title="{postrow.L_MINI_POST_ALT}" border="0" /></a><span class="postdetails">{L_POSTED}: {postrow.POST_DATE}<span class="gen">&</span>& &{L_POST_SUBJECT}: {postrow.POST_SUBJECT}</span></td> 

# 
#-----[ REPLACE WITH ]------------------------------------------ 
# 

<td width="100%"><a href="{postrow.U_MINI_POST}"><img src="{postrow.MINI_POST_IMG}" width="12" height="9" alt="{postrow.L_MINI_POST_ALT}" title="{postrow.L_MINI_POST_ALT}" border="0" /></a> {postrow.ICON} <span class="postdetails">{L_POSTED}: {postrow.POST_DATE}<span class="gen">&</span>& &{L_POST_SUBJECT}: {postrow.POST_SUBJECT}</span></td> 

# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM

Verfasst: 13.05.2006 19:24
von Simpson
Problem gelöst.

Hab für Index, Viewforum und Viewtopic .tpl / .php den Code vom oben geposteten "MSG Icons Mod" genommen und in allen anderen Dateien den Code vom "Post Icons Mod" http://phpbbhacks.com/download/1861 der eine abgewandelte Version des oberen darstellt.

Die beiden geben ne gute Kombination, aus beidem das beste rausgefischt und klappt für 2.0.20.

Verfasst: 14.05.2006 12:12
von ATARI
??!
Ja wie?

Wie kannst du beiden MODS zugleich verwenden??

Verfasst: 14.05.2006 13:29
von Simpson
Wie gesagt der neuere Mod "Post Icons Mod" basiert auf dem älteren "MSG Icons Mod".

Nun hat der neuere Post Icons Mod alleine aber die folgenden Nachteile :

- nirgends ist ein Code für die index.php zu finden
- der Code für die Anzeige der Icons wird nur in die Dateien (viewforum.php und vietopic.php) eingepflegt, eine Modifikation der Templatedateien findet nicht statt (hat den Nachteil man kann nicht schnell mal was umpositionieren, wenn einem die Stelle nicht gefällt wo die Icons sitzen)


Daher habe ich den neueren Post Icons Mod verbaut (bis auf die Stellen für viewtopic.php und viewforum.php), dort habe ich den Code vom alten "Post Icons Mod 1.0.1" (oben gepostet ist 1.0.2) verwendet (der brauch nicht modifiziert werden und er sorgt auch für eine Variable in viewtopic_body.tpl und viewforum_body.tpl) und für den gibt es zudem auch schon einen fertigen Mod für den Forenindex, der nennt sich "Message Icons make-over" welcher sowohl index.php wie auch die index_body.tpl modifziert.


Finde für den Mod Message Icons make-over jetzt leider keinen Link, setze ihn für die die es interessiert daher auch nochmal ein:

Code: Alles auswählen

#################################################################
## Mod Title: Message Icons make-over
## Mod Version: 1.0.0
## Author:    Bisquit - http://www.musicalworld.nl/forum.html
      Acid - http://www.phpbbhacks.com
## Description: once the message-icon 1.0.0 hack is installed, this will improve the looks by putting the last icon on the index page.##
## Installation Level: easy
## Installation Time: 5 Minutes
## Files To Edit: index.php
        templates/subSilver/index_body.tpl
##
## Included Files: none
#################################################################
## Security Disclaimer: This MOD Cannot Be Posted To Or Added At Any Non-Official phpBB Sites
#################################################################
##
## Author Note:
##
## Special thanks go to steveurkel <spam@stefand.de> - http://www.austauschforum.de who wrote the hack for phpBB 2.0.x since I used
## some of his ideas for this mod.
##
#################################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
#################################################################
##
##  Revision History:
##
##  v1.0.0
##  - First Release and Final.
##
#################################################################

#
#-----[ OPEN ]------------------------------------------
#

phpBB2/templates/subSilver/index_body.tpl

#
#-----[ FIND ]------------------------------------------
#

<th class="thCornerR" nowrap="nowrap">&nbsp;{L_LASTPOST}&nbsp;</th>

#
#-----[ before, ADD ]------------------------------------------
#

<th width="25"class="thCornerR" nowrap="nowrap">&nbsp;</th>

#
#-----[ FIND ]------------------------------------------
#

<td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall"><a href="{catrow.forumrow.U_LAST_TOPIC}">{catrow.forumrow.LAST_TOPIC}</a><br />{catrow.forumrow.LAST_POST}</span></td>

#
#-----[ replace with ]------------------------------------------
#

<td class="row2" align="center" valign="middle" height="50" nowrap width="25"><span class="gensmall">
<img src="{catrow.forumrow.LAST_ICON}"></span></td>
<td class="row2" align="left" valign="middle" height="50" nowrap>
<span class="gensmall"><a href="{catrow.forumrow.U_LAST_TOPIC}">
catrow.forumrow.LAST_TOPIC}</a><br />{catrow.forumrow.LAST_POST}</span></td>


#
#-----[ OPEN ]------------------------------------------
#

index.php

#
#-----[ FIND ]------------------------------------------
#

default:
$sql = "SELECT f.*, p.post_time, p.post_username, u.username, u.user_id, t.topic_title, t.topic_id
++FIND in this line++
Quote:
t.topic_id

#
#-----[ add after ]------------------------------------------
#

, t.topic_icon


#
#-----[ FIND ]------------------------------------------
#

$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];

#
#-----[ add after ]------------------------------------------
#

if ( $forum_data[$j]['topic_icon'] == 0 ) {
$icon = "images/icon/icon1.gif";
}
else {
$icon = "images/icon/icon" . $forum_data[$j]['topic_icon'].".gif";
}

#
#-----[ FIND ]------------------------------------------
#

'MODERATORS' => $moderator_list,

#
#-----[ add after ]------------------------------------------
#

'LAST_ICON' => $icon,

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#