About this topic

  • Posted by deanhodges 2 years ago. There are 7 posts. The latest reply is from deanhodges.
  • This topic is resolved
  1. Hi Byron,

    Aim: To have separate profile galleries in author.php and ONLY upload to their own profile.

    i.e. i can upload to my profile page but if i view another member i cant upload.

    How could this be done?

  2. here is one way i have tried:

    The main overall gallery is called "latest images". This is the 'pool' of everyones contributions.

    Therefore, in peoples profiles i have added

    <?php
    $author_id = get_query_var('author');
    
    if($author_id){
    echo
    do_shortcode("[photosmash gallery_type='contributor' author=" . $author_id . "]");
    }
    ?>

    Which shows their contributions. Perfect. Now how do i let the profile owner upload. i.e.

    if($author_id){
    echo"no_form=false";
    else"no_form=true";
    ?>
  3. because the gallery is 'contributor' can you still add an upload form?
    edit: no you cant

  4. What the latest it, is to display in a separate page a gallery with an upload button using the following

    [photosmash uploadform_visible=true no_gallery=true id=XX]

    However, this doesnt work.

    Can you tell me how i can manipulate the contribution gallery to have an upload modal box like a normal gallery

    Thank you

  5. Done :-)

    Added <?php echo do_shortcode("[photosmash no_gallery=true form=std id=6]");?> above the contribution code

  6. Dean,

    Just read your string...you got it right.

    You can have: "no_form=true" to only display the gallery, or "no_gallery=true" to only display the for. As you figured out for "no_gallery=true", you have to include the form name and a gallery ID. "std" works just fine for getting the standard form. I think anything would work, but you have to supply something or it doesn't attempt to show a form if the gallery is not showing.

    Glad you figured it out!

    BB

  7. Hi Byron, i got the code from another post but it didnt have 'form=std' thats why it wasnt working.

    The only problem by having a seperate upload form is that you cant see the image until you refresh the page. Thats why i was thinking about refresh page on press of done

RSS feed for this topic