• I am using a plugin called user-submitted-posts where i have it set up where a registered user can post pictures on my site. What I need help is if a user submits a photo that is originally to large to have it re sized automatically?

    The code they gave me to use is
    <?php post_attachments($size, $beforeUrl, $afterUrl, $numberImages, $postId); ?>

    $size = image size as thumbnail, medium, large or full -> default = full

    How do I do put this together ? Please help

Viewing 3 replies - 1 through 3 (of 3 total)
  • The code they gave

    Have you asked, “they”?

    This code:
    <?php post_attachments($size, $beforeUrl, $afterUrl, $numberImages, $postId); ?>

    is probably the code they want you to put on the page that will display what the user has submitted. You want to place this in the template for that page.

    Have you tried to use this system yet? Create an account at your own site and upload a photo as a user would. It might already resize the image for you. In the plugin options there is most likely a place to set a width and height that you want the images to be scaled down to.

    Thread Starter Gevork

    (@gevork)

    Yes whenever I just put
    <?php post_attachments(); ?> on the content.php template page
    It shows all the images.
    But once I put <?php post_attachments($size, $beforeUrl, $afterUrl, $numberImages, $postId); ?> none of the images show and its all just text.
    In the plugin you have to put in the actually code for it to resize because it doesnt do it on its own.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How Do I close in and where do i put these codes?’ is closed to new replies.