vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Who Was Online Today on forums (https://vborg.vbsupport.ru/showthread.php?t=59579)

Asterik 01-03-2004 05:18 PM

it has the exact same text *bad grammar* as Chroder's one

Princeton 01-03-2004 05:32 PM

some errors ...
this
Code:

<a href="member.php?s=$session[sessionhash]&action=getinfo&userid=$userid" title="Last online at $lastactivetime">$username</a>$invisibleuser
should be
Code:

<a href="member.php?s=$session[sessionhash]&amp;action=getinfo&amp;userid=$userid" title="Last online at $lastactivetime">$username</a>$invisibleuser
I would also recommend using vb phrases (add new ones)
Also, add template names to $globaltemplates array

MGM 01-03-2004 05:33 PM

thanks Gary!!

MGM out

sabret00the 01-03-2004 05:39 PM

you gonna make one for the WOL?

Zelda-King 01-03-2004 05:44 PM

Mods and admins don't show in formatted text (bold/italic).

Princeton 01-03-2004 08:23 PM

Quote:

Originally Posted by Zelda-King
Mods and admins don't show in formatted text (bold/italic).

try (not tested)
Replace
Code:

        if ($todayuser['usergroupid'] == 6 and $highlightadmin) {
                $username = "<b><i>$todayuser[username]</i></b>";
        } else if (($mod["$userid"] or $todayuser['usergroupid'] == 5) and $highlightadmin) {
                $username = "<b>$todayuser[username]</b>";
        } else {
                $username = $todayuser['username'];
        }

with
Code:

$username = fetch_musername($todayuser);

Zelda-King 01-03-2004 08:38 PM

That did the trick, thanks! :)

amykhar 01-03-2004 09:07 PM

Invisible users show for all and not just admins. The fix is as follows:

Find:
PHP Code:

$todayusers=$DB_site->query("SELECT userid, username, usergroupid, lastactivity FROM ".TABLE_PREFIX."user 
                            WHERE lastactivity > " 
. (mktime(0,0,0,date("m"),date("d"),date("Y")) + (($bbuserinfo['timezoneoffset']-$timeoffset)*3600)) . 
                            ORDER BY username"
);
while (
$todayuser=$DB_site->fetch_array($todayusers)) {
    
$numbertodayonline++;
    
$invisibleuser '';
    
$userid $todayuser['userid'];
    
$lastactivetime vbdate($vboptions['timeformat'], $todayuser[lastactivity]);
    if (
$todayuser['invisible']==1) and ($bbuserinfo['usergroupid']!=6) {
        
$numbertodayonlineinvisible++;
        continue;
    }
    if (
$todayuser['invisible']==1) { // Invisible User but show to Admin
        
$invisibleuser '*';
    } 

Replace with:
PHP Code:

$todayusers=$DB_site->query("SELECT userid,(user.options & $_USEROPTIONS[invisible]) AS invisible, username, usergroupid, lastactivity FROM ".TABLE_PREFIX."user 
                            WHERE lastactivity > " 
. (mktime(0,0,0,date("m"),date("d"),date("Y")) + (($bbuserinfo['timezoneoffset']-$timeoffset)*3600)) . 
                            ORDER BY username"
);
while (
$todayuser=$DB_site->fetch_array($todayusers)) {
    
$numbertodayonline++;
    
$invisibleuser '';
    
$userid $todayuser['userid'];
    
$lastactivetime vbdate($vboptions['timeformat'], $todayuser[lastactivity]);
    if ((
$todayuser['invisible']) and ($bbuserinfo['usergroupid']!=6)) {
        
$numbertodayonlineinvisible++;
        continue;
    }
    if ((
$todayuser['invisible']) and ($bbuserinfo['usergroupid']==6)) { // Invisible User but show to Admin
        
$invisibleuser '*';
    } 


-----------
In case my copying and pasting are screwy, what needs to be fixed is the query. It needs to check the options field in the table. invisible was a vb2 field and isn't in vb3. It also needs to change the if statements because invisible will not equal 1. It just won't equal zero.

I also moved the templates to the cache on my board, but didn't bother with the phrases. Things seem to be working ok now.

Amy

amykhar 01-03-2004 09:22 PM

Another glitch. This one in the forumhome_todayloggedinusers template.

Find:
Code:

Number of Active Users Today: $numbertodayonline</b></div>
Replace with:

Code:

Number of Active Users Today: $todayonline</b></div>

uae 01-04-2004 05:15 AM

Thanks Gary ...


All times are GMT. The time now is 04:09 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.01371 seconds
  • Memory Usage 1,761KB
  • 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
  • (6)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (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