Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Converting/Creating Blocks
Author Message
danno58
New Member
New Member



Joined: Dec 16, 2006
Posts: 8
Location: Ramstein, Germany

PostPosted: Wed Sep 29, 2010 5:11 am Reply with quote

Hi Everyone,

I am using RN2.40.00 with Flashchat installed.

I found this neat block called Chatview 1.3a which shows who is chating and in which room and so on.

My problem is that this block will not show as a right block and if I activate it as a left block then all my center blocks and right blocks disappears.

I have tried other original themes to see if this was my problem but it remains the same.

I am hoping someone can help me.
Thanks in advance.
 
View user's profile Send private message
jakec
Site Admin



Joined: Feb 06, 2006
Posts: 3048
Location: United Kingdom

PostPosted: Wed Sep 29, 2010 5:51 am Reply with quote

Can you post the code for the block.
 
View user's profile Send private message
danno58







PostPosted: Wed Sep 29, 2010 6:56 am Reply with quote

Here it is, sorry about taking up so much space though lol

Code:
<?php 

/**********************************************/
/* ChatView v1.3a Block                       */
/* Author: Mark De Lorenzo                    */
/* Copyright (c) 2004 by Evidence             */
/**********************************************/

if (eregi( "block-ChatView.php", $_SERVER['PHP_SELF']))
{
   die("Access Denied");
}

   // Some global definitions
   global $user, $cookie, $db, $user_prefix;

   include("config.php");
   cookiedecode($user);
   $username = $cookie[1];

   //===================================================================================
   // ChatView Configurations
   //===================================================================================
   
   // Directory off of root where your FlashChat is installed
   // Include the leading slash... Case sensitive!
   $FCDirectory = "/FlashChat";
   
   // Set this to 1 if Flashchat is phpNuke integrated or 0 if installed standalone
   $phpNukeIntegrated = "1";
   
   // Set this to 1 if you want to display button to launch Chat, 0 to display info only
   $ShowFCLink = "1";
   
   //===================================================================================
   // PopupWindow dimensions  ( I did popups so that you could continue to browse the site )

   // Width
   $FlashChatWinW = "600";
   
   // Height
   $FlashChatWinH = "400";
   
   //===================================================================================
   // End of configuration settings... don't modify below here!
   //===================================================================================

   include($_SERVER["DOCUMENT_ROOT"].$FCDirectory."/inc/config.srv.php");
   $FCpref = $GLOBALS['fc_config']['db']['pref'];
   $tblFC_Rooms = $FCpref."rooms";
   $tblFC_Connections = $FCpref."connections";
   $tblFC_Users = $FCpref."users";

   if ( $username == "" or $phpNukeIntegrated == "1" ) {
      $ChatLink =  $FCDirectory."/flashchat.php\" onclick=\"window.open('".$FCDirectory."/flashchat.php', '_flashchat', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=".$FlashChatWinW.",height=".$FlashChatWinH.",left = 162,top = 134');return false;\" target=\"_flashchat\"";
   } else {
      $ChatLink =  $FCDirectory."/flashchat.php?username=$username\" onclick=\"window.open('".$FCDirectory."/flashchat.php?username=$username', '_flashchat', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=".$FlashChatWinW.",height=".$FlashChatWinH.",left = 162,top = 134');return false;\" target=\"_flashchat\"";
   }
   
   if ( $phpNukeIntegrated == "0" ) {
      $sql = "SELECT ".$tblFC_Users.".login, ".$tblFC_Rooms.".name, ".$tblFC_Rooms.".id FROM ".$tblFC_Connections." INNER JOIN ".$tblFC_Users." ON ".$tblFC_Connections.".userid = ".$tblFC_Users.".id INNER JOIN ".$tblFC_Rooms." ON ".$tblFC_Connections.".roomid = ".$tblFC_Rooms.".id ORDER BY ".$tblFC_Rooms.".name, ".$tblFC_Users.".login";
   } else {
      $sql = "SELECT ".$user_prefix."_users.username, ".$tblFC_Rooms.".name, ".$tblFC_Rooms.".id FROM ".$tblFC_Connections." INNER JOIN ".$user_prefix."_users ON ".$tblFC_Connections.".userid = ".$user_prefix."_users.user_id INNER JOIN ".$tblFC_Rooms." ON ".$tblFC_Connections.".roomid = ".$tblFC_Rooms.".id ORDER BY ".$tblFC_Rooms.".name, ".$user_prefix."_users.username";
   }

   $numchat = $db->sql_query($sql);
   $chatters_now_online = $db->sql_numrows($numchat);
   $oldroom='';
   if ($numchat) {
      If ( $chatters_now_online != "0" ) {
         $content = "<img src=\"images/blocks/ChatView/icon_members.gif\">\n";
         $content .= "Users chatting: <STRONG>$chatters_now_online</STRONG></center>";
         $content .= "<hr>";
         $ChatroomImage = 0;  // initialize graphics
         while ($usersinchat = $db->sql_fetchrow($numchat)) {
            $ChatroomImage++;
            if ( $ChatroomImage > 4 ) { $ChatroomImage = 1; }  // reset to 1
            if ($usersinchat[1] != $oldroom) {
               $content .= "<img src=\"images/blocks/ChatView/group-$ChatroomImage.gif\">\n";
               $content .= "<u><b>$usersinchat[1]:</u></b><br />\n";
                   $oldroom = $usersinchat[1];
            }
            $content .= "<img src=\"images/blocks/ChatView/arrow.gif\"> ".$usersinchat[0]."<br>\n";
         }
         $content .= "<br>";
      }
      if ($usersinchat[0] == $oldroom) {
         $content = "<br><center><img src=\"images/blocks/ChatView/icon_members.gif\"><br><br>\n";
         $content .= "Nobody Chatting</center><br>\n";
      }
      if ( $ShowFCLink == "1" ) {
         $content .= "<form action=\"$ChatLink\" method=\"get\" title=\"Open a chat window\" name=\"startchat\">\n";
         $content .= "   <center><input type=\"button\" value=\"Enter Live Chat\" name=\"chatbutton\"></center>\n";
         $content .= "</form>\n";
      }
   } else {   //could not connect to database
   echo "ERROR: DB Error\n";
   }
?>
 
danno58







PostPosted: Mon Oct 04, 2010 8:19 am Reply with quote

Please purge this post
I just realized that in order for someone to check the Chatview codes they would also have to have Flashchat installed.

Sorry for the headspace problem.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Converting/Creating Blocks

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©