Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Wordpress has tons of mature code for image editing on the admin side, but I would like to provide a form inside of a custom page template for my visitors to drag and drop, crop and save a thumbnail image as part of a new draft post. I can do the page template, form, and draft post part, but am getting pretty frustrated trying to integrate the plupload, jcrop and gd library parts. I can do bits and pieces using each of those libraries but can't get them to play nice and it's getting way too complicated for me.

Then it hit me: WordPress can do all that magic stuff on the admin side already (having "bundled" those common libraries), so if I can leverage those wp core functions from the front-end, I will be done. Can anyone give me an example or two on how to use those wp core media functions from inside a user-facing page template?

Please see my similar post on wp.org

share|improve this question
    
Please include examples of what you have already tried and point out more specific challenges you need to resolve. Asking for someone to start from scratch and provide you with full working example can be a little overly broad and rarely gets good answers. –  Rarst Mar 1 '13 at 17:01
    
Thanks for the suggestion Rarst. I'm pretty good at dissecting other working examples so the answer below from @whatsthebigidea is very helpful. With that said, since I posted this 2 months ago, I have made great strides and actually have a working wordpress page template that does almost everything I need. The two key things I was missing was the realization that those javascript libs must be literally enqueued on the user-facing page that I intend to use them, and just experience on the mechanics of sending data between javascript and php by means of ajax and json. –  Ron Mar 2 '13 at 14:27
    
Ok, just going through the questions. Would you like to post your solution as an answer so others can benefit or can I close the question since it's no longer relevant in this form? –  Rarst Mar 2 '13 at 15:27
    
I did ... I hope correctly. –  Ron Mar 2 '13 at 20:55
add comment

2 Answers 2

up vote 0 down vote accepted

The two key things I was missing was the realization that those javascript libs must be literally enqueued on the user-facing page that I intend to use them, and just experience on the mechanics of sending data between javascript and php by means of ajax and json.

share|improve this answer
add comment

There are several drag and drop WordPress themes, plugins and frameworks available. Maybe you could pick apart http://wordpress.org/extend/themes/presswork

share|improve this answer
    
Please provide more information in your answer –  bungeshea Jan 2 '13 at 3:11
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.