Changes in [1492:a7112dcc916c:1491:2b9253624dbe]
- Files:
-
- 3 deleted
- 42 edited
Legend:
- Unmodified
- Added
- Removed
-
.hgsubstate
r1486 r1385 1 716e99c54652d08c2e4395d5179e817e0f98182dinc/libs/clearbricks1 4288bdc1f21d00f93331bbe098485727b276c1fe inc/libs/clearbricks -
CHANGELOG
r1350 r1216 1 Dotclear 2.5.2 - 2013-08-142 ===========================================================3 * Security fix: Fixed potential XSS4 * Bugfix: l10n Clearbricks library5 * <tpl:LoopPosition> now works <tpl:Attachments>6 * Dotclear update check may now be forced (ignoring cache)7 * Enforce integration of daInstaller plugin8 * Tags link button is now available on page editor9 * Default cache age is now 1 week instead of 2 hours10 * Quick entry dashboard module is not activated by default on new installation11 * New template {{tpl:BlogParentThemeURL}} (return URL of parent theme of blog's theme if any, URL of blog's theme otherwise)12 * Fix post comments number on comments deletion13 * Fix order of backup files14 * Minor enhancements15 * Various bug fixes16 * Various cosmetic adjustments17 18 1 Dotclear 2.5.1 - 2013-07-20 19 2 =========================================================== -
Makefile
r1451 r1046 69 69 find $(DC)/admin/js/jquery/*.js -exec ./build-tools/min-js.php \{\} \; 70 70 find $(DC)/admin/js/jsToolBar/*.js -exec ./build-tools/min-js.php \{\} \; 71 find $(DC)/admin/js/jsUpload/*.js -exec ./build-tools/min-js.php \{\} \;72 71 find $(DC)/admin/js/tool-man/*.js -exec ./build-tools/min-js.php \{\} \; 73 72 find $(DC)/plugins -name '*.js' -exec ./build-tools/min-js.php \{\} \; -
admin/blog.php
r1482 r1399 79 79 '<form action="blog.php" method="post" id="blog-form">'. 80 80 81 '<div>'.$core->formNonce().'</div>'.81 $core->formNonce(). 82 82 '<p><label class="required" for="blog_id"><abbr title="'.__('Required field').'">*</abbr> '.__('Blog ID:').'</label> '. 83 83 form::field('blog_id',30,32,html::escapeHTML($blog_id)).'</p>'. -
admin/blog_pref.php
r1474 r1399 504 504 (html::escapeHTML($blog_settings->system->media_img_default_size) != '' ? html::escapeHTML($blog_settings->system->media_img_default_size) : 'm')). 505 505 '</p>'. 506 '<p><label for="media_img_default_alignment">'.__('Image alignment :').'</label>'.506 '<p><label for="media_img_default_alignment">'.__('Image alignment').'</label>'. 507 507 form::combo('media_img_default_alignment',$img_default_alignment_combo,html::escapeHTML($blog_settings->system->media_img_default_alignment)). 508 508 '</p>'. … … 548 548 } else { 549 549 if ($blog_id == $core->blog->id) { 550 echo '<p class="message">'.__('The current blog cannot be deleted .').'</p>';550 echo '<p class="message">'.__('The current blog cannot be deleted').'</p>'; 551 551 } else { 552 echo '<p class="message">'.__('Only superadmin can delete a blog .').'</p>';552 echo '<p class="message">'.__('Only superadmin can delete a blog').'</p>'; 553 553 } 554 554 } -
admin/categories.php
r1468 r1399 31 31 $mov_cat = $mov_cat ? $mov_cat : null; 32 32 if ($mov_cat !== null) { 33 $c = $core->blog->getCategory((integer) $_POST[' mov_cat']);33 $c = $core->blog->getCategory((integer) $_POST['del_cat']); 34 34 if ($c->isEmpty()) { 35 35 throw new Exception(__('This category does not exist.')); … … 144 144 echo '</div>'; 145 145 146 $categories_combo = array();147 if (!$rs->isEmpty())148 {149 while ($rs->fetch()) {150 $catparents_combo[] = $categories_combo[] = new formSelectOption(151 str_repeat(' ',$rs->level-1).($rs->level-1 == 0 ? '' : '• ').html::escapeHTML($rs->cat_title),152 $rs->cat_id153 );154 }155 }156 157 146 echo '<div class="col">'. 158 147 … … 160 149 '<h3>'.__('Add a new category').'</h3>'. 161 150 '<p><label class="required" for="cat_title"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:').'</label> '. 162 form::field('cat_title',30,255 ,'','maximal').'</p>'.151 form::field('cat_title',30,255).'</p>'. 163 152 '<p><label for="new_cat_parent">'.__('Parent:').'</label> '. 164 form::combo('new_cat_parent',array_merge(array(__('(No cat)') => 0),$categories_combo),'','maximal'). 165 '</p>'. 153 '<select id="new_cat_parent" name="new_cat_parent">'. 154 '<option value="0">'.__('Top level').'</option>'; 155 while ($rs->fetch()) { 156 echo '<option value="'.$rs->cat_id.'">'. 157 str_repeat(' ',$rs->level-1).($rs->level-1 == 0 ? '' : '• '). 158 html::escapeHTML($rs->cat_title).'</option>'; 159 } 160 echo 161 '</select></p>'. 166 162 '<p><input type="submit" value="'.__('Create').'" />'. 167 163 $core->formNonce().'</p>'. 168 169 164 '</form>'; 170 165 171 166 if (!$rs->isEmpty()) 172 167 { 168 $cats = array(); 169 $dest = array(' ' => ''); 170 $l = $rs->level; 171 $full_name = array($rs->cat_title); 172 while ($rs->fetch()) 173 { 174 if ($rs->level < $l) { 175 $full_name = array(); 176 } elseif ($rs->level == $l) { 177 array_pop($full_name); 178 } 179 $full_name[] = html::escapeHTML($rs->cat_title); 180 181 $cats[implode(' / ',$full_name)] = $rs->cat_id; 182 $dest[implode(' / ',$full_name)] = $rs->cat_id; 183 184 $l = $rs->level; 185 } 186 173 187 echo 174 '<form action="categories.php" method="post" id="delete-category" >'.188 '<form action="categories.php" method="post" id="delete-category" class="border-top">'. 175 189 '<h3>'.__('Remove a category').'</h3>'. 176 190 '<p><label for="del_cat">'.__('Choose a category to remove:').'</label> '. 177 form::combo('del_cat',$cat egories_combo,'','maximal').'</p> '.191 form::combo('del_cat',$cats).'</p> '. 178 192 '<p><label for="mov_cat">'.__('And choose the category which will receive its entries:').'</label> '. 179 form::combo('mov_cat', array_merge(array(__('(No cat)') => ''),$categories_combo),'','maximal').'</p> '.193 form::combo('mov_cat',$dest).'</p> '. 180 194 '<p><input type="submit" value="'.__('Delete').'" class="delete" />'. 181 195 $core->formNonce().'</p>'. 182 183 196 '</form>'; 184 197 -
admin/comments.php
r1480 r1424 37 37 $type_combo = array( 38 38 '-' => '', 39 __(' Comment') => 'co',40 __(' Trackback') => 'tb'39 __('comment') => 'co', 40 __('trackback') => 'tb' 41 41 ); 42 42 … … 134 134 if ($core->auth->check('publish,contentadmin',$core->blog->id)) 135 135 { 136 $combo_action[__(' Publish')] = 'publish';137 $combo_action[__(' Unpublish')] = 'unpublish';138 $combo_action[__(' Mark as pending')] = 'pending';139 $combo_action[__(' Mark as junk')] = 'junk';136 $combo_action[__('publish')] = 'publish'; 137 $combo_action[__('unpublish')] = 'unpublish'; 138 $combo_action[__('mark as pending')] = 'pending'; 139 $combo_action[__('mark as junk')] = 'junk'; 140 140 } 141 141 if ($core->auth->check('delete,contentadmin',$core->blog->id)) … … 261 261 262 262 '<p class="col right"><label for="action" class="classic">'.__('Selected comments action:').'</label> '. 263 form::combo('action',$combo_action,$default,'','','','title="'.__(' Actions').'"').263 form::combo('action',$combo_action,$default,'','','','title="'.__('action: ').'"'). 264 264 $core->formNonce(). 265 265 '<input type="submit" value="'.__('ok').'" /></p>'. -
admin/comments_actions.php
r1474 r1179 137 137 $core->callBehavior('adminCommentsActionsContent',$core,$action,$hidden_fields); 138 138 139 echo '<p><a class="back" href="'.str_replace('&','&',$redir).'">'.__(' Back to comments list').'</a></p>';139 echo '<p><a class="back" href="'.str_replace('&','&',$redir).'">'.__('back').'</a></p>'; 140 140 141 141 dcPage::close(); -
admin/js/_index.js
r1418 r1140 61 61 }); 62 62 } 63 $('#new_cat').toggleWithLegend(64 $('#new_cat').parent().children().not('#new_cat'),65 {} // no cookie on new category as we don't use this every day66 );67 63 } 68 64 -
admin/js/_post.js
r1492 r1490 115 115 hide: $('#post_notes').val() == '' 116 116 }); 117 $('#new_cat').toggleWithLegend(118 $('#new_cat').parent().children().not('#new_cat'),119 {} // no cookie on new category as we don't use this every day120 );121 117 $('#post_lang').parent().toggleWithLegend($('#post_lang'),{ 122 118 cookie: 'dcx_post_lang' -
admin/js/_posts_actions.js
r1419 r1035 6 6 matchContains: true 7 7 }); 8 $('#new_cat').toggleWithLegend(9 $('#new_cat').parent().children().not('#new_cat'),10 {} // no cookie on new category as we don't use this every day11 );12 8 }); -
admin/js/_users_actions.js
r1449 r935 1 1 jQuery.fn.updatePermissionsForm = function() { 2 2 return this.each(function() { 3 4 3 var perms = {}; 5 4 var re = /^perm\[(.+?)\]\[(.+?)\]$/; … … 13 12 continue; 14 13 } 15 var prop;16 14 prop = e.name.match(re); 17 15 if (!prop) { … … 22 20 } 23 21 perms[prop[1]][prop[2]] = e; 24 25 // select related permissions for admin 26 if (prop[2] == 'admin') { 27 if (e.checked) { 28 admin(e,perms,re); 22 } 23 24 // Update elements status 25 var E; 26 for (blog in perms) { 27 for (perm in perms[blog]) { 28 E = perms[blog][perm]; 29 E.onclick = function() {}; 30 31 if (perm == 'admin' && !E.disabled) { 32 perms[blog]['usage'].disabled = E.checked; 33 perms[blog]['publish'].disabled = E.checked; 34 perms[blog]['delete'].disabled = E.checked; 35 perms[blog]['contentadmin'].disabled = E.checked; 36 perms[blog]['categories'].disabled = E.checked; 37 perms[blog]['media'].disabled = E.checked; 38 perms[blog]['media_admin'].disabled = E.checked; 39 E.onclick = function() { $(this.form).updatePermissionsForm(); }; 40 } else if (perm == 'contentadmin' && !E.disabled) { 41 perms[blog]['usage'].checked = E.checked; 42 perms[blog]['publish'].checked = E.checked; 43 perms[blog]['delete'].checked = E.checked; 44 perms[blog]['usage'].disabled = E.checked; 45 perms[blog]['publish'].disabled = E.checked; 46 perms[blog]['delete'].disabled = E.checked; 47 E.onclick = function() { $(this.form).updatePermissionsForm(); }; 48 } else if (perm == 'media_admin' && !E.disabled) { 49 perms[blog]['media'].checked = E.checked; 50 perms[blog]['media'].disabled = E.checked; 51 E.onclick = function() { $(this.form).updatePermissionsForm(); }; 29 52 } 30 $(e).click(function(){31 admin(this,perms,re);32 });33 // select related permissions for content admin34 } else if (prop[2] == 'contentadmin') {35 if (e.checked) {36 contentadmin(e,perms,re);37 }38 $(e).click(function(){39 contentadmin(this,perms,re);40 });41 // select related permissions for media admin42 } else if (prop[2] == 'media_admin') {43 if (e.checked) {44 mediaadmin(e,perms,re);45 }46 $(e).click(function(){47 mediaadmin(this,perms,re);48 });49 53 } 50 54 } 51 52 function admin(E,perms,re) {53 P = E.name.match(re);54 55 perms[P[1]]['usage'].checked = E.checked;56 perms[P[1]]['publish'].checked = E.checked;57 perms[P[1]]['delete'].checked = E.checked;58 perms[P[1]]['contentadmin'].checked = E.checked;59 perms[P[1]]['categories'].checked = E.checked;60 perms[P[1]]['media'].checked = E.checked;61 perms[P[1]]['media_admin'].checked = E.checked;62 perms[P[1]]['usage'].disabled = E.checked;63 perms[P[1]]['publish'].disabled = E.checked;64 perms[P[1]]['delete'].disabled = E.checked;65 perms[P[1]]['contentadmin'].disabled = E.checked;66 perms[P[1]]['categories'].disabled = E.checked;67 perms[P[1]]['media'].disabled = E.checked;68 perms[P[1]]['media_admin'].disabled = E.checked;69 }70 71 function contentadmin(E,perms,re) {72 P = E.name.match(re);73 74 perms[P[1]]['usage'].checked = E.checked;75 perms[P[1]]['publish'].checked = E.checked;76 perms[P[1]]['delete'].checked = E.checked;77 perms[P[1]]['usage'].disabled = E.checked;78 perms[P[1]]['publish'].disabled = E.checked;79 perms[P[1]]['delete'].disabled = E.checked;80 }81 82 function mediaadmin(E,perms,re) {83 P = E.name.match(re);84 85 perms[P[1]]['media'].checked = E.checked;86 perms[P[1]]['media'].disabled = E.checked;87 }88 89 90 55 }); 91 56 }; -
admin/plugins.php
r1474 r1399 236 236 237 237 if ($is_writable) { 238 echo '<p>'.__('To install or upgrade a plugin you generally just need to upload it '.238 echo __('To install or upgrade a plugin you generally just need to upload it '. 239 239 'in "Install or upgrade a plugin" section.'); 240 240 } else { 241 echo '<p>'.__('To install or upgrade a plugin you just need to extract it in your plugins directory.');241 echo __('To install or upgrade a plugin you just need to extract it in your plugins directory.'); 242 242 } 243 243 echo '</p>'; -
admin/posts_actions.php
r1476 r1399 17 17 $params = array(); 18 18 19 /**20 * FieldsList - Compatibility class for hidden fields & entries[] fields21 *22 */23 class FieldsList {24 /** @var array list of hidden fields */25 protected $hidden;26 /** @var array list of selected entries */27 protected $entries;28 29 30 /**31 * Class constructor32 */33 public function __construct() {34 $this->hidden=array();35 $this->entries =array();36 }37 38 /**39 * addHidden - adds a hidden field40 *41 * @param string $name the field name.42 * @param mixed $value the field value.43 *44 * @access public45 * @return the FieldsList instance, enabling to chain requests46 */47 public function addHidden($name,$value) {48 $this->hidden[] = form::hidden($name,$value);49 return $this;50 }51 52 /**53 * addEntry - adds a antry field54 *55 * @param string $id the entry id.56 * @param mixed $title the entry title.57 *58 * @access public59 * @return the FieldsList instance, enabling to chain requests60 */61 public function addEntry($id,$title) {62 $this->entries[$id]=$title;63 return $this;64 }65 66 /**67 * getHidden - returns the list of hidden fields, html encoded68 *69 * @access public70 * @return the list of hidden fields, html encoded71 */72 public function getHidden() {73 return join('',$this->hidden);74 }75 76 /**77 * getEntries - returns the list of entry fields, html encoded78 *79 * @param boolean $hidden if set to true, returns entries as a list of hidden field80 * if set to false, returns html code displaying the list of entries81 * with a list of checkboxes to enable to select/deselect entries82 * @access public83 * @return the list of entry fields, html encoded84 */85 public function getEntries ($hidden=false) {86 $ret = '';87 if ($hidden) {88 foreach ($this->entries as $id=> $e) {89 $ret .= form::hidden('entries[]',$id);90 }91 } else {92 $ret =93 '<table class="posts-list"><tr>'.94 '<th colspan="2">'.__('Title').'</th>'.95 '</tr>';96 foreach ($this->entries as $id=>$title) {97 $ret .=98 '<tr><td>'.99 form::checkbox(array('entries[]'),$id,true,'','').'</td>'.100 '<td>'. $title.'</td></tr>';101 }102 $ret .= '</table>';103 }104 return $ret;105 }106 107 /**108 * getEntriesQS - returns the list of entry fields as query string109 *110 * @access public111 * @return the list of entry fields, html encoded112 */113 public function getEntriesQS() {114 $ret=array();115 foreach ($this->entries as $id=>$title) {116 $ret[] = 'entries[]='.$id;117 }118 return join('&',$ret);119 }120 121 /**122 * __toString - magic method. -- DEPRECATED here123 * This method is only used to preserve compatibility with plugins124 * relying on previous versions of adminPostsActionsContent behavior,125 *126 * @access public127 * @return the list of hidden fields and entries (as hidden fields too), html encoded128 */129 public function __toString() {130 return join('',$this->hidden).$this->getEntries(true);131 }132 }133 134 $fields = new FieldsList();135 136 19 /* Actions 137 20 -------------------------------------------------------- */ … … 179 62 while ($posts->fetch()) { 180 63 $posts_ids[] = $posts->post_id; 181 $fields->addEntry($posts->post_id,$posts->post_title); 182 } 183 // Redirection including selected entries 184 $redir_sel = $redir.'&'.$fields->getEntriesQS(); 64 } 185 65 186 66 # --BEHAVIOR-- adminPostsActions … … 200 80 $core->blog->updPostsStatus($posts_ids,$status); 201 81 202 http::redirect($redir _sel.'&upd=1');82 http::redirect($redir); 203 83 } 204 84 catch (Exception $e) … … 213 93 $core->blog->updPostsSelected($posts_ids,$action == 'selected'); 214 94 215 http::redirect($redir _sel."&upd=1");95 http::redirect($redir); 216 96 } 217 97 catch (Exception $e) … … 236 116 $core->blog->delPosts($posts_ids); 237 117 238 http::redirect($redir ."&del=1");118 http::redirect($redir); 239 119 } 240 120 catch (Exception $e) … … 246 126 elseif ($action == 'category' && isset($_POST['new_cat_id'])) 247 127 { 248 $new_cat_id = $_POST['new_cat_id']; 249 250 try 251 { 252 if (!empty($_POST['new_cat_title']) && $core->auth->check('categories', $core->blog->id)) 253 { 254 $cur_cat = $core->con->openCursor($core->prefix.'category'); 255 $cur_cat->cat_title = $_POST['new_cat_title']; 256 $cur_cat->cat_url = ''; 257 258 $parent_cat = !empty($_POST['new_cat_parent']) ? $_POST['new_cat_parent'] : ''; 259 260 # --BEHAVIOR-- adminBeforeCategoryCreate 261 $core->callBehavior('adminBeforeCategoryCreate', $cur_cat); 262 263 $new_cat_id = $core->blog->addCategory($cur_cat, (integer) $parent_cat); 264 265 # --BEHAVIOR-- adminAfterCategoryCreate 266 $core->callBehavior('adminAfterCategoryCreate', $cur_cat, $new_cat_id); 267 } 268 269 $core->blog->updPostsCategory($posts_ids, $new_cat_id); 270 271 http::redirect($redir_sel."&upd=1"); 128 try 129 { 130 $core->blog->updPostsCategory($posts_ids,$_POST['new_cat_id']); 131 132 http::redirect($redir); 272 133 } 273 134 catch (Exception $e) … … 291 152 $cur->update('WHERE post_id '.$core->con->in($posts_ids)); 292 153 293 http::redirect($redir _sel."&upd=1");154 http::redirect($redir); 294 155 } 295 156 catch (Exception $e) … … 307 168 $cur->update('WHERE post_id '.$core->con->in($posts_ids)); 308 169 309 http::redirect($redir _sel."&upd=1");170 http::redirect($redir); 310 171 } 311 172 catch (Exception $e) … … 314 175 } 315 176 } 316 } else { 317 if (empty($_POST['entries'])) { 318 $core->error->add(__('At least one entry should be selected')); 319 } else { 320 $core->error->add(__('No action specified.')); 321 } 322 dcPage::open( 323 __('Entries'),'',dcPage::breadcrumb( 324 array( 325 html::escapeHTML($core->blog->name) => '', 326 __('Entries') => 'posts.php', 327 '<span class="page-title">'.__('Entries actions').'</span>' => '' 328 )) 329 ); 330 331 echo '<p><a class="back" href="'.html::escapeURL($redir_sel).'">'.__('Back to entries list').'</a></p>'; 332 333 dcPage::close(); 334 exit; 335 } 177 } 178 336 179 /* DISPLAY 337 180 -------------------------------------------------------- */ … … 368 211 } 369 212 213 $hidden_fields = ''; 214 while ($posts->fetch()) { 215 $hidden_fields .= form::hidden(array('entries[]'),$posts->post_id); 216 } 217 370 218 if (isset($_POST['redir']) && strpos($_POST['redir'],'://') === false) 371 219 { 372 $ fields->addHidden(array('redir'),html::escapeURL($_POST['redir']));220 $hidden_fields .= form::hidden(array('redir'),html::escapeURL($_POST['redir'])); 373 221 } 374 222 else 375 223 { 376 $fields 377 ->addHidden(array('user_id'),$_POST['user_id']) 378 ->addHidden(array('cat_id'),$_POST['cat_id']) 379 ->addHidden(array('status'),$_POST['status']) 380 ->addHidden(array('selected'),$_POST['selected']) 381 ->addHidden(array('month'),$_POST['month']) 382 ->addHidden(array('lang'),$_POST['lang']) 383 ->addHidden(array('sortby'),$_POST['sortby']) 384 ->addHidden(array('order'),$_POST['order']) 385 ->addHidden(array('page'),$_POST['page']) 386 ->addHidden(array('nb'),$_POST['nb']) 387 ; 224 $hidden_fields .= 225 form::hidden(array('user_id'),$_POST['user_id']). 226 form::hidden(array('cat_id'),$_POST['cat_id']). 227 form::hidden(array('status'),$_POST['status']). 228 form::hidden(array('selected'),$_POST['selected']). 229 form::hidden(array('month'),$_POST['month']). 230 form::hidden(array('lang'),$_POST['lang']). 231 form::hidden(array('sortby'),$_POST['sortby']). 232 form::hidden(array('order'),$_POST['order']). 233 form::hidden(array('page'),$_POST['page']). 234 form::hidden(array('nb'),$_POST['nb']); 388 235 } 389 236 390 237 if (isset($_POST['post_type'])) { 391 $ fields->addHidden(array('post_type'),$_POST['post_type']);238 $hidden_fields .= form::hidden(array('post_type'),$_POST['post_type']); 392 239 } 393 240 394 241 # --BEHAVIOR-- adminPostsActionsContent 395 $core->callBehavior('adminPostsActionsContent',$core,$action,$ fields);242 $core->callBehavior('adminPostsActionsContent',$core,$action,$hidden_fields); 396 243 397 244 if ($action == 'category') 398 245 { 399 echo dcPage::breadcrumb( 400 array( 401 html::escapeHTML($core->blog->name) => '', 402 __('Entries') => 'posts.php', 403 __('Change category for entries') => '' 404 )); 405 406 echo '<p><a class="back" href="'.html::escapeURL($redir_sel).'">'.__('Back to entries list').'</a></p>'; 407 246 echo '<h2 class="page-title">'.__('Change category for entries').'</h2>'; 247 408 248 # categories list 409 249 # Getting categories 410 $categories_combo = array( __('(No cat)')=> '');250 $categories_combo = array(' ' => ''); 411 251 try { 412 252 $categories = $core->blog->getCategories(array('post_type'=>'post')); 413 if (!$categories->isEmpty()) {414 253 while ($categories->fetch()) { 415 $catparents_combo[] = $categories_combo[] = new formSelectOption( 416 str_repeat(' ',$categories->level-1).($categories->level-1 == 0 ? '' : '• ').html::escapeHTML($categories->cat_title), 254 $categories_combo[] = new formSelectOption( 255 str_repeat(' ',$categories->level-1). 256 ($categories->level-1 == 0 ? '' : '• ').html::escapeHTML($categories->cat_title), 417 257 $categories->cat_id 418 258 ); 419 259 } 420 }421 260 } catch (Exception $e) { } 422 261 423 262 echo 424 263 '<form action="posts_actions.php" method="post">'. 425 $fields->getEntries().426 264 '<p><label for="new_cat_id" class="classic">'.__('Category:').'</label> '. 427 265 form::combo('new_cat_id',$categories_combo,''); 428 266 429 if ($core->auth->check('categories', $core->blog->id)) { 430 echo 431 '<div>'. 432 '<p id="new_cat">'.__('Add a new category').'</p>'. 433 '<p><label for="new_cat_title">'.__('Title:').' '. 434 form::field('new_cat_title',30,255,'','maximal').'</label></p>'. 435 '<p><label for="new_cat_parent">'.__('Parent:').' '. 436 form::combo('new_cat_parent',$categories_combo,'','maximal'). 437 '</label></p>'. 438 '</div>'; 439 } 440 441 echo 442 $fields->getHidden(). 267 echo 268 $hidden_fields. 443 269 $core->formNonce(). 444 270 form::hidden(array('action'),'category'). … … 448 274 elseif ($action == 'lang') 449 275 { 450 echo dcPage::breadcrumb( 451 array( 452 html::escapeHTML($core->blog->name) => '', 453 __('Entries') => 'posts.php', 454 '<span class="page-title">'.__('Change language for entries').'</span>' => '' 455 )); 456 echo '<p><a class="back" href="'.html::escapeURL($redir_sel).'">'.__('Back to entries list').'</a></p>'; 457 276 echo '<h2 class="page-title">'.__('Change language for entries').'</h2>'; 277 458 278 # lang list 459 279 # Languages combo … … 474 294 echo 475 295 '<form action="posts_actions.php" method="post">'. 476 $fields->getEntries().477 478 296 '<p><label for="new_lang" class="classic">'.__('Entry lang:').'</label> '. 479 297 form::combo('new_lang',$lang_combo,''); 480 298 481 299 echo 482 $ fields->getHidden().300 $hidden_fields. 483 301 $core->formNonce(). 484 302 form::hidden(array('action'),'lang'). … … 489 307 elseif ($action == 'author' && $core->auth->check('admin',$core->blog->id)) 490 308 { 491 echo dcPage::breadcrumb( 492 array( 493 html::escapeHTML($core->blog->name) => '', 494 __('Entries') => 'posts.php', 495 '<span class="page-title">'.__('Change author for entries').'</span>' => '' 496 )); 497 echo '<p><a class="back" href="'.html::escapeURL($redir_sel).'">'.__('Back to entries list').'</a></p>'; 498 309 echo '<h2 class="page-title">'.__('Change author for entries').'</h2>'; 310 499 311 echo 500 312 '<form action="posts_actions.php" method="post">'. 501 $fields->getEntries().502 313 '<p><label for="new_auth_id" class="classic">'.__('Author ID:').'</label> '. 503 314 form::field('new_auth_id',20,255); 504 315 505 316 echo 506 $ fields->getHidden().317 $hidden_fields. 507 318 $core->formNonce(). 508 319 form::hidden(array('action'),'author'). … … 511 322 } 512 323 324 echo '<p><a class="back" href="'.html::escapeURL($redir).'">'.__('back').'</a></p>'; 325 513 326 dcPage::close(); 514 327 ?> -
admin/preferences.php
r1474 r1399 344 344 ($user_acc_nodragdrop ? '' : dcPage::jsLoad('js/_preferences-dragdrop.js')). 345 345 dcPage::jsLoad('js/jquery/jquery-ui.custom.js'). 346 dcPage::jsLoad('js/jquery/jquery.pwstrength.js').347 '<script type="text/javascript">'."\n".348 "//<![CDATA[\n".349 "\$(function() {\n".350 " \$('#new_pwd').pwstrength({texts: ['".351 sprintf(__('Password strength: %s'),__('very weak'))."', '".352 sprintf(__('Password strength: %s'),__('weak'))."', '".353 sprintf(__('Password strength: %s'),__('mediocre'))."', '".354 sprintf(__('Password strength: %s'),__('strong'))."', '".355 sprintf(__('Password strength: %s'),__('very strong'))."']});\n".356 "});\n".357 "\n//]]>\n".358 "</script>\n".359 346 dcPage::jsPageTabs($default_tab). 360 347 dcPage::jsConfirmClose('user-form'). … … 424 411 '</div>'. 425 412 '</div>'. 413 '<br class="clear" />'. //Opera sucks 426 414 '</fieldset>'; 427 415 … … 432 420 '<legend>'.__('Change your password').'</legend>'. 433 421 434 '<div class="pw-table">'. 435 '<p class="pw-cell"><label for="new_pwd">'.__('New password:').'</label>'. 436 form::password('new_pwd',20,255,'','','',false,' data-indicator="pwindicator" ').'</p>'. 437 '<div id="pwindicator">'. 438 ' <div class="bar"></div>'. 439 ' <p class="label no-margin"></p>'. 440 '</div>'. 441 '</div>'. 422 '<p><label for="new_pwd">'.__('New password:').'</label>'. 423 form::password('new_pwd',20,255).'</p>'. 442 424 443 '<p><label for="new_pwd_c">'.__('Confirm newpassword:').'</label>'.425 '<p><label for="new_pwd_c">'.__('Confirm password:').'</label>'. 444 426 form::password('new_pwd_c',20,255).'</p>'. 445 427 '</fieldset>'. … … 499 481 form::checkbox('user_ui_hide_std_favicon',1,$user_ui_hide_std_favicon).' '. 500 482 __('Do not use standard favicon').'</label></p>'. 501 '<p class="clear form-note info">'.__('This will be applied for all users'). 502 '<br class="clear" /></p>';//Opera sucks; 483 '<p class="clear form-note info">'.__('This will be applied for all users').'</p>'; 503 484 } 504 485 505 486 echo 487 '<br class="clear" />'. //Opera sucks 506 488 '</fieldset>'; 507 489 … … 529 511 '<p><label for="user_dm_quickentry" class="classic">'. 530 512 form::checkbox('user_dm_quickentry',1,$user_dm_quickentry).' '. 531 __('Display quick entry form').'</label>< br class="clear" />'. //Opera sucks532 '</p>'. 533 513 __('Display quick entry form').'</label></p>'. 514 515 '<br class="clear" />'. //Opera sucks 534 516 '</fieldset>'; 535 517 -
admin/style/default.css
r1492 r1490 420 420 #login-screen { 421 421 display: block; 422 width: 20em;422 width: 18em; 423 423 margin: 1.5em auto 0; 424 424 font-size: 1.4rem; … … 431 431 margin-left: 0; 432 432 } 433 #login-screen .fieldset {433 #login-screen fieldset, #login-screen .fieldset { 434 434 border: 1px solid #A8DC26; 435 435 padding: 1em 1em 0 1em; … … 437 437 background: #fff; 438 438 } 439 #login-screen legend { 440 border: 1px solid #A8DC26; 441 } 439 442 #login-screen input[type=text], #login-screen input[type=password], #login-screen input[type=submit] { 440 443 width: 100%; … … 445 448 } 446 449 #login-screen #issue strong {font-weight: normal;} 450 447 451 448 452 /* ------------------------------------------------------------------ dashboard */ … … 477 481 #icons a img { 478 482 padding: 2em; 479 margin-bottom: .3em; 480 -moz-box-shadow: 0px 1px 0px 0px #ffffff; 481 -webkit-box-shadow: 0px 1px 0px 0px #ffffff; 482 box-shadow: 0px 1px 0px 0px #ffffff; 483 background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #f9f9f9), color-stop(1, #e9e9e9) ); 484 background:-moz-linear-gradient( center top, #f9f9f9 5%, #e9e9e9 100% ); 485 filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9f9f9', endColorstr='#e9e9e9'); 486 background-color:#f9f9f9; 487 -moz-border-radius:1em; 488 -webkit-border-radius:1em; 489 border-radius:1em; 490 border:1px solid #dcdcdc; 491 display:inline-block; 483 background: #eee; 484 border-radius: 1.6rem; 485 box-shadow: 0 3px 3px 0 #ccc; 486 margin-bottom: .6rem; 492 487 } 493 488 #icons a img:hover, #icons a:focus img { 494 background : #BBDB58;489 background-color: #BBDB58; 495 490 } 496 491 #icons a:focus span, #icons a:hover span { … … 506 501 #quick p.qinfo { 507 502 margin: -.7em -1em 1em; 508 background: # f3f3ff url(info.png) no-repeat .2em .2em;503 background: #eef url(info.png) no-repeat .2em .2em; 509 504 border: 1px solid #99f; 510 505 padding: .2em 1em .1em 24px; … … 546 541 } 547 542 548 #upg-notify {549 }550 #upg-notify ul {551 padding-left: 15px;552 }553 #upg-notify li {554 color: #fff;555 }556 543 /* ------------------------------------------------------------------ post */ 557 544 #entry-wrapper { … … 1214 1201 } 1215 1202 table.settings th, table.prefs th { 1216 background: # f3f3ff;1203 background: #eef; 1217 1204 } 1218 1205 table.settings th:first-child, table.prefs th:first-child { … … 1353 1340 } 1354 1341 p.form-note.info { 1355 background: #f5eaff url(info.png) no-repeat .3em . 3em;1342 background: #f5eaff url(info.png) no-repeat .3em .2em; 1356 1343 border: 1px solid #ddbaff; 1357 1344 } … … 1428 1415 a.submit { 1429 1416 display: inline-block; 1417 outline: none; 1430 1418 cursor: pointer; 1431 1419 text-align: center; 1432 1420 text-decoration: none; 1433 1421 padding: .1em .5em; 1422 text-shadow: 0 1px 1px rgba(0,0,0,.3); 1434 1423 border-radius: .2em; 1435 1424 margin-bottom: .1em; 1436 font-size: 1.2rem; 1437 } 1425 } 1438 1426 h4 a.button {font-weight: normal;} 1439 1427 … … 1443 1431 a.submit { 1444 1432 color: #fff; 1445 text-shadow: 0 -1px 1px #1A87B9; 1446 background:#25A6E1; 1447 background:-moz-linear-gradient(top,#25A6E1 0%,#188BC0 100%); 1448 background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#25A6E1),color-stop(100%,#188BC0)); 1449 background:linear-gradient(top,#25A6E1 0%,#188BC0 100%); 1450 filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#25A6E1',endColorstr='#188BC0',GradientType=0); 1451 border:1px solid #2C8FD1; 1452 1433 border: 1px solid #2373A8; 1434 background: #2373A8; 1435 background: -webkit-gradient(linear, left top, left bottom, from(#2C8FD1), to(#2373A8)); 1436 background: -moz-linear-gradient(top, #2C8FD1, #2373A8); 1453 1437 } 1454 1438 input[type=submit]:hover, … … 1458 1442 input[type=button]:focus, 1459 1443 a.submit:focus { 1460 background: #188BC0;1461 background: -moz-linear-gradient(top,#188BC0 0%,#25A6E1 100%);1462 background: -webkit-gradient(linear,left top,left bottom,color-stop(0%,#188BC0),color-stop(100%,#25A6E1));1463 background:linear-gradient(top,#188BC0 0%,#25A6E1 100%);1464 filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#25A6E1',endColorstr='#25A6E1',GradientType=0);1444 background: #2373A8; 1445 background: -webkit-gradient(linear, left top, left bottom, from(#2373A8), to(#2C8FD1)); 1446 background: -moz-linear-gradient(top, #2373A8, #2C8FD1); 1447 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#2373A8', endColorstr='#2C8FD1'); 1448 border: 1px solid #2C8FD1; 1465 1449 } 1466 1450 /* suppression et reset */ … … 1473 1457 background: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#dfdfdf)); 1474 1458 background: -moz-linear-gradient(top, #f5f5f5, #dfdfdf); 1475 text-shadow: 1px 1px 0px #fff;1459 text-shadow: none; 1476 1460 } 1477 1461 a.button:hover, … … 1483 1467 input[type=submit].reset:focus, 1484 1468 input[type=submit].delete:focus { 1485 background: -webkit-gradient( linear, left top, left bottom, color-stop(0.05, #e9e9e9), color-stop(1, #f9f9f9) );1486 background: -moz-linear-gradient( center top, #e9e9e9 5%, #f9f9f9 100%);1487 filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#e9e9e9', endColorstr='#f9f9f9');1488 background-color:#e9e9e9;1469 background: #dfdfdf; 1470 background: -webkit-gradient(linear, left top, left bottom, from(#dfdfdf), to(#f5f5f5)); 1471 background: -moz-linear-gradient(top, #dfdfdf, #f5f5f5); 1472 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#e5e5e5', endColorstr='#f5f5f5'); 1489 1473 } 1490 1474 a.delete, … … 1525 1509 font-size: 1.4rem; 1526 1510 } 1527 .button.add:hover, .button.add: active, .button.add:focus {1511 .button.add:hover, .button.add:focus { 1528 1512 background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #8cb82b), color-stop(1, #9dce2c) ); 1529 1513 background:-moz-linear-gradient( center top, #8cb82b 5%, #9dce2c 100% ); … … 1631 1615 border-color : #ccc; 1632 1616 background-color: #fff; 1633 }1634 1635 /* --------------------------------------------------------------- password indcator */1636 .pw-table {1637 display: table;1638 margin-bottom: 1em;1639 }1640 .pw-cell {1641 display: table-cell;1642 margin-bottom: 1em;1643 }1644 #pwindicator {1645 display: table-cell;1646 vertical-align: bottom;1647 padding-left: 1.5em;1648 height: 3.8em;1649 }1650 #pwindicator .bar {1651 height: 6px;1652 margin-bottom: 4px;1653 }1654 .pw-very-weak .bar {1655 background: #900;1656 width: 30px;1657 }1658 .pw-weak .bar {1659 background: #c00;1660 width: 60px;1661 }1662 .pw-mediocre .bar {1663 background: #f60;1664 width: 90px;1665 }1666 .pw-strong .bar {1667 background: #060;1668 width: 120px;1669 }1670 .pw-very-strong .bar {1671 background: #0c0;1672 width: 150px;1673 1617 } 1674 1618 -
admin/style/jsToolBar/jsToolBar.css
r1475 r1399 82 82 display: block; 83 83 list-style: none; 84 margin: 0 ;84 margin: 0 0 0 -5px; 85 85 padding: 0 0 5px 0; 86 86 background: #dfdfdf; 87 87 border-top: 1px solid #999; 88 font-size: 90%; 89 font-weight: bold; 88 90 } 89 91 .jstSwitcher li { 90 92 display: inline; 91 93 margin: 0 0 0 5px; 92 padding: 2px 8px;94 padding: 2px 4px; 93 95 } 94 96 .jstSwitcher li.jstSwitcherCurrent { 95 97 color: #fff; 96 background: # 575859;98 background: #999; 97 99 border-radius: 0 0 2px 2px; 98 100 } -
admin/update.php
r1474 r1358 27 27 28 28 $updater = new dcUpdate(DC_UPDATE_URL,'dotclear',DC_UPDATE_VERSION,DC_TPL_CACHE.'/versions'); 29 $new_v = $updater->check(DC_VERSION , !empty($_GET['nocache']));29 $new_v = $updater->check(DC_VERSION); 30 30 $zip_file = $new_v ? DC_BACKUP_PATH.'/'.basename($updater->getFileURL()) : ''; 31 31 $version_info = $new_v ? $updater->getInfoURL() : ''; … … 168 168 -------------------------------------------------------- */ 169 169 dcPage::open(__('Dotclear update'), 170 (!$step ? 171 dcPage::jsPageTabs($default_tab). 172 dcPage::jsLoad('js/_update.js') 173 : ''), 170 (!$step ? dcPage::jsPageTabs($default_tab) : ''), 174 171 dcPage::breadcrumb( 175 172 array( … … 179 176 ); 180 177 181 if (!$core->error->flag()) {182 if (!empty($_GET['nocache'])) {183 dcPage::message(__('Manual checking of update done successfully.'));184 }185 }186 187 178 if (!$step) 188 179 { … … 190 181 if (empty($new_v)) 191 182 { 192 echo '<p><strong>'.__('No newer Dotclear version available.').'</strong></p>'. 193 '<form action="'.$p_url.'" method="get">'. 194 '<p><input type="hidden" name="nocache" value="1" />'. 195 '<input type="submit" value="'.__('Force checking update Dotclear').'" /></p>'. 196 '</form>'; 183 echo '<p><strong>'.__('No newer Dotclear version available.').'</strong></p>'; 197 184 } 198 185 else … … 200 187 echo 201 188 '<p class="static-msg">'.sprintf(__('Dotclear %s is available.'),$new_v). 202 ($version_info ? ' <a href="'.$version_info.'">('.__(' Information about this version').')</a>' : '').189 ($version_info ? ' <a href="'.$version_info.'">('.__('information about this version').')</a>' : ''). 203 190 '</p>'. 204 191 … … 246 233 '<p class="message">'. 247 234 __("Congratulations, you're one click away from the end of the update."). 248 ' <strong><a href="index.php?logout=1">'.__('Finish the update ').'</a>.</strong>'.235 ' <strong><a href="index.php?logout=1">'.__('Finish the update.').'</a></strong>'. 249 236 '</p>'; 250 237 } -
admin/user.php
r1474 r1399 226 226 '<p><label for="user_firstname">'.__('First Name:').'</label> '. 227 227 form::field('user_firstname',20,255,html::escapeHTML($user_firstname)). 228 '</ p>'.229 230 '<p><label for="user_displayname">'.__('Display name:').' </label>'.228 '</label></p>'. 229 230 '<p><label for="user_displayname">'.__('Display name:').' '. 231 231 form::field('user_displayname',20,255,html::escapeHTML($user_displayname)). 232 232 '</p>'. -
admin/users.php
r1474 r1426 39 39 40 40 41 # ?Get users41 # Get users 42 42 $page = !empty($_GET['page']) ? $_GET['page'] : 1; 43 43 $nb_per_page = 30; … … 134 134 form::combo('order',$order_combo,$order).'</p>'. 135 135 '<p><span class="label ib">'.__('Show').'</span> <label for="nb" class="classic">'. 136 form::field('nb',3,3,$nb_per_page).' '.__('users per page').'</ label></p> '.136 form::field('nb',3,3,$nb_per_page).' '.__('users per page').'</p> '. 137 137 '</div>'. 138 138 '</div>'. -
admin/users_actions.php
r1477 r1399 255 255 256 256 echo 257 '<h2><a href="users.php">'.__('Users').'</a> › <span class="page-title">'.__('Permissions').'</span></h2>'. 257 258 '<p>'.sprintf( 258 259 __('You are about to change permissions on the following blogs for users %s.'), -
inc/admin/lib.pager.php
r1476 r1415 42 42 $pager->html_next = $this->html_next; 43 43 $pager->var_page = 'page'; 44 $entries = array(); 45 if (isset($_REQUEST['entries'])) { 46 foreach ($_REQUEST['entries'] as $v) { 47 $entries[(integer)$v]=true; 48 } 49 } 44 50 45 $html_block = 51 46 '<table class="clear"><tr>'. … … 71 66 while ($this->rs->fetch()) 72 67 { 73 echo $this->postLine( isset($entries[$this->rs->post_id]));68 echo $this->postLine(); 74 69 } 75 70 … … 80 75 } 81 76 82 private function postLine( $checked)77 private function postLine() 83 78 { 84 79 if ($this->core->auth->check('categories',$this->core->blog->id)) { … … 92 87 html::escapeHTML($this->rs->cat_title)); 93 88 } else { 94 $cat_title = __(' (No cat)');89 $cat_title = __('None'); 95 90 } 96 91 … … 133 128 $res .= 134 129 '<td class="nowrap">'. 135 form::checkbox(array('entries[]'),$this->rs->post_id, $checked,'','',!$this->rs->isEditable()).'</td>'.130 form::checkbox(array('entries[]'),$this->rs->post_id,'','','',!$this->rs->isEditable()).'</td>'. 136 131 '<td class="maximal"><a href="'.$this->core->getPostAdminURL($this->rs->post_type,$this->rs->post_id).'">'. 137 132 html::escapeHTML($this->rs->post_title).'</a></td>'. -
inc/core/class.dc.blog.php
r1492 r1491 634 634 private function checkCategory($title,$url,$id=null) 635 635 { 636 # Let's check if URL is taken... 637 $strReq = 638 'SELECT cat_url FROM '.$this->prefix.'category '. 639 "WHERE cat_url = '".$this->con->escape($url)."' ". 640 ($id ? 'AND cat_id <> '.(integer) $id. ' ' : ''). 641 "AND blog_id = '".$this->con->escape($this->id)."' ". 642 'ORDER BY cat_url DESC'; 636 $strReq = 'SELECT cat_id '. 637 'FROM '.$this->prefix.'category '. 638 "WHERE cat_url = '".$this->con->escape($url)."' ". 639 "AND blog_id = '".$this->con->escape($this->id)."' "; 640 641 if ($id !== null) { 642 $strReq .= 'AND cat_id <> '.(integer) $id.' '; 643 } 643 644 644 645 $rs = $this->con->select($strReq); 645 646 646 if (!$rs->isEmpty()) 647 { 648 if ($this->con->driver() == 'mysql') { 649 $clause = "REGEXP '^".$this->con->escape($url)."[0-9]+$'"; 650 } elseif ($this->con->driver() == 'pgsql') { 651 $clause = "~ '^".$this->con->escape($url)."[0-9]+$'"; 652 } else { 653 $clause = "LIKE '".$this->con->escape($url)."%'"; 654 } 655 $strReq = 656 'SELECT cat_url FROM '.$this->prefix.'category '. 657 "WHERE cat_url ".$clause.' '. 658 ($id ? 'AND cat_id <> '.(integer) $id. ' ' : ''). 659 "AND blog_id = '".$this->con->escape($this->id)."' ". 660 'ORDER BY cat_url DESC '; 661 662 $rs = $this->con->select($strReq); 663 $a = array(); 664 while ($rs->fetch()) { 665 $a[] = $rs->cat_url; 666 } 667 668 natsort($a); 669 $t_url = end($a); 670 671 if (preg_match('/(.*?)([0-9]+)$/',$t_url,$m)) { 672 $i = (integer) $m[2]; 673 $url = $m[1]; 674 } else { 675 $i = 1; 676 } 677 678 return $url.($i+1); 679 } 680 681 # URL is empty? 682 if ($url == '') { 683 throw new Exception(__('Empty category URL')); 684 } 685 686 return $url; 647 if (!$rs->isEmpty()) { 648 throw new Exception(__('Category URL must be unique.')); 649 } 687 650 } 688 651 … … 706 669 707 670 # Check if title or url are unique 708 $ cur->cat_url = $this->checkCategory($cur->cat_title,$cur->cat_url,$id);671 $this->checkCategory($cur->cat_title,$cur->cat_url,$id); 709 672 710 673 if ($cur->cat_desc !== null) { -
inc/core/class.dc.media.php
r1468 r1280 30 30 31 31 public $thumb_tp = '%s/.%s_%s.jpg'; ///< <b>string</b> Thumbnail file pattern 32 public $thumb_tp_alpha = '%s/.%s_%s.png'; ///< <b>string</b> Thumbnail file pattern (with alpha layer)33 32 34 33 /** … … 299 298 $f->media_thumb = array(); 300 299 $p = path::info($f->relname); 301 $alpha = ($p['extension'] == 'png') || ($p['extension'] == 'PNG'); 302 $thumb = sprintf(($alpha ? $this->thumb_tp_alpha : $this->thumb_tp),$this->root.'/'.$p['dirname'],$p['base'],'%s'); 303 $thumb_url = sprintf(($alpha ? $this->thumb_tp_alpha : $this->thumb_tp),$this->root_url.$p['dirname'],$p['base'],'%s'); 300 $thumb = sprintf($this->thumb_tp,$this->root.'/'.$p['dirname'],$p['base'],'%s'); 301 $thumb_url = sprintf($this->thumb_tp,$this->root_url.$p['dirname'],$p['base'],'%s'); 304 302 305 303 # Cleaner URLs … … 922 920 923 921 $p = path::info($file); 924 $alpha = ($p['extension'] == 'png') || ($p['extension'] == 'PNG'); 925 $thumb = sprintf(($alpha ? $this->thumb_tp_alpha : $this->thumb_tp),$p['dirname'],$p['base'],'%s'); 922 $thumb = sprintf($this->thumb_tp,$p['dirname'],$p['base'],'%s'); 926 923 927 924 try … … 942 939 $rate = ($s[0] < 100 ? 95 : ($s[0] < 600 ? 90 : 85)); 943 940 $img->resize($s[0],$s[0],$s[1]); 944 $img->output( ($alpha ? 'png' : 'jpeg'),$thumb_file,$rate);941 $img->output('jpeg',$thumb_file,$rate); 945 942 $img->loadImage($file); 946 943 } … … 961 958 { 962 959 $p = path::info($file->relname); 963 $alpha = ($p['extension'] == 'png') || ($p['extension'] == 'PNG'); 964 $thumb_old = sprintf(($alpha ? $this->thumb_tp_alpha : $this->thumb_tp),$p['dirname'],$p['base'],'%s'); 960 $thumb_old = sprintf($this->thumb_tp,$p['dirname'],$p['base'],'%s'); 965 961 966 962 $p = path::info($newFile->relname); 967 $alpha = ($p['extension'] == 'png') || ($p['extension'] == 'PNG'); 968 $thumb_new = sprintf(($alpha ? $this->thumb_tp_alpha : $this->thumb_tp),$p['dirname'],$p['base'],'%s'); 963 $thumb_new = sprintf($this->thumb_tp,$p['dirname'],$p['base'],'%s'); 969 964 970 965 foreach ($this->thumb_sizes as $suffix => $s) { … … 979 974 { 980 975 $p = path::info($f); 981 $alpha = ($p['extension'] == 'png') || ($p['extension'] == 'PNG'); 982 $thumb = sprintf(($alpha ? $this->thumb_tp_alpha : $this->thumb_tp),'',$p['base'],'%s'); 976 $thumb = sprintf($this->thumb_tp,'',$p['base'],'%s'); 983 977 984 978 foreach ($this->thumb_sizes as $suffix => $s) { -
locales/en/main.po
r1468 r1425 2139 2139 msgstr "" 2140 2140 2141 msgid "Are you sure you want to delete this backup?"2142 msgstr ""2143 2144 2141 msgid "Zip file content" 2145 2142 msgstr "" … … 2790 2787 msgid "The following error was encountered while trying to read the database:" 2791 2788 msgstr "" 2792 2793 msgid "(No cat)"2794 msgstr "(none)" -
locales/fr/main.po
r1484 r1454 95 95 96 96 msgid "This mode allows you to login without activating any of your plugins. This may be useful to solve compatibility problems" 97 msgstr " Ce mode vous permet de vous connecter sans activer de plugins. Il peut être utile pour résoudre un problème de compatibilité"97 msgstr "\"Ce mode vous permet de vous connecter sans activer de plugins. Il peut être utile pour résoudre un problème de compatibilité" 98 98 99 99 msgid "Disable or delete any plugin suspected to cause trouble, then log out and log back in normally." … … 1038 1038 #, fuzzy, php-format 1039 1039 msgid "Path <strong>%s</strong> is not writable." 1040 msgstr "Le répertoire de cache <strong>%s</strong>n'est pas accessible en écriture."1040 msgstr "Le répertoire de cache %s n'est pas accessible en écriture." 1041 1041 1042 1042 #, fuzzy … … 1123 1123 #, php-format 1124 1124 msgid "You can change your user language in your <a href=\"%1$s\">preferences</a> or change your blog's main language in your <a href=\"%2$s\">blog settings</a>." 1125 msgstr "Vous pouvez changer votre langue d'utilisateur dans vos <a href=\"%1$s\">préférences</a> ou changer la langue principale de votre blog dans vos <a href=\"%2$s\">paramètres d ublog</a>."1125 msgstr "Vous pouvez changer votre langue d'utilisateur dans vos <a href=\"%1$s\">préférences</a> ou changer la langue principale de votre blog dans vos <a href=\"%2$s\">paramètres de blog</a>." 1126 1126 1127 1127 msgid "Installed languages" … … 1193 1193 msgstr "Gestionnaire de médias" 1194 1194 1195 msgid "Go to %s folder"1196 msgstr "Aller au dossier %s"1197 1198 msgid "Media details of %s"1199 msgstr "Détails du média %s"1200 1201 1195 msgid "confirm removal" 1202 1196 msgstr "Confirmer la suppression" … … 1790 1784 1791 1785 msgid "If you want to change your email or password you must provide your current password." 1792 msgstr "Si vous voulez changer votre adresse email ou votre mot de passe, vous devez indiquer votre mot de passe actuel."1786 msgstr "Si vous voulez changer votre adresse email ou votre mot de passe, vous devez indiquer votre mot de passe." 1793 1787 1794 1788 msgid "No favorite selected" … … 1826 1820 1827 1821 msgid "If you have changed this user email or password you must provide your current password to save these modifications." 1828 msgstr "Si vous voulez changer votre adresse email ou votre mot de passe, vous devez indiquer votre mot de passe actuel pour enregistrer ces modifications."1822 msgstr "Si vous voulez changer votre adresse email ou votre mot de passe, vous devez indiquer votre mot de passe." 1829 1823 1830 1824 msgid "My options" … … 2000 1994 msgstr "Les fichiers suivants de votre installation de Dotclear ne peuvent pas être écrits. Veuillez corriger la situation ou <a href=\"http://fr.dotclear.org/download\">mettre à jour manuellement</a>." 2001 1995 2002 msgid "Manual checking of update done successfully."2003 msgstr "Vérification manuelle de mise à jour effectuée avec succès."2004 2005 1996 msgid "No newer Dotclear version available." 2006 1997 msgstr "Aucune nouvelle version de Dotclear n'est disponible." 2007 1998 2008 msgid "Force checking update Dotclear"2009 msgstr "Forcer la vérification de mise à jour de Dotclear"2010 2011 1999 #, php-format 2012 2000 msgid "Dotclear %s is available." … … 2145 2133 #, fuzzy 2146 2134 msgid "Go to the content" 2147 msgstr " Aller au contenu"2135 msgstr "Voir ce billet sur le site" 2148 2136 2149 2137 #, fuzzy 2150 2138 msgid "Go to the menu" 2151 msgstr "Aller au menu"2139 msgstr "Aller sur le site" 2152 2140 2153 2141 msgid "Go to site" … … 2213 2201 2214 2202 msgid "Users with posts cannot be deleted." 2215 msgstr "Les utilisateurs ayant écrit des billets ne peuvent être supprimés."2203 msgstr "Les utilisateurs ayant écrit des billets ne peuvent être effacées." 2216 2204 2217 2205 #, php-format … … 2255 2243 msgstr "Êtes-vous certain de vouloir supprimer le thème \"%s\" ?" 2256 2244 2257 msgid "Are you sure you want to delete this backup?"2258 msgstr "Êtes-vous certain de vouloir supprimer cette sauvegarde ?"2259 2260 2245 msgid "Zip file content" 2261 2246 msgstr "Contenu du fichier zip" … … 2273 2258 msgstr "Vous avez des modifications non sauvegardées. Changer de format vous fera perdre ces modifications. Continuer ?" 2274 2259 2275 msgid "Warning: post format change will not convert existing content. You will need to apply new format by yourself. Proceed anyway?"2276 msgstr "Attention : le changement de syntaxe ne transformera pas les balises des contenus déjà saisis. Pensez à les réadapter après cette opération. Confirmez-vous ce changement de syntaxe ?"2277 2278 2260 msgid "Loading enhanced uploader, please wait." 2279 2261 msgstr "Chargement de l'interface avancée." … … 2524 2506 #, fuzzy 2525 2507 msgid "You are not allowed to reset categories order" 2526 msgstr "Vous n'êtes pas autorisé à réinitialiser l'ordredes catégories"2508 msgstr "Vous n'êtes pas autorisé à supprimer des catégories" 2527 2509 2528 2510 msgid "Category URL must be unique." … … 3052 3034 msgstr "Filtrer la liste des commentaires et rétroliens" 3053 3035 3054 msgid "comments per page"3055 msgstr "commentaires par page"3056 3057 3036 msgid "Filter users list" 3058 3037 msgstr "Filtrer la liste des utilisateurs" … … 3081 3060 msgid "Add an introduction to the page." 3082 3061 msgstr "Ajoute une introduction à la page." 3083 3084 msgid "(No cat)"3085 msgstr "(aucune)"3086 3087 msgid "Password strength: %s"3088 msgstr "Force du mot de passe : %s"3089 3090 msgid "very weak"3091 msgstr "très faible"3092 3093 msgid "weak"3094 msgstr "faible"3095 3096 msgid "mediocre"3097 msgstr "moyen"3098 3099 msgid "strong"3100 msgstr "fort"3101 3102 msgid "very strong"3103 msgstr "très fort"3104 3105 msgid "Confirm new password:"3106 msgstr "Confirmez le nouveau mot de passe :"3107 3108 msgid "Not selected"3109 msgstr "Non sélectionné"3110 3111 msgid "Back to comments list"3112 msgstr "Retour à la liste des commentaires"3113 3114 msgid "The current blog cannot be deleted."3115 msgstr "Le blog courant ne peut être détruit."3116 3117 msgid "Only superadmin can delete a blog."3118 msgstr "Seul un superadministrateur peut supprimer un blog."3119 3120 msgid "Invalid publication date"3121 msgstr "Date de publication invalide."3122 3123 msgid "Image alignment:"3124 msgstr "Alignement de l'image :"3125 3126 msgid "Finish the update"3127 msgstr "Finir la mise à jour"3128 3129 msgid "Information about this version"3130 psgstr "Informations sur cette version" -
locales/fr/plugins.po
r1483 r1396 42 42 43 43 msgid "blog settings" 44 msgstr " paramètres du blog"44 msgstr "Réglages du blog" 45 45 46 46 msgid "Value" … … 305 305 306 306 msgid "No attachment." 307 msgstr "Pas de fichier attaché ."307 msgstr "Pas de fichier attaché" 308 308 309 309 msgid "Add files to this entry" … … 1166 1166 msgstr "Pages" 1167 1167 1168 msgid "My first page"1169 msgstr "Ma première page"1170 1171 msgid "This is your first page. When you\'re ready to blog, log in to edit or delete it."1172 msgstr "Ceci est votre première page. Quand vous serez prêt à bloguer, connectez-vous pour l'éditer ou la supprimer."1173 1174 1168 #, php-format 1175 1169 msgid "%d page" … … 1756 1750 1757 1751 msgid "Custom sidebar" 1758 msgstr " Voletsupplémentaire"1752 msgstr "Bandeau supplémentaire" 1759 1753 1760 1754 msgid "Update sidebars" 1761 msgstr "Mettre à jour les volets"1755 msgstr "Mettre à jour les bandeaux" 1762 1756 1763 1757 msgid "Reset sidebars" 1764 msgstr "Réinitialiser les volets"1758 msgstr "Réinitialiser les bandeaux" 1765 1759 1766 1760 msgid "Use of widgets" … … 1934 1928 msgid "Edit theme files" 1935 1929 msgstr "Modifier les fichiers du thème" 1936 1937 msgid "Blog settings"1938 msgstr "Paramètres du blog"1939 1940 msgid "Move widgets from this list to one of the sidebars."1941 msgstr "Déplacez des widgets de cette liste vers l'un des volets." -
plugins/antispam/_admin.php
r1474 r1207 59 59 if ($ttl != null && $ttl >=0) { 60 60 echo '<p>'.sprintf(__('All spam comments older than %s day(s) will be automatically deleted.'), $ttl).' '. 61 sprintf(__('You can modify this duration in the %s'),'<a href="blog_pref.php#antispam_moderation_ttl"> '.__('Blog settings').'</a>').61 sprintf(__('You can modify this duration in the %s'),'<a href="blog_pref.php#antispam_moderation_ttl"> '.__('Blog preferences').'</a>'). 62 62 '</p>'; 63 63 } -
plugins/antispam/filters/class.dc.filter.iplookup.php
r1468 r1454 44 44 } 45 45 46 $match = array(); 47 46 48 $bls = $this->getServers(); 47 49 $bls = preg_split('/\s*,\s*/',$bls); 48 50 49 foreach ($bls as $bl) { 51 foreach ($bls as $bl) 52 { 50 53 if ($this->dnsblLookup($ip,$bl)) { 51 // Pass by reference $status to contain matching DNSBL 52 $status = $bl; 53 return true; 54 $match[] = $bl; 54 55 } 56 } 57 58 if (!empty($match)) { 59 $status = substr(implode(', ',$match),0,128); 60 return true; 55 61 } 56 62 } -
plugins/antispam/filters/class.dc.filter.linkslookup.php
r1366 r1179 64 64 private function getLinks($text) 65 65 { 66 // href attribute on "a" tags is second match 67 preg_match_all('|<a.*?href="(http.*?)"|', $text, $parts); 68 69 return $parts[1]; 66 $res = array(); 67 68 # href attribute on "a" tags 69 if (preg_match_all('/<a ([^>]+)>/ms', $text, $match, PREG_SET_ORDER)) 70 { 71 for ($i = 0; $i<count($match); $i++) 72 { 73 if (preg_match('/href="(http:\/\/[^"]+)"/ms', $match[$i][1], $matches)) { 74 $res[] = $matches[1]; 75 } 76 } 77 } 78 79 return $res; 70 80 } 71 81 } -
plugins/antispam/index.php
r1474 r1423 170 170 if ($moderationTTL != null && $moderationTTL >=0) { 171 171 echo '<p>'.sprintf(__('All spam comments older than %s day(s) will be automatically deleted.'), $moderationTTL).' '. 172 sprintf(__('You can modify this duration in the %s'),'<a href="blog_pref.php#antispam_moderation_ttl"> '.__('Blog settings').'</a>').172 sprintf(__('You can modify this duration in the %s'),'<a href="blog_pref.php#antispam_moderation_ttl"> '.__('Blog preferences').'</a>'). 173 173 '</p>'; 174 174 } … … 212 212 '<td class="nowrap">'.form::checkbox(array('filters_active[]'),$fid,$f->active, '', '', false, 'title="'.__('Active').'"').'</td>'. 213 213 '<td class="nowrap">'.form::checkbox(array('filters_auto_del[]'),$fid,$f->auto_delete, '', '', false, 'title="'.__('Auto Del.').'"').'</td>'. 214 '<td class="nowrap" scope="r ow">'.$f->name.'</td>'.214 '<td class="nowrap" scope="raw">'.$f->name.'</td>'. 215 215 '<td class="maximal">'.$f->description.'</td>'. 216 216 '<td class="status">'.$gui_link.'</td>'. -
plugins/attachments/_admin.php
r1468 r1398 41 41 '<img src="'.$f->media_icon.'" alt="" title="'.$f->basename.'" /></a>'. 42 42 '<ul>'. 43 '<li><a class="media-link" href="media_item.php?id='.$f->media_id.'" 43 '<li><a class="media-link" href="media_item.php?id='.$f->media_id.'"'. 44 44 'title="'.$f->basename.'">'.$ftitle.'</a></li>'. 45 45 '<li>'.$f->media_dtstr.'</li>'. -
plugins/pages/_define.php
r1442 r1179 16 16 /* Description*/ "Serve entries as simple web pages", 17 17 /* Author */ "Olivier Meunier", 18 /* Version */ '1. 3',18 /* Version */ '1.2', 19 19 array( 20 20 'permissions' => 'contentadmin,pages', … … 22 22 ) 23 23 ); 24 ?> -
plugins/pages/page.php
r1480 r1454 455 455 456 456 echo 457 '<p><label for="post_status" class="ib">'.__('Page status:').'</label> '.457 '<p><label for="post_status">'.__('Page status:').'</label> '. 458 458 form::combo('post_status',$status_combo,$post_status,'','',!$can_publish). 459 459 '</p>'. 460 460 461 '<p><label for="post_dt" class="ib">'.__('Published on:').'</label>'.461 '<p><label for="post_dt">'.__('Published on:').'</label>'. 462 462 form::field('post_dt',16,16,$post_dt,($bad_dt ? 'invalid' : '')).'</p>'. 463 463 464 '<p><label for="post_format" class="ib">'.__('Text formating:').'</label>'.464 '<p><label for="post_format">'.__('Text formating:').'</label>'. 465 465 form::combo('post_format',$formaters_combo,$post_format). 466 466 ($post_id && $post_format != 'xhtml' ? '<a class="button" href="'.html::escapeURL($redir_url).'&id='.$post_id.'&xconv=1">'.__('Convert to XHTML').'</a>' : ''). … … 493 493 '</p>'. 494 494 495 '<p><label for="post_lang" class="ib">'.__('Page lang:').'</label>'.495 '<p><label for="post_lang">'.__('Page lang:').'</label>'. 496 496 form::combo('post_lang',$lang_combo,$post_lang).'</p>'. 497 497 498 '<p><label for="post_password" class="ib">'.__('Page password:').'</label>'.498 '<p><label for="post_password">'.__('Page password:').'</label>'. 499 499 form::field('post_password',10,32,html::escapeHTML($post_password),'maximal'). 500 500 '</p>'. 501 501 502 '<div class="lockable ib">'.503 '<p><label for="post_url" class="ib">'.__('Basename:').'</label>'.502 '<div class="lockable">'. 503 '<p><label for="post_url">'.__('Basename:').'</label>'. 504 504 form::field('post_url',10,255,html::escapeHTML($post_url),'maximal'). 505 505 '</p>'. … … 512 512 { 513 513 echo 514 '<h 4 class="clear">'.__('Attachments').'</h4>';514 '<h3 class="clear">'.__('Attachments').'</h3>'; 515 515 foreach ($post_media as $f) 516 516 { … … 541 541 542 542 if (empty($post_media)) { 543 echo '<p class="form-note">'.__('No attachment.').'</p>';543 echo '<p>'.__('No attachment.').'</p>'; 544 544 } 545 545 echo '<p><a class="button" href="media.php?post_id='.$post_id.'">'.__('Add files to this page').'</a></p>'; -
plugins/simpleMenu/index.php
r1474 r1358 233 233 234 234 // All done successfully, return to menu items list 235 http::redirect($p_url.'&a mp;added=1');235 http::redirect($p_url.'&added=1'); 236 236 } else { 237 237 throw new Exception(__('Label and URL of menu item are mandatory.')); … … 268 268 269 269 // All done successfully, return to menu items list 270 http::redirect($p_url.'& amp;removed=1');270 http::redirect($p_url.'&removed=1'); 271 271 } else { 272 272 throw new Exception(__('No menu items selected.')); … … 302 302 303 303 // All done successfully, return to menu items list 304 http::redirect($p_url.'& amp;updated=1');304 http::redirect($p_url.'&updated=1'); 305 305 } 306 306 catch (Exception $e) { … … 339 339 340 340 // All done successfully, return to menu items list 341 http::redirect($p_url.'& amp;neworder=1');341 http::redirect($p_url.'&neworder=1'); 342 342 } 343 343 catch (Exception $e) { … … 402 402 case 1: 403 403 // Selection du type d'item 404 echo '<form id="additem" action="'.$p_url.'&a mp;add=2" method="post">';404 echo '<form id="additem" action="'.$p_url.'&add=2" method="post">'; 405 405 echo '<fieldset><legend>'.__('Select type').'</legend>'; 406 406 echo '<p class="field"><label for="item_type" class="classic">'.__('Type of item menu:').'</label>'.form::combo('item_type',$items_combo,'').'</p>'; … … 412 412 if ($items[$item_type][1]) { 413 413 // Choix à faire 414 echo '<form id="additem" action="'.$p_url.'&a mp;add=3" method="post">';414 echo '<form id="additem" action="'.$p_url.'&add=3" method="post">'; 415 415 echo '<fieldset><legend>'.$item_type_label.'</legend>'; 416 416 switch ($item_type) { … … 449 449 case 3: 450 450 // Libellé et description 451 echo '<form id="additem" action="'.$p_url.'&a mp;add=4" method="post">';451 echo '<form id="additem" action="'.$p_url.'&add=4" method="post">'; 452 452 echo '<fieldset><legend>'.$item_type_label.($item_select_label != '' ? ' ('.$item_select_label.')' : '').'</legend>'; 453 453 echo '<p class="field"><label for="item_label" class="classic required"><abbr title="'.__('Required field').'">*</abbr> '. … … 467 467 // Liste des items 468 468 if (!$step) { 469 echo '<form id="menuitemsappend" action="'.$p_url.'&a mp;add=1" method="post">';469 echo '<form id="menuitemsappend" action="'.$p_url.'&add=1" method="post">'; 470 470 echo '<p class="top-add">'.$core->formNonce().'<input class="button add" type="submit" name="appendaction" value="'.__('Add an item').'" /></p>'; 471 471 echo '</form>'; -
plugins/tags/_admin.php
r1471 r1454 229 229 if ($action == 'tags') 230 230 { 231 echo dcPage::breadcrumb( 232 array( 233 html::escapeHTML($core->blog->name) => '', 234 __('Entries') => 'posts.php', 235 '<span class="page-title">'.__('Add tags to entries').'</span>' => '' 236 )). 231 echo 232 '<h2 class="page-title">'.__('Add tags to entries').'</h2>'. 237 233 '<form action="'.$form_uri.'" method="post">'. 238 $hidden_fields->getEntries().239 234 '<div><label for="new_tags" class="area">'.__('Tags to add:').'</label> '. 240 235 form::textarea('new_tags',60,3). 241 236 '</div>'. 242 $hidden_fields ->getHidden().237 $hidden_fields. 243 238 $core->formNonce(). 244 239 form::hidden(array('action'),'tags'). … … 264 259 } 265 260 } 266 echo dcPage::breadcrumb( 267 array( 268 html::escapeHTML($core->blog->name) => '', 269 __('Entries') => 'posts.php', 270 '<span class="page-title">'.__('Remove selected tags from entries').'</span>' => '' 271 )); 261 262 echo '<h2 class="page-title">'.__('Remove selected tags from entries').'</h2>'; 272 263 273 264 if (empty($tags)) { -
plugins/tags/tag_posts.php
r1480 r1358 130 130 { 131 131 echo 132 '<div class="fieldset">'.133 132 '<form action="'.$this_url.'" method="post">'. 134 '< h3>'.__('Actions for this tag').'</h3>'.133 '<div class="fieldset"><h3>'.__('Actions for this tag').'</h3>'. 135 134 '<p><label for="new_tag_id">'.__('Edit tag name:').'</label>'. 136 135 form::field('new_tag_id',20,255,html::escapeHTML($tag)). … … 162 161 '<p class="col right"><label for="action" class="classic">'.__('Selected entries action:').'</label> '. 163 162 form::combo('action',$combo_action). 164 '<input type="submit" value="'.__(' OK').'" /></p>'.163 '<input type="submit" value="'.__('ok').'" /></p>'. 165 164 form::hidden('post_type',''). 166 165 form::hidden('redir',$p_url.'&m=tag_posts&tag='. -
plugins/userPref/index.php
r1474 r1358 82 82 return 83 83 '<tr class="line">'. 84 '<td scope="r ow"><label for="s_'.$id.'">'.sprintf($slabel,html::escapeHTML($id)).'</label></td>'.84 '<td scope="raw"><label for="s_'.$id.'">'.sprintf($slabel,html::escapeHTML($id)).'</label></td>'. 85 85 '<td>'.$field.'</td>'. 86 86 '<td>'.$s['type'].'</td>'. -
plugins/widgets/class.widgets.php
r1474 r1454 246 246 '<p><label for="'.$wfid.'">'.$s['title'].'</label> '. 247 247 form::textarea(array($iname,$wfid),30,5,html::escapeHTML($s['value']),'maximal'). 248 '</ p>';248 '</label></p>'; 249 249 break; 250 250 case 'check': -
plugins/widgets/index.php
r1483 r1454 197 197 echo 198 198 '<form id="listWidgets" action="'.$p_url.'" method="post" class="widgets">'. 199 '<h3>'.__('Available widgets').'</h3>'. 200 __('Move widgets from this list to one of the sidebars.'). 199 '<fieldset><legend>'.__('Available widgets').'</legend>'. 201 200 '<div id="widgets">'; 202 201 … … 206 205 '<div>'.form::hidden(array('w[void][0][id]'),html::escapeHTML($w->id())). 207 206 '<p class="widget-name">'.form::field(array('w[void][0][order]'),2,3,0,'hideControl').' '. 208 $w->name().($w->desc() != '' ? ' <span class="form-note"> '.__($w->desc()).'</span>' : '').'</p>'.207 $w->name().($w->desc() != '' ? ' <span class="form-note">('.__($w->desc()).')</span>' : '').'</p>'. 209 208 '<p class="js-remove"><label class="classic">'.__('Append to:').'</label> '. 210 209 form::combo(array('addw['.$w->id().']'),$append_combo).'</p>'. … … 216 215 echo 217 216 '</div>'. 217 '</fieldset>'. 218 218 '<p><input type="submit" class="js-remove" name="append" value="'.__('Add widgets to sidebars').'" />'. 219 219 $core->formNonce().'</p>'. … … 223 223 # Nav sidebar 224 224 echo 225 '<div id="sidebarNav" class="widgets fieldset">'.225 '<div id="sidebarNav" class="widgets">'. 226 226 sidebarWidgets('dndnav',__('Navigation sidebar'),$widgets_nav,'nav',$__default_widgets['nav'],$j). 227 227 '</div>'; … … 229 229 # Extra sidebar 230 230 echo 231 '<div id="sidebarExtra" class="widgets fieldset">'.231 '<div id="sidebarExtra" class="widgets">'. 232 232 sidebarWidgets('dndextra',__('Extra sidebar'),$widgets_extra,'extra',$__default_widgets['extra'],$j). 233 233 '</div>'; … … 235 235 # Custom sidebar 236 236 echo 237 '<div id="sidebarCustom" class="widgets fieldset">'.237 '<div id="sidebarCustom" class="widgets">'. 238 238 sidebarWidgets('dndcustom',__('Custom sidebar'),$widgets_custom,'custom',$__default_widgets['custom'],$j). 239 239 '</div>'; … … 316 316 function sidebarWidgets($id,$title,$widgets,$pr,$default_widgets,&$j) 317 317 { 318 $res = '< h3>'.$title.'</h3><div id="'.$id.'">';318 $res = '<fieldset><legend>'.$title.'</legend><div id="'.$id.'">'; 319 319 320 320 if (!($widgets instanceof dcWidgets)) … … 335 335 '<div>'.form::hidden(array($iname.'[id]'),html::escapeHTML($w->id())). 336 336 '<p class="widget-name">'.form::field(array($iname.'[order]'),2,3,(string) $i,'js-hide','',0,'title="'.__('order').'"').' '. 337 $w->name().($w->desc() != '' ? ' < !-- <span class="form-note">'.__($w->desc()).'</span> -->' : '').'</p>'.337 $w->name().($w->desc() != '' ? ' <span class="form-note">('.__($w->desc()).')</span>' : '').'</p>'. 338 338 '<p class="removeWidget js-remove"><label class="classic">'. 339 339 form::checkbox(array($iname.'[_rem]'),'1',0).' '.__('Remove widget'). … … 346 346 } 347 347 348 $res .= '</div> ';348 $res .= '</div></fieldset>'; 349 349 350 350 return $res; -
plugins/widgets/style.css
r1483 r1301 1 1 #listWidgets { 2 2 float: left; 3 width: 45%; 4 background: #eee; 5 padding: 1.5em 1%; 6 border: 1px solid #ccc; 7 margin-left: 1.5em; 8 } 9 #widgets .widget-name { 10 background: #fff; 11 min-height: 3em; 12 } 13 #listWidgets h3 { 14 color: #333; 3 width: 33%; 15 4 } 16 5 17 6 #sidebarsWidgets { 18 7 float: left; 19 width: 45%; 20 margin-left: 3%; 21 padding: 0 1%; 8 width: 65%; 9 margin-left: 1%; 22 10 } 11 #sidebarNav { 12 float: left; 13 width: 50%; 14 margin-left: 0%; 15 } 16 #sidebarExtra { 17 float: left; 18 width: 49%; 19 margin-left: 1%; 20 } 21 #sidebarCustom { 22 float: left; 23 width: 100%; 24 } 25 23 26 #sidebarsControl { 24 27 clear: left; 25 28 } 26 .widgets.fieldset {27 margin-bottom: 2em;28 }29 29 30 #widgets, #dndnav, #dndextra , #dndcustom{30 #widgets, #dndnav, #dndextra { 31 31 padding: 1em 0; 32 32 } 33 33 34 .widget-name { 35 background: #eef; 34 .widgets fieldset { 35 border: 1px solid #999; 36 } 37 .widgets legend { 38 border: 1px solid #999; 39 } 40 41 .widgets p.widget-name { 42 background: #F0EFEA; 36 43 color: #000; 37 padding: 4px 6px;44 padding: 4px; 38 45 margin: 0.5em 0 0 0; 39 46 border-width: 1px 1px 1px 1px; 40 47 border-style: solid; 41 border-color: # 999;48 border-color: #bbb; 42 49 font-weight: bold; 43 50 } 44 .widget-name span { 45 display: block; 46 font-style: normal; 47 font-size: 1.1rem; 48 } 49 .widget-name img { 51 .widgets p.widget-name img { 50 52 cursor: pointer; 51 53 margin-bottom: -1px; … … 56 58 border-style: solid; 57 59 border-color: #666; 58 padding: 4px 6px;59 background: # f5f5f5;60 padding: 4px; 61 background: #E5E3DA; 60 62 } 61 63
Note: See TracChangeset
for help on using the changeset viewer.