Jump to content

JasonTTex84

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

JasonTTex84's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. 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.
  2. 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.
  3. Well, I fixed my issue this morning... It seems that PHP was using the first capital letter to use for sorting purposes. I am all good to go . Thanks for everyone's help. I'm sure you'll see more from me JT
  4. I get what your saying... Perhaps use letters, a-z = 26... I'll never have more than say 10-15 events listed. I guess my issue right now is that I don't understand what method the PHP is using to sort the items I have now, everything is in alphabetical order off of the first letter of the Title (of course ignoring the letter that I put in front of it i.e. a-z...) except for the last two which start with "Z" and "Q" and are listed in that order. None the less I don't want alpha order I really want to determine the order myself. What I have is this, I have a directory with folders, each folder has photos as well as thumbs of each photo as well as a file named "info.txt". Whatever I type in the "info.txt" file is what shows up on the page as the title of the page containing the photos in that directorty. So each "info.txt" file basically has a few words in it with a year and a couple "-". That's all. When I started this thread all I wanted to accomplish was setting the order in which these titles were displayed, I thought I was on the right track but obviously not. Thanks for all of your help thus far, you have given me exactly what I've asked for... Just seems that what I'm asking for isn't the solution....
  5. This code worked great in the fact that it did indeed strip the first letter from my text file, however I can't figure out what is determining the order in which these Titles are displayed. I tried put 1-2-3-4 in front of each title string as well as a-b-c-d and neither worked for me. Any suggestions??
  6. Should I insert this before or after the Echo line? Thanks for the quick replies here as well!!
  7. I have this command that basically populates my website with titles for pages based on the information that is placed within "info.txt" I have multiple titles being created so I'd like a way of putting them in order beside alphabetically. My thought was that I could place numbers as the first character in the "info.txt" file and that would allow me to put the titles in an order I find acceptable. Now this causes the issue that I don't want those numbers displayed on my website. So the Echo needs to strip the number.... I'm lost, but my brain thinks it's a good idea. Here's the code I'm working with: <tr> <td id="body"> <table id="columns" cellspacing="0"> <tr> <td> <h2>LSAV Latest Events</h2> <p>Select an event from below to view a gallery of images from that event.</p> <ul> <?php $dir = 'latest-events'; if ($handle = opendir($dir)) { while (false !== ($file = readdir($handle))) { if( $file != '.' && $file != '..') { $title = file_get_contents( "$dir/$file/info.txt" ); echo "<li><a href=\"event-viewer.php?event=$file\">$title</a></li>"; } } closedir($handle);
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.