[addon]IAI

This shoutbox, fully integrates in phpbb2, support smilies and bbcode
this shoutbox is a shoutbox written for phpbb2, therefor it makes uses of templates and language files

Moderator: Moderators

Forum rules
The content in this forum is dated Dec. 21 2005 and can be used as Archive only. This Forum is LOCKED and READ ONLY !

[addon]IAI

Postby wyrihaximus on Thu 08. May, 2003 13:44

Hi .. some one on phpbb.com had the idee to intergrate the IAI mod with your shout box. So I made it.
Code: Select all
#################################################################
## Mod Title: shout witn AI
## Mod Version: 0.2.1
## Author: WyriHaximus < webmaster@wyrihaximus.net > (Cees-Jan Kiewiet) http://www.wyrihaximus.net/
## Description: This mod will add AI to Niels Chr. Denmark Shoutbox.
##
## Installation Level: easy
## Installation Time: about 10 Minutes
##
## Files To Edit:  /shoutbox.php
##                  /shoutbox_view.php
##                  /shoutbox_max.php
##                  /language/lang_english/lang_main.php
##                  /templates/subSilver/shoutbox_body.tpl
##                  /templates/subSilver/shoutbox_view_body.tpl
##                  /templates/subSilver/shoutbox_max_body.tpl
##                  /templates/subSilver/shoutbox_max_guest_body.tpl
##
#################################################################
## Security Disclaimer: This MOD Cannot Be Posted To Or Added At Any Non-Official phpBB Sites
#################################################################
##
## Author Note:
##
## You need Niels Chr. Denmark Shoutbox mod, you can download it @ http://mods.db9.dk
## And you need the IAI mod, you can download it @ palgn.com/iai
##
## PLEASE place questions @ my forum: http://www.wyrihaximus.net//
##
## When your modding you'll find "mods/iai/" make sure your replace it with the path to your iai mod directory
##
#################################################################
##
## Chancelog:
##
## 0.1.0 Initial release
## 0.2.0 shoutbox_max support added
##
#################################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
#################################################################
#
#-----[ ADD SQL ]------------------------------------------
# remember to replace phpbb_ with your table prefix
ALTER TABLE phpbb_shout ADD iai_shout TEXT NOT NULL AFTER shout_text
#
#-----[ OPEN ]------------------------------------------
#
/shoutbox.php
#
#-----[ FIND ]------------------------------------------
#
      $bbcode_uid = ( $bbcode_on ) ? make_bbcode_uid() : '';
      $message = prepare_message(trim($message), $html_on, $bbcode_on, $smilies_on, $bbcode_uid);
      $sql = "INSERT INTO " . SHOUTBOX_TABLE. " (shout_text, shout_session_time, shout_user_id, shout_ip, shout_username, shout_bbcode_uid,enable_bbcode,enable_html,enable_smilies,iai_shout)
            VALUES ('$message', '".time()."', '".$userdata['user_id']."', '$user_ip', '".$userdata['username']."', '".$bbcode_uid."',$bbcode_on,$html_on,$smilies_on,'".$iai_message."')";
      if (!$result = $db->sql_query($sql))
      {
         message_die(GENERAL_ERROR, 'Error inserting shout.', '', __LINE__, __FILE__, $sql);
      }
#
#-----[ REPLACE WITH ]------------------------------------------
# (replace mods/iai/ with your path to the iai mod)
      $bbcode_uid = ( $bbcode_on ) ? make_bbcode_uid() : '';
      if($HTTP_POST_VARS['iai'])
      {
         $iai_root_path = "mods/iai/";
         include($iai_root_path.'includes/iai_functions.'.$phpEx);
         //Init IAI vars
         $iai_mode = 'reply';
         $iai_post_id = '';
         $iai_id = $board_config['iai_userid'];
         $iai_subject = '';
         $iai_username = $board_config['iai_username'];
         $iai_topic_type = POST_NORMAL;

         //Get IAI reply (first tell who you are)
         $numselects = 0;
         $iai_reply_to_name = $userdata['username'];
         $iai_reply_to = 'My name is ' . $userdata['username'] . '. ';
         // Note: I'm using the user_id as the unique id if the user is logged in, here
         $myuniqueid = ($userdata['session_logged_in']) ? $user_id : session_id();
         $iai_reply = @reply($iai_reply_to,$myuniqueid);
         $iai_message = $iai_reply->response;
         $iai_reply_to = str_replace("is " .  $iai_username, "are you", $message);
         $iai_reply_to = str_replace( $iai_username, "you", $message);
         $iai_reply = @reply($iai_reply_to,$myuniqueid);
         $iai_message = $iai_reply->response;

         // prepare IAI message(IAI may have used html, smilies etc...)
         //$bbcode_uid = ( $bbcode_on ) ? make_bbcode_uid() : '';
         $iai_message = str_replace("'", "''", $iai_message);
         // This is to fix up some of the bad formatting which comes out of the AI
         $iai_message = str_replace(".", ". ", $iai_message);
         $iai_message = str_replace("!", "! ", $iai_message);
         $iai_message = str_replace("?", "? ", $iai_message);
         
         $iai_message = prepare_message(trim($iai_message), $html_on, $bbcode_on, $smilies_on, $bbcode_uid);
      }
      else
      {
         $iai_message = "";
      }
      $message = prepare_message(trim($message), $html_on, $bbcode_on, $smilies_on, $bbcode_uid);
      $sql = "INSERT INTO " . SHOUTBOX_TABLE. " (shout_text, shout_session_time, shout_user_id, shout_ip, shout_username, shout_bbcode_uid,enable_bbcode,enable_html,enable_smilies,iai_shout)
            VALUES ('$message', '".time()."', '".$userdata['user_id']."', '$user_ip', '".$userdata['username']."', '".$bbcode_uid."',$bbcode_on,$html_on,$smilies_on,'".$iai_message."')";
      if (!$result = $db->sql_query($sql))
      {
         message_die(GENERAL_ERROR, 'Error inserting shout.', '', __LINE__, __FILE__, $sql);
      }
#
#-----[ FIND ]------------------------------------------
#
'S_HIDDEN_FIELDS' => $s_hidden_fields
#
#-----[ REPLACE WITH ]------------------------------------------
#
'S_HIDDEN_FIELDS' => $s_hidden_fields,
'L_INGORE_IAI' => sprintf($lang['Ignore_iai'],$board_config['iai_username'])
#
#-----[ OPEN ]------------------------------------------
#
/shoutbox_view.php
#
#-----[ FIND ]------------------------------------------
#
      $template->assign_block_vars('shoutrow', array(
         'ROW_COLOR' => '#' . $row_color,
         'ROW_CLASS' => $row_class,
         'SHOUT' => preg_replace($orig_word, $replacement_word, $shout),
         'TIME' => create_date($lang['Shoutbox_date'], $shout_row['shout_session_time'], $board_config['board_timezone']),
         'USERNAME' => $username,
      ));
#
#-----[ AFTER, ADD ]------------------------------------------
#
      if($shout_row['iai_shout']!="")
      {
         $shout = $shout_row['iai_shout'];
         if ( $board_config['allow_smilies'] && $shout_row['user_allowsmile'] && $shout != '' & $shout_row['enable_smilies'])
         {
            $shout = smilies_pass($shout);
         }
         $template->assign_block_vars('shoutrow.iai', array(
            'ROW_COLOR' => '#' . $row_color,
            'ROW_CLASS' => $row_class,
            'SHOUT' => preg_replace($orig_word, $replacement_word, $shout),
            'USERNAME' => $board_config['iai_username'],
         ));         
      }
#
#-----[ OPEN ]------------------------------------------
#
/shoutbox_max.php
#
#-----[ FIND ]------------------------------------------
#
      include_once($phpbb_root_path . 'includes/functions_post.'.$phpEx);
      $bbcode_uid = ( $bbcode_on ) ? make_bbcode_uid() : '';
      $message = prepare_message(trim($message), $html_on, $bbcode_on, $smilies_on, $bbcode_uid);
      $sql = "INSERT INTO " . SHOUTBOX_TABLE. " (shout_text, shout_session_time, shout_user_id, shout_ip, shout_username, shout_bbcode_uid,enable_bbcode,enable_html,enable_smilies)
            VALUES ('$message', '".time()."', '".$userdata['user_id']."', '$user_ip', '".$userdata['username']."', '".$bbcode_uid."',$bbcode_on,$html_on,$smilies_on)";
#
#-----[ REPLACE WITH ]------------------------------------------
#
      include_once($phpbb_root_path . 'includes/functions_post.'.$phpEx);
      $bbcode_uid = ( $bbcode_on ) ? make_bbcode_uid() : '';
      if($HTTP_POST_VARS['iai'])
      {
         $iai_root_path = "mods/iai/";
         include($iai_root_path.'includes/iai_functions.'.$phpEx);
         //Init IAI vars
         $iai_mode = 'reply';
         $iai_post_id = '';
         $iai_id = $board_config['iai_userid'];
         $iai_subject = '';
         $iai_username = $board_config['iai_username'];
         $iai_topic_type = POST_NORMAL;

         //Get IAI reply (first tell who you are)
         $numselects = 0;
         $iai_reply_to_name = $userdata['username'];
         $iai_reply_to = 'My name is ' . $userdata['username'] . '. ';
         // Note: I'm using the user_id as the unique id if the user is logged in, here
         $myuniqueid = ($userdata['session_logged_in']) ? $user_id : session_id();
         $iai_reply = @reply($iai_reply_to,$myuniqueid);
         $iai_message = $iai_reply->response;
         $iai_reply_to = str_replace("is " .  $iai_username, "are you", $message);
         $iai_reply_to = str_replace( $iai_username, "you", $message);
         $iai_reply = @reply($iai_reply_to,$myuniqueid);
         $iai_message = $iai_reply->response;

         // prepare IAI message(IAI may have used html, smilies etc...)
         //$bbcode_uid = ( $bbcode_on ) ? make_bbcode_uid() : '';
         $iai_message = str_replace("'", "''", $iai_message);
         // This is to fix up some of the bad formatting which comes out of the AI
         $iai_message = str_replace(".", ". ", $iai_message);
         $iai_message = str_replace("!", "! ", $iai_message);
         $iai_message = str_replace("?", "? ", $iai_message);
         
         $iai_message = prepare_message(trim($iai_message), $html_on, $bbcode_on, $smilies_on, $bbcode_uid);
      }
      else
      {
         $iai_message = "";
      }
      $message = prepare_message(trim($message), $html_on, $bbcode_on, $smilies_on, $bbcode_uid);
      $sql = "INSERT INTO " . SHOUTBOX_TABLE. " (shout_text, shout_session_time, shout_user_id, shout_ip, shout_username, shout_bbcode_uid,enable_bbcode,enable_html,enable_smilies,iai_shout)
            VALUES ('$message', '".time()."', '".$userdata['user_id']."', '$user_ip', '".$userdata['username']."', '".$bbcode_uid."',$bbcode_on,$html_on,$smilies_on,'".$iai_message."')";
#
#-----[ FIND ]------------------------------------------
#
      if ($highlight_match)
      {
         $shout = str_replace('\"', '"', substr(preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "preg_replace('#\b(" . $highlight_match . ")\b#i', '<span style=\"color:#" . $theme['fontcolor3'] . "\"><b>\\\\1</b></span>', '\\0')", '>' . $shout . '<'), 1, -1));
      }
#
#-----[ REPLACE WITH ]------------------------------------------
#
      if ($highlight_match)
      {
         $shout = str_replace('\"', '"', substr(preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "preg_replace('#\b(" . $highlight_match . ")\b#i', '<span style=\"color:#" . $theme['fontcolor3'] . "\"><b>\\\\1</b></span>', '\\0')", '>' . $shout . '<'), 1, -1));
         $iai_shout = str_replace('\"', '"', substr(preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "preg_replace('#\b(" . $highlight_match . ")\b#i', '<span style=\"color:#" . $theme['fontcolor3'] . "\"><b>\\\\1</b></span>', '\\0')", '>' . $iai_shout . '<'), 1, -1));
      }
#
#-----[ FIND ]------------------------------------------
#
      $shout = preg_replace($orig_word, $replacement_word, $shout);
#
#-----[ AFTER ADD ]------------------------------------------
#
      $iai_shout = preg_replace($orig_word, $replacement_word, $iai_shout);
#
#-----[ FIND ]------------------------------------------
#
         if ( $smilies_on && $shout != '' && $shout_row['enable_smilies'])
         {
            $shout = smilies_pass($shout);
         }
         $shout = bbencode_second_pass($shout,$shout_row['shout_bbcode_uid']);
#
#-----[ REPLACE WITH ]------------------------------------------
#
         if ( $smilies_on && $shout != '' && $shout_row['enable_smilies'])
         {
            $shout = smilies_pass($shout);
            $iai_shout = smilies_pass($iai_shout);
         }
         $shout = bbencode_second_pass($shout,$shout_row['shout_bbcode_uid']);
         $iai_shout = bbencode_second_pass($iai_shout,$shout_row['shout_bbcode_uid']);
#
#-----[ FIND ]------------------------------------------
#
      $template->assign_block_vars('shoutrow', array(
         'ROW_COLOR' => '#' . $row_color,
         'ROW_CLASS' => $row_class,
         'SHOUT' => $shout,
         'TIME' => create_date($board_config['default_dateformat'], $shout_row['shout_session_time'], $board_config['board_timezone']),
         'USERNAME' => $username,
         'U_VIEW_USER_PROFILE' => $user_profile,
         'USER_RANK' => $user_rank,
         'RANK_IMAGE' => $rank_image,
         'DELETE_IMG' => $delshout_img,
         'DELETE' => $delshout,
         'CENSOR_IMG' => $censorshout_img,
         'CENSOR' => $censorshout,
         'USER_JOINED' => $user_joined,
         'USER_POSTS' => $user_posts,
         'USER_FROM' => $user_from,
         'USER_AVATAR' => $user_avatar,
         'U_SHOUT_ID' => $shout_row['shout_id']
         ));
#
#-----[ AFTER ADD ]------------------------------------------
#
$iai_sql = $db->sql_query("SELECT * FROM " . USERS_TABLE . " WHERE username = '".$board_config['iai_username']."' LIMIT 0,1");
$iai_row = $db->sql_fetchrow($iai_sql);

         $user_id = $iai_row['user_id'];
         $username = ( $user_id == ANONYMOUS ) ? (( $iai_row['username'] == '' ) ? $lang['Guest'] : $iai_row['username'] ) : $iai_row['username'] ;
         $user_profile = append_sid("profile.$phpEx?mode=viewprofile&amp;" . POST_USERS_URL . "=$user_id");
   $user_posts = ( $iai_row['user_id'] != ANONYMOUS ) ? $lang['Posts'] . ': ' . $iai_row['user_posts'] : '';
   $user_from = ( $iai_row['user_from'] && $iai_row['user_id'] != ANONYMOUS ) ? $lang['Location'] . ': ' . $iai_row['user_from'] : '';
   $user_joined = ( $iai_row['user_id'] != ANONYMOUS ) ? $lang['Joined'] . ': ' . create_date($lang['DATE_FORMAT'], $iai_row['user_regdate'], $board_config['board_timezone']) : '';
   if ( $iai_row['user_avatar_type'] && $user_id != ANONYMOUS && $iai_row['user_allowavatar'] )
   {
      switch( $iai_row['user_avatar_type'] )
      {
         case USER_AVATAR_UPLOAD:
            $user_avatar = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $board_config['avatar_path'] . '/' . $iai_row['user_avatar'] . '" alt="" border="0" />' : '';
            break;
         case USER_AVATAR_REMOTE:
            $user_avatar = ( $board_config['allow_avatar_remote'] ) ? '<img src="' . $iai_row['user_avatar'] . '" alt="" border="0" />' : '';
            break;
         case USER_AVATAR_GALLERY:
            $user_avatar = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $iai_row['user_avatar'] . '" alt="" border="0" />' : '';
            break;
      }
$user_avatar = ($iai_row['user_avatar_url']) ? '<a href="'.$iai_row['user_avatar_url'].'">'.$user_avatar.'</a>' : $user_avatar;
   } else $user_avatar='';

         $iai_shout = (! $shout_row['shout_active']) ? $shout_row['iai_shout'] : $lang['Shout_censor'].(($is_auth['auth_mod']) ? '<br/><hr/><br/>'.$shout_row['iai_shout'] : '');
   $user_sig = ( $iai_row['enable_sig'] && $iai_row['user_sig'] != '' && $board_config['allow_sig'] ) ? $iai_row['user_sig'] : '';
   $user_sig_bbcode_uid = $iai_row['user_sig_bbcode_uid'];


         $user_rank = '';
if ( $iai_row['user_rank'] )
   {
      for($j = 0; $j < count($ranksrow); $j++)
      {
         if ( $iai_row['user_rank'] == $ranksrow[$j]['rank_id'] && $ranksrow[$j]['rank_special'] )
         {
            $user_rank = $ranksrow[$j]['rank_title'];
            $rank_image = ( $ranksrow[$j]['rank_image'] ) ? '<img src="' . $ranksrow[$j]['rank_image'] . '" alt="' . $user_rank . '" title="' . $user_rank . '" border="0" /><br />' : '';
         }
      }
   }
   else
   {
      for($j = 0; $j < count($ranksrow); $j++)
      {
         if ( $iai_row['user_posts'] >= $ranksrow[$j]['rank_min'] && !$ranksrow[$j]['rank_special'] )
         {
            $user_rank = $ranksrow[$j]['rank_title'];
            $rank_image = ( $ranksrow[$j]['rank_image'] ) ? '<img src="' . $ranksrow[$j]['rank_image'] . '" alt="' . $user_rank . '" title="' . $user_rank . '" border="0" /><br />' : '';
         }
      }
   }


   if ( $user_sig != '' )
   {
      $user_sig = make_clickable($user_sig);
   }

      $template->assign_block_vars('shoutrow.iai', array(
         'ROW_COLOR' => '#' . $row_color,
         'ROW_CLASS' => $row_class,
         'SHOUT' => $iai_shout,
         'TIME' => create_date($board_config['default_dateformat'], $shout_row['shout_session_time'], $board_config['board_timezone']),
         'USERNAME' => $board_config['iai_username'],
         'U_VIEW_USER_PROFILE' => $user_profile,
         'USER_RANK' => $user_rank,
         'RANK_IMAGE' => $rank_image,
         'DELETE_IMG' => $delshout_img,
         'DELETE' => $delshout,
         'CENSOR_IMG' => $censorshout_img,
         'CENSOR' => $censorshout,
         'USER_JOINED' => $user_joined,
         'USER_POSTS' => $user_posts,
         'USER_FROM' => $user_from,
         'USER_AVATAR' => $user_avatar,
         'U_SHOUT_ID' => $shout_row['shout_id']
         ));
#
#-----[ OPEN ]------------------------------------------
#
/language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
$lang['Viewing_Shoutbox']= 'Viewing shoutbox';
$lang['Censor'] ='Censor';
#
#-----[ AFTER ADD ]-------------------------------------
#
$lang['Ignore_iai'] = "Ignore %s's replies";
#
#-----[ OPEN ]------------------------------------------
#
/templates/subSilver/shoutbox_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<input type="submit" class="mainoption" value="{L_SHOUT_SUBMIT}" name="shout" />
#
#-----[ AFTER ADD ]-------------------------------------
#
{L_INGORE_IAI}<input type=radio name="iai" value="0" CHECKED>Yes&nbsp;<input type=radio name="iai" value="1">No
#
#-----[ OPEN ]------------------------------------------
#
/templates/subSilver/shoutbox_view_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<!-- END shoutrow -->
#
#-----[ BEFORE ADD ]-------------------------------------
#
<!-- BEGIN iai -->
<tr>
   <td class="{shoutrow.iai.ROW_CLASS}" width="100%" higth="100%">
<span class="gensmall">
   <b>{shoutrow.iai.USERNAME}:</b><br />
   {shoutrow.iai.SHOUT}<br/></span>
   </td>
</tr>
<!-- END iai -->
#
#-----[ OPEN ]------------------------------------------
#
/templates/subSilver/shoutbox_max_body.tpl
#
#-----[ FIND ]------------------------------------------
#
   <tr>
     <td class="catBottom" colspan="2" align="center" height="28"> {S_HIDDEN_FORM_FIELDS}
<input type="submit" tabindex="5" name="refresh" class="mainoption" value="{L_SHOUT_REFRESH}" />&nbsp;
<input type="submit" tabindex="5" name="preview" class="mainoption" value="{L_SHOUT_PREVIEW}" />&nbsp;
<input type="submit" accesskey="s" tabindex="6" name="shout" class="mainoption" value="{L_SHOUT_SUBMIT}" /></td>
   </tr>
#
#-----[ BEFORE ADD ]-------------------------------------
#
   <tr>
     <td class="row1" height="28">
        {L_INGORE_IAI}
     </td>
     <td class="row2" height="28">
        <input type=radio name="iai" value="0" CHECKED>Yes&nbsp;<input type=radio name="iai" value="1">No
     </td>
   </tr>
#
#-----[ FIND ]------------------------------------------
#
   <tr>
      <td class="spaceRow" colspan="2" height="1"><img src="templates/subSilver/images/spacer.gif" alt="" width="1" height="1" /></td>
   </tr>
   <!-- END shoutrow -->
#
#-----[ BEFORE ADD ]-------------------------------------
#
   <!-- BEGIN iai -->
   <tr>
      <td width="160" align="left" valign="top" class="{shoutrow.iai.ROW_CLASS}">
         <span class="name"><a name="{shoutrow.iai.U_SHOUT_ID}"></a><a href="{shoutrow.iai.U_VIEW_USER_PROFILE}" class="name"><b>{shoutrow.iai.USERNAME}</b></a></span><br />
         <span class="postdetails">{shoutrow.iai.USER_RANK}<br />
         {shoutrow.iai.RANK_IMAGE}<br/>
         {shoutrow.iai.USER_AVATAR}<br /><br/>{shoutrow.iai.USER_JOINED}</span></td>
      <td class="{shoutrow.iai.ROW_CLASS}" width="100%" height="28" valign="top">
         <table width="100%" border="0" cellspacing="0" cellpadding="0">
         <tr>
            <td width="100%"><a href="{shoutrow.iai.U_MINI_POST}"><img src="{shoutrow.iai.MINI_POST_IMG}" width="12" height="9" alt="{shoutrow.iai.L_MINI_POST_ALT}" title="{shoutrow.iai.L_MINI_POST_ALT}" border="0" /></a><span class="postdetails">{L_POSTED}: {shoutrow.iai.TIME}</span></td>
            <td valign="top" align="right" nowrap="nowrap">{shoutrow.iai.QUOTE_IMG}{shoutrow.iai.EDIT_IMG}{shoutrow.iai.CENSOR_IMG}{shoutrow.iai.DELETE_IMG}{shoutrow.iai.IP_IMG}</td></form>
         </tr>
         <tr>
            <td colspan="2"><hr/></td>
         </tr>
         <tr>
            <td colspan="2"><span class="postbody">{shoutrow.iai.SHOUT}{shoutrow.iai.SIGNATURE}</span></td>
         </tr>
         </table>
      </td>
   </tr>
   <!-- END iai -->
#
#-----[ OPEN ]------------------------------------------
#
/templates/subSilver/shoutbox_max_guest_body.tpl
#
#-----[ FIND ]------------------------------------------
#
   <tr>
      <td class="spaceRow" colspan="2" height="1"><img src="templates/subSilver/images/spacer.gif" alt="" width="1" height="1" /></td>
   </tr>
   <!-- END shoutrow -->
#
#-----[ BEFORE ADD ]-------------------------------------
#
   <!-- BEGIN iai -->
   <tr>
      <td width="160" align="left" valign="top" class="{shoutrow.iai.ROW_CLASS}">
         <span class="name"><a name="{shoutrow.iai.U_SHOUT_ID}"></a><a href="{shoutrow.iai.U_VIEW_USER_PROFILE}" class="name"><b>{shoutrow.iai.USERNAME}</b></a></span><br />
         <span class="postdetails">{shoutrow.iai.USER_RANK}<br />
         {shoutrow.iai.RANK_IMAGE}<br/>
         {shoutrow.iai.USER_AVATAR}<br /><br/>{shoutrow.iai.USER_JOINED}</span></td>
      <td class="{shoutrow.iai.ROW_CLASS}" width="100%" height="28" valign="top">
         <table width="100%" border="0" cellspacing="0" cellpadding="0">
         <tr>
            <td width="100%"><a href="{shoutrow.iai.U_MINI_POST}"><img src="{shoutrow.iai.MINI_POST_IMG}" width="12" height="9" alt="{shoutrow.iai.L_MINI_POST_ALT}" title="{shoutrow.iai.L_MINI_POST_ALT}" border="0" /></a><span class="postdetails">{L_POSTED}: {shoutrow.iai.TIME}</span></td>
            <td valign="top" align="right" nowrap="nowrap">{shoutrow.iai.QUOTE_IMG}{shoutrow.iai.EDIT_IMG}{shoutrow.iai.CENSOR_IMG}{shoutrow.iai.DELETE_IMG}{shoutrow.iai.IP_IMG}</td></form>
         </tr>
         <tr>
            <td colspan="2"><hr/></td>
         </tr>
         <tr>
            <td colspan="2"><span class="postbody">{shoutrow.iai.SHOUT}{shoutrow.iai.SIGNATURE}</span></td>
         </tr>
         </table>
      </td>
   </tr>
   <!-- END iai -->
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM

Idee: http://www.phpbb.com/phpBB/viewtopic.ph ... 488#562488
the result of the idee: http://www.phpbb.com/phpBB/viewtopic.ph ... 083#568083
Last edited by wyrihaximus on Tue 10. Jun, 2003 14:27, edited 3 times in total.
Image
User avatar
wyrihaximus
brilliant supporter
 
Posts: 16
Joined: Mon 28. Apr, 2003 16:54

Postby Rapid Dr3am on Thu 08. May, 2003 22:19

Hi there.

Does this work with the new updated shoutbox just relased?

Also your mod template is incorrect sunSilver should be subSilver.
User avatar
Rapid Dr3am
Poster
Poster
 
Posts: 204
Joined: Mon 10. Feb, 2003 22:27
Location: Liverpool, England

Postby wyrihaximus on Fri 09. May, 2003 12:47

Hi

I fix the "sunSilver" mistake :oops:

And i'm using the version I downloaded 2 days ago, I gonne check out if it also works with the newest version

Grtz WyriHaximus
Image
User avatar
wyrihaximus
brilliant supporter
 
Posts: 16
Joined: Mon 28. Apr, 2003 16:54

Postby wyrihaximus on Fri 09. May, 2003 14:19

okey that works see the demo @ http://members.lycos.co.uk/wyrihaximus/phpBB2/index.php

but when I shout I shout twice :?
Image
User avatar
wyrihaximus
brilliant supporter
 
Posts: 16
Joined: Mon 28. Apr, 2003 16:54

Postby Rapid Dr3am on Fri 09. May, 2003 14:31

Well it obviously needs a little more work.

Good job though.
User avatar
Rapid Dr3am
Poster
Poster
 
Posts: 204
Joined: Mon 10. Feb, 2003 22:27
Location: Liverpool, England

Postby wyrihaximus on Sat 10. May, 2003 14:22

I found the problem :D
Code: Select all
      if (!$result = $db->sql_query($sql))
      {
         message_die(GENERAL_ERROR, 'Error inserting shout.', '', __LINE__, __FILE__, $sql);
      }
      if (!$result = $db->sql_query($sql))
      {
         message_die(GENERAL_ERROR, 'Error inserting shout.', '', __LINE__, __FILE__, $sql);
      }

instead of
Code: Select all
      if (!$result = $db->sql_query($sql))
      {
         message_die(GENERAL_ERROR, 'Error inserting shout.', '', __LINE__, __FILE__, $sql);
      }

that was my mistake it happens when I was modding the test forum :oops:
Image
User avatar
wyrihaximus
brilliant supporter
 
Posts: 16
Joined: Mon 28. Apr, 2003 16:54

Postby LaZeR on Mon 19. May, 2003 19:24

Cool little addon and seems to work pretty well. Just one thing, Anyway to get the response from the bot to come AFTER instead of BEFORE the user's post?
LaZeR
Poster
Poster
 
Posts: 94
Joined: Tue 27. Aug, 2002 00:42

Postby FX on Sun 25. May, 2003 15:30

Code: Select all
iai_functions.'.$phpEx


I don't find this file (iai_functions.php) on the zip archives or other web site.

Update your package on phpbbhacks to add this file please.
FX
Poster
Poster
 
Posts: 46
Joined: Fri 01. Nov, 2002 21:41
Location: France

Next

Return to Fully integrated shoutbox [2.0.6/EM]

Who is online

Users browsing this forum: No registered users and 1 guest

cron