AJAXChat Intergration Shoutbox only

2009-06-21
2012-11-15
  • Chit-Chat ChatterBox Boss

    I have the AJAXChat Intergration Mod for SMF. I wanted to have this redone or be able to block the chat. I only want the shoutbox from it and not have www.yoursite.com/chat even be there. I just want ONLY the shoutbox from this mod. Know how to do that?

     
    • Carlos Cerritos

      Carlos Cerritos - 2009-07-20

      Hello, this is the code I'm using to show a shoutbox on my website, you can modify to suit your own needs, good luck.

      <code>
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
      <title>Documento sin t&iacute;tulo</title>
      <!-- @import url("http://example.org/path/to/chat/css/shoutbox.css"); if you put on a css already in use-->
      <link rel="STYLESHEET" type="text/css" href="css/shoutbox.css">
      </head>

      <body>
      <?php
      function getShoutBoxContent() {
          // URL to the chat directory:
          if(!defined('AJAX_CHAT_URL')) {
              define('AJAX_CHAT_URL', './chat/');
          }
         
          // Path to the chat directory:
          if(!defined('AJAX_CHAT_PATH')) {
              define('AJAX_CHAT_PATH', realpath(dirname($_SERVER['SCRIPT_FILENAME']).'/chat').'');
          }
         
          // Validate the path to the chat:
          if(@is_file(AJAX_CHAT_PATH.'lib/classes.php')) {
             
              // Include Class libraries:
              require_once(AJAX_CHAT_PATH.'lib/classes.php');
             
              // Initialize the shoutbox:
              $ajaxChat = new CustomAJAXChatShoutBox();
             
              // Parse and return the shoutbox template content:
              return $ajaxChat->getShoutBoxContent();
          }
         
          return null;
      }
      ?>
      <div style="width:200px;"><?php echo getShoutBoxContent(); ?></div>
      </body>
      </html>
      </code>

       
    • ShNaYkHs

      ShNaYkHs - 2009-07-09

      I what to use it as shoutbox too on the index of my PunBB forum, any idea ?

       
  • Mansoor Khan

    Mansoor Khan - 2011-12-07

    Is this supposed to work on a normal html page also or is this only for forums and Bulletin boards like SF and punBB?

    I want to set it up on my website as an html page.  I already have the chat room working but cannot seem to get the shoutbox to work.

    Any help is appreciated.

    Thanks

     
  • Mansoor Khan

    Mansoor Khan - 2011-12-20

    Ok answering my own question but if you want to put a shoutbox on your website page and not on a forum here it is:

    Ok I have been able to solve the problem of using a shoutbox on an independent web page and not on a forum. Here is a link to my shoutbox - http://www.acres-wild.com/Shoutbox.php If you have further questions you can email me at acreswildfarm@gmail.com Mansoor

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks