Changes in [1153:1e48950b05af:1152:fbd922f6ed09]
- Files:
-
- 13 deleted
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
.hgsubstate
r1102 r843 1 789e7f2b4844160f4dc7d2795cfa1e6f4fd53a5cinc/libs/clearbricks1 4f62679e0756104bdc0b49eacaed9aba68735aa5 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) 1 Dotclear 2.5.0 - 201?-??-13 2 =========================================================== 4 3 * daInstaller plugin is now included in the official distribution 5 4 * The media enhanced uploader may now be temporarily enabled or disabled … … 25 24 * Adaptative compression rate for thumbnails generation 26 25 * 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) 28 27 * Add default favicon.ico 29 28 * Add default attributes settings for image,mp3,flv insertion -
admin/media_item.php
r1103 r1073 60 60 # Prepare directories combo box 61 61 $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 } 64 66 } 65 67 ksort($dirs_combo); -
admin/posts.php
r1153 r1152 110 110 __('Mark as unselected') => 'unselected' 111 111 ); 112 $combo_action[__('Change')] = array( 113 __('Change category') => 'category', 114 __('Change language') => 'lang'); 112 $combo_action[__('Change')] = array(__('Change category') => 'category'); 115 113 if ($core->auth->check('admin',$core->blog->id)) 116 114 { -
admin/posts_actions.php
r1102 r1035 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 try165 {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());175 159 } 176 160 } … … 273 257 '</form>'; 274 258 } 275 elseif ($action == 'lang')276 {277 echo '<h2 class="page-title">'.__('Change language for entries').'</h2>';278 279 # lang list280 # Languages combo281 $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 echo296 '<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 echo302 $hidden_fields.303 $core->formNonce().304 form::hidden(array('action'),'lang').305 '<input type="submit" value="'.__('Save').'" /></p>'.306 '</form>';307 308 }309 259 elseif ($action == 'author' && $core->auth->check('admin',$core->blog->id)) 310 260 { -
inc/admin/default-templates/forms/form_layout.html.twig
r1153 r1152 57 57 <label for="{{name}}" class="classic"> 58 58 {% 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 %} /> 60 60 {% if label is not empty %} 61 61 {{ label }}</label> -
inc/core/class.dc.media.php
r1103 r909 821 821 $this->callFileHandler(files::getMimeType($media_file),'remove',$f); 822 822 } 823 824 /**825 * Root directories826 *827 * Returns an array of directory under {@link $root} directory.828 *829 * @uses fileItem830 * @return array831 */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 }848 823 849 824 /** -
inc/dbschema/upgrade.php
r1083 r706 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 directory311 $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 }337 307 338 308 $core->setVersion('core',DC_VERSION); -
inc/public/lib.urlhandlers.php
r1128 r779 86 86 $_ctx->nb_entry_per_page = $core->blog->settings->system->nb_post_per_page; 87 87 } 88 89 // Break public template here for now90 // just to check if template engine is well loaded.91 $core->tpl->display($tpl.'.twig');92 // To be continued...93 88 94 89 $tpl_file = $core->tpl->getFilePath($tpl); -
inc/public/prepend.php
r1128 r921 55 55 } catch (Exception $e) {} 56 56 57 # Add public default templates path58 $core->tpl->getLoader()->addPath(dirname(__FILE__).'/default-templates');59 # Set public context60 $_ctx = new dcPublicContext($core);61 $core->tpl->addExtension($_ctx);62 63 /*64 57 # Creating template context 65 58 $_ctx = new context(); … … 71 64 ,640); 72 65 } 73 */ 66 74 67 # Loading locales 75 68 $_lang = $core->blog->settings->system->lang; … … 127 120 128 121 # --BEHAVIOR-- publicPrepend 129 $core->callBehavior('publicPrepend',$core ,$_ctx);122 $core->callBehavior('publicPrepend',$core); 130 123 131 124 # Prepare the HTTP cache thing … … 134 127 $mod_ts[] = $core->blog->upddt; 135 128 136 137 # Add parent theme path138 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 list142 if (is_dir($core->blog->themes_path.'/'.$__theme.'/tpl')) {143 $core->tpl->getLoader()->prependPath($core->blog->themes_path.'/'.$__theme.'/tpl');144 }145 /*146 129 $__theme_tpl_path = array( 147 130 $core->blog->themes_path.'/'.$__theme.'/tpl' … … 155 138 dirname(__FILE__).'/default-templates', 156 139 $core->tpl->getPath()); 157 */ 140 158 141 $core->url->mode = $core->blog->settings->system->url_scan; 159 142 -
locales/fr/main.po
r1102 r1077 1738 1738 msgstr "Changer la catégorie" 1739 1739 1740 msgid "Change language"1741 msgstr "Changer la langue"1742 1743 1740 msgid "Change author" 1744 1741 msgstr "Changer l'auteur" … … 1764 1761 msgid "Change category for entries" 1765 1762 msgstr "Changer la catégorie des billets" 1766 1767 msgid "Change language for entries"1768 msgstr "Changer la langue des billets"1769 1763 1770 1764 msgid "Change author for entries" -
plugins/akismet/class.dc.filter.akismet.php
r1094 r536 151 151 152 152 $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>'. 154 154 '<p><input type="submit" value="'.__('Save').'" />'. 155 155 $this->core->formNonce().'</p>'. -
plugins/importExport/inc/flat/class.flat.import.php
r1093 r841 790 790 $strReq = 'SELECT media_id '. 791 791 'FROM '.$this->prefix.'media '. 792 "WHERE media_path = '".$this->c on->escape($this->cur_media->media_path)."' ".793 "AND media_file = '".$this->c on->escape($this->cur_media->media_file)."' ";792 "WHERE media_path = '".$this->cur_media->media_path."' ". 793 "AND media_file = '".$this->cur_media->media_file."' "; 794 794 795 795 $rs = $this->con->select($strReq); -
plugins/tags/_admin.php
r1097 r897 105 105 $tag_url = $GLOBALS['core']->blog->url.$GLOBALS['core']->url->getURLFor('tag'); 106 106 107 $opts = $GLOBALS['core']-> auth->getOptions();107 $opts = $GLOBALS['core']->blog->url.$GLOBALS['core']->auth->getOptions(); 108 108 $type = isset($opts['tag_list_format']) ? $opts['tag_list_format'] : 'more'; 109 109 -
themes/ductile/_config.php
r1096 r1011 44 44 } 45 45 46 47 46 48 $contexts = array( 47 49 'default' => __('Home (first page)'), … … 65 67 __('Impact') => 'Impact', 66 68 __('Monospace') => 'Monospace' 67 );68 69 $webfont_apis = array(70 __('none') => '',71 __('javascript (Adobe)') => 'js',72 __('stylesheet (Google)') => 'css'73 69 ); 74 70 … … 229 225 'subtitle_hidden' => null, 230 226 'logo_src' => null, 231 'preview_not_mandatory' => null,232 227 // CSS 233 228 'body_font' => null, 234 'body_webfont_family' => null,235 'body_webfont_url' => null,236 'body_webfont_api' => null,237 229 'alternate_font' => null, 238 'alternate_webfont_family' => null,239 'alternate_webfont_url' => null,240 'alternate_webfont_api' => null,241 230 'blog_title_w' => null, 242 231 'blog_title_s' => null, … … 338 327 $ductile_user['subtitle_hidden'] = (integer) !empty($_POST['subtitle_hidden']); 339 328 $ductile_user['logo_src'] = $_POST['logo_src']; 340 $ductile_user['preview_not_mandatory'] = (integer) !empty($_POST['preview_not_mandatory']);341 329 342 330 $ductile_stickers = array(); … … 380 368 if ($conf_tab == 'css') { 381 369 $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 386 370 $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'];390 371 391 372 $ductile_user['blog_title_w'] = (integer) !empty($_POST['blog_title_w']); … … 512 493 echo '</fieldset>'; 513 494 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 519 495 echo '<input type="hidden" name="conf_tab" value="html">'; 520 496 echo '<p class="clear">'.form::hidden('ds_order','').'<input type="submit" value="'.__('Save').'" />'.$core->formNonce().'</p>'; … … 531 507 echo '<h3>'.__('General settings').'</h3>'; 532 508 533 echo '<fieldset><legend>'.__('Fonts').'</legend>'; 534 535 echo '<div class="two-cols">'; 536 echo '<div class="col">'; 537 echo 509 echo '<fieldset><legend>'.__('Fonts').'</legend>'. 538 510 '<p class="field"><label for="body_font">'.__('Main:').' '. 539 511 form::combo('body_font',$fonts,$ductile_user['body_font']).'</label>'. 540 512 (!empty($ductile_user['body_font']) ? ' '.fontDef($ductile_user['body_font']) : ''). 541 513 '</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 552 515 '<p class="field"><label for="alternate_font">'.__('Secondary:').' '. 553 516 form::combo('alternate_font',$fonts,$ductile_user['alternate_font']).'</label>'. 554 517 (!empty($ductile_user['alternate_font']) ? ' '.fontDef($ductile_user['alternate_font']) : ''). 555 518 '</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>'; 566 520 567 521 echo '<div class="two-cols">'; -
themes/ductile/_public.php
r1096 r1045 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'));26 25 27 26 class tplDuctileTheme … … 176 175 177 176 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 '';194 177 } 195 178 … … 267 250 $core->blog->settings->system->themes_url.'/'.$core->blog->settings->system->theme. 268 251 '/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 font291 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 font302 $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 font308 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 font320 $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 directives325 $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;338 252 } 339 253 -
themes/ductile/locales/fr/admin.po
r1096 r810 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 73 67 msgid "Presentation" 74 68 msgstr "Présentation" … … 116 110 msgstr "Secondaire :" 117 111 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 142 112 msgid "Ductile primary" 143 113 msgstr "Principale de Ductile" -
themes/ductile/style.css
r1098 r1066 621 621 #sidebar li { 622 622 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; 624 624 } 625 625 #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; 627 627 } 628 628 #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; 630 630 } 631 631 #sidebar .syndicate li { -
themes/ductile/tpl/_simple-entry.html
r1096 r881 164 164 <p class="buttons"> 165 165 <input type="submit" class="preview" name="preview" value="{{tpl:lang preview}}" /> 166 <tpl:If PreviewIsNotMandatory>166 <tpl:IfCommentPreview> 167 167 <input type="submit" class="submit" value="{{tpl:lang send}}" /> 168 </tpl:If PreviewIsNotMandatory>168 </tpl:IfCommentPreview> 169 169 </p> 170 170 </fieldset>
Note: See TracChangeset
for help on using the changeset viewer.