if ($visitor['user_id'] != $response->params['user']['user_id'] && !$lastView || $lastView['view_date'] < ($xenOptions->adprofileviews_cooldownPeriod * 3600))
if ($visitor['user_id'] != $response->params['user']['user_id'] && !$lastView || $lastView['view_date'] < ((XenForo_Application::$time - $xenOptions->adprofileviews_cooldownPeriod * 3600)))
It took me some hours to find out that the user permission "Can View Profile Views" does not do what it says ^^
Activated or not, the member is able to see the profile views. But as long as it's not activated the profile views will not be counted !
And a suggestion for a possible future version of this add-on:
same styling for the "Last x visitors" like it's used for the follower blocks.
Currently it looks a bit out of place.
in library\Audentio\ProfileViews\Proxy\XenForo\ControllerPublic\Member.php
This will always be "false", because the view_date is a UNIX timestamp and will never be smaller than x hours cool down period * 3600![]()
A 'ORDER BY pView.view_date LIMIT 1' is also missing in the function 'getLastViewForUserByVisitor'.
Assorted bugfixes and enhancements
Nice, but still no actual time included to calculate the difference between last and current visit.Oops! Good catch. I've also tweaked this conditional and wrapped the
!$lastView || $lastView['view_date'] < ($xenOptions->adprofileviews_cooldownPeriod * 3600 in another set of parenthesis
LinkedIn drives traffic back to their site by periodically (one a week, from what I can tell) sending their members an e-mail stating "X number of people have looked at your profile this week! Click here to see who & update your profile"
Mysqli statement execute error : Duplicate column name 'adprofileviews'
Zend_Db_Statement_Mysqli->_execute() in Zend/Db/Statement.php at line 297
Zend_Db_Statement->execute() in Zend/Db/Adapter/Abstract.php at line 479
Zend_Db_Adapter_Abstract->query() in Audentio/ProfileViews/Listener/Install.php at line 17
Audentio_ProfileViews_Listener_Install::install()
call_user_func() in XenForo/Model/AddOn.php at line 215
XenForo_Model_AddOn->installAddOnXml() in ConvEss/Model/AddOn.php at line 24
ConvEss_Model_AddOn->installAddOnXml() in XenForo/Model/AddOn.php at line 169
XenForo_Model_AddOn->installAddOnXmlFromFile() in XenForo/ControllerAdmin/AddOn.php at line 237
XenForo_ControllerAdmin_AddOn->actionUpgrade() in XenForo/FrontController.php at line 347
XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
XenForo_FrontController->run() in /var/www/vhosts/wweforums.net/httpdocs/admin.php at line 13
BUT: Why does every Profile Visit trigger a new profile history entry in the admin CP? We have profiles with 10k+ visits..
Server Error
Mysqli statement execute error : Duplicate column name 'adprofileviews'
Zend_Db_Statement_Mysqli->_execute() in Zend/Db/Statement.php at line 317
Zend_Db_Statement->execute() in Zend/Db/Adapter/Abstract.php at line 479
Zend_Db_Adapter_Abstract->query() in Audentio/ProfileViews/Listener/Install.php at line 17
Audentio_ProfileViews_Listener_Install::install()
Error trying to upgrade @Jake B.
Code:Mysqli statement execute error : Duplicate column name 'adprofileviews' Zend_Db_Statement_Mysqli->_execute() in Zend/Db/Statement.php at line 297 Zend_Db_Statement->execute() in Zend/Db/Adapter/Abstract.php at line 479 Zend_Db_Adapter_Abstract->query() in Audentio/ProfileViews/Listener/Install.php at line 17 Audentio_ProfileViews_Listener_Install::install() call_user_func() in XenForo/Model/AddOn.php at line 215 XenForo_Model_AddOn->installAddOnXml() in ConvEss/Model/AddOn.php at line 24 ConvEss_Model_AddOn->installAddOnXml() in XenForo/Model/AddOn.php at line 169 XenForo_Model_AddOn->installAddOnXmlFromFile() in XenForo/ControllerAdmin/AddOn.php at line 237 XenForo_ControllerAdmin_AddOn->actionUpgrade() in XenForo/FrontController.php at line 347 XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134 XenForo_FrontController->run() in /var/www/vhosts/wweforums.net/httpdocs/admin.php at line 13
@Audentio Design @Jake B.Nice, but still no actual time included to calculate the difference between last and current visit.
Let's assume, I visited a profile page Sep 01st, 8am UTC (timestamp: 1441094400) and the cool down period is set with 12 hours.
With the current code ( (!$lastView || $lastView['view_date'] < ($xenOptions->adprofileviews_cooldownPeriod * 3600)) ) it would be:
(!$lastView || 1441094400 < (12 * 3600))
12 * 3600 = 43200 <-- far, far away from 1441094400
A second profile visit will never be counted.
Unfortunatelly there is also no fix for the problem in 'getLastVisitorsForUser'![]()
How do I change the sidebar header text to something like "Recent Visitors"? I've tried searching that particular phrase in the templates/phrases, but I'm not quite sure where to change it? It was like this upon installation.
![]()
Or maybe this is actually a bug. Not sure. No one else seems to have had this issue.
@Jake B. @Mike Creuzer
Where's this fix at? I've taken a look over on Audentio, but haven't seen any updated .zip files. Maybe I'm missing where you were trying to tell me it's at?We've uploaded a fix for this to our shop over at audentio.com.
Jake
Where's this fix at? I've taken a look over on Audentio, but haven't seen any updated .zip files. Maybe I'm missing where you were trying to tell me it's at?
We use essential cookies to make this site work, and optional cookies to enhance your experience.