Changes in [1101:7273894e61b8:1106:a4487f3ca4b4]
- Files:
-
- 11 added
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
.hgsubstate
r843 r1102 1 4f62679e0756104bdc0b49eacaed9aba68735aa5inc/libs/clearbricks1 789e7f2b4844160f4dc7d2795cfa1e6f4fd53a5c inc/libs/clearbricks -
CHANGELOG
r1046 r1104 1 Dotclear 2.5.0 - 201?-??-13 2 =========================================================== 1 Dotclear 2.5.0 - 2013-02-24 2 =========================================================== 3 * Ductile theme may now use webfont (from Google, Adobe and similar providers) 3 4 * daInstaller plugin is now included in the official distribution 4 5 * The media enhanced uploader may now be temporarily enabled or disabled … … 24 25 * Adaptative compression rate for thumbnails generation 25 26 * 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) 27 28 * Add default favicon.ico 28 29 * Add default attributes settings for image,mp3,flv insertion -
admin/media_item.php
r1073 r1103 60 60 # Prepare directories combo box 61 61 $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; 66 64 } 67 65 ksort($dirs_combo); -
admin/posts.php
r796 r1102 122 122 __('Mark as unselected') => 'unselected' 123 123 ); 124 $combo_action[__('Change')] = array(__('Change category') => 'category'); 124 $combo_action[__('Change')] = array( 125 __('Change category') => 'category', 126 __('Change language') => 'lang'); 125 127 if ($core->auth->check('admin',$core->blog->id)) 126 128 { -
admin/posts_actions.php
r1035 r1102 157 157 { 158 158 $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()); 159 175 } 160 176 } … … 257 273 '</form>'; 258 274 } 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 } 259 309 elseif ($action == 'author' && $core->auth->check('admin',$core->blog->id)) 260 310 { -
inc/core/class.dc.media.php
r909 r1103 821 821 $this->callFileHandler(files::getMimeType($media_file),'remove',$f); 822 822 } 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 } 823 848 824 849 /** -
inc/dbschema/upgrade.php
r706 r1083 305 305 $core->con->execute($strReq); 306 306 } 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 } 307 337 308 338 $core->setVersion('core',DC_VERSION); -
inc/prepend.php
r1092 r1106 143 143 # Constants 144 144 define('DC_ROOT',path::real(dirname(__FILE__).'/..')); 145 define('DC_VERSION','2.5- dev');145 define('DC_VERSION','2.5-RC'); 146 146 define('DC_DIGESTS',dirname(__FILE__).'/digests'); 147 147 define('DC_L10N_ROOT',dirname(__FILE__).'/../locales'); -
locales/fr/main.po
r1077 r1102 1738 1738 msgstr "Changer la catégorie" 1739 1739 1740 msgid "Change language" 1741 msgstr "Changer la langue" 1742 1740 1743 msgid "Change author" 1741 1744 msgstr "Changer l'auteur" … … 1761 1764 msgid "Change category for entries" 1762 1765 msgstr "Changer la catégorie des billets" 1766 1767 msgid "Change language for entries" 1768 msgstr "Changer la langue des billets" 1763 1769 1764 1770 msgid "Change author for entries" -
plugins/akismet/class.dc.filter.akismet.php
r536 r1094 151 151 152 152 $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>'. 154 154 '<p><input type="submit" value="'.__('Save').'" />'. 155 155 $this->core->formNonce().'</p>'. -
plugins/importExport/inc/flat/class.flat.import.php
r841 r1093 790 790 $strReq = 'SELECT media_id '. 791 791 'FROM '.$this->prefix.'media '. 792 "WHERE media_path = '".$this->c ur_media->media_path."' ".793 "AND media_file = '".$this->c ur_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)."' "; 794 794 795 795 $rs = $this->con->select($strReq); -
plugins/tags/_admin.php
r897 r1097 105 105 $tag_url = $GLOBALS['core']->blog->url.$GLOBALS['core']->url->getURLFor('tag'); 106 106 107 $opts = $GLOBALS['core']-> blog->url.$GLOBALS['core']->auth->getOptions();107 $opts = $GLOBALS['core']->auth->getOptions(); 108 108 $type = isset($opts['tag_list_format']) ? $opts['tag_list_format'] : 'more'; 109 109 -
themes/ductile/_config.php
r1011 r1096 44 44 } 45 45 46 47 48 46 $contexts = array( 49 47 'default' => __('Home (first page)'), … … 67 65 __('Impact') => 'Impact', 68 66 __('Monospace') => 'Monospace' 67 ); 68 69 $webfont_apis = array( 70 __('none') => '', 71 __('javascript (Adobe)') => 'js', 72 __('stylesheet (Google)') => 'css' 69 73 ); 70 74 … … 225 229 'subtitle_hidden' => null, 226 230 'logo_src' => null, 231 'preview_not_mandatory' => null, 227 232 // CSS 228 233 'body_font' => null, 234 'body_webfont_family' => null, 235 'body_webfont_url' => null, 236 'body_webfont_api' => null, 229 237 'alternate_font' => null, 238 'alternate_webfont_family' => null, 239 'alternate_webfont_url' => null, 240 'alternate_webfont_api' => null, 230 241 'blog_title_w' => null, 231 242 'blog_title_s' => null, … … 327 338 $ductile_user['subtitle_hidden'] = (integer) !empty($_POST['subtitle_hidden']); 328 339 $ductile_user['logo_src'] = $_POST['logo_src']; 340 $ductile_user['preview_not_mandatory'] = (integer) !empty($_POST['preview_not_mandatory']); 329 341 330 342 $ductile_stickers = array(); … … 368 380 if ($conf_tab == 'css') { 369 381 $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 370 386 $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']; 371 390 372 391 $ductile_user['blog_title_w'] = (integer) !empty($_POST['blog_title_w']); … … 493 512 echo '</fieldset>'; 494 513 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 495 519 echo '<input type="hidden" name="conf_tab" value="html">'; 496 520 echo '<p class="clear">'.form::hidden('ds_order','').'<input type="submit" value="'.__('Save').'" />'.$core->formNonce().'</p>'; … … 507 531 echo '<h3>'.__('General settings').'</h3>'; 508 532 509 echo '<fieldset><legend>'.__('Fonts').'</legend>'. 533 echo '<fieldset><legend>'.__('Fonts').'</legend>'; 534 535 echo '<div class="two-cols">'; 536 echo '<div class="col">'; 537 echo 510 538 '<p class="field"><label for="body_font">'.__('Main:').' '. 511 539 form::combo('body_font',$fonts,$ductile_user['body_font']).'</label>'. 512 540 (!empty($ductile_user['body_font']) ? ' '.fontDef($ductile_user['body_font']) : ''). 513 541 '</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> '. 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 515 552 '<p class="field"><label for="alternate_font">'.__('Secondary:').' '. 516 553 form::combo('alternate_font',$fonts,$ductile_user['alternate_font']).'</label>'. 517 554 (!empty($ductile_user['alternate_font']) ? ' '.fontDef($ductile_user['alternate_font']) : ''). 518 555 '</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> '. 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>'; 520 566 521 567 echo '<div class="two-cols">'; -
themes/ductile/_public.php
r1045 r1096 23 23 $core->tpl->addValue('ductileNbEntryPerPage',array('tplDuctileTheme','ductileNbEntryPerPage')); 24 24 $core->tpl->addValue('ductileLogoSrc',array('tplDuctileTheme','ductileLogoSrc')); 25 $core->tpl->addBlock('IfPreviewIsNotMandatory',array('tplDuctileTheme','IfPreviewIsNotMandatory')); 25 26 26 27 class tplDuctileTheme … … 175 176 176 177 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 ''; 177 194 } 178 195 … … 250 267 $core->blog->settings->system->themes_url.'/'.$core->blog->settings->system->theme. 251 268 '/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; 252 338 } 253 339 -
themes/ductile/locales/fr/admin.po
r810 r1096 65 65 msgstr "Complet" 66 66 67 msgid "Miscellaneous options" 68 msgstr "Options diverses" 69 70 msgid "Comment preview is not mandatory:" 71 msgstr "Prévisualisation du commentaire optionnelle :" 72 67 73 msgid "Presentation" 68 74 msgstr "Présentation" … … 110 116 msgstr "Secondaire :" 111 117 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 112 142 msgid "Ductile primary" 113 143 msgstr "Principale de Ductile" -
themes/ductile/style.css
r1066 r1098 621 621 #sidebar li { 622 622 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; 624 624 } 625 625 #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; 627 627 } 628 628 #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; 630 630 } 631 631 #sidebar .syndicate li { -
themes/ductile/tpl/_simple-entry.html
r881 r1096 164 164 <p class="buttons"> 165 165 <input type="submit" class="preview" name="preview" value="{{tpl:lang preview}}" /> 166 <tpl:If CommentPreview>166 <tpl:IfPreviewIsNotMandatory> 167 167 <input type="submit" class="submit" value="{{tpl:lang send}}" /> 168 </tpl:If CommentPreview>168 </tpl:IfPreviewIsNotMandatory> 169 169 </p> 170 170 </fieldset>
Note: See TracChangeset
for help on using the changeset viewer.