Changeset 3329
- Timestamp:
- 01/15/15 18:17:20 (9 years ago)
- Location:
- plugins/efiMetadatas
- Files:
-
- 2 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/efiMetadatas/_admin.php
r2304 r3329 14 14 15 15 require_once dirname(__FILE__).'/_widgets.php'; 16 ?> -
plugins/efiMetadatas/_define.php
r2304 r3329 10 10 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 11 11 # -- END LICENSE BLOCK ------------------------------------ 12 /* date */ #15-01-2015 12 13 13 14 if (!defined('DC_RC_PATH')){return;} … … 16 17 /* Name */ "efiMetadatas", 17 18 /* Description*/ "Show metadatas of first image of an entry", 18 /* Author */ "JC Denis", 19 /* Version */ '0.3', 20 /* Permissions */ 'admin' 19 /* Author */ "JC Denis, Pierre Van Glabeke", 20 /* Version */ '0.4', 21 /* Properties */ 22 array( 23 'permissions' => 'admin', 24 'type' => 'plugin', 25 'dc_min' => '2.6', 26 'support' => 'http://lab.dotclear.org/wiki/plugin/efiMetadatas', 27 'details' => 'http://plugins.dotaddict.org/dc2/details/efiMetadatas' 28 ) 21 29 ); 22 /* date */ #2010060523 ?> -
plugins/efiMetadatas/_prepend.php
r2304 r3329 16 16 17 17 $__autoload['efiMetadatas'] = dirname(__FILE__).'/inc/class.efimetadatas.php'; 18 ?> -
plugins/efiMetadatas/_public.php
r2304 r3329 14 14 15 15 require_once dirname(__FILE__).'/_widgets.php'; 16 ?> -
plugins/efiMetadatas/_widgets.php
r2304 r3329 30 30 31 31 $thumbnail_combo = array( 32 '-'=> '',32 __('none') => '', 33 33 __('square') => 'sq', 34 34 __('thumbnail') => 't', … … 52 52 __('Show empty metadatas'),0,'check' 53 53 ); 54 $w->efim->setting('content_only',__('Content only'),0,'check'); 55 $w->efim->setting('class',__('CSS class:'),''); 56 $w->efim->setting('offline',__('Offline'),0,'check'); 54 57 } 55 58 56 59 public static function publicEFIM($w) 57 60 { 58 global $core, $_ctx; 61 global $core, $_ctx; 62 63 if ($w->offline) 64 return; 59 65 60 66 # Not in post context … … 85 91 // keep empty meta if wanted 86 92 if (!$w->showmeta && empty($v[1])) continue; 87 $content .= '<li class="efi-'.$k.'"><strong>'.$v[0].' :</strong><br />'.$v[1].'</li>';93 $content .= '<li class="efi-'.$k.'"><strong>'.$v[0].'</strong><br />'.$v[1].'</li>'; 88 94 } 89 95 … … 94 100 if ($img['thumb']) 95 101 { 96 $thumb = 97 '<div class="img-box">'. 98 '<div class="img-thumbnail">'. 99 '<img alt="'.$img['title'].'" src="'.$img['thumb'].'" />'. 100 '</div>'. 101 "</div>\n"; 102 $thumb = 103 '<li><img class="img-thumbnail" alt="'.$img['title'].'" src="'.$img['thumb'].'" /></li>'; 102 104 } 103 104 return 105 '<div class="entryFirstImageMetas">'. 106 ($w->title ? '<h2>'.html::escapeHTML($w->title).'</h2>' : ''). 107 $thumb. 108 '<ul>'.$content.'</ul>'. 109 '</div>'; 105 106 $res = 107 ($w->title ? $w->renderTitle(html::escapeHTML($w->title)) : ''). 108 '<ul>'.$thumb.$content.'</ul>'; 109 110 return $w->renderDiv($w->content_only,'entryFirstImageMetas '.$w->class,'',$res); 110 111 } 111 112 } 112 ?> -
plugins/efiMetadatas/inc/class.efimetadatas.php
r2304 r3329 10 10 # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 11 11 # -- END LICENSE BLOCK ------------------------------------ 12 if (!defined('DC_RC_PATH')) {return;} 12 13 13 14 class efiMetadatas … … 22 23 # Image pattern 23 24 $pattern = '(?:'.preg_quote($p_site,'/').')?'.preg_quote($p_url,'/'); 24 $pattern = sprintf('/<img.+?src="%s(.*?\.(?:jpg| gif|png))"[^>]+/msu',$pattern);25 $pattern = sprintf('/<img.+?src="%s(.*?\.(?:jpg|jpeg|png|gif))"[^>]+/msu',$pattern); 25 26 26 27 # No image … … 29 30 $src = $thb = $alt = false; 30 31 $alt = $metas = $thumb = ''; 31 $allowed_ext = array('.jpg','.JPG','. png','.PNG','.gif','.GIF');32 $allowed_ext = array('.jpg','.JPG','.jpeg','.JPEG','.png','.PNG','.gif','.GIF'); 32 33 33 34 # Loop through images … … 85 86 { 86 87 $metas = array( 87 'Title' => array(__('Title '),''),88 'Description' => array(__('Description '),''),89 'Location' => array(__('Location '),''),90 'DateTimeOriginal' => array(__('Date '),''),91 'Make' => array(__('Manufacturer '),''),92 'Model' => array(__('Model '),''),93 'Lens' => array(__('Lens '),''),94 'ExposureProgram' => array(__('Program '),''),95 'Exposure' => array(__('Speed '),''),96 'FNumber' => array(__('Aperture '),''),97 'ISOSpeedRatings' => array(__('ISO '),''),98 'FocalLength' => array(__('Focal '),''),99 'ExposureBiasValue' => array(__('Exposure Bias '),''),100 'MeteringMode' => array(__('Metering mode '),'')88 'Title' => array(__('Title:'),''), 89 'Description' => array(__('Description:'),''), 90 'Location' => array(__('Location:'),''), 91 'DateTimeOriginal' => array(__('Date:'),''), 92 'Make' => array(__('Manufacturer:'),''), 93 'Model' => array(__('Model:'),''), 94 'Lens' => array(__('Lens:'),''), 95 'ExposureProgram' => array(__('Program:'),''), 96 'Exposure' => array(__('Speed:'),''), 97 'FNumber' => array(__('Aperture:'),''), 98 'ISOSpeedRatings' => array(__('ISO:'),''), 99 'FocalLength' => array(__('Focal:'),''), 100 'ExposureBiasValue' => array(__('Exposure Bias:'),''), 101 'MeteringMode' => array(__('Metering mode:'),'') 101 102 ); 102 103 … … 232 233 } 233 234 } 234 ?> -
plugins/efiMetadatas/locales/fr/main.po
r1989 r3329 1 # Language: français2 # Module: efiMetadatas - 0.13 # Date: 2009-12-18 00:28:474 # Translated with translater 1.35 6 1 msgid "" 7 2 msgstr "" … … 14 9 "MIME-Version: 1.0\n" 15 10 "Content-Transfer-Encoding: 8bit\n" 11 12 msgid "Show metadatas of first image of an entry" 13 msgstr "Afficher les métadonnées de la première image d'un billet" 16 14 17 15 #: _widgets.php:33 … … 47 45 msgstr "Afficher les métadonnées vides" 48 46 47 msgid "Description:" 48 msgstr "Description :" 49 50 msgid "Date:" 51 msgstr "Date :" 52 49 53 #: inc/class.efimetadatas.php:79 50 msgid "Location "51 msgstr "Lieu "54 msgid "Location:" 55 msgstr "Lieu :" 52 56 53 57 #: inc/class.efimetadatas.php:81 54 msgid "Manufacturer "55 msgstr "Fabricant "58 msgid "Manufacturer:" 59 msgstr "Fabricant :" 56 60 57 61 #: inc/class.efimetadatas.php:82 58 msgid "Model "59 msgstr "Mod el"62 msgid "Model:" 63 msgstr "Modèle :" 60 64 61 65 #: inc/class.efimetadatas.php:83 62 msgid "Lens "63 msgstr "Ob gectif"66 msgid "Lens:" 67 msgstr "Objectif :" 64 68 65 69 #: inc/class.efimetadatas.php:84 66 msgid "Program "67 msgstr "Programme "70 msgid "Program:" 71 msgstr "Programme :" 68 72 69 73 #: inc/class.efimetadatas.php:85 70 msgid "Speed "71 msgstr "Vitesse "74 msgid "Speed:" 75 msgstr "Vitesse :" 72 76 73 77 #: inc/class.efimetadatas.php:86 74 msgid "Aperture "75 msgstr "Ouverture "78 msgid "Aperture:" 79 msgstr "Ouverture :" 76 80 77 81 #: inc/class.efimetadatas.php:87 78 msgid "ISO "79 msgstr "ISO "82 msgid "ISO:" 83 msgstr "ISO :" 80 84 81 85 #: inc/class.efimetadatas.php:88 82 msgid "Focal "83 msgstr "Focale "86 msgid "Focal:" 87 msgstr "Focale :" 84 88 85 89 #: inc/class.efimetadatas.php:89 86 msgid "Exposure Bias "87 msgstr "Décalage d'exposition "90 msgid "Exposure Bias:" 91 msgstr "Décalage d'exposition :" 88 92 89 93 #: inc/class.efimetadatas.php:90 90 msgid "Metering mode "91 msgstr "Mode de mesure "94 msgid "Metering mode:" 95 msgstr "Mode de mesure :" 92 96 93 97 #: inc/class.efimetadatas.php:94 -
plugins/efiMetadatas/release.txt
r2304 r3329 1 0.4 15-01-2015 Pierre Van Glabeke 2 * ajout options dans le widget (class, content only, hors ligne) 3 * modifications affichage pour compatibilité currywurst 4 * modifications localisation 5 1 6 0.3 20100605 2 * Switched to DC 2.27 * Writed now for DC 2.2 or higher 3 8 4 9 0.2 20091218
Note: See TracChangeset
for help on using the changeset viewer.