Prettify fail indeed. Very Happy Thanks for sharing, I look forward especially to the third item on the list. Seems that the switchover went smoothly enough.
I'm adding in some code to display EXIF data along side my photos. However, I keep getting an syntax error, unexpected T_STRING on Line 6. The post was in 2008, could this method be no longer supported?

I'm using this code here.

And the code on a temp page:
Code:

<?php
// $pathtofile             = 'res/img/portfolio/portrait/full/portrait-01.jpg';
// $exif               = exif_read_data($pathtofile, 0, true);
$exif                   = exif_read_data('res/img/portfolio/portrait/full/portrait-01.jpg', 'IFD0');
$filename           = strtolower($exif['FILE']['FileName']);
$filedatename       = $exif['FILE']['FileDateTime'];
$filesize           = $exif['FILE']['FileSize'];
$filetype           = $exif['FILE']['FileType'];
$mimetype           = $exif['FILE']['MimeType'];
$height             = $exif['COMPUTED']['Height'];
$width              = $exif['COMPUTED']['Width'];
$iscolor            = $exif['COMPUTED']['IsColor'];
$fstop              = $exif['COMPUTED']['ApertureFNumber'];
$imagewidth         = $exif['IFD0']['ImageWidth'];
$imagelength        = $exif['IFD0']['ImageLength'];
$compression        = $exif['IFD0']['Compression'];
$make               = $exif['IFD0']['Make'];
$model              = str_replace($make,'',$exif['IFD0']['Model']);
$orientation        = $exif['IFD0']['Orientation'];
$xresolution        = $exif['IFD0']['XResolution'];
$yresolution        = $exif['IFD0']['YResolution'];
$resolutionunit     = $exif['IFD0']['ResolutionUnit'];
$datetime           = $exif['IFD0']['DateTime'];
$exposure           = $exif['EXIF']['ExposureTime'].' sec';
$fnumber            = $exif['EXIF']['FNumber'];
$exposureprogram    = $exif['EXIF']['ExposureProgram'];
$iso                = $exif['EXIF']['ISOSpeedRatings'];
$exifversion        = $exif['EXIF']['ExifVersion'];
$datetimeoriginal   = $exif['EXIF']['DateTimeOriginal'];
$exposurebias       = $exif['EXIF']['ExposureBiasValue'];
$meteringmode       = $exif['EXIF']['MeteringMode'];
$flash              = $exif['EXIF']['Flash'];
$exifimagewidth     = $exif['EXIF']['ExifImageWidth'];
$exifimagelength    = $exif['EXIF']['ExifImageLength'];
$exposuremode       = $exif['EXIF']['ExposureMode'];
$whitebalance       = $exif['EXIF']['WhiteBalance'];
$imagetype          = $exif['MAKERNOTE']['ImageType'];
$ownername          = $exif['MAKERNOTE']['OwnerName'];
$cameraserial       = $exif['MAKERNOTE']['Camera'];
$lens               = $exif['MAKERNOTE']['UndefinedTag:0x0095'];
$focallength        = intval($exif['EXIF']['FocalLength']).' mm';
$copyright          = $exif['COMPUTED']['Copyright'];
$yy = substr($datetimeo,0,4);
$mm = substr($datetimeo,5,2);
$dd = substr($datetimeo,8,2);
$h =  substr($datetimeo,11,2);
$m =  substr($datetimeo,14,2);
$s =  substr($datetimeo,17,2);
$tt = "am";
if($h>=13) {$h=$h-12; $tt="pm"; }
$date = $dd.'/'.$mm.'/'.$yy;
$time = $h.':'.$m.':'.$s.' '.$tt;


?>


Regarding the IFD0 in the $exif variable, that was a thought that went through the heads of the folks on IRC when I asked last night. I'll change it back at some point. For now, I'm going to focus on getting the new photos saved.
ComicIDIOT, can you be more specific about what line is Line 6? I don't see anything immediately wrong with that post.
I was giving you all the information I had. I forget exactly which line it was at the moment (I started a new method) but it was either $exif or $filename.

At the moment, I'm getting another error on Line 6, Call to undefined function read_exif_data(), which is odd because I didn't get the error from the previous post.


Code:
<html>

<?php

echo "test1.jpg:<br />\n";
$exif = read_exif_data('animal-01 copy.jpg', 'IFD0');
echo $exif===false ? "No header data found.<br />\n" : "Image contains headers<br />\n";

$exif = exif_read_data('animal-01 copy.jpg', 0, true);
echo "test2.jpg:<br />\n";
foreach ($exif as $key => $section) {
    foreach ($section as $name => $val) {
        echo "$key.$name: $val<br />\n";
    }
}

?>


</html>
and this is copied from the first example on php.net

The above does have <html> tags, the previous post didn't, on IRC we decided to remove all html tags in an effort to see if they were causing it, even though we figured it wouldn't.
I'm leaving the EXIF behind me for now, in the meantime is there any way to determine which variables are set without checking them?

Such as isset but without using isset($_GET['variable']?

It'd make my image retrieving much easier than:
Code:
                    if (isset($_GET["portrait-01"])) {
                        $view = "portrait-01";
                        echo('
                            <div id="i">
                                <h3 class="linkback"><a href="?portrait">Back to Portfolio</a></h3>
                                <img class="full" src="res/img/portfolio/portrait/full/portrait-01.jpg">
                            </div>
                        ');
                    }
                       
                    if (isset($_GET["portrait-02"])) {
                          $view = "portrait-02";
                        echo('
                            <div id="i">
                                <h3 class="linkback"><a href="?portrait">Back to Portfolio</a></h3>
                                <img class="full" src="res/img/portfolio/portrait/full/portrait-02.jpg">
                            </div>
                        ');
                    }
What do you have against isset()? Isset() is exactly what you use to check if variables exist ("without checking them"?). It sounds like you want to loop through an array and only display images for which items are set. Regarding read_exif_data(), which says its an alias for exif_read_data(), likely requires a certain PHP version. Can you use phpinfo() to get your PHP version number?
I want something that I don't have to check. Something that will grab the variable, portrait-01, then put that name into an image path. But before retrieving that image, it'll check if it exists, and if it doesn't it'll display an "Image Not Found" page, else it'll display the photo.

Perhaps a method to retrieve the URL and use preg_split at the question mark. Then another at any ampersand, then lastly again at the dashes. I'll check if the text before the dash matches "portrait," "sport," "vehicle," etc and if it does, if there's a number variable display a photo, if not display the thumbnails inside the gallery.

I don't want to hardcode if a photo or page exists anymore. If the prefix is "portrait" and there's no suffix (01) then display the gallery thumbnails, else it'll display a photo.

I'd have other changes to make, such as removing a suffix to get back to the portfolio (from portrait-02 to portrait). I won't have any easy way to get back to the respective portfolio unless I do something similar to if (isset(var1) then echo <a link to ?portrait>). if (isset(var2) then echo <a link to ?scape>, which is pretty much what I do for my images (and what I'm trying to eliminate.

The code is not accurate as I need have things to do before I have places to be.
So, all of the bugs have been ironed out: the navigation no longer visits the content in the body on a fresh page load, amid other minor glitches.

Now, I want to finally add the next & previous links. But, all of my site is hard coded. So, I'm going to rework the backend to fetch images from the $_GET command, rather than getting the value and matching it in-code.

I'm assuming I could use stuff like preg_split() and stuff to do the same deal. Since my images are kept in an organized manner.


Code:
res/img/portfolio_nnnnnn/nnnnnn-##.jpg //thumbnail
res/img/portfolio_nnnnnn/full/nnnnnn-##.jpg //fullsize


It wouldn't be hard at all to split a variable at the dash. My only fallback? Is it possible to fetch all variables in the URL (?variable=1) without manually fetching them? Is it possible to copy the URL of the current page with PHP and just split it down to manageable chunks, or is their an easier method?

After I am able to add the next & previous links, I think I'll try this EXIF data again. As, it'll be easier to add such links among information.
Doing some more work, I've got a sponsor for my sports photography so I'm working them into the site a bit. Also resolving some style bugs that I've noticed since I started using a monitor that's wider than 1280 pixels, also starting to consolidate all my CSS files, and separate information that could be retrieved with includes. Still trying to find a method to support EXIF data on the page, and improve photo navigation with Next & Back links.

I have since been able to accept credit card payments outside PayPal and in the field so I need to advertise that and work that into my payment options. I have had integrated Google Analytics into my site for a month now and am able to see what it tracks and what it doesn't, and will update my websites backend to accommodate the missing information.

I'm also expecting a large influx of clients as my sponsor will also advertise my services on their website. But I'm not likely going to get everything done to better my statistical collection before then. Hopefully I'll have cleared up my pricing information. I'm planning to bump up the version to 2.5 once all that has been completed. With an on-track release for v3 by Winter 2012.
In the midst of redoing portions of my site, currently the Information page, I'm going to separate the information on that page into separate pages. Adjust the layout and words on my About page to reflect that change. More of the contents are being gutted from the actual pages and being fetched by php includes for readability while editing, for easier hot-swapping of details, and comparing changes.

I've drastically reworded and condensed my payment amounts. Compare the current Cost tier to an updated tier. I'm of course still working out and making it easier to follow than previously, so voice any concerns you may have about the transition or if anything that was unclear, still is.

I'm also looking into Joomla! for the third version of my website. With the update it'll support client registration, automatic booking, communications through the website and PayPal. The options for sending a check and Square credit card transactions will still be available.
Just saw this, and I like that shadow effect on the gallery, but the horizontal scrollbar annoys me Sad
Ah, that's there? Darn. You people need disappearing scroll bars! Haha.

I'm hoping that's one of the issues I resolve by consolidating my CSS and partially rewriting some HTML. I know why it's happening - the body is 100.5% wide on purpose for another reason.
Quote:
Portrait Session - $50 for one person. $10 per hour for additional persons.

Two outfits per person, total of three combinations between all present.

Moving Vehicle Photography - $60
I assume that the $50 is therefore also per hour? What about the vehicle photography? I think you should make that more explicit (sorry that it's not a design critique).
Underneath additional charges it's written "Extra hours are billed at $30 per hour." Ands that's a general charge for all my services.

I appreciate the text feedback, it will help clear things up now and make the understand that much better Smile
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 3 of 3
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement