How Do I close in and where do i put these codes? (4 posts)

  1. Gevork
    Posted 3 years ago #

    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

  2. kmessinger
    Forum Moderator
    Posted 3 years ago #

    The code they gave

    Have you asked, "they"?

  3. kLunKr
    Posted 3 years ago #

    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.

  4. Gevork
    Posted 3 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.