Title: codecks's Replies | WordPress.org

---

# codecks

  [  ](https://wordpress.org/support/users/codecks/)

 *   [Profile](https://wordpress.org/support/users/codecks/)
 *   [Topics Started](https://wordpress.org/support/users/codecks/topics/)
 *   [Replies Created](https://wordpress.org/support/users/codecks/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/codecks/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/codecks/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/codecks/engagements/)
 *   [Favorites](https://wordpress.org/support/users/codecks/favorites/)

 Search replies:

## Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Dropzone] Create new post after upload](https://wordpress.org/support/topic/create-new-post-after-upload/)
 *  Thread Starter [codecks](https://wordpress.org/support/users/codecks/)
 * (@codecks)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/create-new-post-after-upload/#post-11050056)
 * Hey Nazmul,
 * Thank you so much, this is working!
 * Is there a way to pass the `response.data` (url of the photo) as an argument 
   to the fotoblog() function? I’m looking online on how to do this but currently
   this way above my level of understanding.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Upload image and create blog post from the front-end](https://wordpress.org/support/topic/upload-image-and-create-blog-post-from-the-front-end/)
 *  Thread Starter [codecks](https://wordpress.org/support/users/codecks/)
 * (@codecks)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/upload-image-and-create-blog-post-from-the-front-end/#post-11049612)
 * Thanks t-p,
 * I’m taking the dropzone related questions further on the dedicated support forum.
   
   Thanks for your suggestion Joy, also for your answer on wp-dropzone support forum.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WP Dropzone] Create new post after upload](https://wordpress.org/support/topic/create-new-post-after-upload/)
 *  Thread Starter [codecks](https://wordpress.org/support/users/codecks/)
 * (@codecks)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/create-new-post-after-upload/#post-11049595)
 * Thanks for your reply Joy. I’ve been trying to use the callback to trigger the
   post creation but with no success so far.
 * Basically what I have been doing is to create a custom-page template where I 
   inserted the `do_shortcode` funtion to display the wp-dropzone form. The form
   works, and I’m able to upload files to the media library. The code looks like
   this:
 *     ```
       add_action('genesis_before_entry_content', 'dropit');
       function dropit()
       {
           echo do_shortcode('[wp-dropzone callback="success: function(file, response){ 
           console.log(response) }" desc="Drop your images here"]');
       }
       ```
   
 * You can see the callback has a success event. So, on success it executes what’s
   inside. The content now `function(file, response){ console.log(response) }` is
   simply the example from the plugin instructions page. I’m not sure what I should
   replace it with so it triggers function to create a blog post.
 * The function to create a blog post looks like this. It currently resides inside
   my custom page template, but I’m not sure if this is the good location, maybe
   functions.php would be a better location?
 *     ```
       add_action( 'wp_ajax_fotoblog', 'fotoblog' );
       function fotoblog()
       {
           $post = array(
           'post_title'    => 'My Title',
           'post_content'  => 'My Content',
           'post_status'   => 'publish',
           'post_type'     => 'post'
           );
           wp_insert_post($post);
           wp_die();
       }
       ```
   
 * What I’m failing to grasp is the relationsship between the callback and the function
   to create a blog post. Of what I have been reading so far, I think I should create
   a javascript function that triggers the wp_ajax hook so it fires the post creation,
   but I might be wrong in my understanding of that?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Media Tags] Retrieve media-tag from url](https://wordpress.org/support/topic/retrieve-media-tag-from-url/)
 *  Thread Starter [codecks](https://wordpress.org/support/users/codecks/)
 * (@codecks)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/retrieve-media-tag-from-url/#post-3335821)
 * it seems the function get_mediatags() will do the trick.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Plugin: NextGEN Gallery] Can’t generate thumbnails](https://wordpress.org/support/topic/plugin-nextgen-gallery-cant-generate-thumbnails/)
 *  [codecks](https://wordpress.org/support/users/codecks/)
 * (@codecks)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-cant-generate-thumbnails/page/4/#post-983296)
 * I had the same kind of problems. I deleted the whole db using the setup function,
   removed the pluging and reinstalled everything from scratch. It works like a 
   charm now.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [[Plugin: NextGEN Gallery] Plugin will not create thumbnails](https://wordpress.org/support/topic/plugin-nextgen-gallery-plugin-will-not-create-thumbnails/)
 *  [codecks](https://wordpress.org/support/users/codecks/)
 * (@codecks)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-plugin-will-not-create-thumbnails/#post-1027634)
 * It doesn’t work for me too.
 * Server Settings:
    * Operating System : Linux * Server : Apache/2.0.59 (Unix) 
   mod_ssl/2.0.59 OpenSSL/0.9.8g * Memory usage : 10.7 MByte * MYSQL Version : 5.0.44-
   log * SQL Mode : Not set * PHP Version : 5.2.5-pl1-gentoo * PHP Safe Mode : Off*
   PHP Allow URL fopen : On * PHP Memory Limit : 32M * PHP Max Upload Size : 2M *
   PHP Max Post Size : 8M * PHP Max Script Execute Time : 30s * PHP Exif support:
   Yes ( V1.4 ) * PHP IPTC support : Yes * PHP XML support : Yes
 * GD Library:
    * GD Version : bundled (2.0.34 compatible) * FreeType Support : 
   Yes * FreeType Linkage : with freetype * T1Lib Support : No * GIF Read Support:
   Yes * GIF Create Support : Yes * JPG Support : Yes * PNG Support : Yes * WBMP
   Support : Yes * XPM Support : Yes * XBM Support : Yes * JIS-mapped Japanese Font
   Support : No
 * Tried with smaller images, same problem.

Viewing 6 replies - 1 through 6 (of 6 total)