Shoutbox on new page

Started by AMB, April 01, 2011, 05:10:28 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

AMB

Bump :P *cough*Mindless*cough*

AMB

Aye Mindless, last time i caught ya on shout you said you were working on it for me .. Any news with it?


AMB

Awesome Mindless.. Would be awesome if you could do it for me :)

Thanks

Mindless

Aye i a query could be added somewhere to check if last shout was x seconds ago and then show those usernames - Leave it with me.

AMB

Thanks for the help guys, but is there a way of showing who is currently in the shoutbox?

cm27

Well first I renamed the chat.php to irc.php then I copy the files and made a new page called chat.php or what ever you like. Then I removed all the irc stuff and replaced it with the shout stuff .. Do not forget to change the lang files around to match you files or you get an error .. more help just post you chat files and stuff along with you shout code thats on the index page and I will show you how to do it if you need more help .. :D
Never fall to those that just sit there.. Always look for the way to the top even if you have to code it your self and mistakes and all... quote from BonZO...

stoner

Another way of doing it..  Is have a popup box to display it.

With this, I stripped out the smilies and stuff, but i'm sure it would be easy enough to put back. 
Use a link like this where you want the link to be.


$HTMLOUT .='<a href="newshout.php" onClick="window.open(\'newshout.php\', \'Shout\', \'toolbar=no, directories=yes, location=yes, status=yes, menubar=no, resizable=no, scrollbars=no, width=800, height=270, top=150, left=100\'); return false" > PopUpShout</a>';

make a new file called newshout.php
<?php
/**
 *   https://09source.kicks-ass.net:8443/svn/installer09/
 *   Licence Info: GPL
 *   Copyright (C) 2010 Installer09 v.2
 *   A bittorrent tracker source based on TBDev.net/tbsource/bytemonsoon.
 *   Project Leaders: Mindless,putyn,kidvision.
 **/
require_once(dirname(__FILE__).DIRECTORY_SEPARATOR.'include'.DIRECTORY_SEPARATOR.'bittorrent.php');
require 
INCL_DIR.'user_functions.php';
require 
INCL_DIR.'bbcode_functions.php';


dbconn(false);
loggedinorreturn();
$HTMLOUT '<script type="text/javascript" src="scripts/shout.js"></script>';
    
//$stdfoot = array(/** include js **/'js' => array('shout','wz_tooltip'));
    
$lang array_mergeload_language('global'), load_language('index'));
    if (
function_exists('parked'))
    
parked();
    
$HTMLOUT '';

// === shoutbox 09
   
if ($CURUSER['show_shout'] === "yes") {
   
$commandbutton '';
   
$refreshbutton '';
   
$smilebutton '';
   
$custombutton '';
   if(
get_smile() != '0')
   
$custombutton .="<span style='float:left;'><a href=\"javascript:PopCustomSmiles('shbox','shbox_text')\">{$lang['index_shoutbox_csmilies']}</a></span>";
   if (
$CURUSER['class'] >= UC_STAFF){
   
$commandbutton "<span style='float:left;'><a href=\"javascript:popUp('shoutbox_commands.php')\">{$lang['index_shoutbox_commands']}</a></span>";}
   
$refreshbutton "<span style='float:left;'><a href='shoutbox.php' target='sbox'>{$lang['index_shoutbox_refresh']}</a></span>";
   
$smilebutton "<span style='float:left;'><a href=\"javascript:PopMoreSmiles('shbox','shbox_text')\">{$lang['index_shoutbox_smilies']}</a></span>";
   
$HTMLOUT .= "<form action='shoutbox.php' method='get' target='sbox' name='shbox' onsubmit='mysubmit()'>
   <div class='headline'>
    ShoutBox - General Chit-chat
    <span class='shouthis'>"
;
   if (
$CURUSER['class'] >= UC_STAFF){
   
$HTMLOUT .= "<a href='{$INSTALLER09['baseurl']}/staffpanel.php?tool=shistory&amp;action=shistory'><b>{$lang['index_shoutbox_history']}</b></a>";
   }
   
$HTMLOUT .= "</span>
   </div>
   <div class='headbody'>
   <iframe src='
{$INSTALLER09['baseurl']}/shoutbox.php' width='100%' height='200' frameborder='0' name='sbox' marginwidth='0' marginheight='0'></iframe>
   <br />
 <div align='center'>
   <b>
{$lang['index_shoutbox_shout']}</b>
   <input type='text' maxlength='680' name='shbox_text' size='1' style='width:500px;' />
   <input class='button' type='submit' value='
{$lang['index_shoutbox_send']}' />
   <input type='hidden' name='sent' value='yes' />
   
   <span class='shoutextra'><a href='
{$INSTALLER09['baseurl']}/shoutbox.php?show_shout=1&amp;show=no'></a>{$refreshbutton}</span>
   </div>
 </div>
   </form>\n"
;
   }
   if (
$CURUSER['show_shout'] === "no") {
   
$HTMLOUT .="<div class='headline'><b>{$lang['index_shoutbox']}&nbsp;</b></div><div class='headbody'>[&nbsp;<a href='{$INSTALLER09['baseurl']}/shoutbox.php?show_shout=1&amp;show=yes'>{$lang['index_shoutbox_open']}&nbsp;]</a><!--</div>--></div><br />";
   }
   
//==end 09 shoutbox
           
/////////////////////// HTML OUTPUT //////////////////////////////

    
print $HTMLOUT;


?>

mistero

lol sorry daffy didn't see ur reply

mistero

<?php
/**
 *   https://09source.kicks-ass.net:8443/svn/installer09/
 *   Licence Info: GPL
 *   Copyright (C) 2010 Installer09 v.2
 *   A bittorrent tracker source based on TBDev.net/tbsource/bytemonsoon.
 *   Project Leaders: Mindless,putyn,kidvision.
 **/

require_once(dirname(__FILE__).DIRECTORY_SEPARATOR.'include'.DIRECTORY_SEPARATOR.'bittorrent.php');
require 
CACHE_DIR.'block_settings_cache.php';
require 
CLASS_DIR.'class_blocks_index.php';
require 
INCL_DIR.'user_functions.php';
require 
INCL_DIR.'bbcode_functions.php';
require 
ROOT_DIR.'polls.php';

dbconn(true);

loggedinorreturn();

   
$lang array_mergeload_language('global'), load_language('index') );
   
$HTMLOUT '';
   require(
BLOCK_DIR.'index/shoutbox.php');

echo 
stdhead('Shoutbox') . $HTMLOUT stdfoot();
?>


Should work but not tested

daffy81

unzip it and upload to root, link it. had to name it chatbox (name it what ye like) couldnt name it shoutbox for obvius reasons lol also chat.php is taken for irc.

[attachment deleted by admin]

AMB

Hey,

Was wondering how i could get the shoutbox onto a page of it's own.. Like chat.php etc.. Also, is there a way to add a box on the side of it showing who is currently in the shoutbox? Almost like a IRC type of thing...... Normal chat, with a side bar showing who's in it lol..

Thanks