George Stephanis
Forum Replies Created
-
Forum: Hacks
In reply to: MySQL internals related to WordPress 3 POSTINGNo files are modified, just the DB. For the changes that happen, have you considered backuping up your DB, then making a post, then backing it up again? If you delete all the areas where they are the same, you should be able to spot the changes easily.
Forum: Hacks
In reply to: Threats of 'blitzing my sites'By ‘blitz’ he likely just means he’s gonna try and spam you with a lot of hits and lag your server out. Install wp-super-cache and fuhgeddaboutit.
Forum: Hacks
In reply to: Simple $wpdb-> questionThat’s not actually making a table, all it’s doing is storing the -name- of the table in the class.
You don’t seem to have too much experience with SQL syntax, perhaps you should bone up on a primer. Here’s a good one — http://www.w3schools.com/web/web_sql.asp
Have you actually made the table in the database yet? And the previous poster is right … you need to always always always declare $wpdb to be global before doing anything with it, whether it’s saving a value in it or doing operations.
Forum: Hacks
In reply to: How to get a post in draft status from its slug?function get_post_id_from_slug( $slug ) { global $wpdb; return $wpdb->get_var( "SELECT ID FROM $wpdb->posts WHERE post_name = '".$wpdb->escape( $slug )."' LIMIT 1" ); }
then just …
$post = &get_posts( array( 'include' => (int) get_post_id_from_slug( $slug ), 'post_type' => 'any', 'post_status' => 'any' ) );
should do it, no?
Just pushed up the fix, it should be released in the next few minutes when the WP.org mothership checks the repository.
Thanks for the heads up!
Oh balls, you’re right.
I added a new table in a version or two back, and it seems that for some reason the function that I had setting up the table for it doesn’t run unless the plugin is actually uninstalled then reinstalled, which would clear out your data anyways.
I’ll push up a fix in about ten minutes or so.
Not as of yet, I’ve been more focusing on getting the functionality fleshed out.
I wouldn’t call this a proper release yet, as it’s still in active development (new releases getting pushed every day or two) I just released it now to get some feedback and bug reports as I wrap up the rest. In the next month, when it’s in a more-or-less finished state, I’ll set up a demo and screenshots.
Yeah, I accidentally released the code a day before I meant to, so I didn’t have the readme file together. It’s up now, though.