vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Variables Questions (https://vborg.vbsupport.ru/showthread.php?t=85609)

Cypher720 12-10-2002 02:28 AM

like you said...goto vbulletin.org for hacks

Tony G 12-10-2002 03:25 AM

There is no hack released for this. You will need to modify files though. It's probably possible through phpinclude, too.

imported_JakeC 12-10-2002 04:17 AM

Rodger that. Thanks for the help.

JakeC

filburt1 12-10-2002 10:20 AM

Quote:

Originally posted by Tony
There is no hack released for this. You will need to modify files though. It's probably possible through phpinclude, too.
Not necessarily, phpinclude's variable scope usually isn't too hot, either.

Tony G 12-10-2002 10:21 AM

Yeah, I was only guessing. I'm not much into phpinclude, anyway. :p

Brad 12-10-2002 09:23 PM

you can call the total number of users online by adding this, https://vborg.vbsupport.ru/showthrea...threadid=33048

Firefly changed it to work with phpinclude.

filburt1 12-10-2002 09:48 PM

Beware that that's two queries on every page, though.

Brad 12-10-2002 10:38 PM

Well, he can modifiy the code to his needs, to my understanding he is only using this on one page.

imported_JakeC 12-10-2002 11:55 PM

Yes, I'm only using it on one page. Ideally I think I just need to be able to call the Variable that gives us the "Active Users: 3" statement down at the bottom of a stock version of vB. If I can just get that variable (and a few others) to be able to be recognized in the welcome text template I will be golden (until my next roadblock 5 minutes after that :rolleyes: ). This site is sooooo close to going live that it's driving me crazy. I think it's a matter of the old saying in the home built aircraft sport "90% finished, 90% left to go". Thanks a bunch for the help you all are providing to people like me.

JakeC

Brad 12-11-2002 02:34 AM

Ok try this, add this to a new line on phpinclude:

PHP Code:

// start users online
if (strpos($_SERVER['PHP_SELF'], 'index.php') != false)
{
$datecut=time()-$cookietimeout;
$wol_guests=$DB_site->query_first("SELECT COUNT(*) AS count FROM session WHERE userid=0 AND lastactivity>$datecut");
$wol_users=$DB_site->query_first("SELECT COUNT(DISTINCT(userid)) AS count FROM session WHERE session.userid>0 AND session.lastactivity>$datecut");
$wol_guests=$wol_guests[count];
$wol_users=$wol_users[count];
$wol_online=$wol_guests+$wol_users;


Add this where you want the WOL info on index.php

Code:

<smallfont>Active Users: $wol_online ($wol_users member(s),  $wol_guests guest(s))</smallfont>
This add's 2 queries to index.php


All times are GMT. The time now is 07:18 PM.

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.01135 seconds
  • Memory Usage 1,739KB
  • 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_code_printable
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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