tecvoid
Forum Replies Created
-
Forum: Plugins
In reply to: [blueimp lightbox] Gallery Support?i have done all the site work so far, and im not scared of taking on new projects, but this looks like it would take to long to figure out, i do appreciate the reply though, if there is any chance you will make the plugin compatible with the gallery with a built in function please update me, i guess ill go back to the original gallery because i need the cycle function.
Forum: Plugins
In reply to: [WP eCommerce] spam users in wp_users after wpsc upgradei installed the beta tester, but it pulls code from git hub, which is great, i just dont know how to apply the anon user only fix.
is the beta tester pretty stable? is it possible it has another flaw i will have to struggle with instead?
is anyone using the beta tester??
could you please leave some comments the people who are beta testing, that would be great.Forum: Plugins
In reply to: [WP eCommerce] spam users in wp_users after wpsc upgradeis anyone using the beta tester plugin successfully as a fix?
is there other issues that then need addressed by using the plugin?general question, looking for user feedback. ill try it in the next few days and let people know.
Forum: Plugins
In reply to: [WP eCommerce] spam users in wp_users after wpsc upgradei am still having to delete the anonymous user data with php code, why is this thread practically dead?
does anyone have an eta on when they might update this? am i wrong, when i updated, the anonymous user link disappeared but the users are still stacking up
Forum: Plugins
In reply to: [WP eCommerce] spam users in wp_users after wpsc upgradeHere is the code that finally deletes my users.
<?php
// Remove users and meta data.
function fix_wpsc_clear_customer_meta() {
global $wpdb;
require_once( ABSPATH . ‘wp-admin/includes/user.php’ );
$purge_count = 200;
$sql = “
SELECT user_id
FROM {$wpdb->usermeta}
WHERE
meta_key = ‘_wpsc_last_active’
LIMIT {$purge_count}
“;
// Do this in batches of 200 to avoid memory issues when there are too many
// anonymous users.
@set_time_limit( 0 ); // no time limit
do {
$ids = $wpdb->get_col( $sql );
$included_ids = array();
foreach ( $ids as $id ) {
$included_ids[$id] = $id;
}
$in = implode(‘,’, $included_ids);
$wpdb->query( “DELETE FROM $wpdb->users WHERE ID IN ($in)” );
$wpdb->query(“DELETE FROM $wpdb->usermeta WHERE user_id IN ($in)”);
} while ( count( $ids ) == $purge_count );
// Update number of users.
update_option( ‘user_count’, count_users() );
}// Modify action hook for WP e-Commerce automated task.
function fix_reset_wpsc_cron() {
remove_action( ‘wpsc_hourly_cron_task’, ‘_wpsc_clear_customer_meta’ );
add_action( ‘wpsc_hourly_cron_task’, ‘fix_wpsc_clear_customer_meta’ );
}// Do reset.
add_action( ‘wpsc_init’, ‘fix_reset_wpsc_cron’ );
fix_wpsc_clear_customer_meta();
?>i actually have to remove
AND meta_value < NOW() – ” . WPSC_CUSTOMER_DATA_EXPIRATION . “
if i dont remove that line, i dont think that it returns any values to delete.
im sorry if i kinda took over for a minute here, ill quiet down now that i have code i can run for just a couple seconds it seems to delete my anon users.
if anyone can point out why i should not let it run without that customer expiration line please let me know.
Forum: Plugins
In reply to: [WP eCommerce] spam users in wp_users after wpsc upgradeThanks for your response @litemotiv
i got the anon users deleted but im not quite sure when i got it to work.
i will recap my steps for anyone reading and is at a lower skill level
first went to the functions.php file and added the following to the end:
/** part of temp fix, can be deleted later */
define( ‘WPSC_CUSTOMER_DATA_EXPIRATION’, 3.5 * 3600 );then i used cpanel file browser to create a folder inside /wp-content
called it mu-plugins
open that folder and create a file anon-delete.php
edited that blank file to contain this whole code with the <?php thats not mentioned<?php
// Remove users and meta data.
function fix_wpsc_clear_customer_meta() {
global $wpdb;
require_once( ABSPATH . ‘wp-admin/includes/user.php’ );
$purge_count = 200;
$sql = “
SELECT user_id
FROM {$wpdb->usermeta}
WHERE
meta_key = ‘_wpsc_last_active’
AND meta_value < NOW() – ” . WPSC_CUSTOMER_DATA_EXPIRATION . “
LIMIT {$purge_count}
“;
// Do this in batches of 200 to avoid memory issues when there are too many
// anonymous users.
@set_time_limit( 0 ); // no time limit
do {
$ids = $wpdb->get_col( $sql );
$included_ids = array();
foreach ( $ids as $id ) {
$included_ids[$id] = $id;
}
$in = implode(‘,’, $included_ids);
$wpdb->query( “DELETE FROM $wpdb->users WHERE ID IN ($in)” );
$wpdb->query(“DELETE FROM $wpdb->usermeta WHERE user_id IN ($in)”);
} while ( count( $ids ) == $purge_count );
// Update number of users.
update_option( ‘user_count’, count_users() );
}// Modify action hook for WP e-Commerce automated task.
function fix_reset_wpsc_cron() {
remove_action( ‘wpsc_hourly_cron_task’, ‘_wpsc_clear_customer_meta’ );
add_action( ‘wpsc_hourly_cron_task’, ‘fix_wpsc_clear_customer_meta’ );
}// Do reset.
add_action( ‘wpsc_init’, ‘fix_reset_wpsc_cron’ );
?>Here is where i got lost about when it kicked in because i was reloading the anon users page and the user count was not going down, so you might have to change the code. the changes i tried were:
NOW()
to
UNIX_TIMESTAMP()
and
UNIX_TIMESTAMP(NOW())update_option( ‘user_count’, count_users() );
was
update_option( ‘user_count’, count_users()[‘total_users’] );as @litemotive mentioned, i added
fix_wpsc_clear_customer_meta();
at the end so it looked like
// Do reset.
add_action( ‘wpsc_init’, ‘fix_reset_wpsc_cron’ );
fix_wpsc_clear_customer_meta();
?>i was basicly changing the code and loading non-cached pages, so it will take more testing to see which code will work automaticall, but maybe this is a better explanantion for those currently working on the problem.
Forum: Plugins
In reply to: [WP eCommerce] spam users in wp_users after wpsc upgradehere is the code that doesnt seem to have any errors, but it doesnt seem to be removing any anon users, im not sure what to try next, i used the NOW () command also, im just loading pages on my site hoping this is supposed to be activating the deletion, im getting a better idea of whats going on i guess i just need the right code.
<?php
// Remove users and meta data.
function fix_wpsc_clear_customer_meta() {
global $wpdb;
require_once( ABSPATH . ‘wp-admin/includes/user.php’ );
$purge_count = 200;
$sql = “
SELECT user_id
FROM {$wpdb->usermeta}
WHERE
meta_key = ‘_wpsc_last_active’
AND meta_value < UNIX_TIMESTAMP() – ” . WPSC_CUSTOMER_DATA_EXPIRATION . “
LIMIT {$purge_count}
“;
// Do this in batches of 200 to avoid memory issues when there are too many
// anonymous users.
@set_time_limit( 0 ); // no time limit
do {
$ids = $wpdb->get_col( $sql );
$included_ids = array();
foreach ( $ids as $id ) {
$included_ids[$id] = $id;
}
$in = implode(‘,’, $included_ids);
$wpdb->query( “DELETE FROM $wpdb->users WHERE ID IN ($in)” );
$wpdb->query(“DELETE FROM $wpdb->usermeta WHERE user_id IN ($in)”);
} while ( count( $ids ) == $purge_count );
// Update number of users.
update_option( ‘user_count’, count_users() );
}// Modify action hook for WP e-Commerce automated task.
function fix_reset_wpsc_cron() {
remove_action( ‘wpsc_hourly_cron_task’, ‘_wpsc_clear_customer_meta’ );
add_action( ‘wpsc_hourly_cron_task’, ‘fix_wpsc_clear_customer_meta’ );
}// Do reset.
add_action( ‘wpsc_init’, ‘fix_reset_wpsc_cron’ );
?>Forum: Plugins
In reply to: [WP eCommerce] spam users in wp_users after wpsc upgradei did what you said, i called my file anon-delete.php and im getting the folling error
Remove users and meta data. function fix_wpsc_clear_customer_meta() { global $wpdb; require_once( ABSPATH . ‘wp-admin/includes/user.php’ ); $purge_count = 200; $sql = ” SELECT user_id FROM {$wpdb->usermeta} WHERE meta_key = ‘_wpsc_last_active’ AND meta_value < UNIX_TIMESTAMP() – ” . WPSC_CUSTOMER_DATA_EXPIRATION . ” LIMIT {$purge_count} “; // Do this in batches of 200 to avoid memory issues when there are too many // anonymous users. @set_time_limit( 0 ); // no time limit do { $ids = $wpdb->get_col( $sql ); $included_ids = array(); foreach ( $ids as $id ) { $included_ids[$id] = $id; } $in = implode(‘,’, $included_ids); $wpdb->query( “DELETE FROM $wpdb->users WHERE ID IN ($in)” ); $wpdb->query(“DELETE FROM $wpdb->usermeta WHERE user_id IN ($in)”); } while ( count( $ids ) == $purge_count ); // Update number of users. update_option( ‘user_count’, count_users()[‘total_users’] ); } // Modify action hook for WP e-Commerce automated task. function fix_reset_wpsc_cron() { remove_action( ‘wpsc_hourly_cron_task’, ‘_wpsc_clear_customer_meta’ ); add_action( ‘wpsc_hourly_cron_task’, ‘fix_wpsc_clear_customer_meta’ ); } // Do reset. add_action( ‘wpsc_init’, ‘fix_reset_wpsc_cron’ );
Warning: session_start() [function.session-start]: Cannot send session cache limiter – headers already sent (output started at /home3/revenge1/public_html/a1decals.com/wp-content/mu-plugins/anon-delete.php:14) in /home3/revenge1/public_html/a1decals.com/wp-content/plugins/wp-e-commerce/wpsc-core/wpsc-constants.php on line 17whats weird is this prints on the webpage then the content loads over it.
Forum: Plugins
In reply to: [WP eCommerce] spam users in wp_users after wpsc upgradei tried adding the code to my functions.php and keep breaking the site.
ive tried changing the time code to now, ive tried including it inside the ending }
including it outside
including it outside with a closing }im ok at inserting code but this is a headache considering that the same code doesnt work on different production servers.
// Remove users and meta data. function fix_wpsc_clear_customer_meta() { global $wpdb; require_once( ABSPATH . 'wp-admin/includes/user.php' ); $purge_count = 200; $sql = " SELECT user_id FROM {$wpdb->usermeta} WHERE meta_key = '_wpsc_last_active' AND meta_value < UNIX_TIMESTAMP() - " . WPSC_CUSTOMER_DATA_EXPIRATION . " LIMIT {$purge_count} "; // Do this in batches of 200 to avoid memory issues when there are too many // anonymous users. @set_time_limit( 0 ); // no time limit do { $ids = $wpdb->get_col( $sql ); $included_ids = array(); foreach ( $ids as $id ) { $included_ids[$id] = $id; } $in = implode(',', $included_ids); $wpdb->query( "DELETE FROM $wpdb->users WHERE ID IN ($in)" ); $wpdb->query("DELETE FROM $wpdb->usermeta WHERE user_id IN ($in)"); } while ( count( $ids ) == $purge_count ); // Update number of users. update_option( 'user_count', count_users()['total_users'] ); } // Modify action hook for WP e-Commerce automated task. function fix_reset_wpsc_cron() { remove_action( 'wpsc_hourly_cron_task', '_wpsc_clear_customer_meta' ); add_action( 'wpsc_hourly_cron_task', 'fix_wpsc_clear_customer_meta' ); } // Do reset. add_action( 'wpsc_init', 'fix_reset_wpsc_cron' );@ddt i hate to beg, but could you post once more the final code for a medium skill person you used? and touch on how you trigger the call/fix event?
one last question, im avoiding upgrading to version 3.8.13.3 from version 3.8.13.1, will i need to have the latest broken version to fix?
god what an awful mess
Forum: Plugins
In reply to: [WP eCommerce] spam users in wp_users after wpsc upgradeits too bad someone cant turn the fix into a plugin.
im going to try implementing that fix from page 4 and see what happens.Forum: Plugins
In reply to: [WP eCommerce] spam users in wp_users after wpsc upgradei read 3 pages and im still not sure what the best fix is.
hostgator is pressuring me to do something for some reason, and im not sure if i should roll back wpec, and if so, how far.or if i should upgrade to newest and put the line in the functions.php
what are you guys doing in the meantime?
Forum: Plugins
In reply to: [WP e-Commerce Dynamic Gallery] Can't get this plugin to workhey guys-
i have a fix for you!
go to
http://ww.wp.xz.cn/plugins/wp-e-commerce-dynamic-gallery/developers/
and download version 1.1.3make sure you set all the gallery and thumbnail heights and widths and now it works!!!!
i am googling around right now trying to find out if this is fixable.
like above, you can like but it doesnt give you an option to comment and it doesnt show on facebook as a like.
Forum: Plugins
In reply to: [WP Minify] Does it work with CDN?id like to know as well. it doesnt seeem to minify with maxcdn
Forum: Plugins
In reply to: [WP eCommerce] Google Product Feed Stopped Working /possible fixThanks Lee