Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Those using RSS feeds showing as permanently online
Avatar
Conrad_Farlow
Sheffield, UK
Member
Free Members
sp_UserOfflineSmall Offline
Apr 14, 2012 - 3:35 pm

This does not appear to be working for me, here is a code excerpt from my sp-db_statistics.php file.

 

function sp_track_online() {

    global $spThisUser, $sfvars;
    
# dont track feed views

    if ($sfvars['pageview'] == 'feed') return;

    if ($spThisUser->member) {

        # it's a member

        $trackUserId = $spThisUser->ID;

        $trackName = $spThisUser->user_login;

    } else {

        # Unknown guest

        $trackUserId = 0;

        $trackName = $spThisUser->ip;

    }
Avatar
Conrad_Farlow
Sheffield, UK
Member
Free Members
sp_UserOfflineSmall Offline
Apr 14, 2012 - 6:56 pm

Bizarrely the user who was showing as permanently logged in due to the RSS feed does appear to have vanished from the stats. Did he perhaps need to log in to the forum?

It seemed to take several hours since I changed the update frequency from 0.25 hrs to 1 hr.

Conrad

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Apr 14, 2012 - 7:39 pm

yes or some time.  the online tracking stuff needs to clear itself out first...

Avatar
Conrad_Farlow
Sheffield, UK
Member
Free Members
sp_UserOfflineSmall Offline
Apr 15, 2012 - 1:02 pm

More weirdness look at the image:

double_entry.pngImage Enlarger

 

 

Mr Kelly (he of the RSS feed) is visible twice. He does occasionally vanish but in a very unpredictable manner. I would have consider this not working properly.

What can we try next?

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Apr 15, 2012 - 2:42 pm

odd. at a loss.  not sure how they could be tracked online twice...  and dont seem able to duplicate... will have to let Andy weight in with some ideas since he knows the track stuff better than I...

Avatar
Conrad_Farlow
Sheffield, UK
Member
Free Members
sp_UserOfflineSmall Offline
Apr 15, 2012 - 6:14 pm

I looked at the database when this occurred. I looked at the db table  _sftrack and in both cases the pageview entry said feed.

Before I made the modification Brian Kelly appeared permanently but now he does occasionally disappear from the stats.

Conrad

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Apr 15, 2012 - 6:24 pm

okay, lets try this... please remove anything in sftrack with pageview of feed...  and see if any come back...

Avatar
Conrad_Farlow
Sheffield, UK
Member
Free Members
sp_UserOfflineSmall Offline
Apr 15, 2012 - 6:35 pm

Did that and after a few minutes there were 2 entries in _sftrack with a page view of feed. One has a trackname of Brian Kelly and the other has a trackname of my IP address, presumably because my mobile device RSS reader is using the same wireless router as this machine. That is not showing in the stats though. I'll unsubscribe and delete them all again.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Apr 15, 2012 - 6:40 pm

then I have to ask, are you sure you made the code change???  in sp-db-statistics.php... near the top of sp-track-online.php:

function sp_track_online() {
    global $spThisUser, $sfvars;

    # dont track feed views
    if ($sfvars['pageview'] == 'feed') return;

because not sure how you would get a track page of feed with that in place...

Avatar
Conrad_Farlow
Sheffield, UK
Member
Free Members
sp_UserOfflineSmall Offline
Apr 15, 2012 - 6:58 pm

That's what I couldn't understand either so I closed down notepad++ which I use for editing and downloaded the file anew  just to make sure.

Guess what?

In notepad++ the file shows the code exactly as you do above but after uploading when I re-opened the file from the server there was a very important carriage return missing at the end of line 4. So the if statement was commented out!

It did this twice by the way, even after I had corrected it, I needed to put a blank line in between lines 4 and 5.

I will have to be very careful of this in the future.

I expect that we won't be having any more problems of this nature.

Conrad

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 649
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 616
Members: 17348
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10118
Posts: 79603