Dotclear

Changeset 3075


Ignore:
Timestamp:
08/10/11 23:05:51 (12 years ago)
Author:
JcDenis
Message:

dcQRcode 2011.08.10

  • Added some formats
  • Rewrited QR code library
  • Rewrited admin page
Location:
plugins/dcQRcode
Files:
17 added
2 deleted
16 edited

Legend:

Unmodified
Added
Removed
  • plugins/dcQRcode/_admin.php

    r2911 r3075  
    33# This file is part of dcQRcode, a plugin for Dotclear 2. 
    44#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
     5# Copyright (c) 2009-2011 JC Denis and contributors 
    66# jcdenis@gdwd.com 
    77#  
     
    2525     $core->auth->check('admin',$core->blog->id) 
    2626); 
     27 
     28$core->addBehavior('adminDashboardFavs',array('dcQRcodeAdminBehaviors','dashboardFavs')); 
     29  
     30class dcQRcodeAdminBehaviors 
     31{ 
     32    public static function dashboardFavs($core,$favs) 
     33    { 
     34        $favs['qrcode'] = new ArrayObject(array( 
     35            'qrcode', 
     36            __('QR code'), 
     37            'plugin.php?p=dcQRcode&tab=create', 
     38            'index.php?pf=dcQRcode/icon.png', 
     39            'index.php?pf=dcQRcode/icon-big.png', 
     40            'admin', 
     41            null, 
     42            null 
     43          )); 
     44    } 
     45} 
    2746?> 
  • plugins/dcQRcode/_define.php

    r2911 r3075  
    33# This file is part of dcQRcode, a plugin for Dotclear 2. 
    44#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
     5# Copyright (c) 2009-2011 JC Denis and contributors 
    66# jcdenis@gdwd.com 
    77#  
     
    1717     /* Description*/         "Use QR code on your blog", 
    1818     /* Author */             "JC Denis", 
    19      /* Version */            '0.7.2', 
     19     /* Version */            '2011.08.10', 
    2020     /* Permissions */        'admin' 
    2121); 
    22      /* date */          #20101130 
    2322?> 
  • plugins/dcQRcode/_install.php

    r2761 r3075  
    33# This file is part of dcQRcode, a plugin for Dotclear 2. 
    44#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
     5# Copyright (c) 2009-2011 JC Denis and contributors 
    66# jcdenis@gdwd.com 
    77#  
     
    2121{ 
    2222     # Check DC version 
    23      if (version_compare(str_replace("-r","-p",DC_VERSION),'2.2-alpha','<')) 
     23     if (version_compare(str_replace("-r","-p",DC_VERSION),'2.3','<')) 
    2424     { 
    25           throw new Exception('dcQRcode requires Dotclear 2.2'); 
     25          throw new Exception('dcQRcode requires Dotclear 2.3'); 
    2626     } 
    2727      
     
    4747     $s->put('qrc_active',false,'boolean','Enable plugin',false,true); 
    4848     $s->put('qrc_use_mebkm',true,'boolean','Use MEBKM anchor',false,true); 
    49      $s->put('qrc_img_size',128,'integer','Image size',false,true); 
     49     $s->put('qrc_img_size',196,'integer','Image size',false,true); 
    5050     $s->put('qrc_cache_use',true,'boolean','qrc_cache_use',false,true); 
    5151     $s->put('qrc_cache_path','','string','Custom cache path',false,true); 
     52     $s->put('qrc_custom_css','div.qrcode { float:right; }','string','Custom css',false,true); 
    5253     $s->put('qrc_nb_per_page',10,'integer','Number of records per page in admin',false,true); 
    5354     $s->put('qrc_api_url','http://chart.apis.google.com/chart?','string','',false,true); 
  • plugins/dcQRcode/_prepend.php

    r2911 r3075  
    33# This file is part of dcQRcode, a plugin for Dotclear 2. 
    44#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
     5# Copyright (c) 2009-2011 JC Denis and contributors 
    66# jcdenis@gdwd.com 
    77#  
     
    1313if (!defined('DC_RC_PATH')){return;} 
    1414 
    15 global $__autoload, $core; 
     15# Main class 
     16$__autoload['dcQRcode'] = dirname(__FILE__).'/inc/class.dc.qr.code.php'; 
     17$__autoload['dcQRcodeList'] = dirname(__FILE__).'/inc/lib.dc.qr.code.list.php'; 
     18$__autoload['QRcodeCore'] = dirname(__FILE__).'/inc/lib.qrc.core.php'; 
     19$__autoload['QRcodeType'] = dirname(__FILE__).'/inc/lib.qrc.type.php'; 
    1620 
    17 $__autoload['dcQRcode'] = dirname(__FILE__).'/inc/class.dc.qr.code.php'; 
    18 $__autoload['dcQRcodeIndexLib'] = dirname(__FILE__).'/inc/lib.dc.qr.code.index.php'; 
    19 $__autoload['dcQRcodeList'] = dirname(__FILE__).'/inc/lib.dc.qr.code.list.php'; 
     21# Formats 
     22$__autoload['QRcodeTypeTXT'] = dirname(__FILE__).'/inc/libs/lib.qrc.type.txt.php'; 
     23$core->addBehavior('registerType',create_function(null,'return array("TXT","QRcodeTypeTXT");')); 
     24$__autoload['QRcodeTypeURL'] = dirname(__FILE__).'/inc/libs/lib.qrc.type.url.php'; 
     25$core->addBehavior('registerType',create_function(null,'return array("URL","QRcodeTypeURL");')); 
     26$__autoload['QRcodeTypeMECARD'] = dirname(__FILE__).'/inc/libs/lib.qrc.type.mecard.php'; 
     27$core->addBehavior('registerType',create_function(null,'return array("MECARD","QRcodeTypeMECARD");')); 
     28$__autoload['QRcodeTypeBIZCARD'] = dirname(__FILE__).'/inc/libs/lib.qrc.type.bizcard.php'; 
     29$core->addBehavior('registerType',create_function(null,'return array("BIZCARD","QRcodeTypeBIZCARD");')); 
     30$__autoload['QRcodeTypeGEO'] = dirname(__FILE__).'/inc/libs/lib.qrc.type.geo.php'; 
     31$core->addBehavior('registerType',create_function(null,'return array("GEO","QRcodeTypeGEO");')); 
     32$__autoload['QRcodeTypeICAL'] = dirname(__FILE__).'/inc/libs/lib.qrc.type.ical.php'; 
     33$core->addBehavior('registerType',create_function(null,'return array("ICAL","QRcodeTypeICAL");')); 
     34$__autoload['QRcodeTypeMARKET'] = dirname(__FILE__).'/inc/libs/lib.qrc.type.market.php'; 
     35$core->addBehavior('registerType',create_function(null,'return array("MARKET","QRcodeTypeMARKET");')); 
     36$__autoload['QRcodeTypeIAPPLI'] = dirname(__FILE__).'/inc/libs/lib.qrc.type.iappli.php'; 
     37$core->addBehavior('registerType',create_function(null,'return array("IAPPLI","QRcodeTypeIAPPLI");')); 
     38$__autoload['QRcodeTypeMATMSG'] = dirname(__FILE__).'/inc/libs/lib.qrc.type.matmsg.php'; 
     39$core->addBehavior('registerType',create_function(null,'return array("MATMSG","QRcodeTypeMATMSG");')); 
     40$__autoload['QRcodeTypeTEL'] = dirname(__FILE__).'/inc/libs/lib.qrc.type.tel.php'; 
     41$core->addBehavior('registerType',create_function(null,'return array("TEL","QRcodeTypeTEL");')); 
     42$__autoload['QRcodeTypeSMSTO'] = dirname(__FILE__).'/inc/libs/lib.qrc.type.smsto.php'; 
     43$core->addBehavior('registerType',create_function(null,'return array("SMSTO","QRcodeTypeSMSTO");')); 
     44$__autoload['QRcodeTypeMMSTO'] = dirname(__FILE__).'/inc/libs/lib.qrc.type.mmsto.php'; 
     45$core->addBehavior('registerType',create_function(null,'return array("MMSTO","QRcodeTypeMMSTO");')); 
     46$__autoload['QRcodeTypeWIFI'] = dirname(__FILE__).'/inc/libs/lib.qrc.type.wifi.php'; 
     47$core->addBehavior('registerType',create_function(null,'return array("WIFI","QRcodeTypeWIFI");')); 
    2048 
     49# Public URL to serve QR code 
    2150$core->url->register( 
    2251     'dcQRcodeImage', 
     
    2756 
    2857# Add dcQrcode events on plugin activityReport 
    29 if (defined('ACTIVITY_REPORT')) 
    30 { 
     58if (defined('ACTIVITY_REPORT')) { 
    3159     require_once dirname(__FILE__).'/inc/lib.dcqrcode.activityreport.php'; 
    3260} 
  • plugins/dcQRcode/_public.php

    r2911 r3075  
    33# This file is part of dcQRcode, a plugin for Dotclear 2. 
    44#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
     5# Copyright (c) 2009-2011 JC Denis and contributors 
    66# jcdenis@gdwd.com 
    77#  
     
    1919 
    2020# Public behaviors 
    21 $core->addBehavior('publicHeadContent',array('dcQRcodeUrl','publicBeforeDocument')); 
     21$core->addBehavior('publicBeforeDocument',array('dcQRcodeUrl','publicBeforeDocument')); 
     22$core->addBehavior('publicHeadContent',array('dcQRcodeUrl','publicHeadContent')); 
    2223$core->addBehavior('publicEntryBeforeContent',array('dcQRcodeUrl','publicEntryBeforeContent')); 
    2324$core->addBehavior('publicEntryAfterContent',array('dcQRcodeUrl','publicEntryAfterContent')); 
     
    2728class dcQRcodeUrl extends dcUrlHandlers 
    2829{ 
     30     # Public URL to serve QR code previously encode 
    2931     public static function image($args) 
    3032     { 
    3133          global $core; 
    32  
     34           
    3335          if (!$core->blog->settings->dcQRcode->qrc_active) { 
    3436               self::p404(); 
     
    3638          } 
    3739 
    38           if (!preg_match('#^(.*?)\.png$#',$args,$m)) { 
    39                self::p404(); 
    40                return; 
    41           } 
    42  
     40          try { 
     41               $qrc = new dcQRcode($core,QRC_CACHE_PATH); 
     42          } 
     43          catch (Exception $e) { 
     44               self::p404(); 
     45               return; 
     46          } 
     47          $prefix = $qrc->getParam('prefix'); 
     48           
     49          if (!preg_match('#^'.preg_quote($prefix).'(.*?)\.png$#',$args,$m)) { 
     50               self::p404(); 
     51               return; 
     52          } 
     53           
    4354          if (empty($m[1])) { 
    4455               self::p404(); 
    4556               return; 
    4657          } 
    47  
    48           try 
    49           { 
    50                $qrc = new dcQRcode($core,QRC_CACHE_PATH); 
    51           } 
    52           catch (Exception $e) 
    53           { 
    54                self::p404(); 
    55                return; 
    56           } 
    57  
    58           $str = urldecode($m[1]); 
    59           if (null === $qrc->decode($str)) { 
    60                self::p404(); 
    61                return; 
    62           } 
    63  
     58           
     59          $id = urldecode($m[1]); 
     60          if (null === $qrc->decodeData($id)) { 
     61               self::p404(); 
     62               return; 
     63          } 
     64           
    6465          $qrc->getImage(); 
    65           return; 
    66      } 
    67  
     66          exit; 
     67     } 
     68      
     69     # Put QRcode class to context 
    6870     public static function publicBeforeDocument($core) 
    6971     { 
    7072          global $_ctx; 
    71  
     73           
    7274          $_ctx->qrcode = new dcQRcode($core,QRC_CACHE_PATH); 
    73           $_ctx->qrcode->setSize($core->blog->settings->dcQRcode->qrc_img_size); 
    74           $_ctx->qrcode->setParams('use_mebkm',$core->blog->settings->dcQRcode->qrc_use_mebkm); 
    75      } 
    76  
     75     } 
     76      
     77     # Custom css 
     78     public static function publicHeadContent($core) 
     79     { 
     80          $css = $core->blog->settings->dcQRcode->qrc_custom_css; 
     81          if ($css) { 
     82               echo  
     83               "\n<!-- CSS for dcQrCode --> \n". 
     84               "<style type=\"text/css\"> \n". 
     85               html::escapeHTML($css)."\n". 
     86               "</style>\n"; 
     87          } 
     88     } 
     89      
     90     # Place QRcode before entry content 
    7791     public static function publicEntryBeforeContent($core,$_ctx) 
    7892     { 
    7993          self::publicEntryBehaviorContent($core,$_ctx,'before'); 
    8094     } 
    81  
     95      
     96     # Place QR code after entry content 
    8297     public static function publicEntryAfterContent($core,$_ctx) 
    8398     { 
    8499          self::publicEntryBehaviorContent($core,$_ctx,'after'); 
    85100     } 
    86  
     101      
     102     # Generic place 
    87103     public static function publicEntryBehaviorContent($core,$_ctx,$place) 
    88104     { 
     
    97113          || !$core->blog->settings->dcQRcode->qrc_bhv_entrytplarchive && $_ctx->current_tpl == 'archive_month.html'  
    98114          ) return; 
    99  
     115           
    100116          $url = $_ctx->posts->getURL(); 
    101117          $title = $core->blog->name.' - '.$_ctx->posts->post_title; 
    102  
    103           $id = $_ctx->qrcode->encode($url,$title); 
    104  
     118           
     119          $_ctx->qrcode->setType('URL'); 
     120          $id = $_ctx->qrcode->encodeData($url,$title); 
     121           
    105122          echo  
    106           '<p class="qrcode"><img alt="QR code" src="'. 
    107           $core->blog->url.$core->url->getBase('dcQRcodeImage').'/'.$id. 
    108           '.png" /></p>'; 
     123          '<div class="qrcode">'. 
     124          '<img alt="QR code" src="'.$_ctx->qrcode->getURL($id).'" />'. 
     125          '</div>'; 
    109126     } 
    110127} 
     
    112129class dcQRcodeTpl 
    113130{ 
     131     # Custom template tag to generate QR code 
    114132     public static function QRcode($attr) 
    115133     { 
    116134          global $core, $_ctx; 
    117  
     135           
    118136          if (!$core->blog->settings->dcQRcode->qrc_active) return; 
    119  
     137           
    120138          $size = isset($attr['size']) ? (integer) $attr['size'] : 128; 
    121139          $type = isset($attr['type']) ? html::escapeHTML($attr['type']) : 'URL'; 
    122  
     140           
    123141          $res =  
    124142          "<?php \n". 
     
    127145          "\$id = null; ". 
    128146          "?>\n"; 
    129  
    130           /* Related to context */ 
    131147           
    132148          # posts 
     
    140156               "\$title = \$core->blog->name.' - '.\$_ctx->posts->post_title; \n". 
    141157               "\$url = \$_ctx->posts->getURL(); \n". 
    142                "\$id = \$_ctx->qrcode->encode(\$url,\$title); \n". 
     158               "\$id = \$_ctx->qrcode->encodeData(\$url,\$title); \n". 
    143159               "} ?>\n"; 
    144160          } 
    145  
    146161          # categories 
    147           if ($type == 'categories') 
     162          elseif ($type == 'categories') 
    148163          { 
    149164               $res .=  
     
    153168               "\$title = \$core->blog->name.' - '.\$_ctx->categories->cat_title; \n". 
    154169               "\$url = \$core->blog->url.\$core->url->getBase('category').'/'.\$_ctx->categories->cat_url; \n". 
    155                "\$id = \$_ctx->qrcode->encode(\$url,\$title); \n". 
     170               "\$id = \$_ctx->qrcode->encodeData(\$url,\$title); \n". 
    156171               "} ?>\n"; 
    157172          } 
    158  
    159173          # tags 
    160           if ($type == 'tags') 
     174          elseif ($type == 'tags') 
    161175          { 
    162176               $res .=  
     
    166180               "\$title = \$core->blog->name.' - '.\$_ctx->meta->meta_id; \n". 
    167181               "\$url = \$core->blog->url.\$core->url->getBase('tag').'/'.\$_ctx->meta->meta_id; \n". 
    168                "\$id = \$_ctx->qrcode->encode(\$url,\$title); \n". 
     182               "\$id = \$_ctx->qrcode->encodeData(\$url,\$title); \n". 
    169183               "} ?>\n"; 
    170184          } 
    171  
    172           /* Related to QRtype */ 
    173  
    174           # TXT 
    175           if ($type == 'TXT' && !empty($attr['str'])) 
    176           { 
    177                $res .=  
    178                "<?php \n". 
    179                "\$txt = '".html::escapeHTML($attr['str'])."'; \n". 
    180                "\$id = \$_ctx->qrcode->encode(\$str); \n". 
    181                "?>\n"; 
    182           } 
    183  
    184           # URL 
    185           if ($type == 'URL' && isset($attr['url'])) 
    186           { 
    187                $mebkm = ''; 
    188                if (isset($attr['use_mebkm'])) { 
    189                     $mebkm = " \$_ctx->qrcode->setParams('use_mebkm',".((boolean) $attr['use_mebkm'])."); \n"; 
    190                } 
    191  
    192                $res .=  
    193                "<?php \n". 
    194                $mebkm. 
    195                " \$title = '".(isset($attr['title']) ? html::escapeHTML($attr['title']) : '')."'; \n". 
    196                " \$url = '".html::escapeHTML($attr['url'])."'; \n". 
    197                " \$id = \$_ctx->qrcode->encode(\$url,\$title); \n". 
    198                "?>\n"; 
    199           } 
    200  
    201           # MECARD 
    202           if ($type == 'MECARD' && isset($attr['name'])) 
    203           { 
    204                $res .=  
    205                "<?php \n". 
    206                " \$name = '".html::escapeHTML($attr['name'])."'; \n". 
    207                " \$address = '".(isset($attr['address']) ? html::escapeHTML($attr['address']) : '')."'; \n". 
    208                " \$phone = '".(isset($attr['phone']) ? html::escapeHTML($attr['phone']) : '')."'; \n". 
    209                " \$email = '".(isset($attr['email']) ? html::escapeHTML($attr['email']) : '')."'; \n". 
    210                " \$id = \$_ctx->qrcode->encode(\$name,\$address,\$phone,\$email); \n". 
    211                "?>\n"; 
    212           } 
    213  
    214           # GEO 
    215           if ($type == 'GEO' && isset($attr['latitude']) && isset($attr['longitude'])) 
    216           { 
    217                $res .=  
    218                "<?php \n". 
    219                " \$latitude = '".html::escapeHTML($attr['latitude'])."'; \n". 
    220                " \$longitude = '".html::escapeHTML($attr['longitude'])."'; \n". 
    221                " \$altitude = '".(isset($attr['altitude']) ? html::escapeHTML($attr['altitude']) : '0')."'; \n". 
    222                " \$id = \$_ctx->qrcode->encode(\$latitude,\$longitude,\$altitude); \n". 
    223                "?>\n"; 
    224           } 
    225  
    226           # MARKET 
    227           if ($type == 'MARKET' && isset($attr['cat']) && isset($attr['search'])) 
    228           { 
    229                $res .=  
    230                "<?php \n". 
    231                " \$cat = '".html::escapeHTML($attr['cat'])."'; \n". 
    232                " \$search = '".html::escapeHTML($attr['search'])."'; \n". 
    233                " \$id = \$_ctx->qrcode->encode(\$cat,\$search); \n". 
    234                "?>\n"; 
    235           } 
    236  
    237           # ICAL 
    238           if ($type == 'ICAL' && isset($attr['summary']) && isset($attr['start-date']) && isset($attr['end-date'])) 
    239           { 
    240                $res .=  
    241                "<?php \n". 
    242                " \$summary = '".html::escapeHTML($attr['summary'])."'; \n". 
    243                " \$start_date = '".html::escapeHTML($attr['start-date'])."'; \n". 
    244                " \$end_date = '".html::escapeHTML($attr['end-date'])."'; \n". 
    245                " \$id = \$_ctx->qrcode->encode(\$summary,\$start_date,\$end_date); \n". 
    246                "?>\n"; 
    247           } 
    248  
    249  
    250           # --BEHAVIOR-- dcQRcodeTemplate 
    251           $res .= $core->callBehavior('dcQRcodeTemplate',$attr); 
    252  
    253  
    254           $res .= 
     185          else { 
     186               $res .= $_ctx->qrcode->getTemplate($attr); 
     187          } 
     188           
     189          return  
    255190          "<?php if (\$id) { \n". 
    256191          "echo '". 
    257192          "<p class=\"qrcode\">". 
    258           "<img alt=\"QR code\" src=\"'.". 
    259           "\$core->blog->url.\$core->url->getBase('dcQRcodeImage').'/'.\$id.". 
    260           "'.png\" />". 
     193          "<img alt=\"QR code\" src=\"'.\$_ctx->qrcode->getURL(\$id).'\" />". 
    261194          "</p>'; \n". 
    262           // regain standard settings 
    263           "\$_ctx->qrcode->setSize(\$core->blog->settings->dcQRcode->qrc_img_size); \n". 
    264           "\$_ctx->qrcode->setParams('use_mebkm',\$core->blog->settings->dcQRcode->qrc_use_mebkm); \n". 
    265195          "unset(\$id); } ?> \n"; 
    266  
    267           return $res; 
    268196     } 
    269197} 
     
    284212          ) 
    285213     ); 
    286  
     214      
    287215     public static function posts($w) 
    288216     { 
    289217          global $core, $_ctx; 
    290  
     218           
    291219          # plugin active 
    292220          if (!$core->blog->settings->dcQRcode->qrc_active) return; 
    293  
     221           
    294222          # qrc class 
    295223          $qrc = new dcQRcode($core,QRC_CACHE_PATH); 
    296224          $qrc->setSize($w->size); 
    297225          $qrc->setType('URL'); 
    298           $qrc->setParams('use_mebkm',$core->blog->settings->dcQRcode->qrc_use_mebkm); 
    299  
     226           
    300227          $url = $core->blog->url; 
    301228          $title = $core->blog->name.' - '; 
    302229          $id = null; 
    303  
     230           
    304231          # posts 
    305232          if ($w->context == 'posts') 
     
    310237               $url = $_ctx->posts->getURL(); 
    311238               $title .= $_ctx->posts->post_title; 
    312                $id = $qrc->encode($url,$title); 
     239               $id = $qrc->encodeData($url,$title); 
    313240          } 
    314241          # categories 
     
    322249                    '/'.$_ctx->categories->cat_url; 
    323250               $title .= $_ctx->categories->cat_title; 
    324                $id = $qrc->encode($url,$title); 
     251               $id = $qrc->encodeData($url,$title); 
    325252          } 
    326253          # tags 
     
    334261                    '/'.$_ctx->meta->meta_id; 
    335262               $title .= $_ctx->meta->meta_id; 
    336                $id = $qrc->encode($url,$title); 
    337           } 
    338  
     263               $id = $qrc->encodeData($url,$title); 
     264          } 
     265           
    339266          if (!$id) return; 
    340  
     267           
    341268          # Display 
    342269          $res = 
    343           '<div class="qrc_posts">'. 
     270          '<div class="qrcode-widget">'. 
    344271          ($w->title ? '<h2>'.html::escapeHTML($w->title).'</h2>' : ''). 
    345           '<p class="qrcode">'. 
    346           '<img alt="QR code" src="'. 
    347                $core->blog->url.$core->url->getBase('dcQRcodeImage').'/'.$id. 
    348           '.png" />'. 
    349           '</p></div>'; 
    350  
     272          '<img alt="QR code" src="'.$qrc->getURL($id).'" />'. 
     273          '</div>'; 
     274           
    351275          return $res; 
    352276     } 
  • plugins/dcQRcode/_uninstall.php

    r2024 r3075  
    33# This file is part of dcQRcode, a plugin for Dotclear 2. 
    44#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
     5# Copyright (c) 2009-2011 JC Denis and contributors 
    66# jcdenis@gdwd.com 
    77#  
  • plugins/dcQRcode/_widgets.php

    r2024 r3075  
    33# This file is part of dcQRcode, a plugin for Dotclear 2. 
    44#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
     5# Copyright (c) 2009-2011 JC Denis and contributors 
    66# jcdenis@gdwd.com 
    77#  
     
    1919     public static function posts($w) 
    2020     { 
     21          global $core; 
     22           
     23          $qrc = new dcQRcode($core,QRC_CACHE_PATH); 
     24          $combo_sizes = array(); 
     25          foreach($qrc->getAccept('size') as $px) 
     26          { 
     27               $combo_sizes[sprintf(__('%sx%s pixels'),$px,$px)] = $px; 
     28          } 
     29           
    2130          # Create widget 
    2231          $w->create( 
     
    3847               128, 
    3948               'combo', 
    40                array( 
    41                     '64x64 pixels' => 64, 
    42                     '92x92 pixels' => 92, 
    43                     '128x128 pixels' => 128, 
    44                     '256x256 pixels' => 256, 
    45                     '512x512 pixels' => 512 
    46                ) 
     49               $combo_sizes 
    4750          ); 
    4851          # context 
  • plugins/dcQRcode/inc/class.dc.qr.code.php

    r2911 r3075  
    33# This file is part of dcQRcode, a plugin for Dotclear 2. 
    44#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
     5# Copyright (c) 2009-2011 JC Denis and contributors 
    66# jcdenis@gdwd.com 
    77#  
     
    1313if (!defined('DC_RC_PATH')){return;} 
    1414 
    15 class dcQRcode 
     15class dcQRcode extends QRcodeCore 
    1616{ 
    1717     public $core; 
     
    1919     public $blog; 
    2020     public $table; 
    21  
    22      public $qrc_api_url = 'http://chart.apis.google.com/chart?'; 
    23      public $qrc_api_ec_level = 'L'; 
    24      public $qrc_api_ec_margin = 2; 
    25      public $qrc_api_out_enc = 'UTF-8'; 
    26  
    27      protected $data = ''; 
    28      protected $id = ''; 
    29      protected $type = 'URL'; 
    30      protected $size = 128; 
    31      protected $cache_path = null; 
    32      protected $params = array('use_mebkm'=>true); 
    33  
     21      
    3422     public function __construct($core,$cache_path=null) 
    3523     { 
     
    3826          $this->blog = $core->con->escape($core->blog->id); 
    3927          $this->table = $core->prefix.'qrcode'; 
    40  
    41           $this->cache_path = $cache_path; 
    42  
    43           if ($core->blog->settings->dcQRcode->qrc_api_url) 
    44           { 
    45                $this->qrc_api_url = $core->blog->settings->dcQRcode->qrc_api_url; 
    46           } 
    47           if ($core->blog->settings->dcQRcode->qrc_api_ec_level) 
    48           { 
    49                $this->qrc_api_ec_level = $core->blog->settings->dcQRcode->qrc_api_ec_level; 
    50           } 
    51           if ($core->blog->settings->dcQRcode->qrc_api_ec_margin) 
    52           { 
    53                $this->qrc_api_ec_margin = $core->blog->settings->dcQRcode->qrc_api_ec_margin; 
    54           } 
    55           if ($core->blog->settings->dcQRcode->qrc_api_out_enc) 
    56           { 
    57                $this->qrc_api_out_enc = $core->blog->settings->dcQRcode->qrc_api_out_enc; 
    58           } 
    59      } 
    60  
    61      public function setType($type='URL') 
    62      { 
    63           $this->type = (string) $type; 
    64      } 
    65  
    66      public function setSize($size=128) 
    67      { 
    68           $size = (integer) $size; 
    69           $this->size = $size > 10 && $size < 550 ? $size : 128; 
    70      } 
    71  
    72      public function setParams($ns,$params) 
    73      { 
    74           $ns = (string) $ns; 
    75           $this->params[$ns] = $params; 
    76      } 
    77  
     28           
     29          $core->blog->settings->addNameSpace('dcQRcode'); 
     30          $s = $core->blog->settings->dcQRcode; 
     31           
     32          if ($cache_path) 
     33               $this->setCachePath($cache_path); 
     34           
     35          if ($s->qrc_api_url) 
     36               $this->setApiURL($s->qrc_api_url); 
     37           
     38          if ($s->qrc_api_ec_level) 
     39               $this->setErrorCorrectionLevel($s->qrc_api_ec_level); 
     40           
     41          if ($s->qrc_api_out_enc) 
     42               $this->setOutputEncoding($s->qrc_api_out_enc); 
     43           
     44          if ($s->qrc_api_ec_margin) 
     45               $this->setMargin($s->qrc_api_ec_margin); 
     46           
     47          if ($s->qrc_img_size) 
     48               $this->setSize($s->qrc_img_size); 
     49           
     50          if ($s->qrc_use_mebkm) 
     51               $this->setMebkm($s->qrc_use_mebkm); 
     52           
     53          $list = $this->core->getBehaviors('registerType'); 
     54           
     55          if (!empty($list)) { 
     56               foreach($list as $callback) 
     57               { 
     58                    try { 
     59                         list($type,$class) = call_user_func($callback); 
     60                         $this->registerType($type,$class); 
     61                    } 
     62                    catch (Exception $e) {} 
     63               } 
     64          } 
     65     } 
     66      
     67     protected function tweakEncode($args) 
     68     { 
     69          # --BEHAVIOR-- dcQRcodeEncode 
     70          $this->core->callBehavior('dcQRcodeEncode',$this,$args); 
     71     } 
     72      
     73     protected function tweakDecode($id) 
     74     { 
     75          # --BEHAVIOR-- dcQRcodeDecode 
     76          $this->core->callBehavior('dcQRcodeDecode',$this,$id); 
     77     } 
     78      
     79     public function getURL($id) 
     80     { 
     81          return $this->core->blog->url.$this->core->url->getBase('dcQRcodeImage').'/'.$this->getParam('prefix').$id.'.png'; 
     82     } 
     83      
     84     # Retrieve qrcode info in db according to current id 
    7885     protected function getId() 
    7986     { 
     
    8390               "AND qrcode_id='".$this->id."' ". 
    8491               $this->con->limit(1)); 
    85  
    86           if (!$rs->isEmpty()) 
    87           { 
     92           
     93          if (!$rs->isEmpty()) { 
    8894               $this->id = $rs->qrcode_id; 
    8995               $this->data = $rs->qrcode_data; 
    90                $this->size = $rs->qrcode_size; 
    91                $this->type = $rs->qrcode_type; 
     96               $this->setSize($rs->qrcode_size); 
     97               $this->setType($rs->qrcode_type); 
    9298               return true; 
    9399          } 
    94           else 
    95           { 
    96                $this->id = null; 
    97                $this->data = null; 
     100          else { 
     101               $this->id = $this->data = null; 
    98102               return false; 
    99103          } 
    100104     } 
    101  
     105      
     106     # Add qrcode info in db and return id 
    102107     protected function setId() 
    103108     { 
     
    105110               'SELECT qrcode_id FROM '.$this->table.' '. 
    106111               "WHERE blog_id='".$this->blog."' ". 
    107                "AND qrcode_size='".$this->size."' ". 
    108                "AND qrcode_type='".$this->type."' ". 
     112               "AND qrcode_size = ".((integer) $this->getParam('size'))." ". 
     113               "AND qrcode_type='".$this->getParam('type')."' ". 
    109114               "AND qrcode_data='".$this->con->escape($this->data)."' ". 
    110115               $this->con->limit(1)); 
    111  
    112           if ($rs->isEmpty()) 
    113           { 
     116           
     117          if ($rs->isEmpty()) { 
    114118               $this->id = $this->con->select( 
    115                     'SELECT MAX(qrcode_id) FROM '.$this->table)->f(0) + 1; 
    116  
     119                    'SELECT MAX(qrcode_id) FROM '.$this->table 
     120               )->f(0) + 1; 
     121                
    117122               $cur = $this->core->con->openCursor($this->table); 
    118123               $this->core->con->writeLock($this->table); 
    119  
     124                
    120125               $cur->blog_id = $this->blog; 
    121                $cur->qrcode_type = (string) $this->type; 
     126               $cur->qrcode_type = (string) $this->getParam('type'); 
    122127               $cur->qrcode_id = (integer) $this->id; 
    123                $cur->qrcode_data = $this->con->escape((string) $this->data); 
    124                $cur->qrcode_size = (integer) $this->size; 
    125  
    126  
     128               $cur->qrcode_data = (string) $this->data; 
     129               $cur->qrcode_size = (integer) $this->getParam('size'); 
     130                
    127131               # --BEHAVIOR-- dcQRcodeBeforeCreate 
    128132               $this->core->callBehavior('dcQRcodeBeforeCreate',$cur); 
    129  
    130  
     133                
    131134               $cur->insert(); 
    132135               $this->core->con->unlock(); 
    133  
    134  
     136                
    135137               # --BEHAVIOR-- dcQRcodeAfterCreate 
    136138               $this->core->callBehavior('dcQRcodeAfterCreate',$cur); 
    137  
    138  
    139           } 
    140           else 
    141           { 
     139                
     140          } 
     141          else { 
    142142               $this->id = $rs->qrcode_id; 
    143143          } 
    144144          return $this->id; 
    145145     } 
    146  
    147      public function getArgs() 
    148      { 
    149           $args = array(); 
    150           $args['cht'] = 'qr'; 
    151           $args['chs'] = $this->size.'x'.$this->size; 
    152           $args['choe'] = $this->qrc_api_out_enc; 
    153           $args['chld'] = $this->qrc_api_ec_level.'|'.$this->qrc_api_ec_margin; 
    154           $args['chl'] = $this->tweakData(); 
    155  
    156           return $args; 
    157      } 
    158  
    159      public function getImage($force_no_cache=false) 
    160      { 
    161           $f = $this->cache_path.'/'.$this->size.'-'.$this->id.'.png'; 
    162           if ($this->cache_path !== null && file_exists($f) && !$force_no_cache) 
    163           { 
    164                readfile($f); 
    165           } 
    166           else 
    167           { 
    168                try 
    169                { 
    170                     $args = $this->getArgs(); 
    171                     $path = ''; 
    172                     $client = netHttp::initClient($this->qrc_api_url,$path); 
    173                     $client->setUserAgent('dcQRcode - http://dotclear.jcdenis.com/'); 
    174                     $client->useGzip(false); 
    175                     $client->setPersistReferers(false); 
    176                     $client->get($path,$args); 
    177  
    178                     $response = $client->getContent(); 
    179                } 
    180                catch (Exception $e) 
    181                { 
    182                     throw new Exception('An error occured: '.$e->getMessage()); 
    183                } 
    184  
    185                if ($client->getStatus() != 200) 
    186                { 
    187                     throw new Exception('Failed to get content: <pre>'.print_r($args,true).'</pre>'); 
    188                } 
    189                else 
    190                { 
    191                     if ($this->cache_path !== null && !$force_no_cache) 
    192                     { 
    193                          @file_put_contents($f,$response); 
    194                     } 
    195                     echo $response; 
    196                } 
    197           } 
    198           exit; 
    199      } 
    200  
    201      public function cleanCache() 
    202      { 
    203           if (!is_dir($this->cache_path)) return null; 
    204  
    205           return files::delTree($this->cache_path); 
    206      } 
    207  
     146      
     147     # List qrcodes info from db 
    208148     public function getQRcodes($p,$count_only=false) 
    209149     { 
    210150          if ($count_only) 
    211151               $strReq = 'SELECT count(Q.qrcode_id) '; 
    212  
     152           
    213153          else { 
    214154               $content_req = ''; 
     
    216156               if (!empty($p['columns']) && is_array($p['columns'])) 
    217157                    $content_req .= implode(', ',$p['columns']).', '; 
    218  
     158                
    219159               $strReq = 'SELECT Q.qrcode_type, Q.qrcode_id, Q.qrcode_data, '. 
    220160                    $content_req.'Q.qrcode_size '; 
    221161          } 
    222  
     162           
    223163          $strReq .= 'FROM '.$this->table.' Q '; 
    224  
     164           
    225165          if (!empty($p['from'])) 
    226166               $strReq .= $p['from'].' '; 
    227  
     167           
    228168          $strReq .= "WHERE Q.blog_id = '".$this->blog."' "; 
    229  
     169           
    230170          if (isset($p['qrcode_type'])) { 
    231  
    232171               if (is_array($p['qrcode_type']) && !empty($p['qrcode_type'])) 
    233172                    $strReq .= 'AND qrcode_type '.$this->con->in($p['qrcode_type']); 
    234  
    235173               elseif ($p['qrcode_type'] != '') 
    236174                    $strReq .= "AND qrcode_type = '".$this->con->escape($p['qrcode_type'])."' "; 
    237175          } 
    238  
     176           
    239177          if (isset($p['qrcode_id'])) { 
    240  
    241178               if (is_array($p['qrcode_id']) && !empty($p['qrcode_id'])) 
    242179                    $strReq .= 'AND qrcode_id '.$this->con->in($p['qrcode_id']); 
    243  
    244180               elseif ($p['qrcode_id'] != '') 
    245181                    $strReq .= "AND qrcode_id = '".$this->con->escape($p['qrcode_id'])."' "; 
    246182          } 
    247  
     183           
    248184          if (!empty($p['qrcode_data'])) { 
    249  
    250185                    $strReq .= "AND qrcode_data = '".$this->con->escape($p['qrcode_data'])."' "; 
    251186          } 
    252  
     187           
    253188          if (isset($p['qrcode_size'])) { 
    254  
    255189               if (is_array($p['qrcode_size']) && !empty($p['qrcode_size'])) 
    256190                    $strReq .= 'AND qrcode_size '.$this->con->in($p['qrcode_size']); 
    257  
    258191               elseif ($p['qrcode_size'] != '') 
    259192                    $strReq .= "AND qrcode_size = '".$this->con->escape($p['qrcode_size'])."' "; 
    260193          } 
    261  
     194           
    262195          if (!empty($p['sql']))  
    263196               $strReq .= $p['sql'].' '; 
    264  
     197           
    265198          if (!$count_only) { 
    266199               $strReq .= empty($p['order']) ? 
     
    268201                    'ORDER BY '.$this->con->escape($p['order']).' '; 
    269202          } 
    270  
     203           
    271204          if (!$count_only && !empty($p['limit']))  
    272205               $strReq .= $this->con->limit($p['limit']); 
    273  
     206           
    274207          $rs = $this->con->select($strReq); 
    275208          $rs->core = $this->core; 
    276  
    277  
     209          $rs->qrc = $this; 
     210           
    278211          # --BEHAVIOR-- coreBlogGetPosts 
    279212          $this->core->callBehavior('blogGetQRcodes',$rs); 
    280  
    281  
     213           
    282214          return $rs; 
    283215     } 
    284  
     216      
     217     # Delete qrcodes info from db according to its id 
    285218     public function delQRcode($id) 
    286219     { 
    287220          $id = (integer) $id; 
    288  
    289  
     221           
    290222          # --BEHAVIOR-- dcQRcodeBeforeDelete 
    291223          $this->core->callBehavior('dcQRcodeBeforeDelete',$id); 
    292  
    293  
     224           
     225          $file = $this->imagePath($id); 
     226          if (file_exists($file)) { 
     227               if (!files::isDeletable($file)) { 
     228                    return false; 
     229               } 
     230               if (!@unlink($file)) { 
     231                    return false; 
     232               } 
     233          } 
     234           
    294235          return $this->con->execute( 
    295236               'DELETE FROM '.$this->table.' '. 
     
    298239          ); 
    299240     } 
    300  
    301      public static function escape($str,$escape=false,$toUTF8=true) 
    302      { 
    303           if ($toUTF8) 
    304           { 
    305                $str = text::toUTF8($str); 
    306           } 
    307 /* 
    308           if ($escape) 
    309           { 
    310                $str = str_replace( 
    311                     array('¥',':',';',','), 
    312                     array('¥¥','¥:','¥;','¥,'), 
    313                     $str 
    314                ); 
    315           } 
    316 //*/ 
    317           return $str; 
    318      } 
    319  
    320      public static function unescape($str) 
    321      { 
    322 /* 
    323           $str = str_replace( 
    324                array('¥¥','¥:','¥;','¥,'), 
    325                array('¥',':',';',','), 
    326                $str 
    327           ); 
    328 //*/ 
    329           return $str; 
    330      } 
    331  
    332      public function decode($id) 
    333      { 
    334           $this->id = (integer) $id; 
    335  
    336  
    337           # --BEHAVIOR-- dcQRcodeDecode 
    338           $this->core->callBehavior('dcQRcodeDecode',$this,$id); 
    339  
    340  
    341           $this->getId(); 
    342  
    343           return $this->id; 
    344      } 
    345  
    346      public function encode() 
    347      { 
    348           $num_args = func_num_args(); 
    349           $args = func_get_args(); 
    350  
    351           $data = ''; 
    352  
    353           # TXT 
    354           if ($this->type == 'TXT' && !empty($args[0])) 
    355           { 
    356                $data = self::escape($args[0]); 
    357           } 
    358           # URL 
    359           if ($this->type == 'URL' && $num_args > 0) 
    360           { 
    361                if ($this->params['use_mebkm']) 
    362                { 
    363                     $data = 'MEBKM:TITLE:'; 
    364                     $data .= !empty($args[1]) ? self::escape($args[1],true) : 'link'; 
    365                     $data .= ';URL:'.self::escape($args[0],true).';'; 
    366                } 
    367                else 
    368                { 
    369                     $data = self::escape($args[0]); 
    370                } 
    371           } 
    372           # MECARD 
    373           if ($this->type == 'MECARD' && $num_args > 3) 
    374           { 
    375                $data = 'MECARD:'; 
    376                $data .= 'N:'.self::escape($args[0],true).';'; 
    377                $data .= 'ADR:'.self::escape($args[1],true).';'; 
    378  
    379                foreach($args[2] as $param) 
    380                { 
    381                     if (!empty($param)) 
    382                          $data .= 'TEL:'.self::escape($param,true).';'; 
    383                } 
    384  
    385                foreach($args[3] as $param) 
    386                { 
    387                     if (!empty($param)) 
    388                          $data .= 'EMAIL:'.self::escape($param,true).';'; 
    389                } 
    390  
    391                if (!empty($args[4])) 
    392                     $data .= 'URL:'.self::escape($args[4],true).';'; 
    393  
    394                if (!empty($args[5])) 
    395                     $data .= 'BDAY:'.self::escape($args[5],true).';'; 
    396  
    397                if (!empty($args[6])) 
    398                     $data .= 'NOTE:'.self::escape($args[6],true).';'; 
    399  
    400                if (!empty($args[7])) 
    401                     $data .= 'NICKNAME:'.self::escape($args[7],true).';'; 
    402  
    403                if (!empty($args[8])) 
    404                     $data .= 'TEL-AV:'.self::escape($args[8],true).';'; 
    405  
    406                if (!empty($args[9])) 
    407                     $data .= 'SOUND:'.self::escape($args[9],true).';'; 
    408  
    409                $data .= ';'; 
    410           } 
    411           # geo 
    412           if ($this->type == 'GEO' && $num_args > 1) 
    413           { 
    414                $data = 'geo:'; 
    415                $data .= str_replace(',','.',$args[0]).','; 
    416                $data .= str_replace(',','.',$args[1]).','; 
    417                $data .= isset($args[2]) ? $args[2] : '100'; 
    418           } 
    419           # market (Android) 
    420           if ($this->type == 'MARKET' && $num_args == 2) 
    421           { 
    422                $data = 'market://search?q='; 
    423                $data .= $args[0].'%3A'; 
    424                $data .=  $args[0] == 'pub' ? 
    425                     '%22'.self::escape($args[0]).'%22' : self::escape($args[0]); 
    426           } 
    427           # iCAL 
    428           if ($this->type == 'ICAL' && $num_args == 3) 
    429           { 
    430                $data = 'BEGIN:VEVENT'."\n"; 
    431                $data .= 'SUMMARY:'.self::escape($args[0])."\n"; 
    432                $data .= 'DTSTART:'.$args[1]."\n"; 
    433                $data .= 'DTEND:'.$args[2]."\n"; 
    434                $data .= 'END:VEVENT'."\n"; 
    435           } 
    436           # i-appli (i-phone) 
    437           if ($this->type == 'IAPPLI' && $num_args > 1) 
    438           { 
    439                $data = 'LAPL:'; 
    440                $data .= 'ADFURL:'.self::escape($args[0],true).';'; 
    441                $data .= 'CMD:'.self::escape($args[1],true).';'; 
    442                if (isset($args[2])) 
    443                { 
    444                     foreach($args[2] as $param) 
    445                     { 
    446                          if (!empty($param)) 
    447                               $data .= 'PARAM:'.self::escape($param,true).';'; 
    448                     } 
    449                } 
    450                $data .= ';'; 
    451           } 
    452           # preformed email 
    453           if ($this->type == 'MATMSG' && $num_args == 3) 
    454           { 
    455                $data = 'MATMSG:'; 
    456                $data .= 'TO:'.self::escape($args[0],true).';'; 
    457                $data .= 'SUB:'.self::escape($args[1],true).';'; 
    458                $data .= 'BODY:'.self::escape($args[2],true).';'; 
    459                $data .= ';'; 
    460           } 
    461  
    462           $this->data = $data; 
    463  
    464  
    465           # --BEHAVIOR-- dcQRcodeEncode 
    466           $this->core->callBehavior('dcQRcodeEncode',$this,$args); 
    467  
    468  
    469           $this->setId(); 
    470  
    471           return $this->id; 
    472      } 
    473  
    474      public function tweakData() 
    475      { 
    476  
    477  
    478           # --BEHAVIOR-- dcQRcodeTweakData 
    479           $this->core->callBehavior('dcQRcodeTweakData',$this); 
    480  
    481  
    482           return $this->data; 
    483      } 
    484       
     241      
     242     # QRC_CACHE_PATH could be set elsewhere (blog define, or multiblog config) 
    485243     public static function defineCachePath($core) 
    486244     { 
     245          if (defined('QRC_CACHE_PATH')) { 
     246               return; 
     247          } 
    487248          if ($core->blog === null) { 
    488249               define('QRC_CACHE_PATH',null); 
     
    490251          } 
    491252           
    492           $find = false; 
    493253          $custom = $core->blog->settings->dcQRcode->qrc_public_path; 
    494254          $default = $core->blog->public_path; 
    495  
     255           
    496256          # See if don't want cache 
    497           if (!$core->blog->settings->dcQRcode->qrc_cache_use) 
    498           { 
     257          if (!$core->blog->settings->dcQRcode->qrc_cache_use) { 
    499258               $qrc_cache_path = null; 
    500259          } 
    501260          # See if custom cache path exists and it is writable 
    502           elseif (is_writable($custom)) 
    503           { 
     261          elseif (is_writable($custom)) { 
    504262               $qrc_cache_path = $custom; 
    505263          } 
    506264          # See if default cache path exists 
    507           elseif (is_writable($default)) 
    508           { 
    509                if (!is_dir($default.'/qrc/')) 
    510                { 
     265          elseif (is_writable($default)) { 
     266               if (!is_dir($default.'/qrc/')) { 
    511267                    @mkdir($default.'/qrc/'); 
    512268               } 
  • plugins/dcQRcode/inc/lib.dc.qr.code.list.php

    r2024 r3075  
    33# This file is part of dcQRcode, a plugin for Dotclear 2. 
    44#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
     5# Copyright (c) 2009-2011 JC Denis and contributors 
    66# jcdenis@gdwd.com 
    77#  
     
    1515class dcQRcodeList extends adminGenericList 
    1616{ 
    17      public function display($page,$nb_per_page,$page_name,$base_url,$redir) 
     17     public function display($page,$nb_per_page,$enclose_block='') 
    1818     { 
    1919          if ($this->rs->isEmpty()) 
    20                echo '<p><strong>'.__('No record').'</strong></p>'; 
    21  
    22           else { 
     20          { 
     21               echo '<p><strong>'.__('No QR code').'</strong></p>'; 
     22          } 
     23          else 
     24          { 
    2325               $pager = new pager($page,$this->rs_count,$nb_per_page,10); 
    24  
    25                $pager->base_url = $base_url; 
    26  
    27                echo 
    28                '<p>'.__('Page(s)').' : '.$pager->getLinks().'</p>'. 
    29                '<form action="plugin.php?p=dcQRcode" method="post">'. 
    30                '<table class="clear">'. 
    31                '<thead>'. 
    32                '<tr>'. 
    33                '<th class="nowrap" colspan="2">'.__('ID').'</th>'. 
    34                '<th class="minimal">'.__('Img').'</th>'. 
    35                '<th class="maximal">'.__('Data').'</th>'. 
    36                '<th class="nowrap">'.__('Size').'</th>'. 
    37                '<th class="nowrap">'.__('Type').'</th>'. 
    38                '</tr>'. 
    39                '</thead>'. 
    40                '<tbody>'; 
    41  
    42                $this->rs->index(((integer)$page - 1) * $nb_per_page); 
    43                $iter = 0; 
    44                while ($iter < $nb_per_page) 
     26               $pager->html_prev = $this->html_prev; 
     27               $pager->html_next = $this->html_next; 
     28               $pager->var_page = 'page'; 
     29                
     30               $html_block = 
     31               '<table class="clear"><tr>'. 
     32               '<th colspan="2">'.__('ID').'</th>'. 
     33               '<th>'.__('Image').'</th>'. 
     34               '<th>'.__('Content').'</th>'. 
     35               '<th>'.__('Size').'</th>'. 
     36               '<th>'.__('Type').'</th>'. 
     37               '</tr>%s</table>'; 
     38                
     39               if ($enclose_block) 
    4540               { 
    46                     echo $this->parseLine($iter); 
    47  
    48                     if ($this->rs->isEnd()) 
    49                     { 
    50                          break; 
    51                     } 
    52                     else 
    53                     { 
    54                          $this->rs->moveNext(); 
    55                     } 
    56                     $iter++; 
     41                    $html_block = sprintf($enclose_block,$html_block); 
    5742               } 
    58  
    59                echo   
    60                '</tbody>'. 
    61                '</table>'. 
    62                '<div class="two-cols">'. 
    63                '<p class="col checkboxes-helpers"></p><p>'. 
    64                '<input type="submit" name="delete_qrcode" value="'.__('Delete selected records').'" />'. 
    65                form::hidden(array($page_name),$page). 
    66                form::hidden(array('nb'),$nb_per_page). 
    67                form::hidden(array('redir'),$redir). 
    68                $this->core->formNonce().'</p>'. 
    69                '</div>'. 
    70                '</form>'. 
    71                '<p>'.__('Page(s)').' : '.$pager->getLinks().'</p>'; 
     43                
     44               echo '<p>'.__('Page(s)').' : '.$pager->getLinks().'</p>'; 
     45                
     46               $blocks = explode('%s',$html_block); 
     47                
     48               echo $blocks[0]; 
     49                
     50               while ($this->rs->fetch()) 
     51               { 
     52                    echo $this->qrLine(); 
     53               } 
     54                
     55               echo $blocks[1]; 
     56                
     57               echo '<p>'.__('Page(s)').' : '.$pager->getLinks().'</p>'; 
    7258          } 
    7359     } 
    74  
    75      private function parseLine($loop) 
     60      
     61     private function qrLine() 
    7662     { 
    7763          return 
    78           '<tr class="line">'."\n". 
     64          '<tr class="line">'. 
    7965          '<td class="nowrap">'. 
    80                form::checkbox(array('entries['.$loop.']'),$this->rs->qrcode_id,0). 
     66               form::checkbox(array('entries[]'),$this->rs->qrcode_id,0). 
    8167          '</td>'. 
    8268          '<td class="nowrap">'. 
     
    8470               $this->rs->qrcode_id. 
    8571          '</strong>'. 
    86           "</td>\n". 
     72          '</td>'. 
    8773          '<td class="minimal">'. 
    88           '<img alt="QR code" src="'.$this->core->blog->url. 
    89                $this->core->url->getBase('dcQRcodeImage').'/'. 
    90                $this->rs->qrcode_id.'.png'.'" />'. 
    91           "</td>\n". 
     74          '<img alt="QR code" src="'.$this->rs->qrc->getURL($this->rs->qrcode_id).'" />'. 
     75          '</td>'. 
    9276          '<td class="maximal">'. 
    93                html::escapeHTML(dcQRcode::unescape($this->rs->qrcode_data)). 
    94           "</td>\n". 
     77               html::escapeHTML(QRcodeCore::unescape($this->rs->qrcode_data)). 
     78          '</td>'. 
    9579          '<td class="nowrap">'. 
    9680               $this->rs->qrcode_size.'x'.$this->rs->qrcode_size. 
    97           "</td>\n". 
     81          '</td>'. 
    9882          '<td class="nowrap">'. 
    9983               html::escapeHTML($this->rs->qrcode_type). 
    100           "</td>\n". 
     84          '</td>'. 
    10185          '</tr>'."\n"; 
    10286     } 
  • plugins/dcQRcode/inc/lib.dcqrcode.activityreport.php

    r2024 r3075  
    33# This file is part of dcQRcode, a plugin for Dotclear 2. 
    44#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
     5# Copyright (c) 2009-2011 JC Denis and contributors 
    66# jcdenis@gdwd.com 
    77#  
  • plugins/dcQRcode/index.php

    r2317 r3075  
    33# This file is part of dcQRcode, a plugin for Dotclear 2. 
    44#  
    5 # Copyright (c) 2009-2010 JC Denis and contributors 
     5# Copyright (c) 2009-2011 JC Denis and contributors 
    66# jcdenis@gdwd.com 
    77#  
     
    1515dcPage::check('admin'); 
    1616 
     17$qrc = new dcQRcode($core,QRC_CACHE_PATH); 
     18$types = $qrc->getAccept('type'); 
    1719$s = $core->blog->settings->dcQRcode; 
    18  
    19 $tab = isset($_REQUEST['tab']) ? $_REQUEST['tab'] : 'qrc_settings'; 
    20 $_REQUEST['nb_per_page'] =  $s->qrc_nb_per_page; 
    21 if (!empty($_GET['nb']) && (integer) $_GET['nb'] > 0) 
     20$tab = empty($_REQUEST['tab']) ? '' : $_REQUEST['tab']; 
     21$part = !empty($_REQUEST['type']) && isset($types[$_REQUEST['type']]) ? $_REQUEST['type'] : key($types); 
     22$action = empty($_POST['action']) ? '' : $_POST['action']; 
     23$combo_sizes = array(); 
     24foreach($qrc->getAccept('size') as $px) 
    2225{ 
    23      $_REQUEST['nb_per_page'] = (integer) $_GET['nb']; 
     26     $combo_sizes[sprintf(__('%sx%s pixels'),$px,$px)] = $px; 
    2427} 
    25 $returned_id = array(); 
    26 $combo_img_size = dcQRcodeIndexLib::$combo_img_size; 
    27  
    28 # QRcode class 
    29 $qrc = new dcQRcode($core,QRC_CACHE_PATH); 
    30  
    31 # Delete records 
    32 if (!empty($_POST['delete_qrcode']) && !empty($_POST['entries'])) 
    33 { 
    34      try 
     28 
     29# Admin form to create custom QR code 
     30if ($tab == 'create' && $s->qrc_active) { 
     31     echo 
     32     '<html><head><title>'.__('QR code').'</title>'. 
     33     dcPage::jsPageTabs($part). 
     34     '</head><body>'. 
     35     '<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; '.__('QR code'). 
     36     ' &rsaquo; <span class="page-title">'.__('New image').'</span>'. 
     37     ' - <a href="'.$p_url.'" class="button">'.__('Records').'</a>'. 
     38     ' - <a href="'.$p_url.'&amp;tab=settings" class="button">'.__('Settings').'</a>'. 
     39     '</h2>'; 
     40 
     41     foreach($types as $type => $class) 
    3542     { 
    36           foreach($_POST['entries'] as $entry) 
    37           { 
    38                $qrc->delQRcode($entry); 
     43          $size = empty($_POST['QRC_'.$type.'_size']) ? $qrc->getParam('size') : $_POST['QRC_'.$type.'_size']; 
     44           
     45          $qrc->setSize($size); 
     46          $qrc->setType($type); 
     47           
     48          echo  
     49          '<div id="'.$type.'" class="multi-part" title="'.$qrc->getTitle().'">'. 
     50          '<div class="clear two-cols"><div class="col">'. 
     51          '<h3>'.$qrc->getTitle().'</h3>'. 
     52          '<form method="post" action="plugin.php">'. 
     53 
     54          '<p><label for="QRC_'.$type.'_size">'. 
     55          __('Image size').'<br />'. 
     56          form::combo('QRC_'.$type.'_size',$combo_sizes,$size). 
     57          '</label></p>'; 
     58           
     59          $qrc->getForm(); 
     60           
     61          echo  
     62          '<p>'. 
     63          '<input type="submit" name="create_url" value="'.__('Create').'" />'. 
     64          form::hidden(array('p'),'dcQRcode'). 
     65          form::hidden(array('tab'),'create'). 
     66          form::hidden(array('type'),html::escapeHTML($type)). 
     67          form::hidden(array('action'),'createqrcode'). 
     68          $core->formNonce(). 
     69          '</p>'. 
     70          '</form>'. 
     71          '</div><div class="col">'; 
     72           
     73          if ($action == 'createqrcode' && !empty($_POST['type']) && $_POST['type'] == $type) { 
     74               try { 
     75                    $qrc->saveForm(); 
     76               } 
     77               catch (Exception $e) { 
     78                    $core->error->add($e->getMessage()); 
     79               } 
    3980          } 
    40           $qrc->cleanCache(); 
    41  
    42           $core->blog->triggerBlog(); 
    43           http::redirect($_POST['redir']); 
    44      } 
    45      catch (Exception $e) 
     81           
     82          echo  
     83          '</div></div></div>'; 
     84     } 
     85} 
     86# Admin form for default plugin settings 
     87elseif ($tab == 'settings') { 
     88     if ($action == 'savesettings') { 
     89          try { 
     90               $s->put('qrc_active',isset($_POST['qrc_active'])); 
     91               $s->put('qrc_use_mebkm',isset($_POST['qrc_use_mebkm'])); 
     92               $s->put('qrc_img_size',(integer) $_POST['qrc_img_size']); 
     93               $s->put('qrc_cache_use',isset($_POST['qrc_cache_use'])); 
     94               $s->put('qrc_custom_css',$_POST['qrc_custom_css']); 
     95               $s->put('qrc_bhv_entrytplhome',isset($_POST['qrc_bhv_entrytplhome'])); 
     96               $s->put('qrc_bhv_entrytplpost',isset($_POST['qrc_bhv_entrytplpost'])); 
     97               $s->put('qrc_bhv_entrytplcategory',isset($_POST['qrc_bhv_entrytplcategory'])); 
     98               $s->put('qrc_bhv_entrytpltag',isset($_POST['qrc_bhv_entrytpltag'])); 
     99               $s->put('qrc_bhv_entrytplarchive',isset($_POST['qrc_bhv_entrytplarchive'])); 
     100               $s->put('qrc_bhv_entryplace',$_POST['qrc_bhv_entryplace']); 
     101                
     102               if ($core->auth->isSuperAdmin()  
     103                && isset($_POST['qrc_cache_use'])  
     104                && !empty($_POST['qrc_cache_path']) 
     105               ) { 
     106                    if (!is_dir($_POST['qrc_cache_path'])) { 
     107                         throw new Exception('Unable to find cache path'); 
     108                    } 
     109                    $s->put('qrc_cache_path',$_POST['qrc_cache_path']); 
     110               } 
     111                
     112               //$qrc->cleanCache(); 
     113                
     114               $core->blog->triggerBlog(); 
     115               http::redirect($p_url.'&tab=settings'); 
     116          } 
     117          catch (Exception $e) { 
     118               $core->error->add($e->getMessage()); 
     119          } 
     120     } 
     121      
     122     echo 
     123     '<html><head><title>'.__('QR code').'</title>'. 
     124     '</head><body>'. 
     125     '<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; '.__('QR code'). 
     126     ' &rsaquo; <span class="page-title">'.__('Settings').'</span>'. 
     127     ' - <a href="'.$p_url.'&amp;tab=" class="button">'.__('Records').'</a>'; 
     128      
     129     if ($s->qrc_active) { 
     130          echo  
     131          ' - <a href="'.$p_url.'&amp;tab=create" class="button">'.__('New image').'</a>'; 
     132     } 
     133      
     134     echo  
     135     '</h2>'. 
     136     '<form method="post" action="plugin.php">'. 
     137      
     138    '<h3>'.__('Settings').'</h3>'. 
     139      
     140    '<p><label for="qrc_active" class="classic">'. 
     141     form::checkbox('qrc_active','1',$s->qrc_active). 
     142     __('Enable plugin'). 
     143     '</label></p>'. 
     144      
     145    '<p><label for="qrc_use_mebkm" class="classic">'. 
     146     form::checkbox('qrc_use_mebkm','1',$s->qrc_use_mebkm). 
     147     __('Use MEBKM anchor for URL QR codes'). 
     148     '</label></p>'. 
     149     '<p class="form-note">'. 
     150     __('MEBKM anchors made links as bookmarks with titles.'). 
     151     '</p>'. 
     152 
     153    '<p><label for="qrc_img_size">'. 
     154     __('Image size:'). 
     155     form::combo('qrc_img_size',$combo_sizes,$s->qrc_img_size). 
     156     '</label></p>'; 
     157 
     158     if ($core->auth->isSuperAdmin()) { 
     159          echo  
     160          '<p><label for="qrc_cache_use" class="classic">'. 
     161          form::checkbox('qrc_cache_use','1',$s->qrc_cache_use). 
     162          __('Use image cache'). 
     163          '</label></p>'. 
     164 
     165          '<p><label for="qrc_cache_path">'. 
     166          __('Custom path for cache:'). 
     167          form::field('qrc_cache_path',50,255,$s->qrc_cache_path). 
     168          '</label></p>'. 
     169          '<p class="form-note">'. 
     170          sprintf(__('Default is %s'),path::real($core->blog->public_path).'/qrc'). 
     171          '<br />'. 
     172          sprintf(__('Currently %s'),QRC_CACHE_PATH). 
     173          '</p>'; 
     174     } 
     175      
     176     echo  
     177     '<h3>'.__('Theme').'</h3>'. 
     178 
     179     '<p class="area" id="style-area"><label for="_style">'.__('CSS:').'</label>'. 
     180     form::textarea('qrc_custom_css',50,3,html::escapeHTML($s->qrc_custom_css),'',2). 
     181     '</p>'. 
     182     '<p class="form-note">'.__('You can add here special cascading style sheet. QRcode images have HTML tag "div" of class "qrcode" and "qrcode-widget" for widgets.').'</p>'. 
     183      
     184     '<p><label for="qrc_bhv_entrytplhome" class="classic">'. 
     185     form::checkbox('qrc_bhv_entrytplhome','1',$s->qrc_bhv_entrytplhome). 
     186     __('Include on entries on home page'). 
     187     '</label></p>'. 
     188 
     189     '<p><label for="qrc_bhv_entrytplpost" class="classic">'. 
     190     form::checkbox('qrc_bhv_entrytplpost','1',$s->qrc_bhv_entrytplpost). 
     191     __('Include on entries on post page'). 
     192     '</label></p>'. 
     193 
     194     '<p><label for="qrc_bhv_entrytplcategory" class="classic">'. 
     195     form::checkbox('qrc_bhv_entrytplcategory','1',$s->qrc_bhv_entrytplcategory). 
     196     __('Include on entries on category page'). 
     197     '</label></p>'. 
     198 
     199     '<p><label for="qrc_bhv_entrytpltag" class="classic">'. 
     200     form::checkbox('qrc_bhv_entrytpltag','1',$s->qrc_bhv_entrytpltag). 
     201     __('Include on entries on tag page'). 
     202     '</label></p>'. 
     203 
     204     '<p><label for="qrc_bhv_entrytplarchive" class="classic">'. 
     205     form::checkbox('qrc_bhv_entrytplarchive','1',$s->qrc_bhv_entrytplarchive). 
     206     __('Include on entries on monthly archive page'). 
     207     '</label></p>'. 
     208 
     209     '<p><label for="qrc_bhv_entryplace">'. 
     210     __('Place where to insert image:'). 
     211     form::combo('qrc_bhv_entryplace',array(__('before content')=>'before',__('after content')=>'after'),$s->qrc_bhv_entryplace). 
     212     '</label></p>'. 
     213 
     214     '<p class="form-note">'. 
     215     __('In order to use this, blog theme must have behaviors "publicEntryBeforeContent" and  "publicEntryAfterContent".').'<br />'. 
     216     __('A template value is also available, you can add {{tpl:QRcode}} anywhere inside &lt;tpl:Entries&gt; loop in templates.'). 
     217     '</p>'. 
     218      
     219     '<p>'. 
     220     '<input type="submit" name="save_settings" value="'.__('Save').'" />'. 
     221     form::hidden(array('p'),'dcQRcode'). 
     222     form::hidden(array('tab'),'settings'). 
     223     form::hidden(array('action'),'savesettings'). 
     224     $core->formNonce(). 
     225     '</p>'. 
     226     '</form>'; 
     227} 
     228else { 
     229     if ($action == 'deleteqrc' && !empty($_POST['entries'])) { 
     230          try { 
     231               foreach($_POST['entries'] as $id) 
     232               { 
     233                    $qrc->delQRcode($id); 
     234               } 
     235               if (!empty($redir)) { 
     236                    http::redirect($redir); 
     237               } 
     238               else { 
     239                    http::redirect($p_url); 
     240               } 
     241          } 
     242          catch (Exception $e) { 
     243               $core->error->add($e->getMessage()); 
     244          } 
     245     } 
     246      
     247     # Filters 
     248     $show_filters = false; 
     249     $sorttype = !empty($_GET['sorttype']) ? $_GET['sorttype'] : ''; 
     250     $sortsize = !empty($_GET['sortsize']) ? $_GET['sortsize'] : ''; 
     251     $sortby = !empty($_GET['sortby']) ? $_GET['sortby'] : 'qrcode_id'; 
     252     $order = !empty($_GET['order']) ? $_GET['order'] : 'desc'; 
     253 
     254     $page = !empty($_GET['page']) ? (integer) $_GET['page'] : 1; 
     255     $nb_per_page =  10; 
     256     if (!empty($_GET['nb']) && (integer) $_GET['nb'] > 0) { 
     257          if ($nb_per_page != $_GET['nb']) $show_filters = true; 
     258          $nb_per_page = (integer) $_GET['nb']; 
     259     } 
     260      
     261     # Combos 
     262     $sortby_combo = array( 
     263          __('ID') => 'qrcode_id', 
     264          __('Size') => 'qrcode_size', 
     265          __('Type') => 'qrcode_type' 
     266     ); 
     267      
     268     $order_combo = array( 
     269          __('Descending') => 'desc', 
     270          __('Ascending') => 'asc' 
     271     ); 
     272      
     273     $types_combo = array(); 
     274     foreach($types as $type => $_) 
    46275     { 
     276          $qrc->setType($type); 
     277          $types_combo[$qrc->getTitle()] = $type; 
     278     } 
     279     $types_combo = array_merge(array('-'=>''),$types_combo); 
     280      
     281     $sizes_combo = array(); 
     282     foreach($qrc->getAccept('size') as $size) 
     283     { 
     284          $sizes_combo[sprintf(__('%sx%s pixels'),$size,$size)] = $size; 
     285     } 
     286     $sizes_combo = array_merge(array('-'=>''),$sizes_combo); 
     287      
     288     # Params for list 
     289     $params = array(); 
     290     $params['limit'] = array((($page-1)*$nb_per_page),$nb_per_page); 
     291 
     292     if ($sortby != '' && in_array($sortby,$sortby_combo)) 
     293     { 
     294          if ($sorttype != '' && in_array($sorttype,$types_combo)) 
     295               $params['qrcode_type'] = $sorttype; 
     296           
     297          if ($sortsize != '' && in_array($sortsize,$sizes_combo)) 
     298               $params['qrcode_size'] = $sortsize; 
     299 
     300          if ($order != '' && in_array($order,$order_combo)) 
     301               $params['order'] = $sortby.' '.$order; 
     302 
     303          if ($sortby != 'qrcode_id' || $sortsize != '' || $order != 'desc' || $sorttype != '') 
     304               $show_filters = true; 
     305     } 
     306      
     307     $redir = $p_url. 
     308     '&amp;tab='. 
     309     '&amp;sorttype='.$sorttype. 
     310     '&amp;sortsize='.$sortsize. 
     311     '&amp;sortby='.$sortby. 
     312     '&amp;order='.$order. 
     313     '&amp;nb='.$nb_per_page. 
     314     '&amp;page=%s'; 
     315      
     316     try { 
     317          $list_all = $qrc->getQRcodes($params); 
     318          $list_counter = $qrc->getQRcodes($params,true)->f(0); 
     319          $list_current = new dcQRcodeList($core,$list_all,$list_counter,$pager_base_url); 
     320     } 
     321     catch (Exception $e) { 
    47322          $core->error->add($e->getMessage()); 
    48323     } 
     324      
     325     echo  
     326     '<html><head><title>'.__('QR code').'</title>'. 
     327     "\n<script type=\"text/javascript\"> \n". 
     328     "$(function(){ $('.checkboxes-helpers').each(function(){dotclear.checkboxesHelpers(this);}); }); \n". 
     329     "</script>\n"; 
     330      
     331     if (!$show_filters) { 
     332          echo  
     333          dcPage::jsLoad('js/filter-controls.js'); 
     334     } 
     335     echo  
     336     '</head><body>'. 
     337     '<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; '.__('QR code'). 
     338     ' &rsaquo; <span class="page-title">'.__('Records').'</span>'; 
     339      
     340     if ($s->qrc_active) { 
     341          echo  
     342          ' - <a href="'.$p_url.'&amp;tab=create" class="button">'.__('New image').'</a>'; 
     343     } 
     344      
     345     echo  
     346     ' - <a href="'.$p_url.'&amp;tab=settings" class="button">'.__('Settings').'</a>'. 
     347     '</h2>'; 
     348      
     349     if (!$show_filters) { 
     350          echo '<p><a id="filter-control" class="form-control" href="#">'. 
     351          __('Filters').'</a></p>'; 
     352     } 
     353 
     354     echo ' 
     355     <form action="'.$p_url.'" method="get" id="filters-form"> 
     356     <fieldset><legend>'.__('Filters').'</legend> 
     357     <div class="three-cols"> 
     358     <div class="col"> 
     359     <label>'.__('Type:').form::combo('sorttype',$types_combo,$sorttype).' 
     360     </label>  
     361     <label>'.__('Size:').form::combo('sortsize',$sizes_combo,$sortsize).' 
     362     </label>  
     363     </div> 
     364     <div class="col"> 
     365     <label>'.__('Order by:').form::combo('sortby',$sortby_combo,$sortby).' 
     366     </label>  
     367     <label>'.__('Sort:').form::combo('order',$order_combo,$order).' 
     368     </label> 
     369     </div> 
     370     <div class="col"> 
     371     <p> 
     372     <label class="classic">'.form::field('nb',3,3,$nb_per_page).' '.__('Image per page').' 
     373     </label>  
     374     <input type="submit" value="'.__('filter').'" />'. 
     375     form::hidden(array('p'),'dcQRcode'). 
     376     form::hidden(array('tab'),'').' 
     377     </p> 
     378     </div> 
     379     </div> 
     380     <br class="clear" /> 
     381     </fieldset> 
     382     </form>'; 
     383 
     384     $list_current->display($page,$nb_per_page, 
     385      
     386     '<form action="'.$p_url.'" method="post" id="form-actions"> 
     387     %s 
     388     <div class="two-cols"> 
     389     <p class="col checkboxes-helpers"></p> 
     390     <p class="col right"> 
     391     <input type="submit" value="'.__('Delete selected QR codes').'" />'. 
     392     form::hidden(array('action'),'deleteqrc'). 
     393     form::hidden(array('p'),'dcQRcode'). 
     394     form::hidden(array('redir'),sprintf($redir,$page)). 
     395     $core->formNonce().' 
     396     </p> 
     397     </div> 
     398     </form>' 
     399     ); 
    49400} 
    50401 
    51 # Save settings 
    52 if (!empty($_POST['settings'])) 
    53 { 
    54      try 
    55      { 
    56           $s->put('qrc_active',isset($_POST['qrc_active'])); 
    57           $s->put('qrc_use_mebkm',isset($_POST['qrc_use_mebkm'])); 
    58           $s->put('qrc_img_size',(integer) $_POST['qrc_img_size']); 
    59           $s->put('qrc_cache_use',isset($_POST['qrc_cache_use'])); 
    60           $s->put('qrc_bhv_entrytplhome',isset($_POST['qrc_bhv_entrytplhome'])); 
    61           $s->put('qrc_bhv_entrytplpost',isset($_POST['qrc_bhv_entrytplpost'])); 
    62           $s->put('qrc_bhv_entrytplcategory',isset($_POST['qrc_bhv_entrytplcategory'])); 
    63           $s->put('qrc_bhv_entrytpltag',isset($_POST['qrc_bhv_entrytpltag'])); 
    64           $s->put('qrc_bhv_entrytplarchive',isset($_POST['qrc_bhv_entrytplarchive'])); 
    65           $s->put('qrc_bhv_entryplace',$_POST['qrc_bhv_entryplace']); 
    66  
    67           if ($core->auth->isSuperAdmin()  
    68            && isset($_POST['qrc_cache_use'])  
    69            && !empty($_POST['qrc_cache_path'])) 
    70           { 
    71                if (!is_dir($_POST['qrc_cache_path'])) 
    72                { 
    73                     throw new Exception('Unable to find cache path'); 
    74                } 
    75                $s->put('qrc_cache_path',$_POST['qrc_cache_path']); 
    76           } 
    77  
    78           $qrc->cleanCache(); 
    79  
    80           $core->blog->triggerBlog(); 
    81           http::redirect($p_url.'&t=qrc_settings'); 
    82      } 
    83      catch (Exception $e) 
    84      { 
    85           $core->error->add($e->getMessage()); 
    86      } 
    87 } 
    88  
     402dcPage::helpBlock('dcQRcode'); 
     403 
     404echo ' 
     405<hr class="clear" /> 
     406<p class="right"> 
     407dcQRcode - '.$core->plugins->moduleInfo('dcQRcode','version').'&nbsp; 
     408<img alt="dcQRcode" src="index.php?pf=dcQRcode/icon.png" /> 
     409</p> 
     410</body></html>'; 
    89411?> 
    90 <html> 
    91  <head> 
    92   <title><?php echo __('QR code'); ?></title> 
    93 <?php  
    94 echo  
    95 dcPage::jsLoad('js/_posts_list.js'). 
    96 dcPage::jsToolBar(). 
    97 dcPage::jsPageTabs($tab);  
    98  
    99  
    100 # --BEHAVIOR-- dcQRcodeIndexHeader 
    101 $core->callBehavior('dcQRcodeIndexHeader',$core,$qrc); 
    102  
    103  
    104 ?> 
    105   <script type="text/javascript"> 
    106     $(function() {  
    107 <?php 
    108 foreach(array('txt','url','mecard','geo','market','ical','iappli','matmsg') as $k) 
    109 { 
    110      echo  
    111      "\$('#list-title-".$k."').toggleWithLegend($('#list-content-".$k."'),{cookie:'dcx_dcqrcode_list_".$k."'});\n". 
    112      "\$('#form-title-".$k."').toggleWithLegend($('#form-content-".$k."'),{cookie:'dcx_dcqrcode_form_".$k."'});\n"; 
    113 } 
    114 ?> 
    115     }); 
    116   </script> 
    117  </head> 
    118  <body> 
    119   <h2><?php echo html::escapeHTML($core->blog->name). 
    120    ' &rsaquo; '.__('QR code'); ?></h2> 
    121  
    122   <div class="multi-part" id="qrc_settings" title="<?php echo __('Settings'); ?>"> 
    123    <form method="post" action="plugin.php"> 
    124  
    125   <div class="two-cols"> 
    126   <div class="col"> 
    127  
    128     <h2><?php echo __('Settings'); ?></h2> 
    129  
    130     <p><label class="classic"><?php echo 
    131       form::checkbox(array('qrc_active'),'1', 
    132        $s->qrc_active).' '. 
    133      __('Enable plugin'); ?> 
    134      </label></p> 
    135  
    136     <p><label class="classic"><?php echo 
    137       form::checkbox(array('qrc_use_mebkm'),'1', 
    138        $s->qrc_use_mebkm).' '. 
    139      __('Use MEBKM anchor for URL QR codes'); ?> 
    140      </label></p> 
    141      <p class="form-note"> 
    142       <?php echo __('MEBKM anchors made links as bookmarks with titles.'); ?> 
    143      </p> 
    144  
    145     <p><label class="classic"> 
    146       <?php echo __('Image size:'); ?><br /> 
    147      <?php echo form::combo(array('qrc_img_size'),$combo_img_size, 
    148        $s->qrc_img_size); ?> 
    149      </label></p> 
    150  
    151 <?php if ($core->auth->isSuperAdmin()) : ?> 
    152  
    153     <p><label class="classic"><?php echo 
    154       form::checkbox(array('qrc_cache_use'),'1', 
    155        $s->qrc_cache_use).' '. 
    156      __('Use image cache'); ?> 
    157      </label></p> 
    158  
    159     <p><label class="classic"> 
    160       <?php echo __('Custom path for cache:'); ?><br /> 
    161      <?php echo form::field(array('qrc_cache_path'),50,255, 
    162        $s->qrc_cache_path); ?> 
    163      </label></p> 
    164      <p class="form-note"> 
    165       <?php echo sprintf(__('Default is %s'),path::real($core->blog->public_path).'/qrc'); ?> 
    166      </p> 
    167      <p class="form-note"> 
    168       <?php echo sprintf(__('Currently %s'),QRC_CACHE_PATH); ?> 
    169      </p> 
    170  
    171 <?php endif; ?> 
    172  
    173   </div> 
    174   <div class="col"> 
    175  
    176    <h2><?php echo __('Entries'); ?> *</h2> 
    177  
    178      <p><label class="classic"><?php echo 
    179       form::checkbox(array('qrc_bhv_entrytplhome'),'1', 
    180        $s->qrc_bhv_entrytplhome).' '. 
    181      __('Include on entries on home page'); ?> 
    182      </label></p> 
    183  
    184      <p><label class="classic"><?php echo 
    185       form::checkbox(array('qrc_bhv_entrytplpost'),'1', 
    186        $s->qrc_bhv_entrytplpost).' '. 
    187      __('Include on entries on post page'); ?> 
    188      </label></p> 
    189  
    190      <p><label class="classic"><?php echo 
    191       form::checkbox(array('qrc_bhv_entrytplcategory'),'1', 
    192        $s->qrc_bhv_entrytplcategory).' '. 
    193      __('Include on entries on category page'); ?> 
    194      </label></p> 
    195  
    196      <p><label class="classic"><?php echo 
    197       form::checkbox(array('qrc_bhv_entrytpltag'),'1', 
    198        $s->qrc_bhv_entrytpltag).' '. 
    199      __('Include on entries on tag page'); ?> 
    200      </label></p> 
    201  
    202      <p><label class="classic"><?php echo 
    203       form::checkbox(array('qrc_bhv_entrytplarchive'),'1', 
    204        $s->qrc_bhv_entrytplarchive).' '. 
    205      __('Include on entries on monthly archive page'); ?> 
    206      </label></p> 
    207  
    208     <p><label class="classic"> 
    209       <?php echo __('Place where to insert image:'); ?><br /> 
    210      <?php echo form::combo(array('qrc_bhv_entryplace'), 
    211        array(__('before content')=>'before',__('after content')=>'after'), 
    212        $s->qrc_bhv_entryplace); ?> 
    213      </label></p> 
    214  
    215   </div> 
    216   </div> 
    217  
    218      <p class="form-note">*  
    219       <?php echo  
    220       __('In order to use this, blog theme must have behaviors "publicEntryBeforeContent" and  "publicEntryAfterContent".').'<br />'. 
    221       __('A template value is also available, you can add {{tpl:QRcode}} anywhere inside &lt;tpl:Entries&gt; loop in templates.'); ?> 
    222      </p> 
    223  
    224     <p> 
    225      <input type="submit" name="settings" value="<?php echo __('Save'); ?>" /> 
    226      <?php echo  
    227       form::hidden(array('p'),'dcQRcode'). 
    228       form::hidden(array('tab'),'qrc_settings'). 
    229       $core->formNonce(); 
    230      ?> 
    231      </p> 
    232    </form> 
    233   </div> 
    234  
    235 <?php 
    236  
    237 if ($s->qrc_active) 
    238 { 
    239      dcQRcodeIndexLib::txtTab($core,$qrc); 
    240      dcQRcodeIndexLib::urlTab($core,$qrc); 
    241      dcQRcodeIndexLib::mecardTab($core,$qrc); 
    242      dcQRcodeIndexLib::geoTab($core,$qrc); 
    243      dcQRcodeIndexLib::marketTab($core,$qrc); 
    244      dcQRcodeIndexLib::icalTab($core,$qrc); 
    245      dcQRcodeIndexLib::iappliTab($core,$qrc); 
    246      dcQRcodeIndexLib::matmsgTab($core,$qrc); 
    247 } 
    248  
    249  
    250 # --BEHAVIOR-- dcQRcodeIndexTab 
    251 $core->callBehavior('dcQRcodeIndexTab',$core,$qrc); 
    252  
    253  
    254 echo dcPage::helpBlock('dcQRcode'); 
    255 ?> 
    256   <hr class="clear"/> 
    257   <p class="right"><a class="button" href="<?php echo $p_url;?>&amp;t=qrc_settings"><?php echo __('Settings'); ?></a> -  
    258    dcQRcode - <?php echo $core->plugins->moduleInfo('dcQRcode','version'); ?>&nbsp; 
    259    <img alt="dcQRcode" src="index.php?pf=dcQRcode/icon.png" /> 
    260   </p> 
    261  </body> 
    262 </html> 
  • plugins/dcQRcode/locales/en/help/help.html

    r2024 r3075  
    88<h3>Support</h3> 
    99<ul> 
    10 <li><a href="http://dotclear.jcdenis.com/go/dcQRcode">Author's blog</a></li> 
     10<li><a href="http://jcd.lv/?q=dcQRcode">Author's blog</a></li> 
    1111<li><a href="http://dotclear.jcdenis.com/go/dcQRcode-support">Dotclear forum</a></li> 
    1212<li><a href="http://lab.dotclear.org/wiki/plugin/dcQRcode">Dotclear lab</a></li> 
     
    3232The term QR Code itself is a registered trademark of Denso Wave Incorporated.</li> 
    3333</ul> 
    34 <h3>Tools</h3> 
    35 <ul> 
    36  <li>Traduced with plugin <a href="http://dotclear.jcdenis.com/go/translater">translater</a></li> 
    37  <li>Packaged with plugin <a href="http://dotclear.jcdenis.com/go/pacKman">pacKman</a></li> 
    38  <li>Licensed added by plugin <a href="http://dotclear.jcdenis.com/go/pacKman">licenseBootstrap</a></li> 
    39 </ul> 
    40 <h3>Read more</h3> 
    41 <ul> 
    42 <li>Definition on <a href="http://en.wikipedia.org/wiki/QR_Code">Wikipedia</a></li> 
    43 <li>Charts API on <a href="http://code.google.com/intl/fr/apis/chart/">Google</a></li> 
    44 <li>QRcode API on <a href="http://code.google.com/p/zxing/">Google</a></li> 
    45 <li>Description on <a href="http://www.nttdocomo.co.jp/english/service/imode/make/content/barcode/">NTT docomo</a></li> 
    46 </ul> 
    4734 
    4835</body> 
  • plugins/dcQRcode/locales/fr/help/help.html

    r2024 r3075  
    88<h3>Support</h3> 
    99<ul> 
    10 <li><a href="http://dotclear.jcdenis.com/go/dcQRcode">Blog de l'auteur</a></li> 
     10<li><a href="http://jcd.lv/?q=dcQRcode">Blog de l'auteur</a></li> 
    1111<li><a href="http://dotclear.jcdenis.com/go/dcQRcode-support">Forum Dotclear</a></li> 
    1212<li><a href="http://lab.dotclear.org/wiki/plugin/dcQRcode">Lab Dotclear</a></li> 
     
    3232The term QR Code itself is a registered trademark of Denso Wave Incorporated.</li> 
    3333</ul> 
    34 <h3>Outils</h3> 
    35 <ul> 
    36  <li>Traduced with plugin <a href="http://dotclear.jcdenis.com/go/translater">translater</a></li> 
    37  <li>Packaged with plugin <a href="http://dotclear.jcdenis.com/go/pacKman">pacKman</a></li> 
    38  <li>Licensed added by plugin <a href="http://dotclear.jcdenis.com/go/pacKman">licenseBootstrap</a></li> 
    39 </ul> 
    40 <h3>En savoir plus</h3> 
    41 <ul> 
    42 <li>Definition sur <a href="http://en.wikipedia.org/wiki/QR_Code">Wikipedia</a></li> 
    43 <li>Charts API sur <a href="http://code.google.com/intl/fr/apis/chart/">Google</a></li> 
    44 <li>QRcode API sur <a href="http://code.google.com/p/zxing/">Google</a></li> 
    45 <li>Description sur <a href="http://www.nttdocomo.co.jp/english/service/imode/make/content/barcode/">NTT docomo</a></li> 
    46 </ul> 
    4734 
    4835</body> 
  • plugins/dcQRcode/locales/fr/main.lang.php

    r2024 r3075  
    11<?php 
    2 // Language: français  
    3 // Module: dcQRcode - 0.6 
    4 // Date: 2010-01-19 07:11:27  
    5 // Translated with dcTranslater - 1.3  
    6  
    7 #_widgets.php:37 
     2// Language: Français  
     3// Module: dcQRcode - 2011.08.10 
     4// Date: 2011-08-10 20:56:23  
     5// Translated with dcTranslater - 1.5  
     6 
     7#_widgets.php:46 
     8#index.php:361 
    89$GLOBALS['__l10n']['Size:'] = 'Taille :'; 
    910 
    10 #inc/lib.dc.qr.code.index.php:28 
    11 $GLOBALS['__l10n']['QRcode successfully created'] = 'QRcode créé avec succès'; 
    12  
    13 #inc/lib.dc.qr.code.index.php:37 
    14 $GLOBALS['__l10n']['Simple text'] = 'Texte simple'; 
    15  
    16 #inc/lib.dc.qr.code.index.php:60 
    17 #inc/lib.dc.qr.code.index.php:151 
    18 #inc/lib.dc.qr.code.index.php:258 
    19 #inc/lib.dc.qr.code.index.php:402 
    20 #inc/lib.dc.qr.code.index.php:501 
    21 #inc/lib.dc.qr.code.index.php:595 
    22 #inc/lib.dc.qr.code.index.php:703 
    23 #inc/lib.dc.qr.code.index.php:810 
    24 $GLOBALS['__l10n']['Create a QR code'] = 'Créer un QR code'; 
    25  
    26 #inc/lib.dc.qr.code.index.php:74 
    27 #inc/lib.dc.qr.code.index.php:175 
    28 #inc/lib.dc.qr.code.index.php:327 
    29 #inc/lib.dc.qr.code.index.php:426 
    30 #inc/lib.dc.qr.code.index.php:521 
    31 #inc/lib.dc.qr.code.index.php:619 
    32 #inc/lib.dc.qr.code.index.php:736 
    33 #inc/lib.dc.qr.code.index.php:834 
    34 $GLOBALS['__l10n']['Create'] = 'Créer'; 
    35  
    36 #inc/lib.dc.qr.code.index.php:85 
    37 #inc/lib.dc.qr.code.index.php:186 
    38 #inc/lib.dc.qr.code.index.php:338 
    39 #inc/lib.dc.qr.code.index.php:437 
    40 #inc/lib.dc.qr.code.index.php:531 
    41 #inc/lib.dc.qr.code.index.php:630 
    42 #inc/lib.dc.qr.code.index.php:746 
    43 #inc/lib.dc.qr.code.index.php:845 
    44 $GLOBALS['__l10n']['List of records'] = 'Liste des enregistrements'; 
    45  
    46 #inc/lib.dc.qr.code.index.php:126 
    47 $GLOBALS['__l10n']['Bookmark'] = 'Favoris'; 
    48  
    49 #inc/lib.dc.qr.code.index.php:155 
    50 #inc/lib.dc.qr.code.index.php:262 
    51 #inc/lib.dc.qr.code.index.php:406 
    52 #inc/lib.dc.qr.code.index.php:516 
    53 #inc/lib.dc.qr.code.index.php:614 
    54 #inc/lib.dc.qr.code.index.php:707 
    55 #inc/lib.dc.qr.code.index.php:829 
    56 $GLOBALS['__l10n']['Image size'] = 'Taille de l\'image'; 
    57  
    58 #inc/lib.dc.qr.code.index.php:171 
    59 $GLOBALS['__l10n']['Use MEBKM anchor'] = 'Utiliser la balise MEBKM'; 
    60  
    61 #inc/lib.dc.qr.code.index.php:227 
    62 $GLOBALS['__l10n']['Phonebook'] = 'Contact'; 
    63  
    64 #inc/lib.dc.qr.code.index.php:272 
    65 $GLOBALS['__l10n']['Address:'] = 'Adresse :'; 
    66  
    67 #inc/lib.dc.qr.code.index.php:277 
    68 $GLOBALS['__l10n']['Phone:'] = 'Téléphone :'; 
    69  
    70 #inc/lib.dc.qr.code.index.php:282 
    71 $GLOBALS['__l10n']['Second phone:'] = 'Second téléphone :'; 
    72  
    73 #inc/lib.dc.qr.code.index.php:292 
    74 $GLOBALS['__l10n']['Second email:'] = 'Second email :'; 
    75  
    76 #inc/lib.dc.qr.code.index.php:302 
    77 $GLOBALS['__l10n']['Birthdate:'] = 'Date de naissance :'; 
    78  
    79 #inc/lib.dc.qr.code.index.php:307 
    80 $GLOBALS['__l10n']['Memo:'] = 'Mémo :'; 
    81  
    82 #inc/lib.dc.qr.code.index.php:312 
    83 $GLOBALS['__l10n']['Nickname:'] = 'Pseudo :'; 
    84  
    85 #inc/lib.dc.qr.code.index.php:317 
    86 $GLOBALS['__l10n']['Video phone:'] = 'Vidéophone :'; 
    87  
    88 #inc/lib.dc.qr.code.index.php:322 
    89 $GLOBALS['__l10n']['Sound:'] = 'Son :'; 
    90  
    91 #inc/lib.dc.qr.code.index.php:379 
    92 $GLOBALS['__l10n']['Geographic'] = 'Géographique'; 
    93  
    94 #inc/lib.dc.qr.code.index.php:411 
    95 $GLOBALS['__l10n']['Latitude:'] = 'Latitude :'; 
    96  
    97 #inc/lib.dc.qr.code.index.php:416 
    98 $GLOBALS['__l10n']['Longitude:'] = 'Longitude :'; 
    99  
    100 #inc/lib.dc.qr.code.index.php:421 
    101 $GLOBALS['__l10n']['Altitude:'] = 'Altitude :'; 
    102  
    103 #inc/lib.dc.qr.code.index.php:507 
    104 $GLOBALS['__l10n']['Publisher'] = 'Auteur'; 
    105  
    106 #inc/lib.dc.qr.code.index.php:507 
    107 $GLOBALS['__l10n']['Package'] = 'Paquetage'; 
    108  
    109 #inc/lib.dc.qr.code.index.php:599 
    110 $GLOBALS['__l10n']['Summary'] = 'Résumé'; 
    111  
    112 #inc/lib.dc.qr.code.index.php:604 
    113 $GLOBALS['__l10n']['Start date:'] = 'Date de début :'; 
    114  
    115 #inc/lib.dc.qr.code.index.php:609 
    116 $GLOBALS['__l10n']['End date:'] = 'Date de fin :'; 
    117  
    118 #inc/lib.dc.qr.code.index.php:730 
    119 $GLOBALS['__l10n']['Designates a text string to be set as the parameter sent to the i-appli to be activated. (1 to 255 bytes)'] = 'Désigne une chaine de texte définissant un paramètre envoyé à l\'i-appli pour être activé. (1 à 255 bytes)'; 
    120  
    121 #inc/lib.dc.qr.code.index.php:731 
    122 $GLOBALS['__l10n']['The "name" and "value" are separated by a comma (,).'] = 'Les "nom" et "valeur" sont séparés par une virgule (,).'; 
    123  
    124 #inc/lib.dc.qr.code.index.php:732 
    125 $GLOBALS['__l10n']['16 parameters can be designated within a single LAPL: identifier.'] = '16 paramètres peuvent être assignés avec un seul identifiant LAPL :'; 
    126  
    127 #inc/lib.dc.qr.code.index.php:814 
    128 $GLOBALS['__l10n']['Receiver:'] = 'Destinataire :'; 
    129  
    130 #inc/lib.dc.qr.code.index.php:819 
    131 $GLOBALS['__l10n']['Subject:'] = 'Sujet :'; 
    132  
    133 #inc/lib.dc.qr.code.index.php:824 
    134 $GLOBALS['__l10n']['Message:'] = 'Message :'; 
    135  
    136 #inc/lib.dc.qr.code.list.php:20 
    137 $GLOBALS['__l10n']['No record'] = 'Pas d\'enregistrement'; 
     11#inc/lib.dc.qr.code.list.php:21 
     12$GLOBALS['__l10n']['No QR code'] = 'Aucun QR code'; 
     13 
     14#inc/lib.dc.qr.code.list.php:34 
     15$GLOBALS['__l10n']['Content'] = 'Contenu'; 
    13816 
    13917#inc/lib.dc.qr.code.list.php:35 
    140 $GLOBALS['__l10n']['Data'] = 'Données'; 
    141  
    142 #inc/lib.dc.qr.code.list.php:36 
     18#index.php:264 
    14319$GLOBALS['__l10n']['Size'] = 'Taille'; 
    144  
    145 #inc/lib.dc.qr.code.list.php:64 
    146 $GLOBALS['__l10n']['Delete selected records'] = 'Effacer les enregistrements sélectionnés'; 
    14720 
    14821#inc/lib.dcqrcode.activityreport.php:22 
     
    15831$GLOBALS['__l10n']['QR code of id "%s" has been deleted by "%s"'] = 'Le code QR d\'id "%s" a été supprimé par "%s"'; 
    15932 
    160 #index.php:123 
    161 #index.php:129 
     33#inc/lib.qrc.type.php:27 
     34$GLOBALS['__l10n']['QRcode successfully created'] = 'QRcode créé avec succès'; 
     35 
     36#inc/libs/lib.qrc.type.bizcard.php:33 
     37#inc/libs/lib.qrc.type.mecard.php:39 
     38$GLOBALS['__l10n']['Last name:'] = 'Nom :'; 
     39 
     40#inc/libs/lib.qrc.type.bizcard.php:39 
     41#inc/libs/lib.qrc.type.mecard.php:44 
     42$GLOBALS['__l10n']['First name:'] = 'Prénom :'; 
     43 
     44#inc/libs/lib.qrc.type.bizcard.php:45 
     45$GLOBALS['__l10n']['Job:'] = 'Métier :'; 
     46 
     47#inc/libs/lib.qrc.type.bizcard.php:50 
     48$GLOBALS['__l10n']['Company:'] = 'Entreprise :'; 
     49 
     50#inc/libs/lib.qrc.type.bizcard.php:55 
     51#inc/libs/lib.qrc.type.mecard.php:50 
     52$GLOBALS['__l10n']['Address:'] = 'Adresse :'; 
     53 
     54#inc/libs/lib.qrc.type.bizcard.php:60 
     55#inc/libs/lib.qrc.type.mecard.php:56 
     56$GLOBALS['__l10n']['Phone:'] = 'Téléphone :'; 
     57 
     58#inc/libs/lib.qrc.type.geo.php:17 
     59$GLOBALS['__l10n']['Geographic'] = 'Géographique'; 
     60 
     61#inc/libs/lib.qrc.type.geo.php:29 
     62$GLOBALS['__l10n']['Latitude:'] = 'Latitude :'; 
     63 
     64#inc/libs/lib.qrc.type.geo.php:35 
     65$GLOBALS['__l10n']['Longitude:'] = 'Longitude :'; 
     66 
     67#inc/libs/lib.qrc.type.geo.php:40 
     68$GLOBALS['__l10n']['Altitude:'] = 'Altitude :'; 
     69 
     70#inc/libs/lib.qrc.type.iappli.php:39 
     71$GLOBALS['__l10n']['Command:'] = 'Commande :'; 
     72 
     73#inc/libs/lib.qrc.type.iappli.php:54 
     74$GLOBALS['__l10n']['Designates a text string to be set as the parameter sent to the i-appli to be activated. (1 to 255 bytes)'] = 'Désigne une chaine de texte définissant un paramètre envoyé à l\'i-appli pour être activé. (1 à 255 bytes)'; 
     75 
     76#inc/libs/lib.qrc.type.iappli.php:55 
     77$GLOBALS['__l10n']['The "name" and "value" are separated by a comma (,).'] = 'Les "nom" et "valeur" sont séparés par une virgule (,).'; 
     78 
     79#inc/libs/lib.qrc.type.iappli.php:56 
     80$GLOBALS['__l10n']['16 parameters can be designated within a single LAPL: identifier.'] = '16 paramètres peuvent être assignés avec un seul identifiant LAPL :'; 
     81 
     82#inc/libs/lib.qrc.type.ical.php:17 
     83$GLOBALS['__l10n']['Calendar'] = 'Calendrier'; 
     84 
     85#inc/libs/lib.qrc.type.ical.php:29 
     86$GLOBALS['__l10n']['Summary'] = 'Résumé'; 
     87 
     88#inc/libs/lib.qrc.type.ical.php:35 
     89$GLOBALS['__l10n']['Start date:'] = 'Date de début :'; 
     90 
     91#inc/libs/lib.qrc.type.ical.php:41 
     92$GLOBALS['__l10n']['End date:'] = 'Date de fin :'; 
     93 
     94#inc/libs/lib.qrc.type.market.php:22 
     95#inc/libs/lib.qrc.type.market.php:42 
     96$GLOBALS['__l10n']['Publisher'] = 'Auteur'; 
     97 
     98#inc/libs/lib.qrc.type.market.php:22 
     99#inc/libs/lib.qrc.type.market.php:42 
     100$GLOBALS['__l10n']['Package'] = 'Paquetage'; 
     101 
     102#inc/libs/lib.qrc.type.matmsg.php:29 
     103$GLOBALS['__l10n']['Receiver:'] = 'Destinataire :'; 
     104 
     105#inc/libs/lib.qrc.type.matmsg.php:34 
     106$GLOBALS['__l10n']['Subject:'] = 'Sujet :'; 
     107 
     108#inc/libs/lib.qrc.type.matmsg.php:39 
     109#inc/libs/lib.qrc.type.mmsto.php:33 
     110#inc/libs/lib.qrc.type.smsto.php:33 
     111$GLOBALS['__l10n']['Message:'] = 'Message :'; 
     112 
     113#inc/libs/lib.qrc.type.mecard.php:17 
     114$GLOBALS['__l10n']['Phonebook'] = 'Contact'; 
     115 
     116#inc/libs/lib.qrc.type.mecard.php:61 
     117$GLOBALS['__l10n']['Second phone:'] = 'Second téléphone :'; 
     118 
     119#inc/libs/lib.qrc.type.mecard.php:72 
     120$GLOBALS['__l10n']['Second email:'] = 'Second email :'; 
     121 
     122#inc/libs/lib.qrc.type.mecard.php:82 
     123$GLOBALS['__l10n']['Birthdate:'] = 'Date de naissance :'; 
     124 
     125#inc/libs/lib.qrc.type.mecard.php:87 
     126$GLOBALS['__l10n']['Memo:'] = 'Mémo :'; 
     127 
     128#inc/libs/lib.qrc.type.mecard.php:92 
     129$GLOBALS['__l10n']['Nickname:'] = 'Pseudo :'; 
     130 
     131#inc/libs/lib.qrc.type.mecard.php:97 
     132$GLOBALS['__l10n']['Video phone:'] = 'Vidéophone :'; 
     133 
     134#inc/libs/lib.qrc.type.mecard.php:102 
     135$GLOBALS['__l10n']['Sound:'] = 'Son :'; 
     136 
     137#inc/libs/lib.qrc.type.mecard.php:105 
     138$GLOBALS['__l10n']['Designates a text string to be set as the kana name in the phonebook.'] = 'Désigne un texte qui sera enregistré comme kana dans le carnet d\'adresse.'; 
     139 
     140#inc/libs/lib.qrc.type.mmsto.php:28 
     141#inc/libs/lib.qrc.type.smsto.php:28 
     142#inc/libs/lib.qrc.type.tel.php:27 
     143$GLOBALS['__l10n']['Phone number:'] = 'NUméro de téléphone :'; 
     144 
     145#inc/libs/lib.qrc.type.tel.php:17 
     146$GLOBALS['__l10n']['Phone'] = 'Téléphone'; 
     147 
     148#inc/libs/lib.qrc.type.txt.php:17 
     149$GLOBALS['__l10n']['Simple text'] = 'Texte simple'; 
     150 
     151#inc/libs/lib.qrc.type.url.php:17 
     152$GLOBALS['__l10n']['Bookmark'] = 'Favoris'; 
     153 
     154#index.php:36 
     155#index.php:131 
     156#index.php:342 
     157$GLOBALS['__l10n']['New image'] = 'Nouvelle image'; 
     158 
     159#index.php:37 
     160#index.php:127 
     161#index.php:338 
     162$GLOBALS['__l10n']['Records'] = 'Enregistrements'; 
     163 
     164#index.php:38 
     165#index.php:126 
     166#index.php:138 
     167#index.php:346 
    162168$GLOBALS['__l10n']['Settings'] = 'Paramètres'; 
    163169 
    164 #index.php:134 
     170#index.php:55 
     171$GLOBALS['__l10n']['Image size'] = 'Taille de l\'image'; 
     172 
     173#index.php:63 
     174$GLOBALS['__l10n']['Create'] = 'Créer'; 
     175 
     176#index.php:142 
    165177$GLOBALS['__l10n']['Enable plugin'] = 'Activer l\'extension'; 
    166178 
    167 #index.php:140 
     179#index.php:147 
    168180$GLOBALS['__l10n']['Use MEBKM anchor for URL QR codes'] = 'Utiliser la balise MEBKM pour les QR codes de type URL'; 
    169181 
    170 #index.php:143 
     182#index.php:150 
    171183$GLOBALS['__l10n']['MEBKM anchors made links as bookmarks with titles.'] = 'La balise MEBKM crée des liens sous forme de signets avec des titres.'; 
    172184 
    173 #index.php:157 
     185#index.php:162 
    174186$GLOBALS['__l10n']['Use image cache'] = 'Utiliser le cache pour les images'; 
    175187 
    176 #index.php:161 
     188#index.php:166 
    177189$GLOBALS['__l10n']['Custom path for cache:'] = 'Répertoire personnalisé pour le cache :'; 
    178190 
    179 #index.php:166 
     191#index.php:170 
    180192$GLOBALS['__l10n']['Default is %s'] = 'Répertoire par défaut : %s'; 
    181193 
    182 #index.php:169 
     194#index.php:172 
    183195$GLOBALS['__l10n']['Currently %s'] = 'Répertoire courant : %s'; 
    184196 
     197#index.php:177 
     198$GLOBALS['__l10n']['Theme'] = 'Thème'; 
     199 
     200#index.php:179 
     201$GLOBALS['__l10n']['CSS:'] = 'CSS :'; 
     202 
    185203#index.php:182 
     204$GLOBALS['__l10n']['You can add here special cascading style sheet. QRcode images have HTML tag "div" of class "qrcode" and "qrcode-widget" for widgets.'] = 'Vous pouvez ajouter ici une feuille de style spéciale. Les images de code QR sont encapsulé dans une balise HTML "div" de class "qrcode" et "qrcode-widget" pour les widgets.'; 
     205 
     206#index.php:186 
    186207$GLOBALS['__l10n']['Include on entries on home page'] = 'Inclure dans les billets de la page d\'accueil'; 
    187208 
    188 #index.php:188 
     209#index.php:191 
    189210$GLOBALS['__l10n']['Include on entries on post page'] = 'Inclure dans les billets de la page des billets'; 
    190211 
    191 #index.php:194 
     212#index.php:196 
    192213$GLOBALS['__l10n']['Include on entries on category page'] = 'Inclure dans les billets de la page des catégories'; 
    193214 
    194 #index.php:200 
     215#index.php:201 
    195216$GLOBALS['__l10n']['Include on entries on tag page'] = 'Inclure dans les billets de la page des tags'; 
    196217 
     
    201222$GLOBALS['__l10n']['Place where to insert image:'] = 'Lieu où insérer l\'image :'; 
    202223 
    203 #index.php:212 
     224#index.php:211 
    204225$GLOBALS['__l10n']['before content'] = 'Avant le contenu'; 
    205226 
    206 #index.php:212 
     227#index.php:211 
    207228$GLOBALS['__l10n']['after content'] = 'Après le contenu'; 
    208229 
    209 #index.php:221 
     230#index.php:215 
    210231$GLOBALS['__l10n']['In order to use this, blog theme must have behaviors "publicEntryBeforeContent" and  "publicEntryAfterContent".'] = 'Pour utiliser ceci, le thème du blog doit avoir les behaviors "publicEntryBeforeContent" et "publicEntryAfterContent".'; 
    211232 
    212 #index.php:222 
     233#index.php:216 
    213234$GLOBALS['__l10n']['A template value is also available, you can add {{tpl:QRcode}} anywhere inside &lt;tpl:Entries&gt; loop in templates.'] = 'Une balise de template est également disponible, vous pouvez ajouter { {tpl:qrCode}} n\'importe où à l\'intèrieur d\'une boucle &lt;tpl:Entries&gt; dans les templates.'; 
    214235 
     236#index.php:372 
     237$GLOBALS['__l10n']['Image per page'] = 'Images par page'; 
     238 
     239#index.php:374 
     240$GLOBALS['__l10n']['filter'] = 'Filtre'; 
     241 
     242#index.php:391 
     243$GLOBALS['__l10n']['Delete selected QR codes'] = 'Effacer les codes QR sélectionnés'; 
     244 
     245$GLOBALS['__l10n']['Create a QR code'] = 'Créer un QR code'; 
     246 
     247$GLOBALS['__l10n']['List of records'] = 'Liste des enregistrements'; 
     248 
     249$GLOBALS['__l10n']['Use MEBKM anchor'] = 'Utiliser la balise MEBKM'; 
     250 
    215251?> 
  • plugins/dcQRcode/locales/fr/main.po

    r2024 r3075  
    1 # Language: français 
    2 # Module: dcQRcode - 0.6 
    3 # Date: 2010-01-19 07:11:28 
    4 # Translated with translater 1.3 
     1# Language: Français 
     2# Module: dcQRcode - 2011.08.10 
     3# Date: 2011-08-10 20:56:23 
     4# Translated with translater 1.5 
    55 
    66msgid "" 
    77msgstr "" 
    88"Content-Type: text/plain; charset=UTF-8\n" 
    9 "Project-Id-Version: dcQRcode 0.6\n" 
     9"Project-Id-Version: dcQRcode 2011.08.10\n" 
    1010"POT-Creation-Date: \n" 
    11 "PO-Revision-Date: 2010-01-19T07:11:28+00:00\n" 
     11"PO-Revision-Date: 2011-08-10T20:56:23+00:00\n" 
    1212"Last-Translator: JC Denis\n" 
    1313"Language-Team: \n" 
     
    1515"Content-Transfer-Encoding: 8bit\n" 
    1616 
    17 #: _widgets.php:37 
     17#: _widgets.php:46 
     18#: index.php:361 
    1819msgid "Size:" 
    1920msgstr "Taille :" 
    2021 
    21 #: inc/lib.dc.qr.code.index.php:28 
    22 msgid "QRcode successfully created" 
    23 msgstr "QRcode créé avec succès" 
    24  
    25 #: inc/lib.dc.qr.code.index.php:37 
    26 msgid "Simple text" 
    27 msgstr "Texte simple" 
    28  
    29 #: inc/lib.dc.qr.code.index.php:60 
    30 #: inc/lib.dc.qr.code.index.php:151 
    31 #: inc/lib.dc.qr.code.index.php:258 
    32 #: inc/lib.dc.qr.code.index.php:402 
    33 #: inc/lib.dc.qr.code.index.php:501 
    34 #: inc/lib.dc.qr.code.index.php:595 
    35 #: inc/lib.dc.qr.code.index.php:703 
    36 #: inc/lib.dc.qr.code.index.php:810 
    37 msgid "Create a QR code" 
    38 msgstr "Créer un QR code" 
    39  
    40 #: inc/lib.dc.qr.code.index.php:74 
    41 #: inc/lib.dc.qr.code.index.php:175 
    42 #: inc/lib.dc.qr.code.index.php:327 
    43 #: inc/lib.dc.qr.code.index.php:426 
    44 #: inc/lib.dc.qr.code.index.php:521 
    45 #: inc/lib.dc.qr.code.index.php:619 
    46 #: inc/lib.dc.qr.code.index.php:736 
    47 #: inc/lib.dc.qr.code.index.php:834 
    48 msgid "Create" 
    49 msgstr "Créer" 
    50  
    51 #: inc/lib.dc.qr.code.index.php:85 
    52 #: inc/lib.dc.qr.code.index.php:186 
    53 #: inc/lib.dc.qr.code.index.php:338 
    54 #: inc/lib.dc.qr.code.index.php:437 
    55 #: inc/lib.dc.qr.code.index.php:531 
    56 #: inc/lib.dc.qr.code.index.php:630 
    57 #: inc/lib.dc.qr.code.index.php:746 
    58 #: inc/lib.dc.qr.code.index.php:845 
    59 msgid "List of records" 
    60 msgstr "Liste des enregistrements" 
    61  
    62 #: inc/lib.dc.qr.code.index.php:126 
    63 msgid "Bookmark" 
    64 msgstr "Favoris" 
    65  
    66 #: inc/lib.dc.qr.code.index.php:155 
    67 #: inc/lib.dc.qr.code.index.php:262 
    68 #: inc/lib.dc.qr.code.index.php:406 
    69 #: inc/lib.dc.qr.code.index.php:516 
    70 #: inc/lib.dc.qr.code.index.php:614 
    71 #: inc/lib.dc.qr.code.index.php:707 
    72 #: inc/lib.dc.qr.code.index.php:829 
    73 msgid "Image size" 
    74 msgstr "Taille de l'image" 
    75  
    76 #: inc/lib.dc.qr.code.index.php:171 
    77 msgid "Use MEBKM anchor" 
    78 msgstr "Utiliser la balise MEBKM" 
    79  
    80 #: inc/lib.dc.qr.code.index.php:227 
    81 msgid "Phonebook" 
    82 msgstr "Contact" 
    83  
    84 #: inc/lib.dc.qr.code.index.php:272 
    85 msgid "Address:" 
    86 msgstr "Adresse :" 
    87  
    88 #: inc/lib.dc.qr.code.index.php:277 
    89 msgid "Phone:" 
    90 msgstr "Téléphone :" 
    91  
    92 #: inc/lib.dc.qr.code.index.php:282 
    93 msgid "Second phone:" 
    94 msgstr "Second téléphone :" 
    95  
    96 #: inc/lib.dc.qr.code.index.php:292 
    97 msgid "Second email:" 
    98 msgstr "Second email :" 
    99  
    100 #: inc/lib.dc.qr.code.index.php:302 
    101 msgid "Birthdate:" 
    102 msgstr "Date de naissance :" 
    103  
    104 #: inc/lib.dc.qr.code.index.php:307 
    105 msgid "Memo:" 
    106 msgstr "Mémo :" 
    107  
    108 #: inc/lib.dc.qr.code.index.php:312 
    109 msgid "Nickname:" 
    110 msgstr "Pseudo :" 
    111  
    112 #: inc/lib.dc.qr.code.index.php:317 
    113 msgid "Video phone:" 
    114 msgstr "Vidéophone :" 
    115  
    116 #: inc/lib.dc.qr.code.index.php:322 
    117 msgid "Sound:" 
    118 msgstr "Son :" 
    119  
    120 #: inc/lib.dc.qr.code.index.php:379 
    121 msgid "Geographic" 
    122 msgstr "Géographique" 
    123  
    124 #: inc/lib.dc.qr.code.index.php:411 
    125 msgid "Latitude:" 
    126 msgstr "Latitude :" 
    127  
    128 #: inc/lib.dc.qr.code.index.php:416 
    129 msgid "Longitude:" 
    130 msgstr "Longitude :" 
    131  
    132 #: inc/lib.dc.qr.code.index.php:421 
    133 msgid "Altitude:" 
    134 msgstr "Altitude :" 
    135  
    136 #: inc/lib.dc.qr.code.index.php:507 
    137 msgid "Publisher" 
    138 msgstr "Auteur" 
    139  
    140 #: inc/lib.dc.qr.code.index.php:507 
    141 msgid "Package" 
    142 msgstr "Paquetage" 
    143  
    144 #: inc/lib.dc.qr.code.index.php:599 
    145 msgid "Summary" 
    146 msgstr "Résumé" 
    147  
    148 #: inc/lib.dc.qr.code.index.php:604 
    149 msgid "Start date:" 
    150 msgstr "Date de début :" 
    151  
    152 #: inc/lib.dc.qr.code.index.php:609 
    153 msgid "End date:" 
    154 msgstr "Date de fin :" 
    155  
    156 #: inc/lib.dc.qr.code.index.php:730 
    157 msgid "Designates a text string to be set as the parameter sent to the i-appli to be activated. (1 to 255 bytes)" 
    158 msgstr "Désigne une chaine de texte définissant un paramètre envoyé à l'i-appli pour être activé. (1 à 255 bytes)" 
    159  
    160 #: inc/lib.dc.qr.code.index.php:731 
    161 msgid "The \"name\" and \"value\" are separated by a comma (,)." 
    162 msgstr "Les \"nom\" et \"valeur\" sont séparés par une virgule (,)." 
    163  
    164 #: inc/lib.dc.qr.code.index.php:732 
    165 msgid "16 parameters can be designated within a single LAPL: identifier." 
    166 msgstr "16 paramètres peuvent être assignés avec un seul identifiant LAPL :" 
    167  
    168 #: inc/lib.dc.qr.code.index.php:814 
    169 msgid "Receiver:" 
    170 msgstr "Destinataire :" 
    171  
    172 #: inc/lib.dc.qr.code.index.php:819 
    173 msgid "Subject:" 
    174 msgstr "Sujet :" 
    175  
    176 #: inc/lib.dc.qr.code.index.php:824 
    177 msgid "Message:" 
    178 msgstr "Message :" 
    179  
    180 #: inc/lib.dc.qr.code.list.php:20 
    181 msgid "No record" 
    182 msgstr "Pas d'enregistrement" 
     22#: inc/lib.dc.qr.code.list.php:21 
     23msgid "No QR code" 
     24msgstr "Aucun QR code" 
     25 
     26#: inc/lib.dc.qr.code.list.php:34 
     27msgid "Content" 
     28msgstr "Contenu" 
    18329 
    18430#: inc/lib.dc.qr.code.list.php:35 
    185 msgid "Data" 
    186 msgstr "Données" 
    187  
    188 #: inc/lib.dc.qr.code.list.php:36 
     31#: index.php:264 
    18932msgid "Size" 
    19033msgstr "Taille" 
    191  
    192 #: inc/lib.dc.qr.code.list.php:64 
    193 msgid "Delete selected records" 
    194 msgstr "Effacer les enregistrements sélectionnés" 
    19534 
    19635#: inc/lib.dcqrcode.activityreport.php:22 
     
    21049msgstr "Le code QR d'id \"%s\" a été supprimé par \"%s\"" 
    21150 
    212 #: index.php:123 
    213 #: index.php:129 
     51#: inc/lib.qrc.type.php:27 
     52msgid "QRcode successfully created" 
     53msgstr "QRcode créé avec succès" 
     54 
     55#: inc/libs/lib.qrc.type.bizcard.php:33 
     56#: inc/libs/lib.qrc.type.mecard.php:39 
     57msgid "Last name:" 
     58msgstr "Nom :" 
     59 
     60#: inc/libs/lib.qrc.type.bizcard.php:39 
     61#: inc/libs/lib.qrc.type.mecard.php:44 
     62msgid "First name:" 
     63msgstr "Prénom :" 
     64 
     65#: inc/libs/lib.qrc.type.bizcard.php:45 
     66msgid "Job:" 
     67msgstr "Métier :" 
     68 
     69#: inc/libs/lib.qrc.type.bizcard.php:50 
     70msgid "Company:" 
     71msgstr "Entreprise :" 
     72 
     73#: inc/libs/lib.qrc.type.bizcard.php:55 
     74#: inc/libs/lib.qrc.type.mecard.php:50 
     75msgid "Address:" 
     76msgstr "Adresse :" 
     77 
     78#: inc/libs/lib.qrc.type.bizcard.php:60 
     79#: inc/libs/lib.qrc.type.mecard.php:56 
     80msgid "Phone:" 
     81msgstr "Téléphone :" 
     82 
     83#: inc/libs/lib.qrc.type.geo.php:17 
     84msgid "Geographic" 
     85msgstr "Géographique" 
     86 
     87#: inc/libs/lib.qrc.type.geo.php:29 
     88msgid "Latitude:" 
     89msgstr "Latitude :" 
     90 
     91#: inc/libs/lib.qrc.type.geo.php:35 
     92msgid "Longitude:" 
     93msgstr "Longitude :" 
     94 
     95#: inc/libs/lib.qrc.type.geo.php:40 
     96msgid "Altitude:" 
     97msgstr "Altitude :" 
     98 
     99#: inc/libs/lib.qrc.type.iappli.php:39 
     100msgid "Command:" 
     101msgstr "Commande :" 
     102 
     103#: inc/libs/lib.qrc.type.iappli.php:54 
     104msgid "Designates a text string to be set as the parameter sent to the i-appli to be activated. (1 to 255 bytes)" 
     105msgstr "Désigne une chaine de texte définissant un paramètre envoyé à l'i-appli pour être activé. (1 à 255 bytes)" 
     106 
     107#: inc/libs/lib.qrc.type.iappli.php:55 
     108msgid "The \"name\" and \"value\" are separated by a comma (,)." 
     109msgstr "Les \"nom\" et \"valeur\" sont séparés par une virgule (,)." 
     110 
     111#: inc/libs/lib.qrc.type.iappli.php:56 
     112msgid "16 parameters can be designated within a single LAPL: identifier." 
     113msgstr "16 paramètres peuvent être assignés avec un seul identifiant LAPL :" 
     114 
     115#: inc/libs/lib.qrc.type.ical.php:17 
     116msgid "Calendar" 
     117msgstr "Calendrier" 
     118 
     119#: inc/libs/lib.qrc.type.ical.php:29 
     120msgid "Summary" 
     121msgstr "Résumé" 
     122 
     123#: inc/libs/lib.qrc.type.ical.php:35 
     124msgid "Start date:" 
     125msgstr "Date de début :" 
     126 
     127#: inc/libs/lib.qrc.type.ical.php:41 
     128msgid "End date:" 
     129msgstr "Date de fin :" 
     130 
     131#: inc/libs/lib.qrc.type.market.php:22 
     132#: inc/libs/lib.qrc.type.market.php:42 
     133msgid "Publisher" 
     134msgstr "Auteur" 
     135 
     136#: inc/libs/lib.qrc.type.market.php:22 
     137#: inc/libs/lib.qrc.type.market.php:42 
     138msgid "Package" 
     139msgstr "Paquetage" 
     140 
     141#: inc/libs/lib.qrc.type.matmsg.php:29 
     142msgid "Receiver:" 
     143msgstr "Destinataire :" 
     144 
     145#: inc/libs/lib.qrc.type.matmsg.php:34 
     146msgid "Subject:" 
     147msgstr "Sujet :" 
     148 
     149#: inc/libs/lib.qrc.type.matmsg.php:39 
     150#: inc/libs/lib.qrc.type.mmsto.php:33 
     151#: inc/libs/lib.qrc.type.smsto.php:33 
     152msgid "Message:" 
     153msgstr "Message :" 
     154 
     155#: inc/libs/lib.qrc.type.mecard.php:17 
     156msgid "Phonebook" 
     157msgstr "Contact" 
     158 
     159#: inc/libs/lib.qrc.type.mecard.php:61 
     160msgid "Second phone:" 
     161msgstr "Second téléphone :" 
     162 
     163#: inc/libs/lib.qrc.type.mecard.php:72 
     164msgid "Second email:" 
     165msgstr "Second email :" 
     166 
     167#: inc/libs/lib.qrc.type.mecard.php:82 
     168msgid "Birthdate:" 
     169msgstr "Date de naissance :" 
     170 
     171#: inc/libs/lib.qrc.type.mecard.php:87 
     172msgid "Memo:" 
     173msgstr "Mémo :" 
     174 
     175#: inc/libs/lib.qrc.type.mecard.php:92 
     176msgid "Nickname:" 
     177msgstr "Pseudo :" 
     178 
     179#: inc/libs/lib.qrc.type.mecard.php:97 
     180msgid "Video phone:" 
     181msgstr "Vidéophone :" 
     182 
     183#: inc/libs/lib.qrc.type.mecard.php:102 
     184msgid "Sound:" 
     185msgstr "Son :" 
     186 
     187#: inc/libs/lib.qrc.type.mecard.php:105 
     188msgid "Designates a text string to be set as the kana name in the phonebook." 
     189msgstr "Désigne un texte qui sera enregistré comme kana dans le carnet d'adresse." 
     190 
     191#: inc/libs/lib.qrc.type.mmsto.php:28 
     192#: inc/libs/lib.qrc.type.smsto.php:28 
     193#: inc/libs/lib.qrc.type.tel.php:27 
     194msgid "Phone number:" 
     195msgstr "NUméro de téléphone :" 
     196 
     197#: inc/libs/lib.qrc.type.tel.php:17 
     198msgid "Phone" 
     199msgstr "Téléphone" 
     200 
     201#: inc/libs/lib.qrc.type.txt.php:17 
     202msgid "Simple text" 
     203msgstr "Texte simple" 
     204 
     205#: inc/libs/lib.qrc.type.url.php:17 
     206msgid "Bookmark" 
     207msgstr "Favoris" 
     208 
     209#: index.php:36 
     210#: index.php:131 
     211#: index.php:342 
     212msgid "New image" 
     213msgstr "Nouvelle image" 
     214 
     215#: index.php:37 
     216#: index.php:127 
     217#: index.php:338 
     218msgid "Records" 
     219msgstr "Enregistrements" 
     220 
     221#: index.php:38 
     222#: index.php:126 
     223#: index.php:138 
     224#: index.php:346 
    214225msgid "Settings" 
    215226msgstr "Paramètres" 
    216227 
    217 #: index.php:134 
     228#: index.php:55 
     229msgid "Image size" 
     230msgstr "Taille de l'image" 
     231 
     232#: index.php:63 
     233msgid "Create" 
     234msgstr "Créer" 
     235 
     236#: index.php:142 
    218237msgid "Enable plugin" 
    219238msgstr "Activer l'extension" 
    220239 
    221 #: index.php:140 
     240#: index.php:147 
    222241msgid "Use MEBKM anchor for URL QR codes" 
    223242msgstr "Utiliser la balise MEBKM pour les QR codes de type URL" 
    224243 
    225 #: index.php:143 
     244#: index.php:150 
    226245msgid "MEBKM anchors made links as bookmarks with titles." 
    227246msgstr "La balise MEBKM crée des liens sous forme de signets avec des titres." 
    228247 
    229 #: index.php:157 
     248#: index.php:162 
    230249msgid "Use image cache" 
    231250msgstr "Utiliser le cache pour les images" 
    232251 
    233 #: index.php:161 
     252#: index.php:166 
    234253msgid "Custom path for cache:" 
    235254msgstr "Répertoire personnalisé pour le cache :" 
    236255 
    237 #: index.php:166 
     256#: index.php:170 
    238257msgid "Default is %s" 
    239258msgstr "Répertoire par défaut : %s" 
    240259 
    241 #: index.php:169 
     260#: index.php:172 
    242261msgid "Currently %s" 
    243262msgstr "Répertoire courant : %s" 
    244263 
     264#: index.php:177 
     265msgid "Theme" 
     266msgstr "Thème" 
     267 
     268#: index.php:179 
     269msgid "CSS:" 
     270msgstr "CSS :" 
     271 
    245272#: index.php:182 
     273msgid "You can add here special cascading style sheet. QRcode images have HTML tag \"div\" of class \"qrcode\" and \"qrcode-widget\" for widgets." 
     274msgstr "Vous pouvez ajouter ici une feuille de style spéciale. Les images de code QR sont encapsulé dans une balise HTML \"div\" de class \"qrcode\" et \"qrcode-widget\" pour les widgets." 
     275 
     276#: index.php:186 
    246277msgid "Include on entries on home page" 
    247278msgstr "Inclure dans les billets de la page d'accueil" 
    248279 
    249 #: index.php:188 
     280#: index.php:191 
    250281msgid "Include on entries on post page" 
    251282msgstr "Inclure dans les billets de la page des billets" 
    252283 
    253 #: index.php:194 
     284#: index.php:196 
    254285msgid "Include on entries on category page" 
    255286msgstr "Inclure dans les billets de la page des catégories" 
    256287 
    257 #: index.php:200 
     288#: index.php:201 
    258289msgid "Include on entries on tag page" 
    259290msgstr "Inclure dans les billets de la page des tags" 
     
    267298msgstr "Lieu où insérer l'image :" 
    268299 
    269 #: index.php:212 
     300#: index.php:211 
    270301msgid "before content" 
    271302msgstr "Avant le contenu" 
    272303 
    273 #: index.php:212 
     304#: index.php:211 
    274305msgid "after content" 
    275306msgstr "Après le contenu" 
    276307 
    277 #: index.php:221 
     308#: index.php:215 
    278309msgid "In order to use this, blog theme must have behaviors \"publicEntryBeforeContent\" and  \"publicEntryAfterContent\"." 
    279310msgstr "Pour utiliser ceci, le thème du blog doit avoir les behaviors \"publicEntryBeforeContent\" et \"publicEntryAfterContent\"." 
    280311 
    281 #: index.php:222 
     312#: index.php:216 
    282313msgid "A template value is also available, you can add {{tpl:QRcode}} anywhere inside &lt;tpl:Entries&gt; loop in templates." 
    283314msgstr "Une balise de template est également disponible, vous pouvez ajouter { {tpl:qrCode}} n'importe où à l'intèrieur d'une boucle &lt;tpl:Entries&gt; dans les templates." 
    284315 
     316#: index.php:372 
     317msgid "Image per page" 
     318msgstr "Images par page" 
     319 
     320#: index.php:374 
     321msgid "filter" 
     322msgstr "Filtre" 
     323 
     324#: index.php:391 
     325msgid "Delete selected QR codes" 
     326msgstr "Effacer les codes QR sélectionnés" 
     327 
     328msgid "Create a QR code" 
     329msgstr "Créer un QR code" 
     330 
     331msgid "List of records" 
     332msgstr "Liste des enregistrements" 
     333 
     334msgid "Use MEBKM anchor" 
     335msgstr "Utiliser la balise MEBKM" 
     336 
  • plugins/dcQRcode/release.txt

    r2911 r3075  
     1todo: 
     2 - Add date selector on ICAL format 
     3 - Add check on forms form 
     4 - Add wiki synthax or something like that 
     5 - Add missing options on settings page (margin,prefix...) 
     6 
     72011.08.10 
     8 * Added some formats 
     9 * Rewrited QR code library 
     10 * Rewrited admin page 
     11 
    1120.7.2 20110130 
    213 * Fixed calls to core->blog in prepend. 
Note: See TracChangeset for help on using the changeset viewer.

Sites map