Jump to content

JasonS

Members
  • Content Count

    50
  • Joined

  • Last visited

Community Reputation

12 Good

About JasonS

  • Rank
    Full Member
  • Birthday 08/05/1988

Profile Information

  • Gender
    Male

Recent Profile Visitors

2,022 profile views
  1. Hi Horst, With your instructions and help, I got it to work. Thanks again for working with me in understanding proper methods for rendering the values I needed. For Future reference for anyone else(including myself if I forget )... There are two methods for rendering data from Metadata EXIF module. Array Method: // output the value for one key of the returned array $firstGalleryImage = $page->galleryimages->first()->getExif( array('FNumber') ); echo $firstGalleryImage['FNumber']; Object Method: // if you have choosen the result as object, you would use $options = array('toObject' => true, 'keys' => array('FNumber')); $object = $page->galleryimages->first()->getExif($options); echo $object->FNumber;
  2. Returned :
  3. Notice: Undefined offset: 0 in /Applications/XAMPP/xamppfiles/htdocs/photography/site/modules/MetadataExif/MetadataExif.module on line 44array(5) { ["FILE"]=> array(6) { ["FileName"]=> string(12) "apc_0046.jpg" ["FileDateTime"]=> int(1511813872) ["FileSize"]=> int(1160717) ["FileType"]=> int(2) ["MimeType"]=> string(10) "image/jpeg" ["SectionsFound"]=> string(30) "ANY_TAG, IFD0, THUMBNAIL, EXIF" } ["COMPUTED"]=> array(9) { ["html"]=> string(26) "width="2797" height="3496"" ["Height"]=> int(3496) ["Width"]=> int(2797) ["IsColor"]=> int(1) ["ByteOrderMotorola"]=> int(0) ["ApertureFNumber"]=> string(5) "f/2.2" ["Copyright"]=> string(20) "photography" ["Thumbnail.FileType"]=> int(2) ["Thumbnail.MimeType"]=> string(10) "image/jpeg" } ["IFD0"]=> array(10) { ["ImageDescription"]=> string(36) "time flies" ["Make"]=> string(5) "Apple" ["Model"]=> string(14) "iPhone 6s Plus" ["XResolution"]=> string(5) "240/1" ["YResolution"]=> string(5) "240/1" ["ResolutionUnit"]=> int(2) ["Software"]=> string(49) "Adobe Photoshop Lightroom Classic 7.0 (Macintosh)" ["DateTime"]=> string(19) "2017:11:27 16:17:21" ["Copyright"]=> string(20) "j.sobers.photography" ["Exif_IFD_Pointer"]=> int(302) } ["THUMBNAIL"]=> array(6) { ["Compression"]=> int(6) ["XResolution"]=> string(4) "72/1" ["YResolution"]=> string(4) "72/1" ["ResolutionUnit"]=> int(2) ["JPEGInterchangeFormat"]=> int(896) ["JPEGInterchangeFormatLength"]=> int(17303) } ["EXIF"]=> array(26) { ["ExposureTime"]=> string(6) "1/2400" ["FNumber"]=> string(5) "22/10" ["ExposureProgram"]=> int(2) ["ISOSpeedRatings"]=> int(25) ["ExifVersion"]=> string(4) "0230" ["DateTimeOriginal"]=> string(19) "2017:07:10 11:47:22" ["DateTimeDigitized"]=> string(19) "2017:07:10 11:47:22" ["ShutterSpeedValue"]=> string(16) "11228819/1000000" ["ApertureValue"]=> string(15) "2275007/1000000" ["BrightnessValue"]=> string(8) "8488/781" ["ExposureBiasValue"]=> string(3) "0/1" ["MeteringMode"]=> int(5) ["Flash"]=> int(16) ["FocalLength"]=> string(5) "83/20" ["SubjectLocation"]=> array(4) { [0]=> int(2015) [1]=> int(1511) [2]=> int(2217) [3]=> int(1330) } ["SubSecTimeOriginal"]=> string(3) "208" ["SubSecTimeDigitized"]=> string(3) "208" ["ColorSpace"]=> int(1) ["SensingMethod"]=> int(2) ["SceneType"]=> string(1) "" ["ExposureMode"]=> int(0) ["WhiteBalance"]=> int(0) ["FocalLengthIn35mmFilm"]=> int(29) ["UndefinedTag:0xA432"]=> array(4) { [0]=> string(5) "83/20" [1]=> string(5) "83/20" [2]=> string(4) "11/5" [3]=> string(4) "11/5" } ["UndefinedTag:0xA433"]=> string(5) "Apple" ["UndefinedTag:0xA434"]=> string(39) "iPhone 6s Plus back camera 4.15mm f/2.2" } } string(48) "/photography/site/assets/files/1031/apc_0046.jpg" Sorry about that, i corrected my mistake. see above.
  4. returns - int(2) Returns - nothing. returns - string(36) "/photography/site/assets/files/1031/" returns - array(2) { ["apc_0046.jpg"]=> NULL ["img_0335.jpg"]=> NULL }
  5. Yes I can confirm all of this. The multi-image field has two images. Using your example array from the first post of this thread I can see Exif information being returned for both. Both files are jpg type files. See array information returned from your working example code below.
  6. returns NULL
  7. Blank, nothing is returned.
  8. echo $page->galleryimages->first()->getExif('FNumber');
  9. Hi, Thanks for the great module. I'm trying to use this for a single image, however, i'm unable to get this to work for just the first image in multi-image field.
  10. Yes, This worked. Thank you for the great module. I noticed a small typo just FYI.
  11. I tried to update my installation with the new updated version and still failed to update safely.
  12. Updated to the new version and it completely broke my site on my local machine. see attached image.
  13. Unfortunately, no it isn't. Local webdev development on my machine.
  14. yes i did. Didn't work. Yes, it is. I applied your code and doesn't work. I'll attach a screenshot of what I see.
  15. No, That's the confusing part. loginform.php <?php namespace ProcessWire; echo $loginForm; _main.php <?php namespace ProcessWire; /** * _main.php * Main markup file * * This file contains all the main markup for the site and outputs the regions * defined in the initialization (_init.php) file. These regions include: * * $title: The page title/headline * $content: The markup that appears in the main content/body copy column * $sidebar: The markup that appears in the sidebar column * * Of course, you can add as many regions as you like, or choose not to use * them at all! This _init.php > [template].php > _main.php scheme is just * the methodology we chose to use in this particular site profile, and as you * dig deeper, you'll find many others ways to do the same thing. * * This file is automatically appended to all template files as a result of * $config->appendTemplateFile = '_main.php'; in /site/config.php. * * In any given template file, if you do not want this main markup file * included, go in your admin to Setup > Templates > [some-template] > and * click on the "Files" tab. Check the box to "Disable automatic append of * file _main.php". You would do this if you wanted to echo markup directly * from your template file or if you were using a template file for some other * kind of output like an RSS feed or sitemap.xml, for example. * * See the README.txt file for more information. * */ ?><!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <title><?php echo $title; ?></title> <meta name="description" content="<?php echo $page->summary; ?>" /> <link href='//fonts.googleapis.com/css?family=Lusitana:400,700|Quattrocento:400,700' rel='stylesheet' type='text/css' /> <link rel="stylesheet" type="text/css" href="<?php echo $config->urls->templates?>styles/main.css" /> </head> <body class="<?php if($sidebar) echo "has-sidebar "; ?>"> <a href="#main" class="visually-hidden element-focusable bypass-to-main">Skip to content</a> <h1 align="center" class="logo-text"> <a href="<?php echo $config->urls->root ?>" class="logo-link"><?php $page->sitename ?></a> </h1> <!-- top navigation --> <ul class='topnav' role='navigation'><?php // top navigation consists of homepage and its visible children foreach($homepage->and($homepage->children) as $item) { if($item->id == $page->rootParent->id) { echo "<li class='current' aria-current='true'><span class='visually-hidden'>Current page: </span>"; } else { echo "<li>"; } echo "<a href='$item->url'>$item->title</a></li>"; } // output an "Edit" link if this page happens to be editable by the current user if($page->editable()) echo "<li class='edit'><a href='$page->editUrl'>Edit</a></li>"; ?></ul> <!-- search form <form class='search' action='<?php echo $pages->get('template=search')->url; ?>' method='get'> <label for='search' class='visually-hidden'>Search:</label> <input type='text' name='q' placeholder='Search' id='search' value='<?php echo $sanitizer->entities($input->whitelist('q')); ?>' /> <button type='submit' name='submit' class='visually-hidden'>Search</button> </form>--> <!-- breadcrumbs --> <div class='breadcrumbs' role='navigation' aria-label='You are here:'><?php // breadcrumbs are the current page's parents //foreach($page->parents() as $item) { //echo "<span><a href='$item->url'>$item->title</a></span> "; //} // optionally output the current page as the last item //echo "<span>$page->title</span> "; ?></div> <div id='main'> <!-- main content --> <div id='content'> <h1 align="center"><?php echo $title; ?></h1> <?php echo $content; ?> </div> <!-- sidebar content --> <?php if($sidebar): ?> <aside id='sidebar'> <?php echo $sidebar; ?> </aside> <?php endif; ?> </div> <!-- footer --> <footer id='footer'> <p> Powered by <a href='http://processwire.com'>ProcessWire CMS</a> &nbsp; / &nbsp; <?php if($user->isLoggedin()) { // if user is logged in, show a logout link echo "<a href='{$config->urls->admin}login/logout/'>Logout ($user->name)</a>"; } else { // if user not logged in, show a login link echo "<a href='{$config->urls->admin}'>Admin Login</a>"; } ?> </p> </footer> <script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script> <script> $('img').bind('contextmenu', function(e) { return false; }); </script> </body> </html>
×
×
  • Create New...