Ignore:
Timestamp:
03/26/15 01:15:22 (5 years ago)
Author:
SergeD
Message:

version 1.2.23 - see changelog for details

Location:
extensions/greydragon
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • extensions/greydragon/admin/admin.tpl

    r31043 r31061  
    1515      <li><a href="http://piwigo.org/forum/viewtopic.php?pid=154192" target="_blank">{'Support'|@translate}</a>&nbsp;|&nbsp;</li> 
    1616      <li><a title="Follow me on Twitter" href="http://twitter.com/greydragon_th" target="_blank">{'Follow'|@translate}</a>&nbsp;|&nbsp;</li> 
    17       <li><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=9MWBSVJMWMJEU" target="_blank">{'Coffee Fund'|@translate}</a>&nbsp;|&nbsp;</li> 
     17      <li><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=GYVNZCNDMSD58" target="_blank">{'Coffee Fund'|@translate}</a>&nbsp;|&nbsp;</li> 
    1818      <li><a href="http://piwigo.org/ext/extension_view.php?eid=775" onclick="return false" target="_blank">{'Download'|@translate}</a></li> 
    1919    </ul> 
     
    102102      </li> 
    103103      <li><label><span class="graphicalCheckbox {if $options.p_animated_menu=="on"}icon-check{else}icon-check-empty{/if}">&nbsp;</span><input name="p_animated_menu" id="p_animated_menu" type="checkbox" value="on" {if $options.p_animated_menu=="on"}checked="checked"{/if}>{'Animate Menu'|@translate}</label></li> 
    104       <li><label><span class="graphicalCheckbox {if $options.p_main_menu_close=="on"}icon-check{else}icon-check-empty{/if}">&nbsp;</span><input name="p_main_menu_close" id="p_main_menu_close" type="checkbox" value="on" {if $options.p_main_menu_close=="on"}checked="checked"{/if}>{'Auto Close Popup Menu on Refresh'|@translate}</label></li> 
     104      <li><label><span class="graphicalCheckbox {if $options.p_main_menu_close=="on"}icon-check{else}icon-check-empty{/if}">&nbsp;</span><input name="p_main_menu_close" id="p_main_menu_close" type="checkbox" value="on" {if $options.p_main_menu_close=="on"}checked="checked"{/if}>{'Auto Close Popup Menu'|@translate}</label></li> 
    105105      <li> 
    106106        <select id="p_credits" name="p_credits"> 
  • extensions/greydragon/changelog.txt

    r31043 r31061  
    1818 
    1919=== Changelog === 
     20version 1.2.23 
     21+ Added Icon tooltips in Icon metadata tab mode. This would also cause title to be shown in metadata overlay window 
     22+ Added navigation arrows display when hover over photo. This is visual indicators to help with visualization of navigation. Use of image maps is still permitted 
     23+ "Auto Close Popup Menu on Refresh" is now "Auto Close Popup Menu" - menu would close as soon as mouse leaves the popup menu area 
     24+ Corrected PayPal link for "Donate" link in admin area 
     25- Further fixes for Picture Overlay mode - Tags' "edit" was missing for some browsers 
     26 
    2027version 1.2.22 * 
    2128+ Added Photo metadata tab targets in picture.tpl (see template for positioning): {*GD_META_ICO*}, {*GD_META_TXT*}, {*GD_META_CONTENT*} 
  • extensions/greydragon/css/styles.css

    r31043 r31061  
    119119body.static-menu .contentWithMenu .titrePage { margin-left: -194px; } 
    120120body.static-menu #mbCategories { margin-bottom: 1em; } 
    121  
    122 /* 
    123 body.static-menu .contentWithMenu ul.thumbnails, 
    124 body.static-menu .contentWithMenu ul.thumbnailCategories, 
    125 body.static-menu .contentWithMenu #theImageAndInfos,  
    126 body.static-menu .contentWithMenu .notification, 
    127 body.static-menu .contentWithMenu form.filter, 
    128 body.static-menu .contentWithMenu .category_search_results { padding-left: 200px; margin-left: 0; } 
    129  
    130 body.static-menu .contentWithMenu .titrePage { padding-left: 6px; } 
    131 body.static-menu .contentWithMenu .calendarCalBar { margin-left: 210px; } 
    132 */ 
    133121 
    134122/* Static header bottom */ 
     
    211199 
    212200#theImageAndInfos { display: block; width: 100%; position: relative; min-height: 30em; overflow: hidden; } 
     201 
     202#theImageAndInfos .gd-nav { display: block; width: 60px; height: 50px; margin: 0 0 0; position: absolute; z-index: 100; overflow: hidden; opacity: 0; cursor: pointer; color: #fff; -webkit-transition: all .3s ease; -moz-transition: all .3s ease; transition: all .3s ease; text-align: center; line-height: 48px; } 
     203#theImageAndInfos .gd-nav.nav-prev { left: 50%; margin-top: -30px; } 
     204#theImageAndInfos .gd-nav.nav-next { right: 50%; margin-top: -30px; } 
     205#theImageAndInfos .gd-nav.nav-up   { left: 50%; margin-left: -30px; top: 15px; } 
     206#theImageAndInfos .gd-nav.nav-zoom { left: 50%; margin-left: -30px; margin-top: -30px; } 
     207#theImageAndInfos:hover .nav-prev, 
     208#theImageAndInfos:hover .nav-next, 
     209#theImageAndInfos:hover .nav-up, 
     210#theImageAndInfos:hover .nav-zoom  { opacity: 1; } 
     211 
     212#theImageAndInfos a.gd-nav:before  { font-family: "Glyphicons Halflings"; font-size: 24px; display: inline-block; letter-spacing: 2px; letter-spacing: 0px; } 
     213#theImageAndInfos a.nav-prev:before { content: "\e079"; } 
     214#theImageAndInfos a.nav-next:before { content: "\e080"; } 
     215#theImageAndInfos a.nav-up:before   { content: "\e113"; } 
     216#theImageAndInfos a.nav-zoom:before { content: "\e003"; } 
     217 
    213218#theImage { display: block; width: 100%; vertical-align: top; padding: 10px 0 5px 0; } 
    214219#theImage img { padding: 2px; } 
     
    249254 
    250255#cboxContent { margin-top: 22px; } 
     256#cboxTitle   { padding-top: 0.3em; padding-left: 0.6em; } 
    251257#cboxLoadedContent .image-metadata-tab { display: block; } 
    252258 
     
    327333#tab-cart input[type="submit"] { margin-right: 1em; } 
    328334 
    329 #cboxLoadedContent>div { padding: 8px 10px 20px 10px; } 
     335#cboxLoadedContent>div { padding: 8px 10px 10px 10px; } 
    330336#cboxClose { right: 5px; } 
    331337 
     
    333339#tab-tags #TagsTable { width: 100%; min-width: 400px; z-index: 1; } 
    334340// #Tags { background: none; } 
    335 #Tags td.value { position: relative; vertical-align: top; } 
     341#Tags td.value { position: relative; vertical-align: top; min-height: 1.4em; display: block; } 
    336342#Tags div.tags-edit-marker { position: absolute; right: 0; bottom: 0; } 
  • extensions/greydragon/include/greydragon.class.php

    r31043 r31061  
    33if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 
    44 
    5 define('GDTHEME_VERSION', '1.2.22'); 
     5define('GDTHEME_VERSION', '1.2.23'); 
    66 
    77define("QUOTES_NONE",   FALSE); 
     
    327327</div>'; 
    328328 
    329     // <div class="gdHomeLinks"> 
    330     //   <a href="index.php?/categories">Gallery</a>&nbsp;&#9679;&nbsp;<a href="index.php?/contact">Contact</a> 
    331     //  </div> 
    332  
    333329    $query = 'UPDATE ' . $prefix . 'additionalpages ' 
    334330           . 'SET content = "' . pwg_db_real_escape_string($content) . '" ' 
     
    429425  } 
    430426 
     427  public function getPageTabs() { 
     428    // metadata array 
     429    // each tab represented by respected sub array 
     430    // sub array need to include  
     431    //   "id"         = unique id of the tab 
     432    //   "icon_class" = class to be used to render icon tabs 
     433    //   "title"      = tab or menu block title 
     434    //   "content"    = block content 
     435    //   "target"     = optional, rendering target - "left", "top", "right", "bottom", not supported, reserved for future use 
     436    //   "combine"    = combine_css or combine_js reference block 
     437    // 
     438    // prior to rendering, each element would be processed and converted into tab content in picture.tpl 
     439 
     440    $metadata = array(); 
     441    $metadata = trigger_change('gd_get_metadata', $metadata); 
     442 
     443    $meta_icon = ""; 
     444    $meta_text = ""; 
     445    $meta_content = ""; 
     446 
     447    foreach ($metadata as $item): 
     448 
     449      $id            = $item["id"]; 
     450      $icon_class    = $item["icon_class"]; 
     451      $title         = $item["title"]; 
     452      $block_content = $item["content"]; 
     453      $combine       = $item["combine"]; 
     454      $no_overlay    = $item["no_overlay"]; 
     455 
     456      if ($no_overlay): 
     457        $meta_icon .= '<li class="ico-btn btn-' . $id . '">' . $block_content . '</li>'; 
     458      else: 
     459        $meta_icon .= '<li class="meta-' . $id . '{if $ico_mode=="on"} ' . $icon_class . '{/if}{if $def_tab == "' . $id . '"} active{/if}"{if $ico_mode=="on"} title="{"' . $title . '"|@translate}"{/if}>{if $ico_mode=="off"}' . $title . '{/if}</li>'; 
     460      endif; 
     461 
     462      $meta_text .= '<li class="{if $ico_mode=="on"}' . $icon_class . '{/if}{if $def_tab == "' . $id . '"} active{/if}" rel="tab-' . $id . '"{if $ico_mode=="on"} title="{"' . $title . '"|@translate}"{/if}>{if $ico_mode=="off"}' . $title . '{/if}</li>'; 
     463      if (isset($combine)): 
     464        $meta_content .= '{strip}' . $combine . '{strip}'; 
     465      else: 
     466        $meta_content .= '<div id="tab-' . $id . '" class="image-metadata-tab">' . $block_content . '</div>'; 
     467      endif; 
     468    endforeach; 
     469 
     470    return array("icon" => $meta_icon, "text" => $meta_text, "content" => $meta_content); 
     471  } 
    431472} 
    432473 
  • extensions/greydragon/js/theme.menu.js

    r31043 r31061  
    3939 
    4040    if (p_hideabout) { jQuery('a[href$="about.php"]').parent().remove(); } 
     41 
     42    if (p_main_menu == "force_hide") { 
     43      $("#menubar").on('mouseleave', function(e) { 
     44        $(this).hide(); 
     45      }); 
     46    } 
    4147 
    4248    if (p_main_menu == 'static') {  
     
    8389      menuswitcher.hide(); 
    8490    } 
     91 
    8592  }); 
    8693}()); 
  • extensions/greydragon/template/header.tpl

    r31043 r31061  
    7373{if $includeMenu=="on"}  
    7474  {combine_script id='greydragon.scripts' load='footer' require='jquery' path='themes/greydragon/js/theme.menu.js' order=100} 
    75   {if $greydragon.p_main_menu_close == "on"} 
     75  {if ($greydragon.p_main_menu_close == "on") && (($greydragon.p_main_menu == "opened") || ($greydragon.p_main_menu == "closed"))} 
    7676  var p_main_menu = "force_hide"; 
    7777  {elseif isset({$greydragon.p_main_menu})} 
  • extensions/greydragon/template/picture_tab_ico.tpl

    r31043 r31061  
    1     {if isset( $COMMENT_IMG )}<li class="meta-desc{if $ico_mode=="on"} glyphicon glyphicon-eye-open{/if}{if $def_tab == "desc"} active{/if}">{if $ico_mode=="off"}{"Description"|@translate}{/if}</li>{/if} 
    2     <li class="meta-info {if $ico_mode=="on"} glyphicon glyphicon-info-sign{/if}{if $def_tab == "info"} active{/if}">{if $ico_mode=="off"}{"Info"|@translate}{/if}</li> 
    3     {if isset($metadata)}<li class="meta-exif{if $ico_mode=="on"} glyphicon glyphicon-camera{/if}{if $def_tab == "exif"} active{/if}">{if $ico_mode=="off"}{"Exif"|@translate}{/if}</li>{/if} 
    4     {if ($display_info.tags && (isset($related_tags) || ($greydragon.hasUserTags)))}<li class="meta-tags{if $ico_mode=="on"} glyphicon glyphicon-tags{/if}{if $def_tab == "tags"} active{/if}" >{if $ico_mode=="off"}{"Tags"|@translate}{/if}</li>{/if} 
    5     {if isset($COMMENT_COUNT)}<li class="meta-comment{if $ico_mode=="on"} glyphicon glyphicon-comment{/if}{if $def_tab == "comments"} active{/if}">{if $ico_mode=="off"}{$COMMENT_COUNT|@translate_dec:'%d comment':'%d comments'}{else}&nbsp;{$COMMENT_COUNT}{/if}</li>{/if} 
    6     {if isset($ppppp_e_mail)}<li class="meta-cart{if $ico_mode=="on"} glyphicon glyphicon-shopping-cart{/if}{if $def_tab == "cart"} active{/if}" >{if $ico_mode=="off"}{"Cart"|@translate}{/if}</li>{/if} 
     1  {if isset( $COMMENT_IMG )}<li class="meta-desc{if $ico_mode=="on"} glyphicon glyphicon-eye-open{/if}{if $def_tab == "desc"} active{/if}"{if $ico_mode=="on"} title="{"Description"|@translate}"{/if}>{if $ico_mode=="off"}{"Description"|@translate}{/if}</li>{/if} 
     2  <li class="meta-info {if $ico_mode=="on"} glyphicon glyphicon-info-sign{/if}{if $def_tab == "info"} active{/if}"{if $ico_mode=="on"} title="{"Info"|@translate}"{/if}>{if $ico_mode=="off"}{"Info"|@translate}{/if}</li> 
     3  {if isset($metadata)}<li class="meta-exif{if $ico_mode=="on"} glyphicon glyphicon-camera{/if}{if $def_tab == "exif"} active{/if}"{if $ico_mode=="on"} title="{"Exif"|@translate}"{/if}>{if $ico_mode=="off"}{"Exif"|@translate}{/if}</li>{/if} 
     4  {if ($display_info.tags && (isset($related_tags) || ($greydragon.hasUserTags)))}<li class="meta-tags{if $ico_mode=="on"} glyphicon glyphicon-tags{/if}{if $def_tab == "tags"} active{/if}"{if $ico_mode=="on"} title="{"Tags"|@translate}"{/if}>{if $ico_mode=="off"}{"Tags"|@translate}{/if}</li>{/if} 
     5  {if isset($COMMENT_COUNT)}<li class="meta-comment{if $ico_mode=="on"} glyphicon glyphicon-comment{/if}{if $def_tab == "comments"} active{/if}"{if $ico_mode=="on"} title="{"Comments"|@translate}"{/if}>{if $ico_mode=="off"}{$COMMENT_COUNT|@translate_dec:'%d comment':'%d comments'}{else}&nbsp;{$COMMENT_COUNT}{/if}</li>{/if} 
     6  {if isset($ppppp_e_mail)}<li class="meta-cart{if $ico_mode=="on"} glyphicon glyphicon-shopping-cart{/if}{if $def_tab == "cart"} active{/if}"{if $ico_mode=="on"} title="{"Cart"|@translate}"{/if}>{if $ico_mode=="off"}{"Cart"|@translate}{/if}</li>{/if} 
  • extensions/greydragon/template/picture_tab_txt.tpl

    r31043 r31061  
    1     {if isset( $COMMENT_IMG )}<li class="{if $ico_mode=="on"}glyphicon glyphicon-eye-open{/if}{if $def_tab == "desc"} active{/if}" rel="tab-desc">{if $ico_mode=="off"}{"Description"|@translate}{/if}</li>{/if} 
    2     <li class="{if $ico_mode=="on"}glyphicon glyphicon-info-sign{/if}{if $def_tab == "info"} active{/if}" rel="tab-meta">{if $ico_mode=="off"}{"Info"|@translate}{/if}</li> 
    3     {if isset($metadata)}<li class="{if $ico_mode=="on"}glyphicon glyphicon-camera{/if}{if $def_tab == "exif"} active{/if}" rel="tab-exif">{if $ico_mode=="off"}{"Exif"|@translate}{/if}</li>{/if} 
    4     {if ($display_info.tags && (isset($related_tags) || ($greydragon.hasUserTags)))}<li class="{if $ico_mode=="on"}glyphicon glyphicon-tags{/if}{if $def_tab == "tags"} active{/if}" rel="tab-tags">{if $ico_mode=="off"}{"Tags"|@translate}{/if}</li>{/if} 
    5     {if isset($COMMENT_COUNT)}<li class="{if $ico_mode=="on"}glyphicon glyphicon-comment{/if}{if $def_tab == "comments"} active{/if}" rel="tab-comment">{if $ico_mode=="off"}{$COMMENT_COUNT|@translate_dec:'%d comment':'%d comments'}{else}&nbsp;{$COMMENT_COUNT}{/if}</li>{/if} 
    6     {if isset($ppppp_e_mail)}<li class="{if $ico_mode=="on"}glyphicon glyphicon-shopping-cart{/if}{if $def_tab == "cart"} active{/if}" rel="tab-cart">{if $ico_mode=="off"}{"Cart"|@translate}{/if}</li>{/if} 
     1  {if isset( $COMMENT_IMG )}<li class="{if $ico_mode=="on"}glyphicon glyphicon-eye-open{/if}{if $def_tab == "desc"} active{/if}" rel="tab-desc"{if $ico_mode=="on"} title="{"Description"|@translate}"{/if}>{if $ico_mode=="off"}{"Description"|@translate}{/if}</li>{/if} 
     2  <li class="{if $ico_mode=="on"}glyphicon glyphicon-info-sign{/if}{if $def_tab == "info"} active{/if}" rel="tab-meta"{if $ico_mode=="on"} title="{"Info"|@translate}"{/if}>{if $ico_mode=="off"}{"Info"|@translate}{/if}</li> 
     3  {if isset($metadata)}<li class="{if $ico_mode=="on"}glyphicon glyphicon-camera{/if}{if $def_tab == "exif"} active{/if}" rel="tab-exif"{if $ico_mode=="on"} title="{"Exif"|@translate}"{/if}>{if $ico_mode=="off"}{"Exif"|@translate}{/if}</li>{/if} 
     4  {if ($display_info.tags && (isset($related_tags) || ($greydragon.hasUserTags)))}<li class="{if $ico_mode=="on"}glyphicon glyphicon-tags{/if}{if $def_tab == "tags"} active{/if}" rel="tab-tags"{if $ico_mode=="on"} title="{"Tags"|@translate}"{/if}>{if $ico_mode=="off"}{"Tags"|@translate}{/if}</li>{/if} 
     5  {if isset($COMMENT_COUNT)}<li class="{if $ico_mode=="on"}glyphicon glyphicon-comment{/if}{if $def_tab == "comments"} active{/if}" rel="tab-comment"{if $ico_mode=="on"} title="{"Comments"|@translate}"{/if}>{if $ico_mode=="off"}{$COMMENT_COUNT|@translate_dec:'%d comment':'%d comments'}{else}&nbsp;{$COMMENT_COUNT}{/if}</li>{/if} 
     6  {if isset($ppppp_e_mail)}<li class="{if $ico_mode=="on"}glyphicon glyphicon-shopping-cart{/if}{if $def_tab == "cart"} active{/if}" rel="tab-cart"{if $ico_mode=="on"} title="{"Cart"|@translate}"{/if}>{if $ico_mode=="off"}{"Cart"|@translate}{/if}</li>{/if} 
  • extensions/greydragon/themeconf.inc.php

    r31043 r31061  
    22/* 
    33Theme Name: GreyDragon 
    4 Version: 1.2.22 
     4Version: 1.2.23 
    55Description: GreyDragon Theme 
    66Theme URI: http://piwigo.org/ext/extension_view.php?eid=775 
     
    4848  $template->assign('greydragon', $themeCore->getConfig()); 
    4949 
     50  $template->smarty->registerPlugin("modifier", "get_x_half", "greydragon_array_getXhalf"); 
     51  $template->smarty->registerPlugin("modifier", "get_y_half", "greydragon_array_getYhalf"); 
     52 
    5053  // Allow dynamic addition of metadata tabs content 
    5154  add_event_handler('loc_begin_picture', 'greydragon_picture_handler'); 
     55} 
    5256 
     57function greydragon_array_getXhalf($array) { 
     58  if (isset($array) && (count($array) > 0)): 
     59    return (int)($array[0] / 2); 
     60  else: 
     61    return ""; 
     62  endif; 
    5363} 
     64 
     65function greydragon_array_getYhalf($array) { 
     66  if (isset($array) && (count($array) > 1)): 
     67    return (int)($array[1] / 2); 
     68  else: 
     69    return 1000; 
     70  endif; 
     71} 
     72 
    5473 
    5574function greydragon_picture_handler() { 
     
    6079 
    6180function greydragon_prepare_meta($tpl_source, &$smarty) { 
    62   // metadata array 
    63   // each tab represented by respected sub array 
    64   // sub array need to include  
    65   //   "id"         = unique id of the tab 
    66   //   "icon_class" = class to be used to render icon tabs 
    67   //   "title"      = tab or menu block title 
    68   //   "content"    = block content 
    69   //   "target"     = optional, rendering target - "left", "top", "right", "bottom", not supported, reserved for future use 
    70   //   "combine"    = combine_css or combine_js reference block 
    71   // 
    72   // prior to rendering, each element would be processed and converted into tab content in picture.tpl 
    7381 
    74   $metadata = array(); 
    75   $metadata = trigger_change('gd_get_metadata', $metadata); 
    76  
    77   $meta_icon = ""; 
    78   $meta_text = ""; 
    79   $meta_content = ""; 
    80  
    81   foreach ($metadata as $item): 
    82  
    83     $id            = $item["id"]; 
    84     $icon_class    = $item["icon_class"]; 
    85     $title         = $item["title"]; 
    86     $block_content = $item["content"]; 
    87     $combine       = $item["combine"]; 
    88     $no_overlay    = $item["no_overlay"]; 
    89  
    90     if ($no_overlay): 
    91       $meta_icon .= '<li class="ico-btn btn-' . $id . '">' . $block_content . '</li>'; 
    92     else: 
    93       $meta_icon .= '<li class="meta-' . $id . '{if $ico_mode=="on"} ' . $icon_class . '{/if}{if $def_tab == "' . $id . '"} active{/if}" >{if $ico_mode=="off"}' . $title . '{/if}</li>'; 
    94     endif; 
    95  
    96     $meta_text .= '<li class="{if $ico_mode=="on"}' . $icon_class . '{/if}{if $def_tab == "' . $id . '"} active{/if}" rel="tab-' . $id . '">{if $ico_mode=="off"}' . $title . '{/if}</li>'; 
    97     if (isset($combine)): 
    98       $meta_content .= '{strip}' . $combine . '{strip}'; 
    99     endif; 
    100     $meta_content .= '<div id="tab-' . $id . '" class="image-metadata-tab">' . $block_content . '</div>'; 
    101   endforeach; 
     82  $metadata = greyDragonCore::Instance()->getPageTabs(); 
    10283 
    10384  $content  = $tpl_source; 
    104   if ($meta_icon): 
     85  if ($metadata["icon"]): 
    10586    $pattern  = '#{\*GD_META_ICO\*}#'; 
    106     $replace  = $meta_icon . "{*GD_META_ICO*}"; 
     87    $replace  = $metadata["icon"] . "{*GD_META_ICO*}"; 
    10788    $content  = preg_replace($pattern, $replace, $content, 1); 
    10889  endif; 
    109   if ($meta_text): 
     90  if ($metadata["text"]): 
    11091    $pattern  = '#{\*GD_META_TXT\*}#'; 
    111     $replace  = $meta_text . "{*GD_META_TXT*}"; 
     92    $replace  = $metadata["text"] . "{*GD_META_TXT*}"; 
    11293    $content  = preg_replace($pattern, $replace, $content, 1); 
    11394  endif; 
    114   if ($meta_content): 
     95  if ($metadata["content"]): 
    11596    $pattern  = '#{\*GD_META_CONTENT\*}#'; 
    116     $replace  = $meta_content . "{*GD_META_CONTENT*}"; 
     97    $replace  = $metadata["content"] . "{*GD_META_CONTENT*}"; 
    11798    $content  = preg_replace($pattern, $replace, $content, 1); 
    11899  endif; 
     100 
     101  $pattern  = '#<div.*"theImageAndInfos".*>#'; 
     102  $replace  = '$0 
     103    {if isset($previous.U_IMG)}<a class="gd-nav nav-prev" title="{\'Previous\'|translate}" href="{$previous.U_IMG}">&nbsp;</a>{/if} 
     104    {if isset($next.U_IMG)    }<a class="gd-nav nav-next" title="{\'Next\'|translate}" href="{$next.U_IMG}">&nbsp;</a>{/if} 
     105    {if isset($U_UP)          }<a class="gd-nav nav-up"   title="{\'Up\'|translate}" href="{$U_UP}">&nbsp;</a>{/if} 
     106{*    <a class="gd-nav nav-zoom" title="{\'Full HD\'|translate}" href="{$U_UP}">&nbsp;</a> *} 
     107  {html_head}  
     108    <style type="text/css">{strip} 
     109      {if $current.selected_derivative} 
     110      #theImageAndInfos .gd-nav.nav-prev {ldelim} margin-left: -{$current.selected_derivative->get_size()|get_x_half}px !important; top: {$current.selected_derivative->get_size()|get_y_half}px; {rdelim} 
     111      #theImageAndInfos .gd-nav.nav-next {ldelim} margin-right: -{$current.selected_derivative->get_size()|get_x_half}px !important; top: {$current.selected_derivative->get_size()|get_y_half}px; {rdelim} 
     112      {else} 
     113      #theImageAndInfos .gd-nav.nav-prev {ldelim} margin-left: -30% !important; top: 50%; {rdelim} 
     114      #theImageAndInfos .gd-nav.nav-next {ldelim} margin-right: -30% !important; top: 50%; {rdelim} 
     115      {/if} 
     116{*      #theImageAndInfos .gd-nav.nav-zoom {ldelim} top: {$current.selected_derivative->get_size()|get_y_half}px; {rdelim} *} 
     117    {/strip}</style> 
     118  {/html_head}'; 
     119 
     120  $content  = preg_replace($pattern, $replace, $content, 1); 
     121 
    119122  return $content; 
    120123} 
Note: See TracChangeset for help on using the changeset viewer.