GumShoutbox v 1.0 by GumSlone

step 1
backup all files before you install this mod.

step 2
upload all contents from upload directory to your site

step 3
open include/functions_general.php

at the end of file before "?>"

add:

//gum_shoutbox_messages_list()
	function gum_shoutbox_messages_list($start, $limit) {
	  global $database;

	  $declare_array = Array();
	  $declare_query = "SELECT id, user_id, username, gender, msg FROM se_gum_shoutbox ORDER BY id DESC LIMIT $start, $limit";
	  $declares = $database->database_query($declare_query);
	  while($declare_info = $database->database_fetch_assoc($declares)) {

	    // SET DECLARE ARRAY
	    $declare_array[] = Array(
					'id' => $declare_info['id'],
					'username' => $declare_info['username'],
					'user_id' => $declare_info['user_id'],
					'gender' => $declare_info['gender'],
					'msg' => $declare_info['msg']);
	  }

	  return $declare_array;

	} 
// END gum_shoutbox_messages_list()
	
step 4
add this to your se database:	

CREATE TABLE IF NOT EXISTS `se_gum_shoutbox` (
  `id` int(9) NOT NULL auto_increment,
  `user_id` int(11) NOT NULL,
  `username` varchar(70) NOT NULL,
  `gender` int(1) NOT NULL,
  `msg` varchar(255) NOT NULL,
  UNIQUE KEY `id` (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

step 5
open templates/home.tpl or if you wish templates/user_home.tpl

and add somewhere where you want to place the shoutbox this line:

{include file='gum_shoutbox.tpl'}

step 6
open home.php or user_home.php and add at the end of file before include "footer.php";
this lines:
//ADD Shoutbox 
$shoutbox_messages = gum_shoutbox_messages_list(0, 10); 
$smarty->assign('declares', $shoutbox_messages);

step 7
delete all files from include/smarty/templates_c/ directory

thats all,
ENJOY