6

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

4
  • 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, 2013 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, 2013 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, 2013 at 15:27
  • I did ... I hope correctly.
    – Ron
    Mar 2, 2013 at 20:55

2 Answers 2

1

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

1
  • Please provide more information in your answer
    – shea
    Jan 2, 2013 at 3:11
0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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