Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 5 of 5
  1. #1
    Senior Member Ferro's Avatar
    Join Date
    Oct 2006
    Location
    UK
    Posts
    386
    Member #
    14204
    Liked
    5 times
    Hi. I'm currently trying to build a site for an artist I know.
    I have made a php script that will insert the thumbnails automatically by reading them out of particular folders, so all that's needed is to dump more pics in the folders, it works fine.

    Two questions :

    1 :
    Each pic is surrounded by an <a> tag with the href being something like "large_pics/" . $file . ".php" so each pic automatically points towards the php page with the large version of that pic on it. For example "large_pics/still_life.php" etc. etc.

    Now if I wanted to just make one page "large_pic.php" and insert the relevant pic in it would be better IMHO - only one page to write, more flexibility, etc. etc.

    How do I pass the info from the thumbnails page to the large_pic page about which pic it is? All I have to send is the variable "$file" from one page to another, so you click on the thumbnail say "still_life" and it opens "large_pic.php" and inserts the "$file" into it (in this case "still_life") in php? I can't find how to do it without using an invisible form, cookies, sessions etc. etc. - I am half thinking about bringing SQL in to do it, which could also store info about pricing, whether the pic is sold or available and so on. Would this be better? How would you do it?

    2 : Layout : Some pics are large and oblong, some are small and square etc. etc. - how would you do the layout for the thumbnails page? At the moment I'm going for the tried and tested "take a square snapshot of a portion of the pic then display as square thumbnail" method - then display using php as pics surrounded by <a> tags - works a treat. However do you think it would be better to try and retain the original shape of each pic? In which case this makes the display all the more complicated, as you can imagine.

    Opinions? Thanks. Hope I explained that properly......

    BTW - please move this thread if it belongs in the php section.

  2.  

  3. #2
    Senior Member
    Join Date
    Apr 2005
    Location
    Hatfield, England
    Posts
    855
    Member #
    9790
    1) I would use an MySQL database if you don't already and give each picture an id. You can then pass that id in the URL. www.site.com/gallery.php?id=1

    If you are not using one www.site.com/gallery.php?photo=blah

    With your script you can then have the function displayOneItem($_GET['photo']);

  4. #3
    Senior Member Ferro's Avatar
    Join Date
    Oct 2006
    Location
    UK
    Posts
    386
    Member #
    14204
    Liked
    5 times
    Excellent stuff Perad, thanks. Edit - just tried the "$GET" thing - worked a treat many thanks. I can bring in SQL now wherever I want, either before or after this stage.

    Anyone got a layout opinion on question no. 2?

  5. #4
    Senior Member
    Join Date
    Apr 2005
    Location
    Hatfield, England
    Posts
    855
    Member #
    9790
    I think you should keep it as squares, you honestly cannot go wrong with it.

    What will introducing shapes give you?

  6. #5
    Senior Member Ferro's Avatar
    Join Date
    Oct 2006
    Location
    UK
    Posts
    386
    Member #
    14204
    Liked
    5 times
    Ah 'tis no big deal really, it's just that it was a mild request from the artist, they just inquired whether it was possible - I suppose because some of the pics are oblong they wanted to get the whole pic in the thumbnail.
    I agree with you though - wherever I look the galleries have squares on them seems to be the norm.

    Thanks very much for your help Perad, appreciate it......


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 11:55 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com