public function __construct(array $config = array(), Zend_Cache_Core $cache = null, Zend_Db_Adapter_Abstract $db = null)
{
if (empty($config['admin']))
{
$defaultConfig = array(
'table' => 'xf_session',
'cacheName' => 'session',
'cookie' => 'session',
'lifetime' => 3600
);
}
else
{
$defaultConfig = array(
'table' => 'xf_session_admin',
'cacheName' => 'session_admin',
'cookie' => 'session_admin',
'lifetime' => (XenForo_Application::debugMode() ? 86400 : 3600) // longer lifetime in debug mode to get in the way less
);
unset($config['admin']);
}
Cockies delete when you close brouser or when time left. I test on my forum. Can You give link to you forum?Thanks Akinak
I already change ( 'lifetime' => 3600) and (max value) that @Jarod suggested to somthing different and it didnt work out, its more complicated
what I meant from this post is the number of members and guests OnLine Now is limited by xenforo code to 60 minutes currently, what I want is increase it to 240 minutes for example to show more members and guests OnLine Now
http://xenforo.com/community/threads/xen-tr-who-has-visited.29350/
M. b. You need this?
return $sessionModel->getSessionActivityQuickList(
$visitor->toArray(),
array('cutOff' => array('>', $sessionModel->getOnlineStatusTimeout())),
($visitor['user_id'] ? $visitor->toArray() : null)
);
/**
* Returns the length of time after the last recorded activity that a user is considered 'online'
*
* @return integer Time in seconds
*/
public function getOnlineStatusTimeout()
{
return XenForo_Application::$time - XenForo_Application::get('options')->onlineStatusTimeout * 60;
}
Hello,
Enable debug mode :
Code:$config['debug'] = true;
and edit "max value"
When visitor visiting your site, and clicked any link on your site, Its should be consider 'Online' and It recorded into xf_sesseation_activity. And xenForo called 'Online' by
So simple Addon should be overidden this function:PHP:return $sessionModel->getSessionActivityQuickList( $visitor->toArray(), array('cutOff' => array('>', $sessionModel->getOnlineStatusTimeout())), ($visitor['user_id'] ? $visitor->toArray() : null) );
Or you can edit such asCode:/** * Returns the length of time after the last recorded activity that a user is considered 'online' * * @return integer Time in seconds */ public function getOnlineStatusTimeout() { return XenForo_Application::$time - XenForo_Application::get('options')->onlineStatusTimeout * 60; }
this code delete old records from table session_activity.// delete expired session activities
$sessionModel = XenForo_Model::create('XenForo_Model_Session');
$sessionCleanUpCutOff = XenForo_Application::$time - 3600;
$sessionModel->updateUserLastActivityFromSessions();
$sessionModel->deleteSessionActivityOlderThanCutOff($sessionCleanUpCutOff);
No big deal here.
The problem occurred in the understanding of what you want.
I decided that I need time to logout. And there was a block "Users Online"
It should be avaible soonNo need to create block "Users Online", the block is already existed by defualt
It should be avaible soon
I will take sometime to create it
We use essential cookies to make this site work, and optional cookies to enhance your experience.