[BETA] Message Icon Mod aka Posticon Mod v1.0.2

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Post Reply
steveurkel
Registered User
Posts: 33
Joined: Thu Apr 11, 2002 6:59 am
Location: Munich
Contact:

[BETA] Message Icon Mod aka Posticon Mod v1.0.2

Post by steveurkel » Mon Apr 15, 2002 8:41 am

Alright here is a MsgIconMod to add icons in viewforum and viewtopic.php.

If you need some icons I have provided you some -> Get them

Code: Select all

#################################################################
## 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 " . (($post_data['edit_vote'] || !empty($poll_title)) ? ", 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" . (($post_data['edit_vote'] || !empty($poll_title)) ? ", 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
I'd like to get some feedback from you! :wink:

This might be a silly question, but where do I submit Mods to the Moddatabase. I haven't found one yet - or maybe I should use my glasses?
Last edited by steveurkel on Sat Aug 09, 2003 9:57 am, edited 13 times in total.

Bear_nG
Registered User
Posts: 125
Joined: Fri Apr 05, 2002 9:22 am
Location: Brisbane, Australia
Contact:

Post by Bear_nG » Mon Apr 15, 2002 8:51 am

got a example somewhere???

steveurkel
Registered User
Posts: 33
Joined: Thu Apr 11, 2002 6:59 am
Location: Munich
Contact:

Post by steveurkel » Mon Apr 15, 2002 8:56 am

Actually that was stated in the hack next to author,

but here's the example. :)

Matthijs
Former Team Member
Posts: 1031
Joined: Sat Dec 08, 2001 4:27 pm
Location: The Netherlands
Contact:

Post by Matthijs » Mon Apr 15, 2002 12:03 pm

The MODs database can be found here:
http://www.phpbb.com/mods/downloads/
phpBB Converter Team Member
Developer of the vBulletin 2.x.x -> phpBB 2.0.x Converter
See Matthijs.net for more info

User avatar
Brewjah
Registered User
Posts: 265
Joined: Sun Mar 10, 2002 5:37 pm
Location: I think im lost..
Contact:

Post by Brewjah » Mon Apr 15, 2002 1:04 pm

the chances of this MOD actually making it in the dbase here is slim..

there are a few things that should be changed..

$MsgIcon should become $msg_icon to follow with phpBB Coding standards other than that looks good :)
Filling in that ugly white noise with a bunch of black static..

User avatar
jd-
Registered User
Posts: 22
Joined: Sun Apr 14, 2002 4:16 am
Contact:

Post by jd- » Mon Apr 15, 2002 2:07 pm

hrrmm i did this mod...jus note that in ur code it says /images/icon/ as the directory and at the end u say put in images/icons/

so...ppl

make sure u make the folder icon instead of icons ;)

steveurkel
Registered User
Posts: 33
Joined: Thu Apr 11, 2002 6:59 am
Location: Munich
Contact:

Thanks alot

Post by steveurkel » Mon Apr 15, 2002 7:37 pm

jd- wrote: jus note that in ur code it says /images/icon/ as the directory and at the end u say put in images/icons/

Thanks, as you can see I changed this. These small things always keep you working :wink:
Matthijs wrote: The MODs database can be found here:
http://www.phpbb.com/mods/downloads/

Thanks, but I was looking for a submit link.
Brewjah wrote: $MsgIcon should become $msg_icon to follow with phpBB Coding standards

I'm gonna revise this. Could you give me a hint where I can find the guidelines. I searched the whole forum but couldn't find anything. I've them somewhere but forgot where. This could be due to server difficulties.
Last edited by steveurkel on Tue Apr 16, 2002 8:10 am, edited 2 times in total.

Iron-Monkey
Registered User
Posts: 284
Joined: Sat Nov 17, 2001 12:18 am
Location: California, USA

Post by Iron-Monkey » Mon Apr 15, 2002 11:15 pm

Great mod. I had success in installing this mod on my first try.

Saleel
Registered User
Posts: 17
Joined: Sat Apr 13, 2002 9:04 pm

Post by Saleel » Tue Apr 16, 2002 12:30 am

Very nice mod - worked first time. Took a while to install, though! :)

Seewak
Registered User
Posts: 1
Joined: Thu Apr 11, 2002 11:41 am

Post by Seewak » Tue Apr 16, 2002 8:03 am

steveurkel --> Are you French?
Hello, I'm french ^^

steveurkel
Registered User
Posts: 33
Joined: Thu Apr 11, 2002 6:59 am
Location: Munich
Contact:

No

Post by steveurkel » Tue Apr 16, 2002 8:06 am

No, I'm not. I'm German. Did you ask because I posted at a French forum.

But this is going off topic, next time please send me a PM. 8)

User avatar
Klaus2000
Registered User
Posts: 67
Joined: Sat Apr 06, 2002 2:19 pm
Location: somewhere in nowhere in good old Germany ;-)
Contact:

Post by Klaus2000 » Thu Apr 18, 2002 10:27 pm

I have 2 problems with the mod:

1) found twice:

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

in functions_post.php


2) the first icon 2nd line left could not be clicked!

Any ideas!???
Klaus

LS1 TA
Registered User
Posts: 155
Joined: Wed Jan 16, 2002 9:38 pm

Post by LS1 TA » Fri Apr 19, 2002 4:19 am

Hi,
I installed this mod exactly as instructed.. Uploaded the files and posted a new message... it worked great! But when I tried to reply to a message I got this error:
Error in posting

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax near ')' at line 1

INSERT INTO phpbb_posts (topic_id, forum_id, poster_id, post_username, post_time, poster_ip, enable_bbcode, enable_html, enable_smilies, enable_sig, post_icon) VALUES (7003, 1, 1, '', 1019182685, 'aca2c455', 1, 0, 1, 0, )

Line : 285
File : /home/www.modernmusclecars.net/phpBB2/include ... s_post.php



This is that section from my functions_post.php

Code: Select all

$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, $MsgIcon)" : "UPDATE " . POSTS_TABLE . " SET enable_bbcode = $bbcode_on, enable_html = $html_on, enable_smilies = $smilies_on, enable_sig = $attach_sig" . $edited_sql . ", post_icon = $MsgIcon WHERE post_id = $post_id";
Any idea whats causing this?
Thanks,
Dewayne

steveurkel
Registered User
Posts: 33
Joined: Thu Apr 11, 2002 6:59 am
Location: Munich
Contact:

Post by steveurkel » Fri Apr 19, 2002 7:07 am

Klaus2000 wrote: 1) found twice:
include($phpbb_root_path . 'includes/functions_search.'.$phpEx);
in functions_post.php

I'm sorry for this, this line of code

Code: Select all

$icon = "icon" . $MsgIcon . ".gif";
is not needed anymore. That was code from an earlier version of the mod.

So delete

Code: Select all

$icon = "icon" . $MsgIcon . ".gif";
Klaus2000 wrote: 2) the first icon 2nd line left could not be clicked!


Actually I had this too on my board, I also found the error.
Here is the fix

in templates/SubSilver/posting_body.tpl
Find

Code: Select all

<tr><td><span class="gen"><INPUT type="radio" name="{MsgIcon}" value="8" {MSG_ICON_CHECKED8}>  <IMG SRC="images/icon/icon8.gif" HEIGHT=15 WIDTH=15 ALIGN=ABSCENTER>
and replace it with

Code: Select all

<tr><td><span class="gen"><INPUT type="radio" name="MsgIcon" value="8" {MSG_ICON_CHECKED8}>  <IMG SRC="images/icon/icon8.gif" HEIGHT=15 WIDTH=15 ALIGN=ABSCENTER>
That should help, I just forgot to remove two "{" in the name. :oops:

I also updated the mod.

@LS1 TA
LS1 TA wrote: SQL Error : 1064 You have an error in your SQL syntax near ')' at line 1

INSERT INTO phpbb_posts (topic_id, forum_id, poster_id, post_username, post_time, poster_ip, enable_bbcode, enable_html, enable_smilies, enable_sig, post_icon) VALUES (7003, 1, 1, '', 1019182685, 'aca2c455', 1, 0, 1, 0, )
That piece of code points to an missing argument because there's nothing after the last comma. And it seems that the variable "$MsgIcon" is empty. So I'm thinking that you missed some code somewhere in posting_body.tpl or you didn't click an icon, but an icon should always been clicked. I'm still trying to figure out what your problem could be - I'm working on it.

[edit]Could it be that your are using another template than SubSilver[/edit][/code]
Last edited by steveurkel on Fri Apr 19, 2002 5:28 pm, edited 1 time in total.

User avatar
Klaus2000
Registered User
Posts: 67
Joined: Sat Apr 06, 2002 2:19 pm
Location: somewhere in nowhere in good old Germany ;-)
Contact:

Post by Klaus2000 » Fri Apr 19, 2002 8:00 am

It works - Thanks Stefan - also for the mail
Klaus :wink:

Post Reply

Return to “[2.0.x] MODs in Development”