Hi,
Does anyone know if it's possible to add a separate Image upload field to NewsPublisher, instead of using the RTE to upload a new image.
I'm trying to get it so a few of us can add blogs from our phones, but the TinyMCE doesn't work so well on phones.
I basically need 3 fields - Title, Image, Content - I have Title and Content working fine, I could also upload images from TinyMCE but it's difficult on the phone. I need to add a third field which would be a simple file input, I can then select an image from my phone and upload it and add it to the content.
Is there a way of doing this in NewsPublisher or do I need to go further?
Thanks,
John
You could try creating individual TV's for each field (using a File or Image TV for the file and text TVs for the other fields). Then you could have a NewsPublisher page with just those fields in the &show property.
I'm not sure the NewsPublisher File/Image browser would work on a phone either but it's worth a try.
Hi Bob,
Thanks for your reply.
I set up a TV to handle the Image upload but as you suspected it's still not very mobile friendly. Is there something I can do with media sources so that instead of opening up the modX filebrowser it automatically opens up the storage on the users device? Do you think I'd be better using something like Formit in conjunction with NewsPublisher?
Kind Regards.
The FileUpload snippet should go directly to the users device, though I think you'd have to make some modifications to get the extra fields.
You might try one of the MODX Gallery extras, they should do the same thing and give you the extra fields and even some image processing if you like.
If you were going to go to FormIt, I'd skip using NewsPublisher and just use a FormIt postHook to embed the photo in a resource.
I wouldn't recommend altering the NewsPublisher PHP code.
Have you tried the FileUpload snippet to see how that works on a phone?
You might also try having the users upload the images to a public service like Flickr, Picassa, Instagram, or something similar (your account or theirs). Then you could have a plain text TV with the URL of the photo.
You just put a tag for it on a page with (optionally) properties in the tag to control it:
http://bobsguides.com/fileupload-tutorial.html
Hi Bob,
Thanks for the reply.
Is it possible to use FileUpload in conjunction with Newspublisher and embed an image within a post?
The other guys who use the site want it all to be done within that site rather than using a 3rd party site like flikr or photobucket e.t.c. To recap I need to use the Newpublisher add on to create a new Article Post (this works a treat) but need to embed an image into the Article Post using FileUpload.
If anyone can help with this, there is a budget available.
Cheers.
Quote from: jonboy at Oct 28, 2013, 05:33 AM
Is it possible to use FileUpload in conjunction with Newspublisher and embed an image within a post?
I've never tried it. It should be possible to put a tag for FileUpload in the content of the NewsPublisher Resource, but the image wouldn't be associated with the saved page unless you write a plugin to connect it somehow (e.g., write the image path to one of the page's TVs). I think OnDocFormSave will be fired so a plugin attached to that might work.
BTW, you might try Discuss. It might have image-upload capability and could be phone friendly.