Dotclear


Ignore:
Files:
13 deleted
19 edited

Legend:

Unmodified
Added
Removed
  • .hgsubstate

    r1102 r843  
    1 789e7f2b4844160f4dc7d2795cfa1e6f4fd53a5c inc/libs/clearbricks 
     14f62679e0756104bdc0b49eacaed9aba68735aa5 inc/libs/clearbricks 
  • CHANGELOG

    r1104 r1046  
    1 Dotclear 2.5.0 - 2013-02-24 
    2 =========================================================== 
    3 * Ductile theme may now use webfont (from Google, Adobe and similar providers) 
     1Dotclear 2.5.0 - 201?-??-13 
     2=========================================================== 
    43* daInstaller plugin is now included in the official distribution 
    54* The media enhanced uploader may now be temporarily enabled or disabled 
     
    2524* Adaptative compression rate for thumbnails generation 
    2625* Add timestamp on admin information messages 
    27 * Update to jQuery 1.8.3 and jQuery-UI 1.9.2 (custom) 
     26* Update to jQuery 1.8.2 and jQuery-UI 1.9 (custom) 
    2827* Add default favicon.ico 
    2928* Add default attributes settings for image,mp3,flv insertion 
  • admin/media_item.php

    r1103 r1073  
    6060     # Prepare directories combo box 
    6161     $dirs_combo = array(); 
    62      foreach ($core->media->getDBDirs() as $v) { 
    63           $dirs_combo['/'.$v] = $v; 
     62     foreach ($core->media->getRootDirs() as $v) { 
     63          if ($v->w) { 
     64               $dirs_combo['/'.$v->relname] = $v->relname; 
     65          } 
    6466     } 
    6567     ksort($dirs_combo); 
  • admin/posts.php

    r1153 r1152  
    110110     __('Mark as unselected') => 'unselected' 
    111111); 
    112 $combo_action[__('Change')] = array( 
    113      __('Change category') => 'category', 
    114      __('Change language') => 'lang'); 
     112$combo_action[__('Change')] = array(__('Change category') => 'category'); 
    115113if ($core->auth->check('admin',$core->blog->id)) 
    116114{ 
  • admin/posts_actions.php

    r1102 r1035  
    157157          { 
    158158               $core->error->add($e->getMessage()); 
    159           } 
    160      } 
    161      elseif ($action == 'lang' && isset($_POST['new_lang'])) 
    162      { 
    163           $new_lang = $_POST['new_lang']; 
    164           try 
    165           { 
    166                $cur = $core->con->openCursor($core->prefix.'post'); 
    167                $cur->post_lang = $new_lang; 
    168                $cur->update('WHERE post_id '.$core->con->in($posts_ids)); 
    169                 
    170                http::redirect($redir); 
    171           } 
    172           catch (Exception $e) 
    173           { 
    174                $core->error->add($e->getMessages()); 
    175159          } 
    176160     } 
     
    273257     '</form>'; 
    274258} 
    275 elseif ($action == 'lang') 
    276 { 
    277      echo '<h2 class="page-title">'.__('Change language for entries').'</h2>'; 
    278       
    279      # lang list 
    280      # Languages combo 
    281      $rs = $core->blog->getLangs(array('order'=>'asc')); 
    282      $all_langs = l10n::getISOcodes(0,1); 
    283      $lang_combo = array('' => '', __('Most used') => array(), __('Available') => l10n::getISOcodes(1,1)); 
    284      while ($rs->fetch()) { 
    285           if (isset($all_langs[$rs->post_lang])) { 
    286                $lang_combo[__('Most used')][$all_langs[$rs->post_lang]] = $rs->post_lang; 
    287                unset($lang_combo[__('Available')][$all_langs[$rs->post_lang]]); 
    288           } else { 
    289                $lang_combo[__('Most used')][$rs->post_lang] = $rs->post_lang; 
    290           } 
    291      } 
    292      unset($all_langs); 
    293      unset($rs); 
    294       
    295      echo 
    296      '<form action="posts_actions.php" method="post">'. 
    297      '<p><label for="new_lang" class="classic">'.__('Entry lang:').' '. 
    298      form::combo('new_lang',$lang_combo,''). 
    299      '</label> '; 
    300       
    301      echo 
    302      $hidden_fields. 
    303      $core->formNonce(). 
    304      form::hidden(array('action'),'lang'). 
    305      '<input type="submit" value="'.__('Save').'" /></p>'. 
    306      '</form>'; 
    307  
    308 } 
    309259elseif ($action == 'author' && $core->auth->check('admin',$core->blog->id)) 
    310260{ 
  • inc/admin/default-templates/forms/form_layout.html.twig

    r1153 r1152  
    5757          <label for="{{name}}" class="classic"> 
    5858     {% endif %} 
    59     <input type="checkbox" {{ block('field_attr') }}{% if value is defined %} value="{{ value }}"{% endif %}{% if checked %} checked="checked"{% endif %} /> 
     59    <input type="checkbox" {{ block('widget_attributes') }}{% if value is defined %} value="{{ value }}"{% endif %}{% if checked %} checked="checked"{% endif %} /> 
    6060     {% if label is not empty %} 
    6161          {{ label }}</label> 
  • inc/core/class.dc.media.php

    r1103 r909  
    821821          $this->callFileHandler(files::getMimeType($media_file),'remove',$f); 
    822822     } 
    823  
    824      /** 
    825      * Root directories 
    826      * 
    827      * Returns an array of directory under {@link $root} directory. 
    828      * 
    829      * @uses fileItem 
    830      * @return array 
    831      */ 
    832      public function getDBDirs() 
    833      { 
    834           $media_dir = $this->relpwd ? $this->relpwd : '.'; 
    835            
    836           $strReq = 
    837           'SELECT distinct media_dir '. 
    838           'FROM '.$this->table.' '. 
    839           "WHERE media_path = '".$this->path."'"; 
    840           $rs = $this->con->select($strReq); 
    841           while ($rs->fetch()) { 
    842                if (is_dir($this->root.'/'.$rs->media_dir)) 
    843                     $dir[] = $rs->media_dir; 
    844           } 
    845            
    846           return $dir; 
    847      } 
    848823      
    849824     /** 
  • inc/dbschema/upgrade.php

    r1083 r706  
    305305                    $core->con->execute($strReq); 
    306306               } 
    307  
    308                if (version_compare($version,'2.5','<=')) 
    309                { 
    310                     # Try to disable daInstaller plugin if it has been installed outside the default plugins directory 
    311                     $path = explode(PATH_SEPARATOR,DC_PLUGINS_ROOT); 
    312                     $default = path::real(dirname(__FILE__).'/../../plugins/'); 
    313                     foreach ($path as $root) 
    314                     { 
    315                          if (!is_dir($root) || !is_readable($root)) { 
    316                               continue; 
    317                          } 
    318                          if (substr($root,-1) != '/') { 
    319                               $root .= '/'; 
    320                          } 
    321                          if (($p = @dir($root)) === false) { 
    322                               continue; 
    323                          } 
    324                          if(path::real($root) == $default) { 
    325                               continue; 
    326                          } 
    327                          if (($d = @dir($root.'daInstaller')) === false) { 
    328                               continue; 
    329                          } 
    330                          $f = $root.'/daInstaller/_disabled'; 
    331                          if (!file_exists($f)) 
    332                          { 
    333                               @file_put_contents($f,''); 
    334                          } 
    335                     } 
    336                } 
    337307                
    338308               $core->setVersion('core',DC_VERSION); 
  • inc/public/lib.urlhandlers.php

    r1128 r779  
    8686               $_ctx->nb_entry_per_page = $core->blog->settings->system->nb_post_per_page; 
    8787          } 
    88            
    89           // Break public template here for now  
    90           // just to check if template engine is well loaded. 
    91           $core->tpl->display($tpl.'.twig'); 
    92           // To be continued... 
    9388           
    9489          $tpl_file = $core->tpl->getFilePath($tpl); 
  • inc/public/prepend.php

    r1128 r921  
    5555} catch (Exception $e) {} 
    5656 
    57 # Add public default templates path 
    58 $core->tpl->getLoader()->addPath(dirname(__FILE__).'/default-templates'); 
    59 # Set public context 
    60 $_ctx = new dcPublicContext($core); 
    61 $core->tpl->addExtension($_ctx); 
    62  
    63 /* 
    6457# Creating template context 
    6558$_ctx = new context(); 
     
    7164          ,640); 
    7265} 
    73 */ 
     66 
    7467# Loading locales 
    7568$_lang = $core->blog->settings->system->lang; 
     
    127120 
    128121# --BEHAVIOR-- publicPrepend 
    129 $core->callBehavior('publicPrepend',$core,$_ctx); 
     122$core->callBehavior('publicPrepend',$core); 
    130123 
    131124# Prepare the HTTP cache thing 
     
    134127$mod_ts[] = $core->blog->upddt; 
    135128 
    136  
    137 # Add parent theme path 
    138 if ($__parent_theme && is_dir($core->blog->themes_path.'/'.$__parent_theme.'/tpl')) { 
    139      $core->tpl->getLoader()->addPath($core->blog->themes_path.'/'.$__parent_theme.'/tpl'); 
    140 } 
    141 # Add theme path at the begining of path list 
    142 if (is_dir($core->blog->themes_path.'/'.$__theme.'/tpl')) { 
    143      $core->tpl->getLoader()->prependPath($core->blog->themes_path.'/'.$__theme.'/tpl'); 
    144 } 
    145 /* 
    146129$__theme_tpl_path = array( 
    147130     $core->blog->themes_path.'/'.$__theme.'/tpl' 
     
    155138     dirname(__FILE__).'/default-templates', 
    156139     $core->tpl->getPath()); 
    157 */ 
     140 
    158141$core->url->mode = $core->blog->settings->system->url_scan; 
    159142 
  • locales/fr/main.po

    r1102 r1077  
    17381738msgstr "Changer la catégorie" 
    17391739 
    1740 msgid "Change language" 
    1741 msgstr "Changer la langue" 
    1742  
    17431740msgid "Change author" 
    17441741msgstr "Changer l'auteur" 
     
    17641761msgid "Change category for entries" 
    17651762msgstr "Changer la catégorie des billets" 
    1766  
    1767 msgid "Change language for entries" 
    1768 msgstr "Changer la langue des billets" 
    17691763 
    17701764msgid "Change author for entries" 
  • plugins/akismet/class.dc.filter.akismet.php

    r1094 r536  
    151151           
    152152          $res .= 
    153           '<p><a href="http://akismet.com/">'.__('Get your own API key').'</a></p>'. 
     153          '<p><a href="http://wordpress.com/api-keys/">'.__('Get your own API key').'</a></p>'. 
    154154          '<p><input type="submit" value="'.__('Save').'" />'. 
    155155          $this->core->formNonce().'</p>'. 
  • plugins/importExport/inc/flat/class.flat.import.php

    r1093 r841  
    790790          $strReq = 'SELECT media_id '. 
    791791                    'FROM '.$this->prefix.'media '. 
    792                     "WHERE media_path = '".$this->con->escape($this->cur_media->media_path)."' ". 
    793                     "AND media_file = '".$this->con->escape($this->cur_media->media_file)."' "; 
     792                    "WHERE media_path = '".$this->cur_media->media_path."' ". 
     793                    "AND media_file = '".$this->cur_media->media_file."' "; 
    794794           
    795795          $rs = $this->con->select($strReq); 
  • plugins/tags/_admin.php

    r1097 r897  
    105105          $tag_url = $GLOBALS['core']->blog->url.$GLOBALS['core']->url->getURLFor('tag'); 
    106106           
    107           $opts = $GLOBALS['core']->auth->getOptions(); 
     107          $opts = $GLOBALS['core']->blog->url.$GLOBALS['core']->auth->getOptions(); 
    108108          $type = isset($opts['tag_list_format']) ? $opts['tag_list_format'] : 'more'; 
    109109           
  • themes/ductile/_config.php

    r1096 r1011  
    4444} 
    4545 
     46 
     47 
    4648$contexts = array( 
    4749     'default' => __('Home (first page)'), 
     
    6567     __('Impact') => 'Impact', 
    6668     __('Monospace') => 'Monospace' 
    67 ); 
    68  
    69 $webfont_apis = array( 
    70      __('none') => '', 
    71      __('javascript (Adobe)') => 'js', 
    72      __('stylesheet (Google)') => 'css' 
    7369); 
    7470 
     
    229225     'subtitle_hidden' => null, 
    230226     'logo_src' => null, 
    231      'preview_not_mandatory' => null, 
    232227     // CSS 
    233228     'body_font' => null, 
    234      'body_webfont_family' => null, 
    235      'body_webfont_url' => null, 
    236      'body_webfont_api' => null, 
    237229     'alternate_font' => null, 
    238      'alternate_webfont_family' => null, 
    239      'alternate_webfont_url' => null, 
    240      'alternate_webfont_api' => null, 
    241230     'blog_title_w' => null, 
    242231     'blog_title_s' => null, 
     
    338327               $ductile_user['subtitle_hidden'] = (integer) !empty($_POST['subtitle_hidden']); 
    339328               $ductile_user['logo_src'] = $_POST['logo_src']; 
    340                $ductile_user['preview_not_mandatory'] = (integer) !empty($_POST['preview_not_mandatory']); 
    341329 
    342330               $ductile_stickers = array(); 
     
    380368          if ($conf_tab == 'css') { 
    381369               $ductile_user['body_font'] = $_POST['body_font']; 
    382                $ductile_user['body_webfont_family'] = $_POST['body_webfont_family']; 
    383                $ductile_user['body_webfont_url'] = $_POST['body_webfont_url']; 
    384                $ductile_user['body_webfont_api'] = $_POST['body_webfont_api']; 
    385  
    386370               $ductile_user['alternate_font'] = $_POST['alternate_font']; 
    387                $ductile_user['alternate_webfont_family'] = $_POST['alternate_webfont_family']; 
    388                $ductile_user['alternate_webfont_url'] = $_POST['alternate_webfont_url']; 
    389                $ductile_user['alternate_webfont_api'] = $_POST['alternate_webfont_api']; 
    390371 
    391372               $ductile_user['blog_title_w'] = (integer) !empty($_POST['blog_title_w']); 
     
    512493echo '</fieldset>'; 
    513494 
    514 echo '<fieldset><legend>'.__('Miscellaneous options').'</legend>'; 
    515 echo '<p class="field"><label for="preview_not_mandatory">'.__('Comment preview is not mandatory:').' '. 
    516 form::checkbox('preview_not_mandatory',1,$ductile_user['preview_not_mandatory']).'</label>'.'</p>'; 
    517 echo '</fieldset>'; 
    518  
    519495echo '<input type="hidden" name="conf_tab" value="html">'; 
    520496echo '<p class="clear">'.form::hidden('ds_order','').'<input type="submit" value="'.__('Save').'" />'.$core->formNonce().'</p>'; 
     
    531507echo '<h3>'.__('General settings').'</h3>'; 
    532508 
    533 echo '<fieldset><legend>'.__('Fonts').'</legend>'; 
    534  
    535 echo '<div class="two-cols">'; 
    536 echo '<div class="col">'; 
    537 echo 
     509echo '<fieldset><legend>'.__('Fonts').'</legend>'. 
    538510'<p class="field"><label for="body_font">'.__('Main:').' '. 
    539511form::combo('body_font',$fonts,$ductile_user['body_font']).'</label>'. 
    540512(!empty($ductile_user['body_font']) ? ' '.fontDef($ductile_user['body_font']) : ''). 
    541513'</p>'. 
    542 '<p class="form-note">'.__('Set main font to default to use webfont below.').'</p> '. 
    543 '<p class="field"><label for="body_webfont_family">'.__('Webfont family:').'</label> '. 
    544 form::field('body_webfont_family',25,255,$ductile_user['body_webfont_family']).'</p>'. 
    545 '<p class="field"><label for="body_webfont_url">'.__('Webfont URL:').'</label> '. 
    546 form::field('body_webfont_url',50,255,$ductile_user['body_webfont_url']).'</p>'. 
    547 '<p class="field"><label for="body_webfont_url">'.__('Webfont API:').' '. 
    548 form::combo('body_webfont_api',$webfont_apis,$ductile_user['body_webfont_api']).'</label>'.'</p>'; 
    549 echo '</div>'; 
    550 echo '<div class="col">'; 
    551 echo 
     514 
    552515'<p class="field"><label for="alternate_font">'.__('Secondary:').' '. 
    553516form::combo('alternate_font',$fonts,$ductile_user['alternate_font']).'</label>'. 
    554517(!empty($ductile_user['alternate_font']) ? ' '.fontDef($ductile_user['alternate_font']) : ''). 
    555518'</p>'. 
    556 '<p class="form-note">'.__('Set secondary font to default to use webfont below.').'</p> '. 
    557 '<p class="field"><label for="alternate_webfont_family">'.__('Webfont family:').'</label> '. 
    558 form::field('alternate_webfont_family',25,255,$ductile_user['alternate_webfont_family']).'</p>'. 
    559 '<p class="field"><label for="alternate_webfont_url">'.__('Webfont URL:').'</label> '. 
    560 form::field('alternate_webfont_url',50,255,$ductile_user['alternate_webfont_url']).'</p>'. 
    561 '<p class="field"><label for="alternate_webfont_api">'.__('Webfont API:').' '. 
    562 form::combo('alternate_webfont_api',$webfont_apis,$ductile_user['alternate_webfont_api']).'</label>'.'</p>'; 
    563 echo '</div>'; 
    564 echo '</div>'; 
    565 echo '</fieldset>'; 
     519'</fieldset>'; 
    566520 
    567521echo '<div class="two-cols">'; 
  • themes/ductile/_public.php

    r1096 r1045  
    2323$core->tpl->addValue('ductileNbEntryPerPage',array('tplDuctileTheme','ductileNbEntryPerPage')); 
    2424$core->tpl->addValue('ductileLogoSrc',array('tplDuctileTheme','ductileLogoSrc')); 
    25 $core->tpl->addBlock('IfPreviewIsNotMandatory',array('tplDuctileTheme','IfPreviewIsNotMandatory')); 
    2625 
    2726class tplDuctileTheme 
     
    176175           
    177176          return $img_url; 
    178      } 
    179  
    180      public static function IfPreviewIsNotMandatory($attr,$content) 
    181      { 
    182           $s = $GLOBALS['core']->blog->settings->themes->get($GLOBALS['core']->blog->settings->system->theme.'_style'); 
    183           if ($s !== null) { 
    184                $s = @unserialize($s); 
    185                if (is_array($s)) { 
    186                     if (isset($s['preview_not_mandatory'])) { 
    187                          if ($s['preview_not_mandatory']) { 
    188                               return $content; 
    189                          } 
    190                     } 
    191                } 
    192           } 
    193           return ''; 
    194177     } 
    195178 
     
    267250               $core->blog->settings->system->themes_url.'/'.$core->blog->settings->system->theme. 
    268251               '/ductile.js"></script>'."\n"; 
    269  
    270           echo self::ductileWebfontHelper(); 
    271      } 
    272  
    273      public static function ductileWebfontHelper() 
    274      { 
    275           $s = $GLOBALS['core']->blog->settings->themes->get($GLOBALS['core']->blog->settings->system->theme.'_style'); 
    276  
    277           if ($s === null) { 
    278                return; 
    279           } 
    280  
    281           $s = @unserialize($s); 
    282           if (!is_array($s)) { 
    283                return; 
    284           } 
    285  
    286           $ret = ''; 
    287           $css = array(); 
    288           $uri = array(); 
    289           if (!isset($s['body_font']) || ($s['body_font'] == '')) { 
    290                // See if webfont defined for main font 
    291                if (isset($s['body_webfont_api']) && isset($s['body_webfont_family']) && isset($s['body_webfont_url'])) { 
    292                     $uri[] = $s['body_webfont_url']; 
    293                     switch ($s['body_webfont_api']) { 
    294                          case 'js': 
    295                               $ret .= sprintf('<script type="text/javascript" src="%s"></script>',$s['body_webfont_url'])."\n"; 
    296                               break; 
    297                          case 'css': 
    298                               $ret .= sprintf('<link type="text/css" href="%s" rel="stylesheet" />',$s['body_webfont_url'])."\n"; 
    299                               break; 
    300                     } 
    301                     # Main font 
    302                     $selectors = 'body, .supranav li a span, #comments.me, a.comment-number'; 
    303                     self::prop($css,$selectors,'font-family',$s['body_webfont_family']); 
    304                } 
    305           } 
    306           if (!isset($s['alternate_font']) || ($s['alternate_font'] == '')) { 
    307                // See if webfont defined for secondary font 
    308                if (isset($s['alternate_webfont_api']) && isset($s['alternate_webfont_family']) && isset($s['alternate_webfont_url'])) { 
    309                     if (!in_array($s['alternate_webfont_url'], $uri)) { 
    310                          switch ($s['alternate_webfont_api']) { 
    311                               case 'js': 
    312                                    $ret .= sprintf('<script type="text/javascript" src="%s"></script>',$s['alternate_webfont_url'])."\n"; 
    313                                    break; 
    314                               case 'css': 
    315                                    $ret .= sprintf('<link type="text/css" href="%s" rel="stylesheet" />',$s['alternate_webfont_url'])."\n"; 
    316                                    break; 
    317                          } 
    318                     } 
    319                     # Secondary font 
    320                     $selectors = '#blogdesc, .supranav, #content-info, #subcategories, #comments-feed, #sidebar h2, #sidebar h3, #footer'; 
    321                     self::prop($css,$selectors,'font-family',$s['alternate_webfont_family']); 
    322                } 
    323           } 
    324           # Style directives 
    325           $res = ''; 
    326           foreach ($css as $selector => $values) { 
    327                $res .= $selector." {\n"; 
    328                foreach ($values as $k => $v) { 
    329                     $res .= $k.':'.$v.";\n"; 
    330                } 
    331                $res .= "}\n"; 
    332           } 
    333           if ($res != '') { 
    334                $ret .= '<style type="text/css">'."\n".$res.'</style>'."\n"; 
    335           } 
    336  
    337           return $ret; 
    338252     } 
    339253      
  • themes/ductile/locales/fr/admin.po

    r1096 r810  
    6565msgstr "Complet" 
    6666 
    67 msgid "Miscellaneous options" 
    68 msgstr "Options diverses" 
    69  
    70 msgid "Comment preview is not mandatory:" 
    71 msgstr "Prévisualisation du commentaire optionnelle :" 
    72  
    7367msgid "Presentation" 
    7468msgstr "Présentation" 
     
    116110msgstr "Secondaire :" 
    117111 
    118 msgid "none" 
    119 msgstr "aucune" 
    120  
    121 msgid "javascript (Adobe)" 
    122 msgstr "javascript (Adobe)" 
    123  
    124 msgid "stylesheet (Google)" 
    125 msgstr "feuille de style (Google)" 
    126  
    127 msgid "Set main font to default to use webfont below." 
    128 msgstr "Mettre la police de caractère principale à Défaut pour utiliser la fonte web ci-dessous." 
    129  
    130 msgid "Set secondary font to default to use webfont below." 
    131 msgstr "Mettre la police de caractère secondaire à Défaut pour utiliser la fonte web ci-dessous." 
    132  
    133 msgid "Webfont family:" 
    134 msgstr "Famille" 
    135  
    136 msgid "Webfont URL:" 
    137 msgstr "URL de la fonte web" 
    138  
    139 msgid "Webfont API:" 
    140 msgstr "Type d'API" 
    141  
    142112msgid "Ductile primary" 
    143113msgstr "Principale de Ductile" 
  • themes/ductile/style.css

    r1098 r1066  
    621621#sidebar li { 
    622622     padding-left: 16px; 
    623      background: transparent url(img/squares.png) no-repeat -133px 7px; 
     623     background: transparent url(img/squares.png) no-repeat -133px .5em; 
    624624     } 
    625625#sidebar ul li ul li { 
    626      background: transparent url(img/squares.png) no-repeat -70px -59px; 
     626     background: transparent url(img/squares.png) no-repeat -70px center; 
    627627     } 
    628628#sidebar ul li ul li ul li { 
    629      background: transparent url(img/squares.png) no-repeat 0 -126px; 
     629     background: transparent url(img/squares.png) no-repeat 0 center; 
    630630     } 
    631631#sidebar .syndicate li { 
  • themes/ductile/tpl/_simple-entry.html

    r1096 r881  
    164164               <p class="buttons"> 
    165165                    <input type="submit" class="preview" name="preview" value="{{tpl:lang preview}}" /> 
    166                     <tpl:IfPreviewIsNotMandatory> 
     166                    <tpl:IfCommentPreview> 
    167167                         <input type="submit" class="submit" value="{{tpl:lang send}}" /> 
    168                     </tpl:IfPreviewIsNotMandatory> 
     168                    </tpl:IfCommentPreview> 
    169169               </p> 
    170170          </fieldset> 
Note: See TracChangeset for help on using the changeset viewer.

Sites map