Advertisement
tdiaz

Gravity Forms and NextGen Gallery Variables Pre-Populated

Feb 3rd, 2012
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.78 KB | None | 0 0
  1. <?php
  2. /**
  3. Template Page for the image browser
  4.  
  5. Follow variables are useable :
  6.  
  7.     $image : Contain all about the image
  8.     $meta  : Contain the raw Meta data from the image
  9.     $exif  : Contain the clean up Exif data
  10.     $iptc  : Contain the clean up IPTC data
  11.     $xmp   : Contain the clean up XMP data
  12.  
  13.  You can check the content when you insert the tag <?php var_dump($variable) ?>
  14.  If you would like to show the timestamp of the image ,you can use <?php echo $exif['created_timestamp'] ?>
  15. **/
  16. ?>
  17. <?php if (!defined ('ABSPATH')) die ('No direct access allowed'); ?><?php if (!empty ($image)) : ?>
  18. <!--breadcrumbs go here-->
  19. <div class="ngg-imagebrowser" id="<?php echo $image->anchor ?>">
  20. <!-- Image Anchor Above -->
  21.     <h3><?php echo $iptc['headline'] ?> - Photo #<?php echo $image->number ?></h3>
  22. <!-- Image alttext Above -->
  23.     <div class="pic"><?php echo $image->href_link ?></div>
  24.     <div class="ngg-imagebrowser-nav">
  25.         <div class="back">
  26.             <a class="ngg-browser-prev" id="ngg-prev-<?php echo $image->previous_pid ?>" href="<?php echo $image->previous_image_link ?>">&#9668; <?php _e('Back', 'nggallery') ?></a>
  27.         </div>
  28.         <div class="next">
  29.             <a class="ngg-browser-next" id="ngg-next-<?php echo $image->next_pid ?>" href="<?php echo $image->next_image_link ?>"><?php _e('Next', 'nggallery') ?> &#9658;</a>
  30.         </div>
  31.         <div class="counter"><?php _e('Picture', 'nggallery') ?> <?php echo $image->number ?> <?php _e('of', 'nggallery')?> <?php echo $image->total ?></div>
  32.         <div class="ngg-imagebrowser-desc"><br /><?php echo $image->alttext ?><br /><?php echo $image->description ?></div>
  33.        
  34.         <div class="ngg-imagebrowser-desc"><?php _e('Metrics:', 'nggallery') ?> <?php echo $iptc['location'] ?> / <?php echo $iptc['city'] ?>, <?php echo $iptc['state'] ?> @ <?php echo $exif['created_timestamp'] ?></div>
  35.         <div class="ngg-imagebrowser-desc"><?php _e('Keywords:', 'nggallery') ?> <?php echo $iptc['keywords'] ?></div>
  36.         <div class="ngg-imagebrowser-desc"><?php _e('Filename:', 'nggallery') ?> <?php echo $image->filename ?></p></div>
  37.         <?php // var_dump($image) ?>
  38.         <?php // var_dump($meta) ?>
  39.         <?php // var_dump($exif) ?>
  40.         <?php // var_dump($iptc) ?>
  41.         <?php // var_dump($xmp) ?>
  42.     </div>
  43. <?php echo $image->filename ?>    Got updates for this Image? Submit here:
  44. <?php // add_filter('gform_field_value_image_filename', 'get_filename'); function get_filename($value){$variable = "suck" ;return (string) $variable; } ?>
  45. <?php add_filter('gform_field_value_image_filename', 'get_filename'); function get_filename($value){ "<pre>";var_dump(get_defined_vars());echo "</pre>" , $variable = "suck" ;return (string) $variable; } ?>
  46. <?php echo $image->filename ?>
  47.     <?php gravity_form(1, false, false, false, '', false); ?>
  48.        
  49. </div> 
  50.  
  51. <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement