yep i remember this code which me n quik has updated in 2006 with lavalair
put this in your core.php
PHP Code:
function getstaffshout($sid)
{
$shbox = "<small>";
$shbox .= "<b>ShoutBox</b><br/>";
$lshout = mysql_fetch_array(mysql_query("SELECT shout, shouter, id FROM staff_shouts ORDER BY shtime DESC LIMIT 1"));
$shnick = getnick_uid($lshout[1]);
$shbox .= "<i><a href=\"index.php?action=viewuser&sid=$sid&who=$lshout[1]\">".$shnick."</a></i>: ";
$shbox .= htmlspecialchars($lshout[0]);
$shbox .= "<br/>";
$shbox .= "<a href=\"lists.php?action=shouts&sid=$sid\">more</a>, ";
f (ismod(getuid_sid($sid)))
{
$shbox .= "<a href=\"index.php?action=shout&sid=$sid\">shout</a>";
$shbox .= ", <a href=\"modproc.php?action=delstsh&sid=$sid&shid=$lshout[2]\">delete</a>";
}
//$shbox .= "<br/>";
$shbox .= "</small>";
return $shbox;
}
put this code where ever you want to get staff shout
PHP Code:
echo "<p align=\"center\">";
echo getstaffshout($sid);
echo "</p>";
run this with your sql
PHP Code:
-- Table structure for table `staff_shouts`
--
CREATE TABLE `staff_shouts` (
`id` int(100) NOT NULL auto_increment,
`shout` varchar(100) NOT NULL default '',
`shouter` int(100) NOT NULL default '0',
`shtime` int(100) NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=36726 ;
Bookmarks