RR_80
Forum Replies Created
-
Forum: Plugins
In reply to: [Download Manager] Problem with Dashboard Loading in the Latest VersionIt is strange, I installed the plugin update but the problem occurred not instantly. I’m not shure what you are displaying in the dashboard widget but I suppose that you take the content from remote access. This content might be corrupt. However, it is also possibly that my provider did some changes on the server during that time and these possible changes are the responsible for the problems (I do not have full access on my server, just FTP).
By the way: the widged on the dashboard is anoying. I know, you want to share your commercials. But this is visible for all users. Please do not display this widget for normal subscribers, they wont buy anything from you.
Forum: Plugins
In reply to: [Download Manager] Problem with Dashboard Loading in the Latest VersionSame Problem. This is very critical. I had to deactivate the plugin. If you do not have quick solution, I am forced to deinstall the plugin.
I have the latest WordPress version installed (3.8.1, stable).
Thank you in advance.
better:
function loginlog_active() { $current_user = wp_get_current_user(); $current_user_id = $current_user->ID; $user_nicename = urlencode($current_user->user_nicename); if (isset($current_user_id) && $current_user_id > 0) { global $wpdb; $query_LastLogin = "SELECT TIMESTAMPDIFF(MINUTE, MAX(wp_simple_history.date), NOW()) AS lastLogin FROM wp_simple_history WHERE (action = 'logged in' AND user_id = '$current_user_id');"; $lastLogin = $wpdb->get_results($query_LastLogin); if (isset($lastLogin[0]->lastLogin) && $lastLogin[0]->lastLogin >= (3.0*60.0)) { simple_history_add("action=logged in&object_type=user&object_id=$current_user_id&object_name=$user_nicename"); } } }I tried to solve the problem as the following:
function __construct() { ... add_action('init', 'loginlog_active'); ... }function loginlog_active() { $current_user = wp_get_current_user(); $current_user_id = $current_user->ID; $user_nicename = urlencode($current_user->user_nicename); if (isset($current_user_id) && $current_user_id > 0) { global $wpdb; $query_LastLogin = "SELECT (NOW() - MAX(wp_simple_history.date)) / 86400 AS lastLogin FROM wp_simple_history WHERE (action = 'logged in' AND user_id = '$current_user_id');"; $lastLogin = $wpdb->get_results($query_LastLogin); if (isset($lastLogin[0]->lastLogin) && $lastLogin[0]->lastLogin >= 3.0) { simple_history_add("action=logged in&object_type=user&object_id=$current_user_id&object_name=$user_nicename"); } } }Every time the user ist active, the function test if the last login is older than 3 hours. If yes, an new Login-entry will be createt.