vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Simple users online question (https://vborg.vbsupport.ru/showthread.php?t=44078)

fonzerelli_79 09-29-2002 10:07 AM

Simple users online question
 
this is a very simple question - so simple i cant seem to figure it out ;)

all i want to do is pull the number of users from my forum and print the number on my main site - eg. 4 users in forums etc

which table would i get this figure from - is it the session table??

cheers

Xenon 09-29-2002 05:09 PM

<a href="https://vborg.vbsupport.ru/showthread.php?s=&threadid=38012&highlight=of+user s+on+forumhome" target="_blank">https://vborg.vbsupport.ru/showt...s+on+forumhome</a>

fonzerelli_79 10-01-2002 11:05 AM

thanks

fonzerelli_79 10-05-2002 11:32 AM

ive been so busy this is the first chance ive had to have a look at this but its not what im looking for

i want the total number of users online on a non vb page

so if there 5 guests and 6 members on i want 11 users online in forums to appear on my non vb page

is there something like this :D

Xenon 10-05-2002 03:00 PM

ahh, sorry i missunderstood.

your nonvb Mainpage must require global.php in the first place.
then add this line into your file:
PHP Code:

$loggedins=$DB_site->query_first("SELECT DISTINCT SUM(IF(userid>0,1,0)) AS regged, SUM(IF(userid=0,1,0)) AS guests
                              FROM session
                              WHERE session.lastactivity>
$datecut
"
); 

then you should be able to use $loggedins[regged] and $loggedins[guests] in your script

fonzerelli_79 10-05-2002 03:50 PM

the page i want this on though isnt just a non vb page - its a different domain - does this make a difference at all :D

Xenon 10-05-2002 03:53 PM

hmm, yes i think that would make differences, but i'm not sure
i don't know too much about working on different servers and combine the content ;)

the easiest way is to create a file onto your vb-server and just include this file from outside then..

fonzerelli_79 10-05-2002 03:57 PM

yeah - that will probably work:D

ill try that (by the way - you can see what im trying to do at the left hand side of www.affiliate-review.com , this might explain it better than i can)


All times are GMT. The time now is 07:03 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.01152 seconds
  • Memory Usage 1,724KB
  • 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
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete