Welcome to Geeklog, Anonymous Wednesday, November 27 2024 @ 08:11 pm EST

Geeklog Forums

Geeklog Usage Stats [GUS] Plugin 1.1.0

Page navigation


Status: offline

asmaloney

Forum User
Full Member
Registered: 02/08/04
Posts: 214

The Geeklog Usage Stats [GUS] plugin collects statistics on who visits your site, what browser and operating system they are using, which pages they view, and which links they are clicking to get there. It allows the administrator to browse these stats through a series of tables, getting right down into the data.

This plugin is based on the stats plugin by Tom Willett and John Hughes. The major difference between the two plugins is the layout of the database. Reports from testers indicate that it requires about half the space in the database and is noticeably faster.

GUS provides a mechanism to import your data from the stats plugin v1.3. Tom tells me it works with data from 1.2 as well.

You can find out more or download it through my geeklog software page.

- Andy Maloney
 Quote

Status: offline

tomw

Forum User
Full Member
Registered: 08/12/02
Posts: 300
This is the new Stats. Andy did a good job of updating it. Installation and updating are smooth.
 Quote

Status: offline

ajzz

Forum User
Regular Poster
Registered: 01/19/05
Posts: 113
Hi Andy,

Great job on the plugin - the site seems to load a bit faster when i turn the older stats plugin off (i hope this is not just me wanting to believe this).

Also there was a fatal error importing data from the older stats (1.3) plugin
Fatal error: Call to undefined function: ob_flush() in public_html/admin/plugins/gus/import.php on line 298


Any ideas?

Thanks,

Ajay
 Quote

Status: offline

asmaloney

Forum User
Full Member
Registered: 02/08/04
Posts: 214
Uh, yeah. From the PHP manual:

ob_flush (PHP 4 >= 4.2.0, PHP 5)

So it'll only work on PHP >= 4.2.0. Oops. You can safely remove all references to ob_flush() in import.php [that's the only place I used it]. This was my attempt to make sure pages didn't time out when doing SQL-intensive things. Since I changed the way things were done during development, they are no longer required anyways and should have been removed.

- Andy Maloney
 Quote

Status: offline

ajzz

Forum User
Regular Poster
Registered: 01/19/05
Posts: 113
Hi Andy,

Good catch! Did as prescribed and it worked as predicted... the data updates went smooth.

Cheers!

Ajay
 Quote

Status: offline

ldfoo

Forum User
Junior
Registered: 05/10/04
Posts: 34
I have an installation error with GUS 1.1.0 under 2 test servers, EasyPHP (PHP4) with GL1.3.10 and XAMPP(PHP5) with 1.3.12cvs. Most likely something I am doing wrong Doh! - that was a mistake

From the installation:
Text Formatted Code
Fatal error: Call to undefined function: plugin_uninstall_amz() in c:easyphpwwwgeekrc3adminpluginsgusinstall.php on line 130

 


From the error log
Text Formatted Code
4/21/2005 10:57:41 AM - Attempting to install the gus plugin
4/21/2005 10:57:41 AM - Attempting to create gus admin group
4/21/2005 10:57:41 AM - ...success
4/21/2005 10:57:41 AM - About to save group_id to vars table for use during uninstall 4/21/2005 10:57:41 AM - ...success
4/21/2005 10:57:41 AM - Adding gus.admin feature
4/21/2005 10:57:41 AM - Success
4/21/2005 10:57:41 AM - Adding gus.admin feature to admin group
4/21/2005 10:57:41 AM - Success
4/21/2005 10:57:41 AM - Adding gus.view feature
4/21/2005 10:57:41 AM - Success
4/21/2005 10:57:41 AM - Adding gus.view feature to admin group
4/21/2005 10:57:41 AM - Success
4/21/2005 10:57:41 AM - 1136: Column count doesn't match value count at row 1. SQL in question:  
 


Any suggestions please?

Thanks
Laurie
 Quote

Status: offline

asmaloney

Forum User
Full Member
Registered: 02/08/04
Posts: 214

(1) As far as I know it will not work with geeklog < 1.3.11. As for 1.3.12cvs, it looks like the blocks table has changed format.


(2) The undefined function is a stupid copy-paste error from my other plugin. Around line 130 of install.php... It should read plugin_uninstall_gus() instead of plugin_uninstall_amz(). It was simply trying to undo the part of the installation already completed when it failed with the error you see in the log.

- Andy Maloney

 Quote

ldfoo

Anonymous
Thanks Andy
 Quote

Status: offline

asmaloney

Forum User
Full Member
Registered: 02/08/04
Posts: 214

With respect to my 2 points above - I have a version of the install.php file which fixes (2) and ldfoo has confirmed works with 1.3.12cvs (1). So if anyone needs this, email me and I'll get it to you. The changes will be in the next version of GUS - I'm not going to do a release for this unless I get swamped with 'but I use CVS' mail.

- Andy Maloney
 Quote

dbsmall

Anonymous
Should I avoid deleting the old "stats" plugin? Or will that kill some of my DB fields that are re-used by GUS?
 Quote

Status: offline

asmaloney

Forum User
Full Member
Registered: 02/08/04
Posts: 214
Quote by dbsmall: Should I avoid deleting the old "stats" plugin? Or will that kill some of my DB fields that are re-used by GUS?


GUS doesn't reuse any tables from stats, it creates its own and copies the data it needs, so it's safe to remove the old stats plugin.

- Andy Maloney
 Quote

python

Anonymous
confused
how do you getgus to use your theme you have set? So it will change the form it generates to the colors listed in the theme? Cus right now it makes it so its to hard to read unless you highlisght the data. please help me with this ASAP.
 Quote

Status: offline

asmaloney

Forum User
Full Member
Registered: 02/08/04
Posts: 214

You can change the template files in the [geeklog_dir]/plugins/gus/templates/ directory. I used pretty much the same templates as the stats plugin.

- Andy Maloney
 Quote

Python

Anonymous
well i been trying that but no luck. ;-(

im trying to use the tempate Foundation from geeklog.net. If you can help me anymore.
 Quote

Status: offline

asmaloney

Forum User
Full Member
Registered: 02/08/04
Posts: 214

What have you tried? You'll have to edit the template files to add the theme-specific CSS classes, graphics, and so on.

Can you show me what it looks like? You can email me and we can look at this off the boards.

- Andy Maloney
 Quote

python

Anonymous
this is table.thtml file code. I will post the Foundation ccs ad the bottem.

Text Formatted Code
<h3> <a href="{ref_url}"><img src="{img_url}" border="0" width=48

height=48></a>  {header}</h3>
<!-- BEGIN TABLE -->
<table width="{width}" border="1" cellspacing="0" cellpadding="5" bordercolor="#0000FF">
<tr style="text-align: center; font-weight: bold; font-size: larger;"><td colspan="{numcols}">{title}</td></tr>
<!-- BEGIN ROW

-->
<tr {rowformat}>
<!-- BEGIN COLUMN -->
<td {colformat}>{starthref}{data}{endhref}</td>
<!-- END

COLUMN -->
</tr>
<!-- END ROW -->
</table>
<!-- END TABLE -->
<p>{google_paging}</p>
{summary}
 


Foundation ccs here
Text Formatted Code
a {





font-family: verdana, tahoma, arial, sans-serif;





font-size: 11px;





color: #000000;











text-decoration : underline;





}











a:visited {





font-family: verdana, tahoma, helvetica, arial, sans-serif;





font-size: 11px;





color: #000000;











text-decoration : underline;





}











a:active {





font-family: verdana, tahoma, helvetica, arial, sans-serif;





font-size: 11px;





color: #000000;











text-decoration : none;





}











a:hover {





font-family: verdana, tahoma, helvetica, arial, sans-serif;





font-size: 11px;





color: #000000;











text-decoration : none;





}





BODY  { color: gray; font-size: 11px; font-family: verdana, tahoma, helvetica, arial, sans-serif; margin: 0 }



TD {





        color: #000000;





        font-size: 11px;





        font-family: verdana, tahoma, helvetica, arial, sans-serif;





     

        }







.commentbar4 {





        color: #000000;





        font-size: 11px;





        font-family: verdana, tahoma, helvetica, arial, sans-serif;





        background-color: #C0C0C0;







        }







H1 {





        color: #FFFFFF;





        font-size: 12px;





        font-family: verdana, tahoma, helvetica, arial, sans-serif;





        }





H2 {





        color: #000000;





        font-size: 11px;





        font-family: verdana, tahoma, helvetica, arial, sans-serif;





        }





H3 {





        color: #000000;





        font-size: 13px;





        font-family: verdana, tahoma, helvetica, arial, sans-serif;





        }





option {





font-family: verdana, tahoma, helvetica, arial, sans-serif;





font-size: 11px;





color: #000000;





}











textarea {





font-family: verdana, tahoma, helvetica, arial, sans-serif;





font-size: 11px;





color: #000000;





}





select {





font-family: verdana, tahoma, helvetica, arial, sans-serif;





font-size: 10px;





color: #000000;





        }











input, submit {





font-family: verdana, tahoma, helvetica, arial, sans-serif;





font-size: 10px;





color: #000000;







       



}







th {







        color: #000000;





        font-size: 12px;





        font-weight: bold;





        font-family: verdana, tahoma, helvetica, arial, sans-serif;





        }







.headertext {





        color: #000000;





        font-weight: bold;





        font-family: verdana, tahoma, helvetica, arial, sans-serif;

}



.featuretext {





        color: #FFFFFF;





        font-weight: bold;





        font-family: verdana, tahoma, helvetica, arial, sans-serif;



}





.navtext {





        color: #000000;





        font-family: verdana, tahoma, helvetica, arial, sans-serif;





}





.blocktitle {





        color: #000000;





        font-size: 11px;





        font-weight: bold;





        font-family: verdana, tahoma, helvetica, arial, sans-serif;





        background-color: #C0C0C0;





        }





.blockinfo {





        color: #000000;





        font-size: 11px;





        font-family: verdana, tahoma, helvetica, arial, sans-serif;





        background-color: #C0C0C0;





        padding-left:4px;





        padding-bottom:2px;





        padding-top:2px;





        }





.msgbar {





        color: #FFFFFF;





        font-size: 11px;





        font-family: verdana, tahoma, helvetica, arial, sans-serif;





        }





.featureblock {





        color: #FFFFFF;





        font-size: 11px;





        font-family: verdana, tahoma, helvetica, arial, sans-serif;





        }





.footer {





        font-size: 11px;





        font-family: verdana, tahoma, helvetica, arial, sans-serif;





        }





.storytitle {





        color: #FFFFFF;





        font-size: 11px;





        font-weight: bold;





        font-family: verdana, tahoma, helvetica, arial, sans-serif;





        }





.storybyline {





        color: #000000;





        font-size: 11px;





        font-family: verdana, tahoma, helvetica, arial, sans-serif;





        }





.storyunderline{





        background-color: #000000;





        }





.warning {





        color: red;





        font-size: 12px;





        font-weight: bold;





        font-family: verdana, tahoma, helvetica, arial, sans-serif;





        }





.warningsmall {





        color: red;





        font-size: 11px;





        font-family: verdana, tahoma, helvetica, arial, sans-serif;





        }





.commentbar1 {





        color: #FFFFFF;





        background-color: #000000;





        font-size: 11px;





        font-family: verdana, tahoma, helvetica, arial, sans-serif;





        }





.commentbar2 {





        background-color: #C0C0C0;





        font-size: 12px;





        font-family: verdana, tahoma, helvetica, arial, sans-serif;





        }





.commentbar3 {





        color: #000000;





        background-color: #C0C0C0;





        font-size: 11px;





        font-family: verdana, tahoma, helvetica, arial, sans-serif;





        }





.commenttitle {





        font-size: 12px;





        font-weight: bold;





        background-color: #C0C0C0;





        font-family: verdana, tahoma, helvetica, arial, sans-serif;





        }





.cal_day {





    font-size: 13px;





    font-weight: bold;





    color: #000000;

       



    }







.cal_body {







    background-color: #C0C0C0;





        font-family: verdana, tahoma, helvetica, arial, sans-serif;





    font-weight: bold;





    color: #000000;    





        border-style: solid solid solid solid;





        border-color: #000000 #000000 #000000 #000000;





    }







.cal_nullday {





    background-color: #EEEEEE;





    color: #000000;





    }





.cal_oldday {





    background-color: #C0C0C0;





    color: #000000;





    }





.cal_month {





    background-color: #C0C0C0;





    color: #000000;





    }











.cal_today {





    background-color: #66A6CE;





    }





.weekview_caltitle {





    background-color: #C0C0C0;





    font-weight: bold;





    font-size: 13px;





        color: #000000;

       



    }





.weekview_curday {





    background-color: #66A6CE;





        color: #000000;

       



    }





.weekview_offday {





    background-color: #C0C0C0;





        color: #000000;

       



    }





.weekview_dayformat {





    font-size: 11px;





    background-color: #C0C0C0;





    color: #000000;





    }





.weekview_addevent {





    font-size: 11px;





    background-color: #C0C0C0;





    color: #000000;





    }





.weekview_daterange {





    font-size: 13px;





    font-weight: bold;





    background-color: #C0C0C0;





    color: #000000;





    }





.dayview_times {





    font-size: 10px;





    background-color: #C0C0C0;





    color: #000000;





        }





.dayview_datecol {





    font-weight: bold;





    background-color: #C0C0C0;





    font-size: 13px;





        color: #000000;

       



    }





.dayview_quickaddtitle {





    font-weight: bold;





    background-color: #C0C0C0;





    font-size: 13px;





        color: #000000;

       



    }












.searchAuth {
    font-weight: normal;
    font-size: 80%;
    font-family: sans-serif;
    text-align: left;  
    color:#557755;
}
.searchDate {
    font-weight: normal;
    font-size: 80%;
    font-family: sans-serif;
    text-align: right;  
    color:#557755;
}
.searchHits {
    font-weight: normal;
    font-size: 80%;
    font-family: sans-serif;
    text-align: right;
    color:#557755;
}
.highlight {
    background-color: yellow;
    text-decoration: none;
}
/******************   NEW CSS ADDED FOR FORUM Ver 2.3 ************************/

TD.navbar      {
    color: #FFFFFF;
    background-color: #666666;
    font-family: Verdana;
    font-size: 10px;
    line-height: 32px;
    verticle-align: middle;
    text-align: center;
    font-weight: bold;
    }

TD.navbar a:link, TD.navbar a:visited {
    color: #FFFFFF;
    font-style: normal;
    font-weight: plain;
    font-size: 10px;
    font-family: Verdana, sans-serif;
    text-decoration: none;
    padding: 2px
    }

TD.navbar a:hover {
    color: #FFCC00;
    font-style: normal;
    font-weight: plain;
    font-size: 10px;
    font-family: Verdana, sans-serif;
    text-decoration: none;
    padding: 2px;
    }

#forumheading          { text-align:left; background-color: #FFFFFF; }
.forumtext             { color: #CCCCCC; }
.forumclass1           { text-align:left; background-color: #BFBFBF; }
.forumclass2           { text-align:left; background-color: #CCCCCC; }
.forumclass3           { text-align:left; background-color: #EFEFEF; }
.forumclass4           { text-align:left; background-color: #CCCCCC; }
.forumoutline          { background-color: #CCCCCC; }

/* These CSS declarations for links are used in a few places but are here for theme designers to use if needed - can be added to templates  */
.forumlinks A:link            { color: #CCCCCC; font-style: normal; font-size: 11px; font-family: Verdana, sans-serif; text-decoration: underline }
.forumlinks A:visited        { color: #999999; font-style: normal; font-size: 11px; font-family: Verdana, sans-serif; text-decoration: underline }
.forumlinks A:hover            { color: #CCCCCC; font-style: normal; font-size: 11px; font-family: Verdana, sans-serif; text-decoration: underline }

/* alternate table row colours */
.forumAlt1   { background-color: #F5F5F5; }
.forumAlt2   { background-color: #FFFFFF; }

.quotebox   {
     border-style: ridge;
     background-color: #ECE9D8;
     padding:10px;
     margin: 0px;
     }

.quotetext {
     color:#000;
     font-weight: plain;
     background-color: #ECE9D8;
     font-family: Verdana;
     font-size: 9px;
     }

.forumCode  {
    background-color: #ECE9D8;
    color: #000;
    width: 470px;
    height: 160px;
    overflow: auto;
    font-size: 11px;
    min-height: 50px;
    max-height: 120px;
    margin: 5px, 0px,5px,5px;
    padding:5px;
    border: 1px dashed black;
    }

.forumTitle   {
    color: #CCCCCC;
    background-color: #EFEFEF;
    font-weight: bold;
    font-size: 12px;
    line-height: 14pt;
    font-family: Verdana, Helvetica, sans-serif; }

TD.forumRollOver  {
    text-align:left;
    background-color: #FFFFFF;
    font-family: Verdana, Helvetica, sans-serif;
    color: #000033  
    }
TD.forumRollOut   {
    text-align:left;
    background-color: #EFEFEF;
    font-family: Verdana, Helvetica, sans-serif;
    color: #000033  
    }

.cblockTitle    {
    color: #FFFFFF;
    background-color: #506790;
    font-weight: bold;
    font-size: 12px;
    line-height: 16pt;
    padding-left:5px;
    font-family: Verdana, Helvetica, sans-serif;
}
 

the style sheet is kinda ugly looking , but i dont have to to tity it up. So i leaving it has it was from the download.
 Quote

Status: offline

asmaloney

Forum User
Full Member
Registered: 02/08/04
Posts: 214

table.thtml hasn't been changed - again, what did you try?

And again - take this to email...

- Andy Maloney
 Quote

Status: offline

Martinez

Forum User
Newbie
Registered: 10/19/04
Posts: 7
Location:Poland - Zakopane
Hi.
I've made some code modifications, to make more privacy enabled by Admin.
This modifications are made in phpblock_gusstats() function in functions.inc file, and new var added in config.php of the GUS plugin.

Modified function code:
Text Formatted Code
/*
* Stats block to show whos online now, # visitors today, registered today, new today, referers today
*
* @return   string  formatted html for block
*/
function phpblock_gusstats()
{
    global $_USER, $_CONF, $_TABLES, $LANG01, $LANG_GUS00,
                $_GUS_fullname, $_GUS_online, $_GUS_daily, $_GUS_reg, $_GUS_new, $_GUS_refs, $_GUS_max_referrers;
       
    // Code borrowed from lib-common.php
   
    if( empty( $_USER['uid'] ) OR $_USER['uid'] == 1 )
    {
        // The following code handles anonymous users so they show up properly
        DB_query( "DELETE FROM {$_TABLES['sessions']} WHERE remote_ip = '{$_SERVER['REMOTE_ADDR']}' AND uid = 1" );
        // Build a useless sess_id (needed for insert to work properly)
        mt_srand(( double )microtime() * 1000000 );
        $sess_id = mt_rand();
        $curtime = time();
        // Insert anonymous user session
        DB_query( "INSERT INTO {$_TABLES['sessions']} (sess_id, start_time, remote_ip, uid)
                                VALUES ($sess_id,$curtime,'{$_SERVER['REMOTE_ADDR']}',1)" );
    }

    $expire_time = time() - $_CONF['whosonline_threshold'];
   
    // Clear out any expired sessions
    DB_query( "DELETE FROM {$_TABLES['sessions']} WHERE uid = 1 AND start_time < " . $expire_time );

    // Code adapted from whose online block
    $num_anon = 0;
    $num_reg = 0;

    if ( $_GUS_online )
        {        
        $result = DB_query( "SELECT DISTINCT {$_TABLES['sessions']}.uid, username, fullname, photo, showonline
                        FROM {$_TABLES['sessions']},{$_TABLES['users']},{$_TABLES['userprefs']}
                        WHERE {$_TABLES['sessions']}.uid <> 1
                                AND {$_TABLES['users']}.uid = {$_TABLES['sessions']}.uid
                                AND {$_TABLES['users']}.uid = {$_TABLES['userprefs']}.uid
                                AND start_time >= $expire_time
                        ORDER BY username" );

        $rows_retval = '';
        while ( $row = DB_fetchArray( $result, false ) )
        {
            if ( $row['showonline'] == 1 )
            {
                $rows_retval .= '<a href="' . $_CONF['site_url'] . '/users.php?mode=profile&uid=' . $row['uid'] . '">';
               
                if ( $_GUS_fullname && !empty( $row['fullname'] ) )
                    $rows_retval .= $row['fullname'];
                else
                    $rows_retval .= $row['username'];

                $rows_retval .= '</a>';
               
                if ( ($_CONF['allow_user_photo'] == 1) && !empty( $row['photo'] ) )
                {
                   $rows_retval .= ' <a href="' . $_CONF['site_url']
                                . '/users.php?mode=profile&uid=' . $A['uid']
                                . '"><img src="' . $_CONF['layout_url']
                                . '/images/smallcamera.gif" border="0" alt=""></a>';
                }
                $rows_retval .= '<br>';
                $num_reg++;
            }
            else
            {
                $num_anon++;
            }
        }
        $result = DB_query( "SELECT COUNT( DISTINCT uid, remote_ip ) AS nonames FROM {$_TABLES['sessions']} WHERE uid = 1" );
    }
        else
        {
        $result = DB_query( "SELECT COUNT( DISTINCT uid, remote_ip ) AS nonames FROM {$_TABLES['sessions']}" );
    }
       
    $row = DB_fetchArray( $result, false );
    $num_anon += $row['nonames'];
    if (( $_GUS_reg2anon == false ) && ( empty( $_USER['uid'] ) || ( $_USER['uid'] == 1 )) )
    {
         if ( $num_reg > 0 )
         {
               $rows_retval = $LANG01[112] . ': ' . $num_reg . '<br>';
         }
         else
         {
               $rows_retval = '';
         }
    }
    $retval = "<table width='90%'><tr><td width='20%'><hr></td>
                                <td nowrap>{$LANG_GUS00['online']}</td>
                        <td width='60%'><hr></td></tr></table>";
    $retval .= $rows_retval;

    if ( $num_anon > 0 )
    {
        if ( $_GUS_online )
            $retval .= $LANG01[41];
        else
            $retval .= $LANG01[17];

        $retval .= ': ' . $num_anon . '<br>';
    }
       
    if ( $_GUS_daily )
        {
        $retval .= "<table width='90%'><tr><td width='20%'><hr></td>
                                <td nowrap>{$LANG_GUS00['stats']}</td>
                                <td width='60%'><hr></td></tr></table>";
               
        $result = DB_query( "SELECT COUNT(*) AS pages FROM {$_TABLES['gus_userstats']} WHERE date = CURRENT_DATE()" );
        $row = DB_fetchArray( $result, false );
        $retval .= $row['pages'] . ' ' . $LANG_GUS00['page_title'] . '<br>';
               
        $result = DB_query( "SELECT COUNT( DISTINCT ip ) AS visitors FROM {$_TABLES['gus_userstats']} WHERE date = CURRENT_DATE()" );
        $row = DB_fetchArray( $result, false );
        $retval .= $row['visitors'] . ' ' . $LANG_GUS00['unique_visitors'] . '<br>';
    }
       
    if ( $_GUS_reg )
    {
        $result = DB_query( "SELECT DISTINCT uid FROM {$_TABLES['gus_userstats']} WHERE uid > 1 AND date = CURRENT_DATE()" );
        $result2 = DB_query( "SELECT DISTINCT uid FROM {$_TABLES['gus_userstats']} WHERE uid <= 1 AND date = CURRENT_DATE()" );
        $num_visitors = DB_numRows($result);
        $num_anon_visitors = DB_numRows($result2);
        $retval .= "<table width='90%'><tr><td width='20%'><hr></td>
                           <td nowrap>{$LANG_GUS00['reg_users']}</td>
                            <td width='60%'><hr></td></tr></table>";

        $visitors_table = '';
        // Now, we have to build the $visitors_table, to display values of our search
        while ( $row = DB_fetchArray( $result, false ) )
        {
            // let see, if it is reg-user, or anon, but $_GUS_reg2anon feature is disabled
            // so we decide, which portion of information is to display.
            if ( ( $_GUS_reg2anon == true ) || ( $_USER['uid'] > 1 ) )
            {
               $rec = DB_query( "SELECT uid, username, fullname, photo FROM {$_TABLES['users']} WHERE uid = '" . $row['uid'] . "' LIMIT 1" );
               $A = DB_fetchArray( $rec, false );
               $visitors_table .= '<a href="' . $_CONF['site_url'] . '/users.php?mode=profile&uid=' . $A['uid'] . '">';
               if ( $_GUS_fullname && !empty( $A['fullname'] ) )
                   $visitors_table .= $A['fullname'];
               else
                   $visitors_table .= $A['username'];
               $visitors_table .= '</a>';
               if ( ($_CONF['allow_user_photo'] == 1) && !empty( $A['photo'] ) )
               {
                     $visitors_table .= ' <a href="' . $_CONF['site_url'] . '/users.php?mode=profile&uid=' . $A['uid'] . '">';
                     $visitors_table .= '<img src="' . $_CONF['site_url'] . '/gus/images/user_photo.gif" width=16 height=12 border="0" alt=""></a>';
                }
                $visitors_table .= '<br>';
            }
            // if not an registered user and feature $_GUS_reg2anon is set to false we destroy $visitors_table
            // because admin doesn't want to display usernames to anon-users, so we display a smaller portion of info.
            else
            {
                 if ( $num_visitors > 0 )
                     $visitors_table = $LANG_GUS00['registered'] . ': ' . $num_visitors . '<br>';
                 else
                     $visitors_table = '';
            }
        }
    $retval .= $visitors_table;
    }
       
    if ( $_GUS_new )
        {
                $result = DB_query( "SELECT uid, username, fullname, photo FROM {$_TABLES['users']}
                                                                WHERE regdate >= DATE_SUB( CURRENT_DATE(), INTERVAL 1 DAY )" );

                $header_output = false;
               
                while ( $row = DB_fetchArray( $result, false ) )
                {
                        if ( !$header_output )
                        {
                                $retval .= "<table width='90%'><tr><td width='20%'><hr></td>
                                                        <td nowrap>{$LANG_GUS00['new_users']}</td>
                                                        <td width='60%'><hr></td></tr></table>";
                               
                                $header_output = true;
                        }
                       
                        $retval .= '<a href="' . $_CONF['site_url'] . '/users.php?mode=profile&uid=' . $row['uid'] . '">';
                       
                        if ( $_GUS_fullname && !empty( $row['fullname'] ) )
                                $retval .= $row['fullname'];
                        else
                                $retval .= $row['username'];
                       
                        $retval .= '</a>';
                       
                        if ( ($_CONF['allow_user_photo'] == 1) && !empty( $row['photo'] ) )
                        {
                                $retval .= ' <a href="' . $_CONF['site_url'] . '/users.php?mode=profile&uid=' . $row['uid'] . '">';
                                $retval .= '<img src="' . $_CONF['site_url'] . '/gus/images/user_photo.gif" width=16 height=12 border="0" alt=""></a>';
                        }
                       
                        $retval .= '<br>';
                }
    }
       
    if ( $_GUS_refs )
        {
                $encoded_site_url = GUS_getEncodedSiteURL();
               
                $result = DB_query( "SELECT referer FROM {$_TABLES['gus_userstats']}
                                                        WHERE referer <> ''
                                                                AND date = CURRENT_DATE()
                                                                AND referer NOT LIKE '{$encoded_site_url}%'" );

                $header_output = false;
               
                while ( $row = DB_fetchArray( $result, false ) )
                {                      
                        if ( !$header_output )
                        {
                                $retval .= "<table width='90%'><tr><td width='20%'><hr></td>
                                        <td nowrap>{$LANG_GUS00['referers']}</td>
                                        <td width='60%'><hr></td></tr></table>";
                               
                                $header_output = true;
                        }
                       
                        $referrer = urldecode( $row['referer'] );
            $url = parse_url( $referrer );
         
            if ( $url['host'] != '' )
            {
                                $host = preg_replace( '/^www./', '', $url['host'], 1 );
                               
                                if ( $host != '' )
                                {
                                        $ref["$host"] += 1;
                                        $refurl["$host"] = preg_replace( '/admin/plugins.*$/', '', $referrer, 1 );
                                }
            }
        }
               
        if ( is_array($ref) )
                {
            arsort( $ref );
            $i = 0;
           
            foreach ( $ref as $key => $value )
                        {
                $retval .= '<a href="' . $refurl["$key"] . '">' . $key . '</a> - ' . $value . '<br>';
                               
                                $i++;
               
                if ( $i >= $_GUS_max_referrers )
                        break;
            }
        }
    }
       
    return $retval;
}

 


New var needed to set in config.php: $_GUS_reg2anon (bool type - true or false).

Also You need a new entry in $LANG_GUS00 array provided in langfile. New entry is:
Text Formatted Code
  'registered' => 'Registered'
 


In the output, you becomes more privacy of Your users (nicknames are not shown to anon users - only sumarized stats are shown, as in original geeklog's who's on-line block).

Please, be free of using this code Smile and enjoy it!
 Quote

Blank page with gus install

Anonymous
I'm using the latest GUS, v1.2.0 (gus_1.2.0_1.3.11.tar.gz.tgz) and created the directories per any plugin and per the readme for Gus. Went to install and got a blank page.

I looked at the error log and all it said was, "attempting to install gus..." and stops there. The database tables were added. Of course, because it wasn't installed, I couldn't do as suggested to uninstall using the admin plugin manager. So, I dropped my database and used my backup.

I would really love to use this plugin. Any ideas what to try next? Thanks
 Quote

Status: offline

barrywong

Forum User
Regular Poster
Registered: 04/12/02
Posts: 95
Hi Andy

I submitted a comment on Geeklog but found this forum later. Thought I should use this forum instead.

I am using Geeklog 1.3.11 with GUS 1.2.0 and using Redhat 7.3 with PHP4.1.2.

I installed GUS and commend you for the easy of installation and the speed of the plugin. It appears faster than VStats. I also love the format. I do have one comment though.

I notice that some members have signed in, but their accounts have not been logged by GUS. I am wondering if anyone else have encountered this problem on your site.

These specific users are not not listed on the ignored list (IP or Users Ingnore list). In fact, I have removed the list of IPs under Ignore IP Addresses and users under Ignore Users.

Any thoughts or comments what I could be doing wrong?

Thanks
 Quote

Page navigation

All times are EST. The time is now 08:11 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content