Create a shortable Gallery |
[eluser]Lykos22[/eluser]
Hi, I'd like some help please. I've 2 tables: Code: Images I'm just looking for some guidelines in order to create a shortable Gallery like this example (please go to : Portfolio > Portfolio - columns with filter > and choose an option). I can't figure out though how to develop this. Do I need to have a 'fixed' query, something like: Code: SELECT `images`.* , `categories`.`category_name` FROM `images` LEFT JOIN `categories` ON `images`.`category_id` = `categories`.`category_id`
[eluser]InsiteFX[/eluser]
You would need a filter check to see how many columns the user wanted then a for loop to loop through the columns. Code: if ($filter_count % 3)
[eluser]Lykos22[/eluser]
[quote author="InsiteFX" date="1394454807"]You would need a filter check to see how many columns the user wanted then a for loop to loop through the columns. [/quote] No, its not the number of columns the point ( it will be always 3). What I 'm talking about is the functionality, when the user click on first category to show only images with this category, so on so on.
[eluser]InsiteFX[/eluser]
Well from the looks of your sql it should work, from looking at their web page it just looks like they are loading a new page with the image gallery images.
[eluser]Lykos22[/eluser]
Yes, but when I click on a category ( for instacne in my example the <package design> category) how can I fetch the images that belong to this category each time? I guess this has to be a WHERE statement but do I also have to do it with Ajax?? in this part I'm confused a bit.
[eluser]InsiteFX[/eluser]
If you are storing the image path in your categories then you should be able to pull the image link out. You could then just build and echo out a img link. Javascript would give you a better user experience. |
Welcome Guest, Not a member yet? Register Sign In |