Kaynağa Gözat

#2280 Photos: add EXIF info, like in Albums

RomanL 6 yıl önce
ebeveyn
işleme
1e578d0d47

+ 22 - 0
inc/utils.inc.php

@@ -488,6 +488,28 @@ function get_templates_array($bEnabledOnly = true, $bShortInfo = true)
         return $oDb->getAllWithKey("SELECT * FROM `sys_modules` WHERE 1 AND `type`='" . BX_DOL_MODULE_TYPE_TEMPLATE . "'" . $sWhereAddon, "uri");
 }
 
+function getExifAndSizeInfo($oStorage, $oTranscoder, $iContentId){
+    $sExif = '';
+    $aExif = false;
+    $aPhoto = $oStorage->getFile($iContentId);
+    if ($oTranscoder->isMimeTypeSupported($aPhoto['mime_type'])) {
+        $oImageReize = BxDolImageResize::getInstance();
+        
+        $a = $oImageReize->getImageSize($oTranscoder->getFileUrl($iContentId));
+        $sData = isset($a['w']) && isset($a['h']) ? $a['w'] . 'x' . $a['h'] : '';
+        
+        if ($aExif = $oImageReize->getExifInfo($oStorage->getFileUrlById($iContentId))) {
+            $a = array('Make', 'Model', 'FocalLength', 'ShutterSpeedValue', 'ExposureTime', 'ISOSpeedRatings', 'Orientation', 'Artist', 'Copyright', 'Flash', 'WhiteBalance', 'DateTimeOriginal', 'DateTimeDigitized', 'ExifVersion', 'COMPUTED', 'GPSLatitudeRef', 'GPSLatitude', 'GPSLongitudeRef', 'GPSLongitude', 'GPSAltitudeRef', 'GPSAltitude', 'GPSTimeStamp', 'GPSImgDirectionRef', 'GPSImgDirection', 'GPSDateStamp');
+            $aExifFiltered = array();
+            foreach ($a as $sIndex)
+                if (isset($aExif[$sIndex]))
+                    $aExifFiltered[$sIndex] = $aExif[$sIndex];
+            $sExif = serialize($aExifFiltered);
+        }
+    }
+    return array('exif' => $sExif, 'size' => $sData);
+}
+
 function extFileExists( $sFileSrc )
 {
     return (file_exists( $sFileSrc ) && is_file( $sFileSrc )) ? true : false;

+ 11 - 0
modules/base/text/classes/BxBaseModTextModule.php

@@ -161,6 +161,17 @@ class BxBaseModTextModule extends BxBaseModGeneralModule implements iBxDolConten
     {
         return $this->_serviceTemplateFunc('entryPollResults', $iPollId, 'getPollInfoById');
     }
+    
+    /**
+     * Display media EXIF information.
+     * @param $iMediaId media ID, if it's omitted then it's taken from 'id' GET variable.
+     * @return HTML string with EXIF info. On error empty string is returned.
+     */ 
+    public function serviceMediaExif ($iMediaId = 0)
+    {
+        $CNF = &$this->_oConfig->CNF;
+        return $this->_serviceTemplateFunc ('mediaExif', $iMediaId, $CNF['FUNCTION_FOR_MEGIA_INFO']);
+    }
 
     public function serviceGetThumb ($iContentId, $sTranscoder = '') 
     {

+ 58 - 0
modules/base/text/classes/BxBaseModTextTemplate.php

@@ -726,6 +726,64 @@ class BxBaseModTextTemplate extends BxBaseModGeneralTemplate
     {
         return $this->getModule()->getEntryImageData($aData);
     }
+    
+    function mediaExif ($aMediaInfo, $iProfileId = false, $sFuncAuthorDesc = '', $sTemplateName = 'media-exif.html') 
+    {
+
+        if (!$aMediaInfo['exif'])
+            return '';
+
+        $a = unserialize($aMediaInfo['exif']);
+
+        $s = '';
+        if (!empty($a['Make'])) {
+            $oModule = BxDolModule::getInstance($this->MODULE);
+            $CNF = &$oModule->_oConfig->CNF;
+          
+            $sCamera = BxDolMetatags::keywordsCameraModel($a);
+            if (!empty($CNF['OBJECT_METATAGS_MEDIA_CAMERA'])) {
+                $oMetatags = BxDolMetatags::getObjectInstance($CNF['OBJECT_METATAGS_MEDIA_CAMERA']);
+                if ($oMetatags->keywordsIsEnabled()) {
+                    $sCamera = $oMetatags->keywordsParseOne($aMediaInfo['id'], $sCamera);
+                }
+            }
+
+            if (!empty($sCamera))
+                $s .= $this->parseHtmlByName('media-exif-value.html', array(
+                    'key' => _t($CNF['T']['txt_media_exif_camera']), 
+                    'val' => $sCamera,
+                ));
+        }
+        
+        if (!empty($a['FocalLength']))
+            $s .= $this->parseHtmlByName('media-exif-value.html', array(
+                'key' => _t($CNF['T']['txt_media_exif_focal_length']),
+                'val' => _t($CNF['T']['txt_media_exif_focal_length_value'], $a['FocalLength']),
+            ));
+
+        if (!empty($a['COMPUTED']['ApertureFNumber']))
+            $s .= $this->parseHtmlByName('media-exif-value.html', array(
+                'key' => _t($CNF['T']['txt_media_exif_aperture']),
+                'val' => $a['COMPUTED']['ApertureFNumber'],
+            ));
+
+        if (!empty($a['ExposureTime']))
+            $s .= $this->parseHtmlByName('media-exif-value.html', array(
+                'key' => _t($CNF['T']['txt_media_exif_shutter_speed']),
+                'val' => _t($CNF['T']['txt_media_exif_shutter_speed_value'], $a['ExposureTime']),
+            ));
+
+        if (!empty($a['ISOSpeedRatings']))
+            $s .= $this->parseHtmlByName('media-exif-value.html', array(
+                'key' => _t($CNF['T']['txt_media_exif_iso']),
+                'val' => $a['ISOSpeedRatings'],
+            ));
+
+        if (empty($s))
+            return '';
+        
+        return $this->parseHtmlByName($sTemplateName, array('content' => $s));
+    }
 }
 
 /** @} */

+ 3 - 0
modules/base/text/template/media-exif-value.html

@@ -0,0 +1,3 @@
+
+    <b>__key__</b>: __val__ <br />
+

+ 3 - 0
modules/base/text/template/media-exif.html

@@ -0,0 +1,3 @@
+<div class="bx-albums-media-exif">
+    __content__
+</div>

+ 9 - 0
modules/boonex/albums/classes/BxAlbumsConfig.php

@@ -134,6 +134,8 @@ class BxAlbumsConfig extends BxBaseModTextConfig
             'OBJECT_GRID_ADMINISTRATION' => 'bx_albums_administration',
         	'OBJECT_GRID_COMMON' => 'bx_albums_common',
         	'OBJECT_UPLOADERS' => array('bx_albums_simple', 'bx_albums_html5', 'bx_albums_crop'),
+            
+            'FUNCTION_FOR_EXIF_INFO' => 'getMediaInfoById',
 
             // menu items which visibility depends on custom visibility checking
             'MENU_ITEM_TO_METHOD' => array (
@@ -182,6 +184,13 @@ class BxAlbumsConfig extends BxBaseModTextConfig
                 'txt_all_entries_in' => '_bx_albums_txt_all_entries_in',
             	'txt_all_entries_by_author' => '_bx_albums_page_title_browse_by_author',
                 'txt_all_entries_by_context' => '_bx_albums_page_title_browse_by_context',
+                'txt_media_exif_camera' => '_bx_albums_txt_media_album_camera',
+                'txt_media_exif_focal_length' => '_bx_albums_txt_media_album_focal_length',
+                'txt_media_exif_focal_length_value' => '_bx_albums_txt_media_album_focal_length_value',
+                'txt_media_exif_aperture' => '_bx_albums_txt_media_album_aperture',
+                'txt_media_exif_shutter_speed' => '_bx_albums_txt_media_album_shutter_speed',
+                'txt_media_exif_shutter_speed_value' => '_bx_albums_txt_media_album_shutter_speed_value',
+                'txt_media_exif_iso' => '_bx_albums_txt_media_album_iso',
             ),
         );
 

+ 2 - 20
modules/boonex/albums/classes/BxAlbumsFormEntry.php

@@ -55,27 +55,9 @@ class BxAlbumsFormEntry extends BxBaseModTextFormEntry
 
         $oTranscoder = BxDolTranscoderImage::getObjectInstance($CNF['OBJECT_IMAGES_TRANSCODER_BIG']);
         
-        $sData = '';
-        $sExif = '';
-        $aExif = false;
-        $aFile = $oStorage->getFile($iFileId);
-        if ($oTranscoder->isMimeTypeSupported($aFile['mime_type'])) {
-            $oImageReize = BxDolImageResize::getInstance();
-
-            $a = $oImageReize->getImageSize($oTranscoder->getFileUrl($iFileId));
-            $sData = isset($a['w']) && isset($a['h']) ? $a['w'] . 'x' . $a['h'] : '';
-
-            if ($aExif = $oImageReize->getExifInfo($oStorage->getFileUrlById($iFileId))) {
-                $a = array('Make', 'Model', 'FocalLength', 'ShutterSpeedValue', 'ExposureTime', 'ISOSpeedRatings', 'Orientation', 'Artist', 'Copyright', 'Flash', 'WhiteBalance', 'DateTimeOriginal', 'DateTimeDigitized', 'ExifVersion', 'COMPUTED', 'GPSLatitudeRef', 'GPSLatitude', 'GPSLongitudeRef', 'GPSLongitude', 'GPSAltitudeRef', 'GPSAltitude', 'GPSTimeStamp', 'GPSImgDirectionRef', 'GPSImgDirection', 'GPSDateStamp');
-                $aExifFiltered = array();
-                foreach ($a as $sIndex)
-                    if (isset($aExif[$sIndex]))
-                        $aExifFiltered[$sIndex] = $aExif[$sIndex];
-                $sExif = serialize($aExifFiltered);
-            }
-        }
+		$aInfo = getExifAndSizeInfo($oStorage, $oTranscoder, $iFileId);
         
-        if (false === $this->_oModule->_oDb->associateFileWithContent ($iContentId, $iFileId, $iProfileId, $this->getCleanValue('title-' . $iFileId), $sData, $sExif))
+        if (false === $this->_oModule->_oDb->associateFileWithContent ($iContentId, $iFileId, $iProfileId, $this->getCleanValue('title-' . $iFileId), $aInfo['size'], $aInfo['exif']))
             return;
 
         $aMediaInfo = $this->_oModule->_oDb->getMediaInfoSimpleByFileId($iFileId);

+ 0 - 10
modules/boonex/albums/classes/BxAlbumsModule.php

@@ -155,16 +155,6 @@ class BxAlbumsModule extends BxBaseModTextModule
         return true;
     }
 
-    /**
-     * Display media EXIF information.
-     * @param $iMediaId media ID, if it's omitted then it's taken from 'id' GET variable.
-     * @return HTML string with EXIF info. On error empty string is returned.
-     */ 
-    public function serviceMediaExif ($iMediaId = 0)
-    {
-        return $this->_serviceTemplateFunc ('mediaExif', $iMediaId, 'getMediaInfoById');
-    }
-
     /**
      * @page service Service Calls
      * @section bx_albums Albums

+ 0 - 58
modules/boonex/albums/classes/BxAlbumsTemplate.php

@@ -408,64 +408,6 @@ class BxAlbumsTemplate extends BxBaseModTextTemplate
 
         return $sText;
     }
-
-    function mediaExif ($aMediaInfo, $iProfileId = false, $sFuncAuthorDesc = '', $sTemplateName = 'media-exif.html') 
-    {
-        if (!$aMediaInfo['exif'])
-            return '';
-
-        $a = unserialize($aMediaInfo['exif']);
-
-        $s = '';
-        if (!empty($a['Make'])) {
-            $oModule = BxDolModule::getInstance($this->MODULE);
-            $CNF = &$oModule->_oConfig->CNF;
-
-            $sCamera = BxDolMetatags::keywordsCameraModel($a);
-            if (!empty($CNF['OBJECT_METATAGS_MEDIA_CAMERA'])) {
-                $oMetatags = BxDolMetatags::getObjectInstance($CNF['OBJECT_METATAGS_MEDIA_CAMERA']);
-                if ($oMetatags->keywordsIsEnabled()) {
-                    $sCamera = $oMetatags->keywordsParseOne($aMediaInfo['id'], $sCamera);
-                }
-            }
-
-            if (!empty($sCamera))
-                $s .= $this->parseHtmlByName('media-exif-value.html', array(
-                    'key' => _t('_bx_albums_txt_media_album_camera'), 
-                    'val' => $sCamera,
-                ));
-        }
-
-        if (!empty($a['FocalLength']))
-            $s .= $this->parseHtmlByName('media-exif-value.html', array(
-                'key' => _t('_bx_albums_txt_media_album_focal_length'),
-                'val' => _t('_bx_albums_txt_media_album_focal_length_value', $a['FocalLength']),
-            ));
-
-        if (!empty($a['COMPUTED']['ApertureFNumber']))
-            $s .= $this->parseHtmlByName('media-exif-value.html', array(
-                'key' => _t('_bx_albums_txt_media_album_aperture'),
-                'val' => $a['COMPUTED']['ApertureFNumber'],
-            ));
-
-        if (!empty($a['ExposureTime']))
-            $s .= $this->parseHtmlByName('media-exif-value.html', array(
-                'key' => _t('_bx_albums_txt_media_album_shutter_speed'),
-                'val' => _t('_bx_albums_txt_media_album_shutter_speed_value', $a['ExposureTime']),
-            ));
-
-        if (!empty($a['ISOSpeedRatings']))
-            $s .= $this->parseHtmlByName('media-exif-value.html', array(
-                'key' => _t('_bx_albums_txt_media_album_iso'),
-                'val' => $a['ISOSpeedRatings'],
-            ));
-
-        if (empty($s))
-            return '';
-
-        return $this->parseHtmlByName($sTemplateName, array('content' => $s));
-    }
-
 }
 
 /** @} */

+ 1 - 3
modules/boonex/albums/template/media-exif-value.html

@@ -1,3 +1 @@
-
-    <b>__key__</b>: __val__ <br />
-
+<bx_include_base:../modules/base/text/template/media-exif-value.html />

+ 1 - 3
modules/boonex/albums/template/media-exif.html

@@ -1,3 +1 @@
-<div class="bx-albums-media-exif">
-    __content__
-</div>
+<bx_include_base:../modules/base/text/template/media-exif.html />

+ 12 - 1
modules/boonex/photos/classes/BxPhotosConfig.php

@@ -52,6 +52,7 @@ class BxPhotosConfig extends BxBaseModTextConfig
             'FIELD_STATUS_ADMIN' => 'status_admin',
             'FIELD_LABELS' => 'labels',
             'FIELD_LOCATION' => 'location',
+            'FIELD_EXIF' => 'exif',
             'FIELD_LOCATION_PREFIX' => 'location',
             'FIELDS_WITH_KEYWORDS' => 'auto', // can be 'auto', array of fields or comma separated string of field names, works only when OBJECT_METATAGS is specified
 			
@@ -90,6 +91,7 @@ class BxPhotosConfig extends BxBaseModTextConfig
             'OBJECT_FAVORITES' => 'bx_photos',
             'OBJECT_FEATURED' => 'bx_photos',
             'OBJECT_METATAGS' => 'bx_photos',
+            'OBJECT_METATAGS_MEDIA_CAMERA' => 'bx_photos_camera',
             'OBJECT_COMMENTS' => 'bx_photos',
             'OBJECT_CATEGORY' => 'bx_photos_cats',
             'OBJECT_PRIVACY_VIEW' => 'bx_photos_allow_view_to',
@@ -110,6 +112,8 @@ class BxPhotosConfig extends BxBaseModTextConfig
             'OBJECT_GRID_ADMINISTRATION' => 'bx_photos_administration',
             'OBJECT_GRID_COMMON' => 'bx_photos_common',
             'OBJECT_UPLOADERS' => array('sys_simple', 'sys_html5'),
+            
+            'FUNCTION_FOR_EXIF_INFO' => 'getContentInfoById',
 
             // menu items which visibility depends on custom visibility checking
             'MENU_ITEM_TO_METHOD' => array (
@@ -141,7 +145,14 @@ class BxPhotosConfig extends BxBaseModTextConfig
                 'txt_all_entries_in' => '_bx_photos_txt_all_entries_in',
                 'txt_all_entries_by_author' => '_bx_photos_page_title_browse_by_author',
                 'txt_all_entries_by_context' => '_bx_photos_page_title_browse_by_context',
-            	'txt_pict_use_as_thumb' => '_bx_photos_form_entry_input_picture_use_as_thumb'
+            	'txt_pict_use_as_thumb' => '_bx_photos_form_entry_input_picture_use_as_thumb',
+                'txt_media_exif_camera' => '_bx_photos_txt_camera',
+                'txt_media_exif_focal_length' => '_bx_photos_txt_focal_length',
+                'txt_media_exif_focal_length_value' => '_bx_photos_txt_focal_length_value',
+                'txt_media_exif_aperture' => '_bx_photos_txt_aperture',
+                'txt_media_exif_shutter_speed' => '_bx_photos_txt_shutter_speed',
+                'txt_media_exif_shutter_speed_value' => '_bx_photos_txt_shutter_speed_value',
+                'txt_media_exif_iso' => '_bx_photos_txt_album_iso',
             ),
         );
 

+ 28 - 0
modules/boonex/photos/classes/BxPhotosFormsEntryHelper.php

@@ -39,6 +39,34 @@ class BxPhotosFormsEntryHelper extends BxBaseModFilesFormsEntryHelper
                 return $mixedContent;
         }
     }
+    
+    public function onDataEditAfter ($iContentId, $aContentInfo, $aTrackTextFieldsChanges, $oProfile, $oForm)
+    {
+        $this->updateExif($iContentId, $aContentInfo);
+        return parent::onDataEditAfter($iContentId, $aContentInfo, $aTrackTextFieldsChanges, $oProfile, $oForm);
+    }
+    
+    public function onDataAddAfter ($iAccountId, $iContentId)
+    {
+        $aContentInfo = $this->_oModule->_oDb->getContentInfoById($iContentId);
+        if ($aContentInfo){
+             $this->updateExif($iContentId, $aContentInfo);
+        }
+       
+        return parent::onDataAddAfter($iAccountId, $iContentId);
+    }
+            
+    function updateExif($iContentId, $aContentInfo)
+    {
+        $CNF = &$this->_oModule->_oConfig->CNF;
+        $oStorage = BxDolStorage::getObjectInstance($CNF['OBJECT_STORAGE']);
+        $oTranscoder = BxDolTranscoderImage::getObjectInstance($CNF['OBJECT_IMAGES_TRANSCODER_PREVIEW']);
+        
+        if (!$oStorage || !$oTranscoder)
+            return false;
+        $aInfo = getExifAndSizeInfo($oStorage, $oTranscoder, $aContentInfo[$CNF['FIELD_THUMB']]);
+        $this->_oModule->_oDb->updateEntries(array($CNF['FIELD_EXIF'] => $aInfo['exif']), array($CNF['FIELD_ID'] => $iContentId));
+    }
 }
 
 /** @} */

+ 8 - 0
modules/boonex/photos/install/langs/en.xml

@@ -139,6 +139,7 @@
 	<string name="_bx_photos_page_block_title_popular_keywords"><![CDATA[Popular Hashtags]]></string>
 	<string name="_bx_photos_page_block_title_cats"><![CDATA[Photos Categories]]></string>
 	<string name="_bx_photos_page_block_title_entry_info"><![CDATA[Info]]></string>
+  <string name="_bx_photos_page_block_title_entry_media_exif"><![CDATA[EXIF]]></string>
 	<string name="_bx_photos_page_block_title_my_entries"><![CDATA[My Photos]]></string>
     <string name="_bx_photos_page_block_title_sys_recent_entries_view_showcase"><![CDATA[Latest Photos (Showcase View)]]></string>
     <string name="_bx_photos_page_block_title_recent_entries_view_showcase"><![CDATA[Latest Photos]]></string>
@@ -237,4 +238,11 @@
     <string name="_bx_photos_txt_n_views"><![CDATA[{0} views]]></string>
     <string name="_bx_photos_txt_previous"><![CDATA[Previous]]></string>
     <string name="_bx_photos_txt_next"><![CDATA[Next]]></string>
+    <string name="_bx_photos_txt_camera"><![CDATA[Camera]]></string>
+    <string name="_bx_photos_txt_focal_length"><![CDATA[Focal length]]></string>
+    <string name="_bx_photos_txt_focal_length_value"><![CDATA[{0}mm]]></string>
+    <string name="_bx_photos_txt_aperture"><![CDATA[Aperture]]></string>
+    <string name="_bx_photos_txt_shutter_speed"><![CDATA[Exposure time]]></string>
+    <string name="_bx_photos_txt_shutter_speed_value"><![CDATA[{0}s]]></string>
+    <string name="_bx_photos_txt_iso"><![CDATA[ISO]]></string>
 </resources>

+ 3 - 1
modules/boonex/photos/install/sql/enable.sql

@@ -51,6 +51,7 @@ INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `t
 ('bx_photos_view_entry', 2, 'bx_photos', '', '_bx_photos_page_block_title_entry_rating', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_photos";s:6:"method";s:13:"entity_rating";}', 0, 0, 0, 0),
 ('bx_photos_view_entry', 3, 'bx_photos', '_bx_photos_page_block_title_sys_entry_context', '_bx_photos_page_block_title_entry_context', 13, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_photos\";s:6:\"method\";s:14:\"entity_context\";}', 0, 0, 1, 1),
 ('bx_photos_view_entry', 3, 'bx_photos', '', '_bx_photos_page_block_title_entry_info', 11, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_photos";s:6:"method";s:11:"entity_info";}', 0, 0, 1, 2),
+('bx_photos_view_entry', 3, 'bx_photos', '', '_bx_photos_page_block_title_entry_media_exif', 11, 2147483647, 'service', 'a:2:{s:6:\"module\";s:9:\"bx_photos\";s:6:\"method\";s:10:\"media_exif\";}', 0, 0, 1, 5),
 ('bx_photos_view_entry', 3, 'bx_photos', '', '_bx_photos_page_block_title_entry_location', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_photos";s:6:"method";s:15:"entity_location";}', 0, 0, 0, 0),
 ('bx_photos_view_entry', 2, 'bx_photos', '', '_bx_photos_page_block_title_entry_all_actions', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_photos";s:6:"method";s:18:"entity_all_actions";}', 0, 0, 1, 2),
 ('bx_photos_view_entry', 4, 'bx_photos', '', '_bx_photos_page_block_title_entry_actions', 13, 2147483647, 'service', 'a:2:{s:6:"module";s:9:"bx_photos";s:6:"method";s:14:"entity_actions";}', 0, 0, 0, 0),
@@ -377,7 +378,8 @@ INSERT INTO `sys_objects_search` (`ObjectName`, `Title`, `Order`, `ClassName`, `
 
 -- METATAGS
 INSERT INTO `sys_objects_metatags` (`object`, `table_keywords`, `table_locations`, `table_mentions`, `override_class_name`, `override_class_file`) VALUES
-('bx_photos', 'bx_photos_meta_keywords', 'bx_photos_meta_locations', 'bx_photos_meta_mentions', '', '');
+('bx_photos', 'bx_photos_meta_keywords', 'bx_photos_meta_locations', 'bx_photos_meta_mentions', '', ''),
+('bx_photos_camera', 'bx_photos_meta_keywords_camera', '', '', '', '');
 
 
 -- CATEGORY

+ 8 - 0
modules/boonex/photos/install/sql/install.sql

@@ -30,6 +30,7 @@ CREATE TABLE IF NOT EXISTS `bx_photos_entries` (
   `allow_view_to` varchar(16) NOT NULL DEFAULT '3',
   `status` enum('active','hidden') NOT NULL DEFAULT 'active',
   `status_admin` enum('active','hidden') NOT NULL DEFAULT 'active',
+  `exif` text NOT NULL,
   PRIMARY KEY (`id`),
   FULLTEXT KEY `title_text` (`title`,`text`)
 );
@@ -160,6 +161,13 @@ CREATE TABLE `bx_photos_meta_keywords` (
   KEY `keyword` (`keyword`)
 );
 
+CREATE TABLE `bx_photos_meta_keywords_camera` (
+  `object_id` int(10) unsigned NOT NULL,
+  `keyword` varchar(255) NOT NULL,
+  KEY `object_id` (`object_id`),
+  KEY `keyword` (`keyword`)
+);
+
 CREATE TABLE `bx_photos_meta_locations` (
   `object_id` int(10) unsigned NOT NULL,
   `lat` double NOT NULL,

+ 1 - 1
modules/boonex/photos/install/sql/uninstall.sql

@@ -1,6 +1,6 @@
 
 -- TABLES
-DROP TABLE IF EXISTS `bx_photos_entries`, `bx_photos_photos`, `bx_photos_media_resized`, `bx_photos_cmts`, `bx_photos_votes`, `bx_photos_votes_track`, `bx_photos_svotes`, `bx_photos_svotes_track`, `bx_photos_reactions`, `bx_photos_reactions_track`, `bx_photos_views_track`, `bx_photos_meta_keywords`, `bx_photos_meta_locations`, `bx_photos_meta_mentions`, `bx_photos_reports`, `bx_photos_reports_track`, `bx_photos_favorites_track`, `bx_photos_scores`, `bx_photos_scores_track`;
+DROP TABLE IF EXISTS `bx_photos_entries`, `bx_photos_photos`, `bx_photos_media_resized`, `bx_photos_cmts`, `bx_photos_votes`, `bx_photos_votes_track`, `bx_photos_svotes`, `bx_photos_svotes_track`, `bx_photos_reactions`, `bx_photos_reactions_track`, `bx_photos_views_track`, `bx_photos_meta_keywords_camera`, `bx_photos_meta_keywords`, `bx_photos_meta_locations`, `bx_photos_meta_mentions`, `bx_photos_reports`, `bx_photos_reports_track`, `bx_photos_favorites_track`, `bx_photos_scores`, `bx_photos_scores_track`;
 
 
 -- STORAGES & TRANSCODERS

+ 1 - 0
modules/boonex/photos/template/media-exif-value.html

@@ -0,0 +1 @@
+<bx_include_base:../modules/base/text/template/media-exif-value.html />

+ 1 - 0
modules/boonex/photos/template/media-exif.html

@@ -0,0 +1 @@
+<bx_include_base:../modules/base/text/template/media-exif.html />

+ 8 - 0
modules/boonex/russian/data/langs/bx_photos/ru.xml

@@ -143,6 +143,7 @@
 	<string name="_bx_photos_page_block_title_popular_keywords"><![CDATA[Популярные хэштеги]]></string>
     <string name="_bx_photos_page_block_title_cats"><![CDATA[Фото категории]]></string>
     <string name="_bx_photos_page_block_title_entry_info"><![CDATA[Инфо]]></string>
+    <string name="_bx_photos_page_block_title_entry_media_exif"><![CDATA[EXIF]]></string>
     <string name="_bx_photos_page_block_title_my_entries"><![CDATA[Мои фото]]></string>
     <string name="_bx_photos_page_block_title_sys_recent_entries_view_showcase"><![CDATA[Последние фото (Витринный просмотр)]]></string>
     <string name="_bx_photos_page_block_title_recent_entries_view_showcase"><![CDATA[Последние фото]]></string>
@@ -239,4 +240,11 @@
     <string name="_bx_photos_txt_n_views"><![CDATA[{0} просмотров]]></string>
     <string name="_bx_photos_txt_previous"><![CDATA[Предыдущее фото]]></string>
     <string name="_bx_photos_txt_next"><![CDATA[Следующее фото]]></string>
+    <string name="_bx_photos_txt_camera"><![CDATA[Камера]]></string>
+    <string name="_bx_photos_txt_focal_length"><![CDATA[Фокусное расстояние]]></string>
+    <string name="_bx_photos_txt_focal_length_value"><![CDATA[{0} мм]]></string>
+    <string name="_bx_photos_txt_aperture"><![CDATA[Диафрагма]]></string>
+    <string name="_bx_photos_txt_shutter_speed"><![CDATA[Выдержка]]></string>
+    <string name="_bx_photos_txt_shutter_speed_value"><![CDATA[{0} сек]]></string>
+    <string name="_bx_photos_txt_iso"><![CDATA[Чувствительность (ISO)]]></string>
 </resources>