Code: Select all
http://hcctech.ca/forums/index.php
Now I have two shoutboxes, one on top and one on the bottom. Must be from the 013 mod.
Here is the sboutbox_install.php
Code: Select all
<?php
/***************************************************************************
* shoutbox_install.php
* -------------------
* begin : Sat, Oct 26, 2005
* copyright : (C) 2005 Battye @ CricketMX.com
* email : cricketmx@hotmail.com
*
* $Id: shoutbox.php, v1 (October 2005) battye Exp $
*
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
//include($phpbb_root_path . 'config.'.$phpEx);
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
$sql = array();
$sql[] = "CREATE TABLE `" . SHOUTBOX_TABLE . "` (
`shoutbox_id` int(5) NOT NULL default '0',
`shoutbox_datetime` VARCHAR( 255 ) NOT NULL default '',
`shoutbox_text` varchar(255) NOT NULL default '',
`shoutbox_author` int(5) NOT NULL default '0'
);";
$sql[] = "INSERT INTO " . CONFIG_TABLE . " (config_name, config_value) VALUES ('guest_shoutbox', '0')";
$sql[] = "INSERT INTO " . CONFIG_TABLE . " (config_name, config_value) VALUES ('rows_shoutbox', '5')";
for ($i = 0; $i < count($sql); $i++)
{
if( !$db->sql_query($sql[$i]) )
{
echo $i . ': The shoutbox table / rows could not be created (' . $sql[$i] . ')( ' . $db->sql_error() . ' )<br />';
}
}
message_die(GENERAL_MESSAGE, $lang['Shoutbox_table_made']);
?>
Thanks for your help, Battye.
Heeter