WordPress.org

Forums

WP-Activity
[resolved] Double activity (23 posts)

  1. royzzz
    Member
    Posted 3 years ago #

    Hi Dric,

    i use wp-activity and it totally fits what i need :). My compliments. There is one question i want to ask you. Because of my FB login script, it seems my members always login twice. unfortunately they show double up in your plugin. Can you make an option to "GROUP" users so they just show up once, showing their last activity? This would be awesome Dric.

    Thanks for your answer.

    Cheers!

    http://wordpress.org/extend/plugins/wp-activity/

  2. Dric
    Member
    Plugin Author

    Posted 3 years ago #

    I will look at this. Thanks for using my plugin !

  3. Dric
    Member
    Plugin Author

    Posted 3 years ago #

    Hi,
    I wrote a patch that doesn't display the second event login if two of them occur within a minute. Please download http://plugins.svn.wordpress.org/wp-activity/trunk/wp-activity.php v1.3.2 to test it.

  4. royzzz
    Member
    Posted 3 years ago #

    Hi Dric,

    it's running and it works (also for old logins, cool!). But there is one strange thing, whether i choose 5 recent activities it shows 3 and if i choose 10 it shows 5 as a widget and 4 in the page. Before it was working.

    The code i use is: [ACT_STREAM number="10" title=""].

    The widget is at http://www.roypoots.nl (in the middle)

    The page is at http://www.roypoots.nl/member-activity/

    Thanks for your quick responses and fixes. Really appreciate :)

    /ah... i removed the doubles and now it shows 9... i take a look to see whats happening at nr 10

  5. royzzz
    Member
    Posted 3 years ago #

    It seems that new logins arent registered. I will remove everything in the database and try again.

  6. royzzz
    Member
    Posted 3 years ago #

    OK, i emptied the DB (reset DB in your options) and now it shows the first one.

    BUT another issue; the date isnt correct so it does show 2 records cause it's not in the same minut.

    my records:

    1 11/07/0788 13:10:37 David CONNECT
    2 11/07/0777 13:10:37 David CONNECT

    strange year, im afraid i cannot analyse this cause i dont know where this is coming from.

  7. Dric
    Member
    Plugin Author

    Posted 3 years ago #

    I corrected the number of lines displayed bug : the hidden lines were counting on the total lines displayed.

    In fact when a double login occurs, the two lines are stored in DB. And this is masked only in frontend (widget or shortcode), you will continue to see two logs in admin panel.

    This doesn't explain your strange date problem.

    I updated the wp-activity.php. Can you test it ? (same download url as previous)

  8. bobvine38
    Member
    Posted 3 years ago #

    On installation I get code starting thus at the top of my index page:
    .__('Error: No record was found for the license you entered.', 'pbacklinks').'

    '; return $newlicense; } if( $response['content'] == "true") { $options = get_options_fix(); $options["pbl_license"] = $newlicense; update_option("pbl_options", serialize($options)); echo '
    '.__('License has been updated successfully.', 'pbacklinks').'

    '; return $options["pbl_license"]; } else { echo '
    '.__('Error: Comunication error to the license server, please try again.', 'pbacklinks').':

    I cannot find how to uninstall or delete the Plugin with a view to starting again. Are you able to assist please.

  9. Dric
    Member
    Plugin Author

    Posted 3 years ago #

    You just have to delete or rename the wp-activity dir in wp-content/plugins to disable the plugin.

    If it continues after this, then it means that the plugin WP Easy Stats is guilty, not my plugin !

  10. royzzz
    Member
    Posted 3 years ago #

    Yes it works. Thank you :)

    Only problem for me now is the strange date problem. Everytime there is a strange date. like now:

    4341/07/11

    i will uninstall, re-install and update with your php file again to see if the date problem is gone (i guess not :( )

  11. royzzz
    Member
    Posted 3 years ago #

    Re-install didnt work. The update is perfect, but the date is not working for me :(

    I can not put my finger on these strange date's:

    5618/07/11 13:10:38

    (time AND date arent right... he logged in at 14.00)

  12. Dric
    Member
    Plugin Author

    Posted 3 years ago #

    I updated wp-activity.php.

    No code change, just more informations displayed when displaying dates. I hope this will help to find what's going wrong.

  13. royzzz
    Member
    Posted 3 years ago #

    I tried the following:

    changed the date formats in your plugin - didnt help
    changed the date formats in wordpress - didnt help
    reinstall to be sure there is no corrupt data - didnt help.

    does it seem to be just me then? :)

  14. royzzz
    Member
    Posted 3 years ago #

    My recent activity time says:

    time : 11 July 2011 14 h 27 mi - in_seconds : 11 July 7219 13 h 10 mi = diff : 189388800 - gmt_option : 2

    Somewhere it goes wrong :)

  15. Dric
    Member
    Plugin Author

    Posted 3 years ago #

    in_seconds is the login date stored in DB. Could you explore the wp-activity table and look for the act_date column ?
    If the date in DB is wrong too, then the problem occurs when the event login is added in DB.

  16. royzzz
    Member
    Posted 3 years ago #

    Yes, the DB is wrong. Not just shown wrong. Im now looking into the wp-activity.php file.

    Must be something with this line:

    $act_time=mysql2date("Y-m-d H:i:s", time());

  17. royzzz
    Member
    Posted 3 years ago #

    DB:

    id	user_id	act_type	act_date	      act_params
    2	1	CONNECT	        8252-07-11 13:10:38
    3	8	CONNECT	        8255-07-11 13:10:38
  18. Dric
    Member
    Plugin Author

    Posted 3 years ago #

    I think the time() function shows strange results with your hosting.

    time : 11 July 2011 14 h 27 mi

    But this could has been wrong too, it also uses time() !

    I updated once again wp-activity for more debug infos. Could you try it again ?
    You should see the results of time function and mysql2date function.

  19. royzzz
    Member
    Posted 3 years ago #

    I updates, this looks so strange:
    http://www.roypoots.nl/member-activity/

    So the DB says:

    id	user_id	act_type	act_date	act_params
    			1	1	CONNECT	0556-07-11 13:10:39

    but the output doesnt match anymore:

    oy has logged.time function : 1310391181 mysqldate : 1181-07-11 13:10:39 - time : 11 July 2011 15 h 33 mi - in_seconds : 11 July 0556 13 h 10 mi = diff : 19723046400 - gmt_option : 2
    0556/07/11 13:10:39

    When i try:

    $act_time=date('Y-m-d H:i:s');

    and DB:

    2	1	CONNECT	2011-07-11 13:42:12
    			3	8	CONNECT	2011-07-11 13:42:43

    the actual date is in the DB, but not my GMT time.. but getting close!

  20. Dric
    Member
    Plugin Author

    Posted 3 years ago #

    I think I got it !

    I was using mysql2date function, and when carefully reading the WP codex it says that the input shouldn't be the raw timestamp. And that's exactly the mistake I done... :|
    The most strange is that it should have bugged in all hostings...

    I updated (for the last time I hope) wp-activity.php. I changed mysql2date() by date(), and it could solve you problem.

  21. royzzz
    Member
    Posted 3 years ago #

    WOW :) that would be awesome. will be updating by now

    /edit: gives me:

    Date User Event Type
    1 1963/07/11 13:10:39 Roy CONNECT

    $act_time=date('Y-m-d H:i:s'); works for me, but i should take a look at the GMT, maybe that helps? :)

  22. Dric
    Member
    Plugin Author

    Posted 3 years ago #

    Yes, I discovered just after updating that the dates are now stored in UTC.

    I made changes to my script, it will store dates in UTc format, and displays it in GMT format, according to the WP settings.

    Please test the last updated wp-activity.php !

  23. royzzz
    Member
    Posted 3 years ago #

    Woohooo you did it :)

    1 2011/07/11 16:39:14 Roy CONNECT

    You are AWESOME!

    1 2011/07/11 16:39:54 Roy CONNECT
    2 2011/07/11 16:39:14 Roy CONNECT

    Does indeed show the last one! So the double activity is also solved!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic