ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Moblog upload and image resizing issues

May 19, 2008 8:44am

Subscribe [4]
  • #16 / May 25, 2008 8:23am

    Ingmar

    29245 posts

    Sorry, I don’t quite understand what you’re trying to achieve here. What’s the relationship between Freeform and the Moblog? What’s your ultimate goal?

  • #17 / May 25, 2008 8:50am

    Mark Bowen

    12637 posts

    I’ve followed Mark Bowen’s fabulous code for uploading images to a Weblog via Moblog and I’ve posted my adapted version below:


    First of all thanks for the kind words 😉

    As a quick note on this one though the reason I do this is because I wanted a way to have people able to upload images very very easily using a simple form and wanted it to go straight into a weblog after I had checked everything over. I had real problems with getting the various ways of getting the image uploaded and just the name of the file placed into a field. This way I get exactly what I want.

    I must point out though that the way I am using the code totally over-rides the image part of the moblog and instead Freeform handles the image part uploading the image to the correct directory for me. The textual elements are then handled by the moblog and not the images.

    This would probably most definitely (bad grammar I know 😉 ) be the reason why your moblog isn’t resizing the image for you.

    Just thought I should point that out 😉

    Best wishes,

    Mark

  • #18 / May 25, 2008 9:46am

    Ingmar

    29245 posts

    Mark, thanks for elaborating. It certainly sounds like that is the issue, yes. Jordan, can you confirm?

  • #19 / May 25, 2008 9:01pm

    Jordan Moore

    45 posts

    That sounds spot on Mark, thanks for clearing that up 😊 Your code got me a LOT further than I got before, I had struggled with some of my own thrown together methods!

    Can you guys recommend a possible solution if my goals are as follows…
    -The user must be anonnymous and be able to upload an image
    -The image is posted in a thumbnail gallery linking to the larger image

    Thanks again guys for your help, as you can tell I’m new to EE and would be grateful for the best approach 😊

    Jordan

  • #20 / May 26, 2008 6:07am

    Mark Bowen

    12637 posts

    Well it’s nice and easy this one 😉

    If they are to be anonymous you can simply use the LogMeIn plugin to log users in to a dummy account which will then give them access to any forms that you make. On the other hand as you are using Freeform this doesn’t really matter too much as Freeform is available for all users to fill in no matter what but you could use template access restrictions if you wanted to say send out a link to just certain people. If not then you won’t need the plugin at all as you can just let anyone use the Freeform form.

    If you don’t want to gather information such as their name or e-mail then this is also an option using Freeform. You can make as much or as little of the information required as you wish.

    To then make an image thumbnail, the way I always do it is to use the brilliant Image Sizer plugin so what you will have is your original large uploaded image (as long as it isn’t gigantic that is) and then you have the plugin re-size the image to the smaller thumbnail size automatically for you. Dead easy and you can change the sizes that you send to the plugin at a later date if you wanted say larger or smaller thumbnails and it will re-create new images for you on the spot. You don’t have to do a thing!!

    Definitely would recommend checking that one out.

    One last thing which is really really helpful is the Live Validation javascript which you can place on the form which will ensure that people actually select a file and don’t just come along to the form and submit it without selecting a file first. It obviously can’t check if the file is a correct file but you can at least make sure they have selected one.

    So basically to re-cap you will :

    1 - Have the image uploaded to your server using Freeform.
    2 - The Moblog module will take care of putting the text into your weblog entry and the name of the file will go into a field in the weblog.
    3 - When spitting out the information on the page you will use the standard weblog tag and
    4 - the Image Sizer plugin to automatically create image thumbnails for you.

    Hope that helps.

    Best wishes,

    Mark

  • #21 / May 27, 2008 4:46am

    Jordan Moore

    45 posts

    Mark, thank you so much for your great solution, very descriptive and in relation to my problem, it makes the most sense. I will certianly be implementing this in the site I’m working on. You have been an immense help 😊

    Thank you,

    Jordan

  • #22 / May 27, 2008 5:10am

    Mark Bowen

    12637 posts

    Hi Jordan,

    No problem. If you have any more issues on this one then don’t hesitate to holler across. Using the methods above though should definitely get you what you need though and they are nice and easy to implement.

    Hope it all goes well for you.

    Best wishes,

    Mark

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases