Dotclear

Changeset 2987


Ignore:
Timestamp:
02/24/11 19:08:48 (12 years ago)
Author:
sacha
Message:

empreinte - improved installation procedure

Location:
plugins/empreinte
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • plugins/empreinte/_define.php

    r2985 r2987  
    2121     /* Description*/    'Save browser information in comments', 
    2222     /* Author */        'Alex Pirine', 
    23      /* Version */       '2011.02', 
     23     /* Version */       '2011.02.7', 
    2424     /* Permissions */   'admin' 
    2525); 
  • plugins/empreinte/_install.php

    r2985 r2987  
    2525} 
    2626 
    27 # --INSTALL AND UPDATE PROCEDURES-- 
     27 
     28# --SCHEMA SYNC-- 
    2829 
    2930$s = new dbStruct($core->con,$core->prefix); 
    30 $sets = &$core->blog->settings; 
    31 $sets->setNamespace(strtolower($label)); 
    3231 
    33 # New install / update 
    34 $sets->put('empreinte_authorlink_mask','%1$s', 
    35      'string','AuthorLink mask',false); 
    36 $sets->put('empreinte_allow_disable',true, 
    37      'boolean','Allow visitors disable Empreinte',false); 
    38 $sets->put('empreinte_checkbox_style','margin:0pt 5px 0pt 140px;width:auto;', 
    39      'string','Set a style attribute to the checkbox that disables Empreinte',false); 
    4032# We do NOT erase database contents if a previous version is installed 
    4133if ($i_version === null) { 
     
    4638} 
    4739 
    48 # --SCHEMA SYNC-- 
    49  
    5040$si = new dbStruct($core->con,$core->prefix); 
    5141$si->synchronize($s); 
     42 
     43 
     44# --SETTINGS-- 
     45 
     46$core->blog->settings->addNamespace(strtolower($label)); 
     47$s = &$core->blog->settings->empreinte; 
     48 
     49$s->put('authorlink_mask','%1$s', 
     50     'string','AuthorLink mask',false); 
     51$s->put('allow_disable',true, 
     52     'boolean','Allow visitors disable Empreinte',false); 
     53$s->put('checkbox_style','margin:0pt 5px 0pt 140px;width:auto;', 
     54     'string','Set a style attribute to the checkbox that disables Empreinte',false); 
     55 
    5256 
    5357# --SETTING NEW VERSION-- 
     
    5559$core->setVersion($label,$m_version); 
    5660 
     61if (!file_exists(DC_TPL_CACHE.DIRECTORY_SEPARATOR.'cbtpl')) { 
     62     return true; 
     63} 
    5764if (!files::deltree(DC_TPL_CACHE.DIRECTORY_SEPARATOR.'cbtpl')) { 
    5865     throw new Exception(__('To finish installation, please delete the whole cache/cbtpl directory.')); 
  • plugins/empreinte/js/post.js

    r2985 r2987  
    3030               '</p>' 
    3131          ); 
    32       
    33      $('#no_empreinte') 
    34           .css('width',$('#c_remember').css('width')) 
    35           .css('margin',$('#c_remember').css('margin')) 
    36           .css('margin-left',$('#c_remember').css('margin-left')) 
    37           .css('margin-right',$('#c_remember').css('margin-right')); 
    3832      
    3933     var cookie = readCookie($.cookie('comment_no_empreinte')); 
Note: See TracChangeset for help on using the changeset viewer.

Sites map