About this topic

  • Posted by claytonnarcis 2 years ago. There are 5 posts. The latest reply is from claytonnarcis.
  • This topic is not resolved
  1. Evening,

    I need the upload form to only be shown in only 1 page but i can't seem to get it work.

    I've tried :-
    - <?php do_shortcode('[photosmash form]');?>
    - <?php do_shortcode('[photosmash id=14 form=std]');?>
    - <?php do_shortcode('[photosmash id=14 form_alone]');?>

    And a couple more variation.

    The page i'm coding does not call the_post or the_content functions.

    But however, if i were to put through the page editor(from the admin page), it'll appear and works like magic.

    I checked your codes, and it's fine until it returns to wordpress add_shortcode function, after that it's not displaying anything at all. I'm dumbfounded.

    Any help would be appreciated.

    Btw, nice plugin.

    regards,
    clayton

  2. funny.

    it only works if i put echo in front of do_shortcode. shouldn't automatically gets printed out?

  3. I'm not sure whether it's a bug or not but i'll share my experience here.

    After solving the problem up there, the submit button won't work at all and it's not because of jquery loaded twice.

    The real culprit here was the 'Add Photo' shortcode was in the <form> tags, remove the form tags, and all was working again.

    Looks like that's the only work around , if you guys know of any. Feel free to share.

  4. Hi claytonnarcis,

    Yes, echo was the magic trick for the first issue. The reason for that is that shortcodes within the_content return the content, which is then echoed by the_content. So, you have to echo it. I didn't know that until I started researching your problem...then saw that you'd already figured it out ;-)

    The second one is due to the fact that PhotoSmash sets up its form within <form> tags. If you're putting the shortcode within another set of form tags, then you've got a form nested within a form, which I don't think will work. The PhotoSmash upload form uses the jquery.form.js plugin so that it can get the image to upload. That plugin requires the form tags. If were just straight Ajax without an Ajax form submission, you could get away without using the form tags.

    Thanks for sharing back what you've learned!!

    Cheers,
    BB

  5. No problem, i should say thank you for creating this awesome plugin.

    Btw, any chance of sharing how do i change the js script for uploading files? Planning to use this Fancy Uploader - http://digitarald.de/project/fancyupload/

RSS feed for this topic