Dotclear


Ignore:
Files:
11 added
17 edited

Legend:

Unmodified
Added
Removed
  • .hgsubstate

    r843 r1102  
    1 4f62679e0756104bdc0b49eacaed9aba68735aa5 inc/libs/clearbricks 
     1789e7f2b4844160f4dc7d2795cfa1e6f4fd53a5c inc/libs/clearbricks 
  • CHANGELOG

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

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

    r796 r1102  
    122122     __('Mark as unselected') => 'unselected' 
    123123); 
    124 $combo_action[__('Change')] = array(__('Change category') => 'category'); 
     124$combo_action[__('Change')] = array( 
     125     __('Change category') => 'category', 
     126     __('Change language') => 'lang'); 
    125127if ($core->auth->check('admin',$core->blog->id)) 
    126128{ 
  • admin/posts_actions.php

    r1035 r1102  
    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()); 
    159175          } 
    160176     } 
     
    257273     '</form>'; 
    258274} 
     275elseif ($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} 
    259309elseif ($action == 'author' && $core->auth->check('admin',$core->blog->id)) 
    260310{ 
  • inc/core/class.dc.media.php

    r909 r1103  
    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     } 
    823848      
    824849     /** 
  • inc/dbschema/upgrade.php

    r706 r1083  
    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               } 
    307337                
    308338               $core->setVersion('core',DC_VERSION); 
  • inc/prepend.php

    r1092 r1106  
    143143# Constants 
    144144define('DC_ROOT',path::real(dirname(__FILE__).'/..')); 
    145 define('DC_VERSION','2.5-dev'); 
     145define('DC_VERSION','2.5-RC'); 
    146146define('DC_DIGESTS',dirname(__FILE__).'/digests'); 
    147147define('DC_L10N_ROOT',dirname(__FILE__).'/../locales'); 
  • locales/fr/main.po

    r1077 r1102  
    17381738msgstr "Changer la catégorie" 
    17391739 
     1740msgid "Change language" 
     1741msgstr "Changer la langue" 
     1742 
    17401743msgid "Change author" 
    17411744msgstr "Changer l'auteur" 
     
    17611764msgid "Change category for entries" 
    17621765msgstr "Changer la catégorie des billets" 
     1766 
     1767msgid "Change language for entries" 
     1768msgstr "Changer la langue des billets" 
    17631769 
    17641770msgid "Change author for entries" 
  • plugins/akismet/class.dc.filter.akismet.php

    r536 r1094  
    151151           
    152152          $res .= 
    153           '<p><a href="http://wordpress.com/api-keys/">'.__('Get your own API key').'</a></p>'. 
     153          '<p><a href="http://akismet.com/">'.__('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

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

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

    r1011 r1096  
    4444} 
    4545 
    46  
    47  
    4846$contexts = array( 
    4947     'default' => __('Home (first page)'), 
     
    6765     __('Impact') => 'Impact', 
    6866     __('Monospace') => 'Monospace' 
     67); 
     68 
     69$webfont_apis = array( 
     70     __('none') => '', 
     71     __('javascript (Adobe)') => 'js', 
     72     __('stylesheet (Google)') => 'css' 
    6973); 
    7074 
     
    225229     'subtitle_hidden' => null, 
    226230     'logo_src' => null, 
     231     'preview_not_mandatory' => null, 
    227232     // CSS 
    228233     'body_font' => null, 
     234     'body_webfont_family' => null, 
     235     'body_webfont_url' => null, 
     236     'body_webfont_api' => null, 
    229237     'alternate_font' => null, 
     238     'alternate_webfont_family' => null, 
     239     'alternate_webfont_url' => null, 
     240     'alternate_webfont_api' => null, 
    230241     'blog_title_w' => null, 
    231242     'blog_title_s' => null, 
     
    327338               $ductile_user['subtitle_hidden'] = (integer) !empty($_POST['subtitle_hidden']); 
    328339               $ductile_user['logo_src'] = $_POST['logo_src']; 
     340               $ductile_user['preview_not_mandatory'] = (integer) !empty($_POST['preview_not_mandatory']); 
    329341 
    330342               $ductile_stickers = array(); 
     
    368380          if ($conf_tab == 'css') { 
    369381               $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 
    370386               $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']; 
    371390 
    372391               $ductile_user['blog_title_w'] = (integer) !empty($_POST['blog_title_w']); 
     
    493512echo '</fieldset>'; 
    494513 
     514echo '<fieldset><legend>'.__('Miscellaneous options').'</legend>'; 
     515echo '<p class="field"><label for="preview_not_mandatory">'.__('Comment preview is not mandatory:').' '. 
     516form::checkbox('preview_not_mandatory',1,$ductile_user['preview_not_mandatory']).'</label>'.'</p>'; 
     517echo '</fieldset>'; 
     518 
    495519echo '<input type="hidden" name="conf_tab" value="html">'; 
    496520echo '<p class="clear">'.form::hidden('ds_order','').'<input type="submit" value="'.__('Save').'" />'.$core->formNonce().'</p>'; 
     
    507531echo '<h3>'.__('General settings').'</h3>'; 
    508532 
    509 echo '<fieldset><legend>'.__('Fonts').'</legend>'. 
     533echo '<fieldset><legend>'.__('Fonts').'</legend>'; 
     534 
     535echo '<div class="two-cols">'; 
     536echo '<div class="col">'; 
     537echo 
    510538'<p class="field"><label for="body_font">'.__('Main:').' '. 
    511539form::combo('body_font',$fonts,$ductile_user['body_font']).'</label>'. 
    512540(!empty($ductile_user['body_font']) ? ' '.fontDef($ductile_user['body_font']) : ''). 
    513541'</p>'. 
    514  
     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> '. 
     544form::field('body_webfont_family',25,255,$ductile_user['body_webfont_family']).'</p>'. 
     545'<p class="field"><label for="body_webfont_url">'.__('Webfont URL:').'</label> '. 
     546form::field('body_webfont_url',50,255,$ductile_user['body_webfont_url']).'</p>'. 
     547'<p class="field"><label for="body_webfont_url">'.__('Webfont API:').' '. 
     548form::combo('body_webfont_api',$webfont_apis,$ductile_user['body_webfont_api']).'</label>'.'</p>'; 
     549echo '</div>'; 
     550echo '<div class="col">'; 
     551echo 
    515552'<p class="field"><label for="alternate_font">'.__('Secondary:').' '. 
    516553form::combo('alternate_font',$fonts,$ductile_user['alternate_font']).'</label>'. 
    517554(!empty($ductile_user['alternate_font']) ? ' '.fontDef($ductile_user['alternate_font']) : ''). 
    518555'</p>'. 
    519 '</fieldset>'; 
     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> '. 
     558form::field('alternate_webfont_family',25,255,$ductile_user['alternate_webfont_family']).'</p>'. 
     559'<p class="field"><label for="alternate_webfont_url">'.__('Webfont URL:').'</label> '. 
     560form::field('alternate_webfont_url',50,255,$ductile_user['alternate_webfont_url']).'</p>'. 
     561'<p class="field"><label for="alternate_webfont_api">'.__('Webfont API:').' '. 
     562form::combo('alternate_webfont_api',$webfont_apis,$ductile_user['alternate_webfont_api']).'</label>'.'</p>'; 
     563echo '</div>'; 
     564echo '</div>'; 
     565echo '</fieldset>'; 
    520566 
    521567echo '<div class="two-cols">'; 
  • themes/ductile/_public.php

    r1045 r1096  
    2323$core->tpl->addValue('ductileNbEntryPerPage',array('tplDuctileTheme','ductileNbEntryPerPage')); 
    2424$core->tpl->addValue('ductileLogoSrc',array('tplDuctileTheme','ductileLogoSrc')); 
     25$core->tpl->addBlock('IfPreviewIsNotMandatory',array('tplDuctileTheme','IfPreviewIsNotMandatory')); 
    2526 
    2627class tplDuctileTheme 
     
    175176           
    176177          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 ''; 
    177194     } 
    178195 
     
    250267               $core->blog->settings->system->themes_url.'/'.$core->blog->settings->system->theme. 
    251268               '/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; 
    252338     } 
    253339      
  • themes/ductile/locales/fr/admin.po

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

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

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

Sites map