fisheye
[ class tree: fisheye ] [ index: fisheye ] [ all elements ]

Source for file view_image.php

Documentation is available at view_image.php

  1. <?php
  2. /**
  3.  * @package fisheye
  4.  * @subpackage functions
  5.  */
  6.  
  7. /**
  8.  * required setup
  9.  */
  10. require_once( '../kernel/setup_inc.php' );
  11.  
  12. $gBitSystem->verifyPackage( 'fisheye' );
  13. require_once( FISHEYE_PKG_PATH.'FisheyeGallery.php');
  14. require_once( FISHEYE_PKG_PATH.'FisheyeImage.php');
  15.  
  16. global $gBitSystem, $gDebug;
  17.  
  18. if( !empty( $_REQUEST['size'] ) ) {
  19.     // nuke old values if set
  20.     $_COOKIE['fisheyeviewsize'] = NULL;
  21.     setcookie( 'fisheyeviewsize', $_REQUEST['size'], 0, $gBitSystem->getConfig( 'cookie_path', BIT_ROOT_URL ), $gBitSystem->getConfig( 'cookie_domain', '.'.$_SERVER['SERVER_NAME'] ) );
  22. }
  23.  
  24. if( !empty( $_REQUEST['refresh'] ) ) {
  25.     $gBitSmarty->assign( 'refresh', '?refresh='.time() );
  26. }
  27.  
  28. include_once( FISHEYE_PKG_PATH.'image_lookup_inc.php' );
  29.  
  30. if( $gContent && $gContent->isValid() ) {
  31.     $gBitSystem->setCanonicalLink( $gContent->getDisplayUrl() );
  32. }
  33.  
  34. global $gHideModules;
  35. $gHideModules = $gBitSystem->isFeatureActive( 'fisheye_image_hide_modules' );
  36.  
  37. if( is_object( $gGallery ) && $gGallery->isCommentable() ) {
  38.     $commentsParentId = $gContent->mContentId;
  39.     $comments_vars = Array('fisheyeimage');
  40.     $comments_prefix_var='fisheyeimage:';
  41.     $comments_object_var='fisheyeimage';
  42.     $comments_return_url = $_SERVER['SCRIPT_NAME']."?image_id=".$gContent->mImageId;
  43.     include_once( LIBERTY_PKG_PATH.'comments_inc.php' );
  44. }
  45.  
  46. $gContent->addHit();
  47.  
  48. // this will let LibertyMime know that we want to display the original image
  49. if( $gContent->hasUpdatePermission() || $gGallery && $gGallery->getPreference( 'link_original_images' )) {
  50.     $gContent->mInfo['image_file']['original'] = TRUE;
  51. }
  52. require_once( FISHEYE_PKG_PATH.'display_fisheye_image_inc.php' );

Documentation generated on Wed, 29 Jul 2015 13:57:33 +0000 by phpDocumentor 1.5.0-lsces