JasonTTex84 Posted September 20, 2012 Share Posted September 20, 2012 I'm introducing an new photo gallery to our site, however we have many groups of images that will need to be inserted. I'm looking for a way to automate this process based on a directory lookup, as well as adding captions to images based on a .txt file. Here is the code I'm using to call the image within the gallery. <a href="images/ICI_TAC_web1.jpg" rel="lightbox[iCI]" title="Some Caption for Cool Pic Here"><img src="images/ICI_TAC_web1_thumb.jpg" alt></a> <a href="images/ICI_TAC_web2.jpg" rel="lightbox[iCI]" title="Some Caption for Cool Pic Here"></a> <a href="images/ICI_TAC_web3.jpg" rel="lightbox[iCI]" title="Some Caption for Cool Pic Here"></a> So I have a few attributes that would need to be automated, file name, group name (ICI in the case above), and captions. I don't need this to produce thumbnails for the gallery as we will handle this resizing before the upload, but I will need the code to recognize the thumbnail and display it. Thanks in advance for help with this. I'm not sure this is possible or not, however I appreciate the communities input. Quote Link to comment Share on other sites More sharing options...
Monkuar Posted September 20, 2012 Share Posted September 20, 2012 You most likely will be better of posting your result here http://forums.phpfreaks.com/index.php?board=8.0 Quote Link to comment Share on other sites More sharing options...
JasonTTex84 Posted September 20, 2012 Author Share Posted September 20, 2012 Thanks for the reply. To be clear, I'm not asking someone to do this for me. I'm really looking for some input on the matter. Is this a JS project, can it be done within PHP only, is it even possible, and where should I start. Quote Link to comment Share on other sites More sharing options...
Jessica Posted September 20, 2012 Share Posted September 20, 2012 Yes, you can do it in php. Quote Link to comment Share on other sites More sharing options...
Monkuar Posted September 20, 2012 Share Posted September 20, 2012 Thanks for the reply. To be clear, I'm not asking someone to do this for me. I'm really looking for some input on the matter. Is this a JS project, can it be done within PHP only, is it even possible, and where should I start. You can use http://php.net/manual/en/function.file-get-contents.php to get data from your .txt file Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.