wMan |
31st October 2012 23:06 |
TorrenttTrader-v2.06 ajshoutchat
2 Attachment(s)
before you add this mod you must have the mod by ajshoutbox by cooly
ok here is the staffshoutchat
spank-d
first you need to add the SQL
PHP Code:
-- -- Table structure for table `ajshoutchat` --
CREATE TABLE IF NOT EXISTS `ajshoutchat` ( `id` mediumint(9) NOT NULL AUTO_INCREMENT, `uid` mediumint(9) NOT NULL, `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `name` tinytext NOT NULL, `text` text NOT NULL, UNIQUE KEY `id` (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- -- Dumping data for table `ajshoutchat` --
-- --------------------------------------------------------
@admincp.php fined
PHP Code:
if (!$action){ stdhead("Admin CP"); navmenu(); stdfoot(); }
replace with
PHP Code:
if (!$action){ stdhead("Admin CP"); navmenu(); if ($CURUSER["class"] >= 1){ begin_frame("<strong><center>STAFF CHAT</center></strong>"); require_once("backend/smilies.php"); require_once("shoutfunstaff_new.php"); function quickbbshout(){ echo "<table align=center border=0 cellpadding=0 cellspacing=2><tr>";
echo "<td width=22><a href=\"javascript:bbshout('[b]', '[/b]')\"><img src=images/bbcode/bbcode_bold.gif border=0 alt='Bold' id=button1></a></td>";
echo "<td width=22><a href=\"javascript:bbshout('[i]', '[/i]')\"><img src=images/bbcode/bbcode_italic.gif border=0 alt='Italic'></a></td>";
echo "<td width=22><a href=\"javascript:bbshout('[u]', '[/u]')\"><img src=images/bbcode/bbcode_underline.gif border=0 alt='Underline'></a></td>";
echo "<td width=22><a href=\"javascript:bbshout('[url]', '[/url]')\"><img src=images/bbcode/bbcode_url.gif border=0 alt='Url'></a></td>";
echo "<td width=22><a href=\"javascript:bbshout('[img]', '[/img]')\"><img src=images/bbcode/bbcode_image.gif border=0 alt='Img'></a></td>";
echo "<td width=22><a href=\"javascript:bbshout('[blink]', '[/blink]')\"><img src=images/bbcode/bbcode_blink.gif border=0 alt='blink'></a></td>";
echo "<td width=22><a href=\"javascript:bbshout('[align=center]', '[/align]')\"><img src=images/bbcode/bbcode_center.gif border=0 alt='center'></a></td>";
echo "<td width=22><a href=\"javascript:bbshout('[align=left]', '[/align]')\"><img src=images/bbcode/bbcode_left.gif border=0 alt='left'></a></td>";
echo "<td width=22><a href=\"javascript:bbshout('[align=right]', '[/align]')\"><img src=images/bbcode/bbcode_right.gif border=0 alt='right'></a></td>";
echo "<td width=22><a href=\"javascript:bbshout('[video]', '[/video]')\"><img src=images/bbcode/bbcode_video.gif border=0 alt='video'></a></td>";
echo "<td width=22><a href=\"javascript:bbshout('[audio]', '[/audio]')\"><img src=images/bbcode/bbcode_audio.gif border=0 alt='audio'></a></td>";
echo "<td width=22><a href=\"javascript:bbshout('<<<@!1!@>>>')\"><img src=images/bbcode/bbcode_quote.gif border=0 alt='quote'></a></td>";
echo "<td width=22><a href=\"javascript:bbshout('[code]', '[/code]')\"><img src=images/bbcode/bbcode_code.gif border=0 alt='code'></a></td>";
echo "<td width=22><a href=\"javascript:bbshout('[list]', '[/list]')\"><img src=images/bbcode/bbcode_list.gif border=0 alt='list'></a></td>";
echo "<td width=22><a href=\"javascript:bbshout('[email]', '[/email]')\"><img src=images/bbcode/bbcode_email.gif border=0 alt='email'></a></td>";
echo "</tr></table><table align=center border=0 cellpadding=0 cellspacing=2><tr>";
echo "<td> <select name='color' size='0.5' onChange=\"javascript:bbcolor()\"> <option selected='selected'>Color</option> <option value=skyblue style=color:skyblue>sky blue</option> <option value=royalblue style=color:royalblue>royal blue</option> <option value=blue style=color:blue>blue</option> <option value=darkblue style=color:darkblue>dark-blue</option> <option value=orange style=color:orange>orange</option> <option value=orangered style=color:orangered>orange-red</option> <option value=crimson style=color:crimson>crimson</option> <option value=red style=color:red>red</option> <option value=firebrick style=color:firebrick>firebrick</option> <option value=darkred style=color:darkred>dark red</option> <option value=green style=color:green>green</option> <option value=limegreen style=color:limegreen>limegreen</option> <option value=seagreen style=color:seagreen>sea-green</option> <option value=deeppink style=color:deeppink>deeppink</option> <option value=tomato style=color:tomato>tomato</option> <option value=coral style=color:coral>coral</option> <option value=purple style=color:purple>purple</option> <option value=indigo style=color:indigo>indigo</option> <option value=burlywood style=color:burlywood>burlywood</option> <option value=sandybrown style=color:sandybrown>sandy brown</option> <option value=sienna style=color:sienna>sienna</option> <option value=chocolate style=color:chocolate>chocolate</option> <option value=teal style=color:teal>teal</option> <option value=silver style=color:silver>silver</option> </select></td>"; echo "<td> <select name='font' size='0.5' onChange=\"javascript:bbfont()\"> <option selected='selected'>Font</option> <option value=arial>Arial</option> <option value=comic sans ms>Comic</option> <option value=courier new>Courier New</option> <option value=tahoma>Tahoma</option> <option value=times new roman>Times New Roman</option> <option value=verdana>Verdana</option> </select></td>"; echo "<td> <select name='size' size='0.5' onChange=\"javascript:bbsize()\"> <option selected='selected'>Size</option> <option value=1>1</option> <option value=2>2</option> <option value=3>3</option> <option value=4>4</option> <option value=5>5</option> <option value=6>6</option> <option value=7>7</option> </select></td>";
echo "</tr></table>"; } function smile() {
print "<div align='center'><table cellpadding='1' cellspacing='1'><tr>";
global $smilies, $count; reset($smilies);
while ((list($code, $url) = each($smilies)) && $count<16) { print("\n<td><a href=\"javascript: SmileIT('".str_replace("'","\'",$code)."')\"> <img border=\"0\" src=\"images/smilies/$url\" alt=\"$code\" /></a></td>");
$count++; }
print '<td> <a href="javascript:show_hide(\'sextra\');"></a></td></tr></table></div>'; } function smileextra() {
global $smilies; reset($smilies); # getting smilies while (list($code, $url) = each($smilies)) { print("\n<a href=\"javascript: SmileIT('".str_replace("'","\'",$code)."')\"> </a>");
$count++; }
}
?> <script src="/ajshoutchat.js" language="JavaScript" type="text/javascript"></script> <center> <table align=center class=table_col1 width=98%><tr> <td align=center> <div id="chat">
<div id="chatoutput">
<ul id="outputList">
<li> <span class="name"><b><?php echo $site_config[SITENAME];?> Ajax Chat:</b></span><h2 style='padding-left:20px;'>Welcome!</h2>
<center><div class="loader"></div></center>
</li>
</ul>
</div>
</div>
</td> </tr> </table> <div id="shoutheader"> <font size='1'><center><b><font color=yellow>Shoutbox Rules: English Only, No Swearing, Personal Attacks, No Outside Links, No Abuse, No Spamming, Publishing Serials, Cracks, ETC</font><b><b><font color=white>Member</font> | <font color=#8E35EF>Power User</font> | <font color=#008000>VIP</font> | <font color=#153E7E>Uploader</font> |<font color=#FF8040>Moderator</font> | <font color=#0FDDAF>Super Moderator</font> | <font color=#FF0000>Boss</font> </b></center> <form id="chatForm" name="chatForm" onsubmit="return false;" action=""> <input type="hidden" name="name" id="name" value="<?php echo $CURUSER["username"] ?>" /> <input type="hidden" name="uid" id="uid" value="<?php echo $CURUSER["id"] ?>" /> <table align=center class=table_col1 width=99%><tr> <td align=center> <div align=center><?php echo smile();?></div> <input type="text" size="145" maxlength="500" name="chatbarText" id="chatbarText" onblur="checkStatus('');" onfocus="checkStatus('active');" /> <input onclick="sendComment();" type="submit" id="submit" name="submit" value="Send"/> <a href="javascript: PopMoreSmiles('chatForm','chatbarText');"> <img src="images/smile.gif" border="0" class="form" title="smilies" align="top" alt="" /></a>
<a href="javascript: Pophistory()"> <img src="images/quote.gif" border="0" class="form" title="History/Moderate" align="top" alt="" /></a> <div align=center><?php echo quickbbshout();?></div> </td> </tr> </table> </form>
</div> <script language="JavaScript">
function show_hide(sextra) { if(document.getElementById(sextra)) { if(document.getElementById(sextra).style.display == 'none') { document.getElementById(sextra).style.display = 'inline'; } else { document.getElementById(sextra).style.display = 'none'; } } } function show_hide(sextra1) { if(document.getElementById(sextra1)) { if(document.getElementById(sextra1).style.display == 'none') { document.getElementById(sextra1).style.display = 'inline'; } else { document.getElementById(sextra1).style.display = 'none'; } } } </script> </center> <?php end_block(); } stdfoot(); }
@admincp.php Add
PHP Code:
<td align="center"><a href=admincp.php?action=clearShoutchats><img src="images/admin/clearshout.png" border=0 width=32 height=32><BR>Clear SaffShoutbox</a><BR></td>
@admincp.php Add at the end tag
PHP Code:
if ($action == "clearShoutchats") { stdhead("Clear Shoutchats"); navmenu(); begin_frame("Clear shoutchat", center); if ($yes == "yes") { $res = mysql_query("TRUNCATE `ajshoutchat`"); if ($res) echo "<center>Site Shoutchats cleared"; } else { echo "<div align=center>Are you sure you want to clear the Shoutchats?"; echo "<a href='admincp.php?action=clearShoutchats&yes=yes'><b>Yes</b></a></div>"; } end_frame(); stdfoot();
Add the Contents backend/staff.php too the backend FOLDER
Add the all Contents of ajshoutchat too the root Dir
|