Jump to content

JasonS

Members
  • Posts

    50
  • Joined

  • Last visited

Everything posted by JasonS

  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. 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.
  3. returns - int(2) Returns - nothing. returns - string(36) "/photography/site/assets/files/1031/" returns - array(2) { ["apc_0046.jpg"]=> NULL ["img_0335.jpg"]=> NULL }
  4. 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.
  5. returns NULL
  6. Blank, nothing is returned.
  7. echo $page->galleryimages->first()->getExif('FNumber');
  8. 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.
  9. Yes, This worked. Thank you for the great module. I noticed a small typo just FYI.
  10. I tried to update my installation with the new updated version and still failed to update safely.
  11. Updated to the new version and it completely broke my site on my local machine. see attached image.
  12. Unfortunately, no it isn't. Local webdev development on my machine.
  13. 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.
  14. 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>
  15. yes that's a typo in the forum. Yes, $content is the main output variable coming from the _main.php file. My loginForm template page works if i use : <?php namespace ProcessWire; echo $loginForm; shows blank screen using: <?php namespace ProcessWire; $content = $loginForm; Maybe i'm missing something simple...
  16. Hi Everyone, I was wondering if anyone can help me with a problem I'm having. I'm currently using the Intermediate templating schema which you can choose from when first developing PW on localhost. Firstly, let me say this is a great module and thank you for developing it. Secondly, to the problem, I'm trying to render login form via "$content .= loginForm;" however that doesn't appear to work and produces nothing but a blank page. The only way the login form shows is without the _main.php layout by using the default "echo loginForm;" approach.
  17. @KFlare Did you ever got an answer to this puzzle? I'm interested in this as well.
  18. I'm having the same problem. It's unclear from the previous post on how to fix this issue. Shouldn't this be included in module package?
  19. I had the same problem, make sure you have styles enabled and the path to your js in the body field. Instructions can be found on here. .
  20. Is this compatible with PW 2.5 and up?
  21. Hi, Thanks for the great Module. Just letting you know that in your css file form { margin-bottom: 20px; } is pushing the bottom banner up abit. When I remove it, it looks better.
  22. Hi Kongondo, Thanks for the great module. I've been searching all day but been unable to find where I can change the labels of comments as I did for PW comments. My labels within my Label array aren't working as I thought. I also looked at for your documentation on your website but seems to be down for the moment. http://kongondo.com/tutorials/specific-features/creating-a-blog-in-processwire/ What I used before which works for Generic PW commenting system were as followed: 'labels' => array( 'cite' => '<label for="author">Name *</label>', 'email' => '<label for="email">Email <small>(will not be published)</small> *</label>', 'website' => '<label for="url">Website</label>', 'stars'=> '<label>Rate this page:</label>', 'submit' => 'Post Comment' If you can provide any assistance it would be helpful, thanks.
  23. This worked for me too. Would really like if i could implement dynamic data in the email? Is this the only way to implement this at the moment?
×
×
  • Create New...