Time Spent Online

Time Spent Online [Paid] 2.0.6

No permission to buy ($10.00)

Yugensoft

Well-known member
Yugensoft submitted a new resource:

Time Spent Online - Show the total time members have used your forum

If you like this add-on, please >> rate it <<

Description

Record members' total time spent online, and add it to their member profiles.

Features
  • Profile. Show member's total time online on their account profile.
  • Permissions.
    • Set who can view it.
  • User option. Members can select if they want it shown (same way as for...
Read more about this resource...
 

Nirjonadda

Well-known member
@Yugensoft Please can add option globally can enable/disable Show member's total time online on profile and Permit members to hide total time online?

 

Nirjonadda

Well-known member
@Yugensoft Getting Server error log.

Code:
XF\Db\Exception: MySQL query error [1690]: BIGINT UNSIGNED value is out of range in '(1518083848 - `nadda_forumdata`.`u`.`true_last_activity`)' src/XF/Db/AbstractStatement.php:212

Generated by: Sibli sadik Feb 8, 2018 at 3:57 PM

Stack trace

                UPDATE xf_user AS u
                SET u.time_spent=u.time_spent +
                    if(u.true_last_activity,
                      if((1518083848 - u.true_last_activity) < 1518082951,
                        (1518083848 - u.true_last_activity),
                        0
                      ),
                      0
                    ),
                u.true_last_activity=1518083848
                WHERE u.user_id=21019
            
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL query err...', 1690, '22003')
#1 src/XF/Db/Mysqli/Statement.php(77): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1690, '22003')
#2 src/XF/Db/AbstractAdapter.php(79): XF\Db\Mysqli\Statement->execute()
#3 src/addons/Yugensoft/TimeSpentOnline/XF/Repository/SessionActivity.php(23): XF\Db\AbstractAdapter->query('\n              ...')
#4 src/XF/Pub/Controller/AbstractController.php(65): Yugensoft\TimeSpentOnline\XF\Repository\SessionActivity->updateSessionActivity(21019, '103.96.36.10', 'XF\\Pub\\Controll...', 'List', Array, 'valid', '')
#5 src/XF/Pub/Controller/AbstractController.php(40): XF\Pub\Controller\AbstractController->updateSessionActivity('List', Object(XF\Mvc\ParameterBag), Object(XF\Mvc\Reply\View))
#6 src/XF/Mvc/Controller.php(270): XF\Pub\Controller\AbstractController->postDispatchType('List', Object(XF\Mvc\ParameterBag), Object(XF\Mvc\Reply\View))
#7 src/XF/Mvc/Dispatcher.php(271): XF\Mvc\Controller->postDispatch('List', Object(XF\Mvc\ParameterBag), Object(XF\Mvc\Reply\View))
#8 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('XF\\Pub\\Controll...', 'List', 'html', Object(XF\Mvc\ParameterBag), 'forums', Object(SV\RedisCache\XF\Pub\Controller\Forum), Object(XF\Mvc\Reply\Reroute))
#9 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#10 src/XF/App.php(1889): XF\Mvc\Dispatcher->run()
#11 src/XF.php(328): XF\App->run()
#12 index.php(13): XF::runApp('XF\\Pub\\App')
#13 {main}

Request state

array(4) {
  ["url"] => string(1) "/"
  ["referrer"] => string(90) "/account-confirmation/sibli-sadik.21019/email?c=I17n4RMZeGIzVC28"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(0) {
  }
}
 

Yugensoft

Well-known member
Also why Dispatch date are empty?
Not sure, perhaps that field only applies to "dispatched products", but this product doesn't need shipping (it's digital).
Where the option "Time online" in Message user info elements?
Good question, should be there, I'll take a look at it.
Getting Server error log.
Might be an interaction with the RedisCache add-on:
#8 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('XF\\Pub\\Controll...', 'List', 'html', Object(XF\Mvc\ParameterBag), 'forums', Object(SV\RedisCache\XF\Pub\Controller\Forum), Object(XF\Mvc\Reply\Reroute))

So I'll also take a look at that.
 

Xon

Well-known member
Might be an interaction with the RedisCache add-on:
#8 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('XF\\Pub\\Controll...', 'List', 'html', Object(XF\Mvc\ParameterBag), 'forums', Object(SV\RedisCache\XF\Pub\Controller\Forum), Object(XF\Mvc\Reply\Reroute))

So I'll also take a look at that.
It would be if((1518083848 - u.true_last_activity) < 1518082951 type of SQL.

IIRC this need something like cast(u.true_last_activity as signed), as MySQL gets surprisingly strict when mixing signed vs unsigned values.
 
Top