vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=34)
-   -   FREE zz:FlashChat Drop in Flash Animated Chat Integration (https://vborg.vbsupport.ru/showthread.php?t=64907)

x3n0 05-25-2004 07:27 AM

<?php
## """"" INCLUDE """"""""""""""""""""""""""""""""""""""""""""
include('./config/database.php'); # Read Database-Variables
## """"" INCLUDE """"""""""""""""""""""""""""""""""""""""""""
switch(false){
case($db = @mysql_connect($cfg['server'],$cfg['user'],$cfg['password'])):
$mysqlERROR = mysql_error();
break;
case($dat = @mysql_select_db($cfg['database'],$db)):
$mysqlERROR = mysql_error();
break;
}
if(!$mysqlERROR) {

## """"" INCLUDE """"""""""""""""""""""""""""""""""""""""""""
include('./inc/func.get_config.php'); # Read Configuration-Data
## """"" INCLUDE """"""""""""""""""""""""""""""""""""""""""""
}
# $sql = 'SELECT * FROM zz_user WHERE user!=\'admin\' and status=\'0\''; # -- get user currently online
$sql = 'SELECT * FROM '.$cfg['userdat'].' WHERE status=0';
$result = mysql_query($sql, $db);
$number = mysql_num_rows($result);
//No Users Online
if ($number==0)
{
$number= "No users in chat";
echo $number;
}
//Users Online
else
{
$message = "$number users in chat:";
echo $message;
echo "<p>";
for ($i=0; $i<"$number"; $i++)
{
$row=mysql_fetch_array($result);
$id=$row[2];
echo "$id<br>";
}
echo "<p>";
}

mysql_free_result($result);
?>

x3n0 05-25-2004 07:39 AM

Thats the SQL query to pull the usernames from the chat data tables. Then I used the following code in my sidebar template to create the collapsable stat:

<!-- WHOS IN CHAT -->
<tbody>
<tr>
<td class="thead" colspan="2">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('who_chat')"><img id="collapseimg_who_chat" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_stats].gif" alt="" border="0" /></a>
Who's in Chat?
</td>
</tr>
</tbody>

<tbody id="collapseobj_who_chat">
<tr>
<td class="alt1" width="100%"><div class="smallfont">$chat_users</a></td>
</tr>
</tbody>

<!-- /WHOS IN CHAT -->

x3n0 05-25-2004 07:44 AM

Finally the following code MUST be added to the phpinclude_start template:

ob_start();
require("http://Your/Chat/Path/users.php");
$chat_users = ob_get_contents();
ob_end_clean();

Should work then.

ogetbilo 05-25-2004 09:33 AM

thank you x3n0 :)

:applause:

lemarsu 06-04-2004 03:14 PM

Hi
can someone help me please ?

Did any one try to add users online to the vBindex "vbindex_customblocks" ?

I added to phpinclude_start
Code:

// Chat
ob_start();
require("http://www.ukmonster.co.uk/chat/users.php");
$chat_users = ob_get_contents();
ob_end_clean();

and to one of the vBindex "vbindex_customblocks"
Code:

<!-- WHOS IN CHAT -->
Who's in Chat?
<div class="smallfont">$chat_users</a></div>

<!-- /WHOS IN CHAT -->

but I still get this error :

Code:

Warning: Unknown(): stream does not support seeking in /home/ukmonste/public_html/monster/global.php(395) : eval()'d code on line 10
3 users in chat:


ashley53680 06-05-2004 08:23 PM

Quote:

Originally Posted by x3n0
<?php
## """"" INCLUDE """"""""""""""""""""""""""""""""""""""""""""
include('./config/database.php'); # Read Database-Variables
## """"" INCLUDE """"""""""""""""""""""""""""""""""""""""""""
switch(false){
case($db = @mysql_connect($cfg['server'],$cfg['user'],$cfg['password'])):
$mysqlERROR = mysql_error();
break;
case($dat = @mysql_select_db($cfg['database'],$db)):
$mysqlERROR = mysql_error();
break;
}
if(!$mysqlERROR) {

## """"" INCLUDE """"""""""""""""""""""""""""""""""""""""""""
include('./inc/func.get_config.php'); # Read Configuration-Data
## """"" INCLUDE """"""""""""""""""""""""""""""""""""""""""""
}
# $sql = 'SELECT * FROM zz_user WHERE user!=\'admin\' and status=\'0\''; # -- get user currently online
$sql = 'SELECT * FROM '.$cfg['userdat'].' WHERE status=0';
$result = mysql_query($sql, $db);
$number = mysql_num_rows($result);
//No Users Online
if ($number==0)
{
$number= "No users in chat";
echo $number;
}
//Users Online
else
{
$message = "$number users in chat:";
echo $message;
echo "<p>";
for ($i=0; $i<"$number"; $i++)
{
$row=mysql_fetch_array($result);
$id=$row[2];
echo "$id<br>";
}
echo "<p>";
}

mysql_free_result($result);
?>

so this whole thing is a query you need to do in sql? (I am still learning lol)

Bounce 06-06-2004 03:09 AM

firstly how do you put a header and footer in,

then i need to intregrate into vb 3 RC 4,wot files do i need to edit please.

Also like the feature of guest havin to register, how do i do that as well :squareeyed:

Once ive done all that be Ideal for my site :rolleyes:

Bounce 06-08-2004 09:33 PM

Ive added the events,pretty cool, but looking at the attached images on first page it shows a events bar

any idea how i get this showing

Bounce 06-08-2004 09:44 PM

Quote:

Originally Posted by x3n0
Finally the following code MUST be added to the phpinclude_start template:

ob_start();
require("http://Your/Chat/Path/users.php");
$chat_users = ob_get_contents();
ob_end_clean();

Should work then.


i'm getting this


Warning: Unknown(): stream does not support seeking in /home/virtual/site5/fst/var/www/html/forum/global.php(388) : eval()'d code on line 8

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/virtual/site5/fst/var/www/html/forum/flashchat/users.php on line 22
No users in chat
Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/virtual/site5/fst/var/www/html/forum/flashchat/users.php on line 44

lemarsu 06-10-2004 12:47 PM

Quote:

Originally Posted by hIBEES
i'm getting this


Warning: Unknown(): stream does not support seeking in /home/virtual/site5/fst/var/www/html/forum/global.php(388) : eval()'d code on line 8

This part is the same as what I get...
I don't see where Chat calls global.php!! :ermm: :rolleyes:

Help I want this to work

I am sure you did ..... but did you change this line : require("http://Your/Chat/Path/users.php");


All times are GMT. The time now is 06:33 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01293 seconds
  • Memory Usage 1,754KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete