Changeset 9402


Ignore:
Timestamp:
Feb 27, 2011, 10:39:39 PM (9 years ago)
Author:
Saint-Malo
Message:

1.0.5 27/02/2011
Correction pb compatibilité avec certains thèmes
Déplacement des boutons PayPal en début de table info

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/PayPalShoppingCart/main.inc.php

    r9269 r9402  
    22/*
    33Plugin Name: PayPal Shopping Cart
    4 Version: 1.0.4
     4Version: 1.0.5
    55Description: Append PayPal Shopping Cart on Piwigo to sell photos
    66Plugin URI: http://piwigo.org/ext/extension_view.php?eid=499
     
    4444Add de_DE and it_IT (par Sugar888)
    4545
     461.0.5   27/02/2011
     47Correction pb compatibilité avec certains thèmes
     48Déplacement des boutons PayPal en début de table info
     49
    4650*/
    4751if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
    4852define('PPPPP_PATH' , PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/');
    4953include_once (PPPPP_PATH.'/constants.php');
    50  
     54
    5155function ppppp_append_form($tpl_source, &$smarty){
    52  $pattern = '#</table>#'; 
     56 $pattern = '#<.*\"infoTable\".*>#';
    5357 $replacement = '
    5458  <tr>
     
    8084   </td>
    8185  </tr>
    82  </table>
    8386 
    8487 {literal}
     
    9295 {/literal}
    9396 ';
     97 if(!preg_match($pattern,$tpl_source)) {
     98  $pattern='#{if isset\(\$COMMENT_IMG\)}#';
     99  $replacement='<table>'.$replacement.'</table>';
     100  $replacement=$replacement.'$0';
     101  }
     102 else
     103  $replacement='$0'.$replacement;
    94104 return preg_replace($pattern, $replacement, $tpl_source,1);
    95105 }
Note: See TracChangeset for help on using the changeset viewer.