thijmen994
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: date_created_gmt not working for xmlrpcResolved it myself
Yes, I want to arrange them for different pages or posts. 🙂
Just some information why i need it:
My application is made in a way that users don’t have to go to their WordPress site to publish. So using the NGG’s Gallery Management is no option for me.ngg.deleteImage doesn’t work it doesn’t delete the saved image(native image) from your hard-drive. ngg.deleteImage is only deleting database connections to the files.
And ngg.deleteGallery, this is only deleting the gallery in the database.
nobody?
The difference between the manual delete and the XMLRPC delete is that the code at the bottom of this post is not in the XMLRPC call. so in the XMLRPC delete_gallery call only the database rows get deleted.
The code that takes care of this in the manual delete of a gallery:
$gallery = nggdb::find_gallery($id); if ($gallery){ $imagelist = $wpdb->get_col("SELECT filename FROM $wpdb->nggpictures WHERE galleryid = '$gallery->gid' "); if ($ngg->options['deleteImg']) { if (is_array($imagelist)) { foreach ($imagelist as $filename{ @unlink(WINABSPATH . $gallery->path . '/thumbs/thumbs_' . $filename); @unlink(WINABSPATH . $gallery->path .'/'. $filename); @unlink(WINABSPATH . $gallery->path .'/'. $filename . '_backup'); } } // delete folder @rmdir( WINABSPATH . $gallery->path . '/thumbs' ); @rmdir( WINABSPATH . $gallery->path ); } } do_action('ngg_delete_gallery', $id); $deleted = nggdb::delete_gallery( $id );Update: Deleting one by one with the XMLRPC also doesn’t delete the image source