Fehler nach Einbau Mark topics
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.1, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.1, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
-
Markir
das sieht bei mir so aus:
else if ($mode == 'editpost')
{
remove_search_post($post_id);
}
if ($mode == 'newtopic' || ($mode == 'editpost' && $post_data['first_post']))
{
$topic_vote = (!empty($poll_title) && count($poll_options) >= 2) ? 1 : 0;
$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";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
}
if ($mode == 'newtopic')
{
$topic_id = $db->sql_nextid();
}
}
$edited_sql = ($mode == 'editpost' && !$post_data['last_post'] && $post_data['poster_post']) ? ", post_edit_time = $current_time, post_edit_count = post_edit_count + 1 " : "";
$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";
if (!$db->sql_query($sql, BEGIN_TRANSACTION))
{
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
}
else if ($mode == 'editpost')
{
remove_search_post($post_id);
}
if ($mode == 'newtopic' || ($mode == 'editpost' && $post_data['first_post']))
{
$topic_vote = (!empty($poll_title) && count($poll_options) >= 2) ? 1 : 0;
$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";
if (!$db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
}
if ($mode == 'newtopic')
{
$topic_id = $db->sql_nextid();
}
}
$edited_sql = ($mode == 'editpost' && !$post_data['last_post'] && $post_data['poster_post']) ? ", post_edit_time = $current_time, post_edit_count = post_edit_count + 1 " : "";
$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";
if (!$db->sql_query($sql, BEGIN_TRANSACTION))
{
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
}
-
Markir
nabend
ja und nein
also ich hatte den Fehler hab aber dann die Version von MSicon 1.0.2 eingebaut bzw aktuallisiert von 1,00 auf 1,02
mmh seit dem ist der Fehler weg bei mir.
functions_post.php Zeilen sind 248 bis 273
könnten bei dir varieren da ich noch mehr eingebuat habe.
na guck dir die Zeilen mal an vielleicht fehlt da was bei dir
ja und nein
also ich hatte den Fehler hab aber dann die Version von MSicon 1.0.2 eingebaut bzw aktuallisiert von 1,00 auf 1,02
mmh seit dem ist der Fehler weg bei mir.
functions_post.php Zeilen sind 248 bis 273
könnten bei dir varieren da ich noch mehr eingebuat habe.
na guck dir die Zeilen mal an vielleicht fehlt da was bei dir
-
Markir
dachte ich mir 
also den Link finde ich leider net mehr von wo ich den habe
da Du ja die Version 1.00 hast brauchste eignetlich nur die Anleitung dazu, naja die Icons sind ja die selben geblieben.
#################################################################
## Mod Title: Message Icons
## Mod Version: 1.0.2
##
##
## 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 ($msg_icon)
$msg_icon_checked = $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 = " ";
}
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 ]------------------------------------------
#
also den Link finde ich leider net mehr von wo ich den habe
da Du ja die Version 1.00 hast brauchste eignetlich nur die Anleitung dazu, naja die Icons sind ja die selben geblieben.
#################################################################
## Mod Title: Message Icons
## Mod Version: 1.0.2
##
##
## 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 ($msg_icon)
$msg_icon_checked = $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 = " ";
}
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 ]------------------------------------------
#
-
Markir
-
Markir
Dank dir,
Sieht jetzt auch etwas besser aus, nachdem ich das Update auf 1.0.2 ausgeführt habe. Sind jetzt nur noch zwei kleine Fehler, wo ich nach schauen muss.
1.) Wenn ich einen Beitrag schreibe, dann erscheint in der Icon Tabelle ein "&"
2.) Wenn ich mir einen geposteten Beitrag anschaue, dann steht dort "" alt="Messageicon" border="0">", anstelle des verwendeten Icons.
Die Fehler sind zu sehen unter: [url=http:www.markir.de/phpBB2/index.php]Link[/url]
Dann im Forum "Dreigestirn" dort sind ein paar Tests zu sehen.
Danke für Deine Hilfe
Sieht jetzt auch etwas besser aus, nachdem ich das Update auf 1.0.2 ausgeführt habe. Sind jetzt nur noch zwei kleine Fehler, wo ich nach schauen muss.
1.) Wenn ich einen Beitrag schreibe, dann erscheint in der Icon Tabelle ein "&"
2.) Wenn ich mir einen geposteten Beitrag anschaue, dann steht dort "" alt="Messageicon" border="0">", anstelle des verwendeten Icons.
Die Fehler sind zu sehen unter: [url=http:www.markir.de/phpBB2/index.php]Link[/url]
Dann im Forum "Dreigestirn" dort sind ein paar Tests zu sehen.
Danke für Deine Hilfe