Changes in [1491:2b9253624dbe:1492:a7112dcc916c]
- Files:
-
- 3 added
- 42 edited
Legend:
- Unmodified
- Added
- Removed
-
.hgsubstate
r1385 r1486 1 4288bdc1f21d00f93331bbe098485727b276c1feinc/libs/clearbricks1 716e99c54652d08c2e4395d5179e817e0f98182d inc/libs/clearbricks -
CHANGELOG
r1216 r1350 1 Dotclear 2.5.2 - 2013-08-14 2 =========================================================== 3 * Security fix: Fixed potential XSS 4 * Bugfix: l10n Clearbricks library 5 * <tpl:LoopPosition> now works <tpl:Attachments> 6 * Dotclear update check may now be forced (ignoring cache) 7 * Enforce integration of daInstaller plugin 8 * Tags link button is now available on page editor 9 * Default cache age is now 1 week instead of 2 hours 10 * Quick entry dashboard module is not activated by default on new installation 11 * 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 deletion 13 * Fix order of backup files 14 * Minor enhancements 15 * Various bug fixes 16 * Various cosmetic adjustments 17 1 18 Dotclear 2.5.1 - 2013-07-20 2 19 =========================================================== -
Makefile
r1046 r1451 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 \{\} \; 71 72 find $(DC)/admin/js/tool-man/*.js -exec ./build-tools/min-js.php \{\} \; 72 73 find $(DC)/plugins -name '*.js' -exec ./build-tools/min-js.php \{\} \; -
admin/blog.php
r1399 r1482 79 79 '<form action="blog.php" method="post" id="blog-form">'. 80 80 81 $core->formNonce().81 '<div>'.$core->formNonce().'</div>'. 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
r1399 r1474 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
r1399 r1468 31 31 $mov_cat = $mov_cat ? $mov_cat : null; 32 32 if ($mov_cat !== null) { 33 $c = $core->blog->getCategory((integer) $_POST[' del_cat']);33 $c = $core->blog->getCategory((integer) $_POST['mov_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_id 153 ); 154 } 155 } 156 146 157 echo '<div class="col">'. 147 158 … … 149 160 '<h3>'.__('Add a new category').'</h3>'. 150 161 '<p><label class="required" for="cat_title"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:').'</label> '. 151 form::field('cat_title',30,255 ).'</p>'.162 form::field('cat_title',30,255,'','maximal').'</p>'. 152 163 '<p><label for="new_cat_parent">'.__('Parent:').'</label> '. 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>'. 164 form::combo('new_cat_parent',array_merge(array(__('(No cat)') => 0),$categories_combo),'','maximal'). 165 '</p>'. 162 166 '<p><input type="submit" value="'.__('Create').'" />'. 163 167 $core->formNonce().'</p>'. 168 164 169 '</form>'; 165 170 166 171 if (!$rs->isEmpty()) 167 172 { 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 187 173 echo 188 '<form action="categories.php" method="post" id="delete-category" class="border-top">'.174 '<form action="categories.php" method="post" id="delete-category">'. 189 175 '<h3>'.__('Remove a category').'</h3>'. 190 176 '<p><label for="del_cat">'.__('Choose a category to remove:').'</label> '. 191 form::combo('del_cat',$cat s).'</p> '.177 form::combo('del_cat',$categories_combo,'','maximal').'</p> '. 192 178 '<p><label for="mov_cat">'.__('And choose the category which will receive its entries:').'</label> '. 193 form::combo('mov_cat', $dest).'</p> '.179 form::combo('mov_cat',array_merge(array(__('(No cat)') => ''),$categories_combo),'','maximal').'</p> '. 194 180 '<p><input type="submit" value="'.__('Delete').'" class="delete" />'. 195 181 $core->formNonce().'</p>'. 182 196 183 '</form>'; 197 184 -
admin/comments.php
r1424 r1480 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="'.__(' action:').'"').263 form::combo('action',$combo_action,$default,'','','','title="'.__('Actions').'"'). 264 264 $core->formNonce(). 265 265 '<input type="submit" value="'.__('ok').'" /></p>'. -
admin/comments_actions.php
r1179 r1474 137 137 $core->callBehavior('adminCommentsActionsContent',$core,$action,$hidden_fields); 138 138 139 echo '<p><a class="back" href="'.str_replace('&','&',$redir).'">'.__(' back').'</a></p>';139 echo '<p><a class="back" href="'.str_replace('&','&',$redir).'">'.__('Back to comments list').'</a></p>'; 140 140 141 141 dcPage::close(); -
admin/js/_index.js
r1140 r1418 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 day 66 ); 63 67 } 64 68 -
admin/js/_post.js
r1490 r1492 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 day 120 ); 117 121 $('#post_lang').parent().toggleWithLegend($('#post_lang'),{ 118 122 cookie: 'dcx_post_lang' -
admin/js/_posts_actions.js
r1035 r1419 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 day 11 ); 8 12 }); -
admin/js/_users_actions.js
r935 r1449 1 1 jQuery.fn.updatePermissionsForm = function() { 2 2 return this.each(function() { 3 3 4 var perms = {}; 4 5 var re = /^perm\[(.+?)\]\[(.+?)\]$/; … … 12 13 continue; 13 14 } 15 var prop; 14 16 prop = e.name.match(re); 15 17 if (!prop) { … … 20 22 } 21 23 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); 29 } 30 $(e).click(function(){ 31 admin(this,perms,re); 32 }); 33 // select related permissions for content admin 34 } 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 admin 42 } 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 } 22 50 } 23 51 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(); }; 52 } 53 } 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; 54 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 55 90 }); 56 91 }; -
admin/plugins.php
r1399 r1474 236 236 237 237 if ($is_writable) { 238 echo __('To install or upgrade a plugin you generally just need to upload it '.238 echo '<p>'.__('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 __('To install or upgrade a plugin you just need to extract it in your plugins directory.');241 echo '<p>'.__('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
r1399 r1476 17 17 $params = array(); 18 18 19 /** 20 * FieldsList - Compatibility class for hidden fields & entries[] fields 21 * 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 constructor 32 */ 33 public function __construct() { 34 $this->hidden=array(); 35 $this->entries =array(); 36 } 37 38 /** 39 * addHidden - adds a hidden field 40 * 41 * @param string $name the field name. 42 * @param mixed $value the field value. 43 * 44 * @access public 45 * @return the FieldsList instance, enabling to chain requests 46 */ 47 public function addHidden($name,$value) { 48 $this->hidden[] = form::hidden($name,$value); 49 return $this; 50 } 51 52 /** 53 * addEntry - adds a antry field 54 * 55 * @param string $id the entry id. 56 * @param mixed $title the entry title. 57 * 58 * @access public 59 * @return the FieldsList instance, enabling to chain requests 60 */ 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 encoded 68 * 69 * @access public 70 * @return the list of hidden fields, html encoded 71 */ 72 public function getHidden() { 73 return join('',$this->hidden); 74 } 75 76 /** 77 * getEntries - returns the list of entry fields, html encoded 78 * 79 * @param boolean $hidden if set to true, returns entries as a list of hidden field 80 * if set to false, returns html code displaying the list of entries 81 * with a list of checkboxes to enable to select/deselect entries 82 * @access public 83 * @return the list of entry fields, html encoded 84 */ 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 string 109 * 110 * @access public 111 * @return the list of entry fields, html encoded 112 */ 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 here 123 * This method is only used to preserve compatibility with plugins 124 * relying on previous versions of adminPostsActionsContent behavior, 125 * 126 * @access public 127 * @return the list of hidden fields and entries (as hidden fields too), html encoded 128 */ 129 public function __toString() { 130 return join('',$this->hidden).$this->getEntries(true); 131 } 132 } 133 134 $fields = new FieldsList(); 135 19 136 /* Actions 20 137 -------------------------------------------------------- */ … … 62 179 while ($posts->fetch()) { 63 180 $posts_ids[] = $posts->post_id; 64 } 181 $fields->addEntry($posts->post_id,$posts->post_title); 182 } 183 // Redirection including selected entries 184 $redir_sel = $redir.'&'.$fields->getEntriesQS(); 65 185 66 186 # --BEHAVIOR-- adminPostsActions … … 80 200 $core->blog->updPostsStatus($posts_ids,$status); 81 201 82 http::redirect($redir );202 http::redirect($redir_sel.'&upd=1'); 83 203 } 84 204 catch (Exception $e) … … 93 213 $core->blog->updPostsSelected($posts_ids,$action == 'selected'); 94 214 95 http::redirect($redir );215 http::redirect($redir_sel."&upd=1"); 96 216 } 97 217 catch (Exception $e) … … 116 236 $core->blog->delPosts($posts_ids); 117 237 118 http::redirect($redir );238 http::redirect($redir."&del=1"); 119 239 } 120 240 catch (Exception $e) … … 126 246 elseif ($action == 'category' && isset($_POST['new_cat_id'])) 127 247 { 248 $new_cat_id = $_POST['new_cat_id']; 249 128 250 try 129 251 { 130 $core->blog->updPostsCategory($posts_ids,$_POST['new_cat_id']); 131 132 http::redirect($redir); 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"); 133 272 } 134 273 catch (Exception $e) … … 152 291 $cur->update('WHERE post_id '.$core->con->in($posts_ids)); 153 292 154 http::redirect($redir );293 http::redirect($redir_sel."&upd=1"); 155 294 } 156 295 catch (Exception $e) … … 168 307 $cur->update('WHERE post_id '.$core->con->in($posts_ids)); 169 308 170 http::redirect($redir );309 http::redirect($redir_sel."&upd=1"); 171 310 } 172 311 catch (Exception $e) … … 175 314 } 176 315 } 177 } 178 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 } 179 336 /* DISPLAY 180 337 -------------------------------------------------------- */ … … 211 368 } 212 369 213 $hidden_fields = '';214 while ($posts->fetch()) {215 $hidden_fields .= form::hidden(array('entries[]'),$posts->post_id);216 }217 218 370 if (isset($_POST['redir']) && strpos($_POST['redir'],'://') === false) 219 371 { 220 $ hidden_fields .= form::hidden(array('redir'),html::escapeURL($_POST['redir']));372 $fields->addHidden(array('redir'),html::escapeURL($_POST['redir'])); 221 373 } 222 374 else 223 375 { 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']); 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 ; 235 388 } 236 389 237 390 if (isset($_POST['post_type'])) { 238 $ hidden_fields .= form::hidden(array('post_type'),$_POST['post_type']);391 $fields->addHidden(array('post_type'),$_POST['post_type']); 239 392 } 240 393 241 394 # --BEHAVIOR-- adminPostsActionsContent 242 $core->callBehavior('adminPostsActionsContent',$core,$action,$ hidden_fields);395 $core->callBehavior('adminPostsActionsContent',$core,$action,$fields); 243 396 244 397 if ($action == 'category') 245 398 { 246 echo '<h2 class="page-title">'.__('Change category for entries').'</h2>'; 247 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 248 408 # categories list 249 409 # Getting categories 250 $categories_combo = array( ' '=> '');410 $categories_combo = array(__('(No cat)') => ''); 251 411 try { 252 412 $categories = $core->blog->getCategories(array('post_type'=>'post')); 413 if (!$categories->isEmpty()) { 253 414 while ($categories->fetch()) { 254 $categories_combo[] = new formSelectOption( 255 str_repeat(' ',$categories->level-1). 256 ($categories->level-1 == 0 ? '' : '• ').html::escapeHTML($categories->cat_title), 415 $catparents_combo[] = $categories_combo[] = new formSelectOption( 416 str_repeat(' ',$categories->level-1).($categories->level-1 == 0 ? '' : '• ').html::escapeHTML($categories->cat_title), 257 417 $categories->cat_id 258 418 ); 259 419 } 420 } 260 421 } catch (Exception $e) { } 261 422 262 423 echo 263 424 '<form action="posts_actions.php" method="post">'. 425 $fields->getEntries(). 264 426 '<p><label for="new_cat_id" class="classic">'.__('Category:').'</label> '. 265 427 form::combo('new_cat_id',$categories_combo,''); 266 428 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 267 441 echo 268 $ hidden_fields.442 $fields->getHidden(). 269 443 $core->formNonce(). 270 444 form::hidden(array('action'),'category'). … … 274 448 elseif ($action == 'lang') 275 449 { 276 echo '<h2 class="page-title">'.__('Change language for entries').'</h2>'; 277 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 278 458 # lang list 279 459 # Languages combo … … 294 474 echo 295 475 '<form action="posts_actions.php" method="post">'. 476 $fields->getEntries(). 477 296 478 '<p><label for="new_lang" class="classic">'.__('Entry lang:').'</label> '. 297 479 form::combo('new_lang',$lang_combo,''); 298 480 299 481 echo 300 $ hidden_fields.482 $fields->getHidden(). 301 483 $core->formNonce(). 302 484 form::hidden(array('action'),'lang'). … … 307 489 elseif ($action == 'author' && $core->auth->check('admin',$core->blog->id)) 308 490 { 309 echo '<h2 class="page-title">'.__('Change author for entries').'</h2>'; 310 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 311 499 echo 312 500 '<form action="posts_actions.php" method="post">'. 501 $fields->getEntries(). 313 502 '<p><label for="new_auth_id" class="classic">'.__('Author ID:').'</label> '. 314 503 form::field('new_auth_id',20,255); 315 504 316 505 echo 317 $ hidden_fields.506 $fields->getHidden(). 318 507 $core->formNonce(). 319 508 form::hidden(array('action'),'author'). … … 322 511 } 323 512 324 echo '<p><a class="back" href="'.html::escapeURL($redir).'">'.__('back').'</a></p>';325 326 513 dcPage::close(); 327 514 ?> -
admin/preferences.php
r1399 r1474 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". 346 359 dcPage::jsPageTabs($default_tab). 347 360 dcPage::jsConfirmClose('user-form'). … … 411 424 '</div>'. 412 425 '</div>'. 413 '<br class="clear" />'. //Opera sucks414 426 '</fieldset>'; 415 427 … … 420 432 '<legend>'.__('Change your password').'</legend>'. 421 433 422 '<p><label for="new_pwd">'.__('New password:').'</label>'. 423 form::password('new_pwd',20,255).'</p>'. 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>'. 424 442 425 '<p><label for="new_pwd_c">'.__('Confirm password:').'</label>'.443 '<p><label for="new_pwd_c">'.__('Confirm new password:').'</label>'. 426 444 form::password('new_pwd_c',20,255).'</p>'. 427 445 '</fieldset>'. … … 481 499 form::checkbox('user_ui_hide_std_favicon',1,$user_ui_hide_std_favicon).' '. 482 500 __('Do not use standard favicon').'</label></p>'. 483 '<p class="clear form-note info">'.__('This will be applied for all users').'</p>'; 501 '<p class="clear form-note info">'.__('This will be applied for all users'). 502 '<br class="clear" /></p>';//Opera sucks; 484 503 } 485 504 486 505 echo 487 '<br class="clear" />'. //Opera sucks488 506 '</fieldset>'; 489 507 … … 511 529 '<p><label for="user_dm_quickentry" class="classic">'. 512 530 form::checkbox('user_dm_quickentry',1,$user_dm_quickentry).' '. 513 __('Display quick entry form').'</label>< /p>'.514 515 '<br class="clear" />'. //Opera sucks 531 __('Display quick entry form').'</label><br class="clear" />'. //Opera sucks 532 '</p>'. 533 516 534 '</fieldset>'; 517 535 -
admin/style/default.css
r1490 r1492 420 420 #login-screen { 421 421 display: block; 422 width: 18em;422 width: 20em; 423 423 margin: 1.5em auto 0; 424 424 font-size: 1.4rem; … … 431 431 margin-left: 0; 432 432 } 433 #login-screen fieldset, #login-screen.fieldset {433 #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 }442 439 #login-screen input[type=text], #login-screen input[type=password], #login-screen input[type=submit] { 443 440 width: 100%; … … 448 445 } 449 446 #login-screen #issue strong {font-weight: normal;} 450 451 447 452 448 /* ------------------------------------------------------------------ dashboard */ … … 481 477 #icons a img { 482 478 padding: 2em; 483 background: #eee; 484 border-radius: 1.6rem; 485 box-shadow: 0 3px 3px 0 #ccc; 486 margin-bottom: .6rem; 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; 487 492 } 488 493 #icons a img:hover, #icons a:focus img { 489 background -color: #BBDB58;494 background: #BBDB58; 490 495 } 491 496 #icons a:focus span, #icons a:hover span { … … 501 506 #quick p.qinfo { 502 507 margin: -.7em -1em 1em; 503 background: # eef url(info.png) no-repeat .2em .2em;508 background: #f3f3ff url(info.png) no-repeat .2em .2em; 504 509 border: 1px solid #99f; 505 510 padding: .2em 1em .1em 24px; … … 541 546 } 542 547 548 #upg-notify { 549 } 550 #upg-notify ul { 551 padding-left: 15px; 552 } 553 #upg-notify li { 554 color: #fff; 555 } 543 556 /* ------------------------------------------------------------------ post */ 544 557 #entry-wrapper { … … 1201 1214 } 1202 1215 table.settings th, table.prefs th { 1203 background: # eef;1216 background: #f3f3ff; 1204 1217 } 1205 1218 table.settings th:first-child, table.prefs th:first-child { … … 1340 1353 } 1341 1354 p.form-note.info { 1342 background: #f5eaff url(info.png) no-repeat .3em . 2em;1355 background: #f5eaff url(info.png) no-repeat .3em .3em; 1343 1356 border: 1px solid #ddbaff; 1344 1357 } … … 1415 1428 a.submit { 1416 1429 display: inline-block; 1417 outline: none;1418 1430 cursor: pointer; 1419 1431 text-align: center; 1420 1432 text-decoration: none; 1421 1433 padding: .1em .5em; 1422 text-shadow: 0 1px 1px rgba(0,0,0,.3);1423 1434 border-radius: .2em; 1424 1435 margin-bottom: .1em; 1425 } 1436 font-size: 1.2rem; 1437 } 1426 1438 h4 a.button {font-weight: normal;} 1427 1439 … … 1431 1443 a.submit { 1432 1444 color: #fff; 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); 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 1437 1453 } 1438 1454 input[type=submit]:hover, … … 1442 1458 input[type=button]:focus, 1443 1459 a.submit:focus { 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;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); 1449 1465 } 1450 1466 /* suppression et reset */ … … 1457 1473 background: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#dfdfdf)); 1458 1474 background: -moz-linear-gradient(top, #f5f5f5, #dfdfdf); 1459 text-shadow: none;1475 text-shadow:1px 1px 0px #fff; 1460 1476 } 1461 1477 a.button:hover, … … 1467 1483 input[type=submit].reset:focus, 1468 1484 input[type=submit].delete:focus { 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');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; 1473 1489 } 1474 1490 a.delete, … … 1509 1525 font-size: 1.4rem; 1510 1526 } 1511 .button.add:hover, .button.add: focus {1527 .button.add:hover, .button.add:active, .button.add:focus { 1512 1528 background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #8cb82b), color-stop(1, #9dce2c) ); 1513 1529 background:-moz-linear-gradient( center top, #8cb82b 5%, #9dce2c 100% ); … … 1615 1631 border-color : #ccc; 1616 1632 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; 1617 1673 } 1618 1674 -
admin/style/jsToolBar/jsToolBar.css
r1399 r1475 82 82 display: block; 83 83 list-style: none; 84 margin: 0 0 0 -5px;84 margin: 0; 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;90 88 } 91 89 .jstSwitcher li { 92 90 display: inline; 93 91 margin: 0 0 0 5px; 94 padding: 2px 4px;92 padding: 2px 8px; 95 93 } 96 94 .jstSwitcher li.jstSwitcherCurrent { 97 95 color: #fff; 98 background: # 999;96 background: #575859; 99 97 border-radius: 0 0 2px 2px; 100 98 } -
admin/update.php
r1358 r1474 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 );29 $new_v = $updater->check(DC_VERSION, !empty($_GET['nocache'])); 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 ? dcPage::jsPageTabs($default_tab) : ''), 170 (!$step ? 171 dcPage::jsPageTabs($default_tab). 172 dcPage::jsLoad('js/_update.js') 173 : ''), 171 174 dcPage::breadcrumb( 172 175 array( … … 176 179 ); 177 180 181 if (!$core->error->flag()) { 182 if (!empty($_GET['nocache'])) { 183 dcPage::message(__('Manual checking of update done successfully.')); 184 } 185 } 186 178 187 if (!$step) 179 188 { … … 181 190 if (empty($new_v)) 182 191 { 183 echo '<p><strong>'.__('No newer Dotclear version available.').'</strong></p>'; 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>'; 184 197 } 185 198 else … … 187 200 echo 188 201 '<p class="static-msg">'.sprintf(__('Dotclear %s is available.'),$new_v). 189 ($version_info ? ' <a href="'.$version_info.'">('.__(' information about this version').')</a>' : '').202 ($version_info ? ' <a href="'.$version_info.'">('.__('Information about this version').')</a>' : ''). 190 203 '</p>'. 191 204 … … 233 246 '<p class="message">'. 234 247 __("Congratulations, you're one click away from the end of the update."). 235 ' <strong><a href="index.php?logout=1">'.__('Finish the update .').'</a></strong>'.248 ' <strong><a href="index.php?logout=1">'.__('Finish the update').'</a>.</strong>'. 236 249 '</p>'; 237 250 } -
admin/user.php
r1399 r1474 226 226 '<p><label for="user_firstname">'.__('First Name:').'</label> '. 227 227 form::field('user_firstname',20,255,html::escapeHTML($user_firstname)). 228 '</ label></p>'.229 230 '<p><label for="user_displayname">'.__('Display name:').' '.228 '</p>'. 229 230 '<p><label for="user_displayname">'.__('Display name:').'</label> '. 231 231 form::field('user_displayname',20,255,html::escapeHTML($user_displayname)). 232 232 '</p>'. -
admin/users.php
r1426 r1474 39 39 40 40 41 # 41 #?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').'</ p> '.136 form::field('nb',3,3,$nb_per_page).' '.__('users per page').'</label></p> '. 137 137 '</div>'. 138 138 '</div>'. -
admin/users_actions.php
r1399 r1477 255 255 256 256 echo 257 '<h2><a href="users.php">'.__('Users').'</a> › <span class="page-title">'.__('Permissions').'</span></h2>'.258 257 '<p>'.sprintf( 259 258 __('You are about to change permissions on the following blogs for users %s.'), -
inc/admin/lib.pager.php
r1415 r1476 42 42 $pager->html_next = $this->html_next; 43 43 $pager->var_page = 'page'; 44 44 $entries = array(); 45 if (isset($_REQUEST['entries'])) { 46 foreach ($_REQUEST['entries'] as $v) { 47 $entries[(integer)$v]=true; 48 } 49 } 45 50 $html_block = 46 51 '<table class="clear"><tr>'. … … 66 71 while ($this->rs->fetch()) 67 72 { 68 echo $this->postLine( );73 echo $this->postLine(isset($entries[$this->rs->post_id])); 69 74 } 70 75 … … 75 80 } 76 81 77 private function postLine( )82 private function postLine($checked) 78 83 { 79 84 if ($this->core->auth->check('categories',$this->core->blog->id)) { … … 87 92 html::escapeHTML($this->rs->cat_title)); 88 93 } else { 89 $cat_title = __(' None');94 $cat_title = __('(No cat)'); 90 95 } 91 96 … … 128 133 $res .= 129 134 '<td class="nowrap">'. 130 form::checkbox(array('entries[]'),$this->rs->post_id, '','','',!$this->rs->isEditable()).'</td>'.135 form::checkbox(array('entries[]'),$this->rs->post_id,$checked,'','',!$this->rs->isEditable()).'</td>'. 131 136 '<td class="maximal"><a href="'.$this->core->getPostAdminURL($this->rs->post_type,$this->rs->post_id).'">'. 132 137 html::escapeHTML($this->rs->post_title).'</a></td>'. -
inc/core/class.dc.blog.php
r1491 r1492 634 634 private function checkCategory($title,$url,$id=null) 635 635 { 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 } 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'; 644 643 645 644 $rs = $this->con->select($strReq); 646 645 647 if (!$rs->isEmpty()) { 648 throw new Exception(__('Category URL must be unique.')); 649 } 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; 650 687 } 651 688 … … 669 706 670 707 # Check if title or url are unique 671 $ this->checkCategory($cur->cat_title,$cur->cat_url,$id);708 $cur->cat_url = $this->checkCategory($cur->cat_title,$cur->cat_url,$id); 672 709 673 710 if ($cur->cat_desc !== null) { -
inc/core/class.dc.media.php
r1280 r1468 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) 32 33 33 34 /** … … 298 299 $f->media_thumb = array(); 299 300 $p = path::info($f->relname); 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'); 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'); 302 304 303 305 # Cleaner URLs … … 920 922 921 923 $p = path::info($file); 922 $thumb = sprintf($this->thumb_tp,$p['dirname'],$p['base'],'%s'); 924 $alpha = ($p['extension'] == 'png') || ($p['extension'] == 'PNG'); 925 $thumb = sprintf(($alpha ? $this->thumb_tp_alpha : $this->thumb_tp),$p['dirname'],$p['base'],'%s'); 923 926 924 927 try … … 939 942 $rate = ($s[0] < 100 ? 95 : ($s[0] < 600 ? 90 : 85)); 940 943 $img->resize($s[0],$s[0],$s[1]); 941 $img->output( 'jpeg',$thumb_file,$rate);944 $img->output(($alpha ? 'png' : 'jpeg'),$thumb_file,$rate); 942 945 $img->loadImage($file); 943 946 } … … 958 961 { 959 962 $p = path::info($file->relname); 960 $thumb_old = sprintf($this->thumb_tp,$p['dirname'],$p['base'],'%s'); 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'); 961 965 962 966 $p = path::info($newFile->relname); 963 $thumb_new = sprintf($this->thumb_tp,$p['dirname'],$p['base'],'%s'); 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'); 964 969 965 970 foreach ($this->thumb_sizes as $suffix => $s) { … … 974 979 { 975 980 $p = path::info($f); 976 $thumb = sprintf($this->thumb_tp,'',$p['base'],'%s'); 981 $alpha = ($p['extension'] == 'png') || ($p['extension'] == 'PNG'); 982 $thumb = sprintf(($alpha ? $this->thumb_tp_alpha : $this->thumb_tp),'',$p['base'],'%s'); 977 983 978 984 foreach ($this->thumb_sizes as $suffix => $s) { -
locales/en/main.po
r1425 r1468 2139 2139 msgstr "" 2140 2140 2141 msgid "Are you sure you want to delete this backup?" 2142 msgstr "" 2143 2141 2144 msgid "Zip file content" 2142 2145 msgstr "" … … 2787 2790 msgid "The following error was encountered while trying to read the database:" 2788 2791 msgstr "" 2792 2793 msgid "(No cat)" 2794 msgstr "(none)" -
locales/fr/main.po
r1454 r1484 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 %sn'est pas accessible en écriture."1040 msgstr "Le répertoire de cache <strong>%s</strong> 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 eblog</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 du 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 1195 1201 msgid "confirm removal" 1196 1202 msgstr "Confirmer la suppression" … … 1784 1790 1785 1791 msgid "If you want to change your email or password you must provide your current password." 1786 msgstr "Si vous voulez changer votre adresse email ou votre mot de passe, vous devez indiquer votre mot de passe ."1792 msgstr "Si vous voulez changer votre adresse email ou votre mot de passe, vous devez indiquer votre mot de passe actuel." 1787 1793 1788 1794 msgid "No favorite selected" … … 1820 1826 1821 1827 msgid "If you have changed this user email or password you must provide your current password to save these modifications." 1822 msgstr "Si vous voulez changer votre adresse email ou votre mot de passe, vous devez indiquer votre mot de passe ."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." 1823 1829 1824 1830 msgid "My options" … … 1994 2000 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>." 1995 2001 2002 msgid "Manual checking of update done successfully." 2003 msgstr "Vérification manuelle de mise à jour effectuée avec succès." 2004 1996 2005 msgid "No newer Dotclear version available." 1997 2006 msgstr "Aucune nouvelle version de Dotclear n'est disponible." 1998 2007 2008 msgid "Force checking update Dotclear" 2009 msgstr "Forcer la vérification de mise à jour de Dotclear" 2010 1999 2011 #, php-format 2000 2012 msgid "Dotclear %s is available." … … 2133 2145 #, fuzzy 2134 2146 msgid "Go to the content" 2135 msgstr " Voir ce billet sur le site"2147 msgstr "Aller au contenu" 2136 2148 2137 2149 #, fuzzy 2138 2150 msgid "Go to the menu" 2139 msgstr "Aller sur le site"2151 msgstr "Aller au menu" 2140 2152 2141 2153 msgid "Go to site" … … 2201 2213 2202 2214 msgid "Users with posts cannot be deleted." 2203 msgstr "Les utilisateurs ayant écrit des billets ne peuvent être effacées."2215 msgstr "Les utilisateurs ayant écrit des billets ne peuvent être supprimés." 2204 2216 2205 2217 #, php-format … … 2243 2255 msgstr "Êtes-vous certain de vouloir supprimer le thème \"%s\" ?" 2244 2256 2257 msgid "Are you sure you want to delete this backup?" 2258 msgstr "Êtes-vous certain de vouloir supprimer cette sauvegarde ?" 2259 2245 2260 msgid "Zip file content" 2246 2261 msgstr "Contenu du fichier zip" … … 2258 2273 msgstr "Vous avez des modifications non sauvegardées. Changer de format vous fera perdre ces modifications. Continuer ?" 2259 2274 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 2260 2278 msgid "Loading enhanced uploader, please wait." 2261 2279 msgstr "Chargement de l'interface avancée." … … 2506 2524 #, fuzzy 2507 2525 msgid "You are not allowed to reset categories order" 2508 msgstr "Vous n'êtes pas autorisé à supprimerdes catégories"2526 msgstr "Vous n'êtes pas autorisé à réinitialiser l'ordre des catégories" 2509 2527 2510 2528 msgid "Category URL must be unique." … … 3034 3052 msgstr "Filtrer la liste des commentaires et rétroliens" 3035 3053 3054 msgid "comments per page" 3055 msgstr "commentaires par page" 3056 3036 3057 msgid "Filter users list" 3037 3058 msgstr "Filtrer la liste des utilisateurs" … … 3060 3081 msgid "Add an introduction to the page." 3061 3082 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
r1396 r1483 42 42 43 43 msgid "blog settings" 44 msgstr " Réglages du blog"44 msgstr "paramètres 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 1168 1174 #, php-format 1169 1175 msgid "%d page" … … 1750 1756 1751 1757 msgid "Custom sidebar" 1752 msgstr " Bandeausupplémentaire"1758 msgstr "Volet supplémentaire" 1753 1759 1754 1760 msgid "Update sidebars" 1755 msgstr "Mettre à jour les bandeaux"1761 msgstr "Mettre à jour les volets" 1756 1762 1757 1763 msgid "Reset sidebars" 1758 msgstr "Réinitialiser les bandeaux"1764 msgstr "Réinitialiser les volets" 1759 1765 1760 1766 msgid "Use of widgets" … … 1928 1934 msgid "Edit theme files" 1929 1935 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
r1207 r1474 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 preferences').'</a>').61 sprintf(__('You can modify this duration in the %s'),'<a href="blog_pref.php#antispam_moderation_ttl"> '.__('Blog settings').'</a>'). 62 62 '</p>'; 63 63 } -
plugins/antispam/filters/class.dc.filter.iplookup.php
r1454 r1468 44 44 } 45 45 46 $match = array();47 48 46 $bls = $this->getServers(); 49 47 $bls = preg_split('/\s*,\s*/',$bls); 50 48 51 foreach ($bls as $bl) 52 { 49 foreach ($bls as $bl) { 53 50 if ($this->dnsblLookup($ip,$bl)) { 54 $match[] = $bl; 51 // Pass by reference $status to contain matching DNSBL 52 $status = $bl; 53 return true; 55 54 } 56 }57 58 if (!empty($match)) {59 $status = substr(implode(', ',$match),0,128);60 return true;61 55 } 62 56 } -
plugins/antispam/filters/class.dc.filter.linkslookup.php
r1179 r1366 64 64 private function getLinks($text) 65 65 { 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; 66 // href attribute on "a" tags is second match 67 preg_match_all('|<a.*?href="(http.*?)"|', $text, $parts); 68 69 return $parts[1]; 80 70 } 81 71 } -
plugins/antispam/index.php
r1423 r1474 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 preferences').'</a>').172 sprintf(__('You can modify this duration in the %s'),'<a href="blog_pref.php#antispam_moderation_ttl"> '.__('Blog settings').'</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 aw">'.$f->name.'</td>'.214 '<td class="nowrap" scope="row">'.$f->name.'</td>'. 215 215 '<td class="maximal">'.$f->description.'</td>'. 216 216 '<td class="status">'.$gui_link.'</td>'. -
plugins/attachments/_admin.php
r1398 r1468 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
r1179 r1442 16 16 /* Description*/ "Serve entries as simple web pages", 17 17 /* Author */ "Olivier Meunier", 18 /* Version */ '1. 2',18 /* Version */ '1.3', 19 19 array( 20 20 'permissions' => 'contentadmin,pages', … … 22 22 ) 23 23 ); 24 ?> -
plugins/pages/page.php
r1454 r1480 455 455 456 456 echo 457 '<p><label for="post_status" >'.__('Page status:').'</label> '.457 '<p><label for="post_status" class="ib">'.__('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" >'.__('Published on:').'</label>'.461 '<p><label for="post_dt" class="ib">'.__('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" >'.__('Text formating:').'</label>'.464 '<p><label for="post_format" class="ib">'.__('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" >'.__('Page lang:').'</label>'.495 '<p><label for="post_lang" class="ib">'.__('Page lang:').'</label>'. 496 496 form::combo('post_lang',$lang_combo,$post_lang).'</p>'. 497 497 498 '<p><label for="post_password" >'.__('Page password:').'</label>'.498 '<p><label for="post_password" class="ib">'.__('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 ">'.503 '<p><label for="post_url" >'.__('Basename:').'</label>'.502 '<div class="lockable ib">'. 503 '<p><label for="post_url" class="ib">'.__('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 3 class="clear">'.__('Attachments').'</h3>';514 '<h4 class="clear">'.__('Attachments').'</h4>'; 515 515 foreach ($post_media as $f) 516 516 { … … 541 541 542 542 if (empty($post_media)) { 543 echo '<p >'.__('No attachment.').'</p>';543 echo '<p class="form-note">'.__('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
r1358 r1474 233 233 234 234 // All done successfully, return to menu items list 235 http::redirect($p_url.'&a dded=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.'& 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.'& 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.'& 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 dd=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 dd=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 dd=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 dd=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
r1454 r1471 229 229 if ($action == 'tags') 230 230 { 231 echo 232 '<h2 class="page-title">'.__('Add tags to entries').'</h2>'. 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 )). 233 237 '<form action="'.$form_uri.'" method="post">'. 238 $hidden_fields->getEntries(). 234 239 '<div><label for="new_tags" class="area">'.__('Tags to add:').'</label> '. 235 240 form::textarea('new_tags',60,3). 236 241 '</div>'. 237 $hidden_fields .242 $hidden_fields->getHidden(). 238 243 $core->formNonce(). 239 244 form::hidden(array('action'),'tags'). … … 259 264 } 260 265 } 261 262 echo '<h2 class="page-title">'.__('Remove selected tags from entries').'</h2>'; 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 )); 263 272 264 273 if (empty($tags)) { -
plugins/tags/tag_posts.php
r1358 r1480 130 130 { 131 131 echo 132 '<div class="fieldset">'. 132 133 '<form action="'.$this_url.'" method="post">'. 133 '< div class="fieldset"><h3>'.__('Actions for this tag').'</h3>'.134 '<h3>'.__('Actions for this tag').'</h3>'. 134 135 '<p><label for="new_tag_id">'.__('Edit tag name:').'</label>'. 135 136 form::field('new_tag_id',20,255,html::escapeHTML($tag)). … … 161 162 '<p class="col right"><label for="action" class="classic">'.__('Selected entries action:').'</label> '. 162 163 form::combo('action',$combo_action). 163 '<input type="submit" value="'.__(' ok').'" /></p>'.164 '<input type="submit" value="'.__('OK').'" /></p>'. 164 165 form::hidden('post_type',''). 165 166 form::hidden('redir',$p_url.'&m=tag_posts&tag='. -
plugins/userPref/index.php
r1358 r1474 82 82 return 83 83 '<tr class="line">'. 84 '<td scope="r aw"><label for="s_'.$id.'">'.sprintf($slabel,html::escapeHTML($id)).'</label></td>'.84 '<td scope="row"><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
r1454 r1474 246 246 '<p><label for="'.$wfid.'">'.$s['title'].'</label> '. 247 247 form::textarea(array($iname,$wfid),30,5,html::escapeHTML($s['value']),'maximal'). 248 '</ label></p>';248 '</p>'; 249 249 break; 250 250 case 'check': -
plugins/widgets/index.php
r1454 r1483 197 197 echo 198 198 '<form id="listWidgets" action="'.$p_url.'" method="post" class="widgets">'. 199 '<fieldset><legend>'.__('Available widgets').'</legend>'. 199 '<h3>'.__('Available widgets').'</h3>'. 200 __('Move widgets from this list to one of the sidebars.'). 200 201 '<div id="widgets">'; 201 202 … … 205 206 '<div>'.form::hidden(array('w[void][0][id]'),html::escapeHTML($w->id())). 206 207 '<p class="widget-name">'.form::field(array('w[void][0][order]'),2,3,0,'hideControl').' '. 207 $w->name().($w->desc() != '' ? ' <span class="form-note"> ('.__($w->desc()).')</span>' : '').'</p>'.208 $w->name().($w->desc() != '' ? ' <span class="form-note">'.__($w->desc()).'</span>' : '').'</p>'. 208 209 '<p class="js-remove"><label class="classic">'.__('Append to:').'</label> '. 209 210 form::combo(array('addw['.$w->id().']'),$append_combo).'</p>'. … … 215 216 echo 216 217 '</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 ">'.225 '<div id="sidebarNav" class="widgets fieldset">'. 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 ">'.231 '<div id="sidebarExtra" class="widgets fieldset">'. 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 ">'.237 '<div id="sidebarCustom" class="widgets fieldset">'. 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 = '< fieldset><legend>'.$title.'</legend><div id="'.$id.'">';318 $res = '<h3>'.$title.'</h3><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> </fieldset>';348 $res .= '</div>'; 349 349 350 350 return $res; -
plugins/widgets/style.css
r1301 r1483 1 1 #listWidgets { 2 2 float: left; 3 width: 33%; 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; 4 15 } 5 16 6 17 #sidebarsWidgets { 7 18 float: left; 8 width: 65%; 9 margin-left: 1%; 19 width: 45%; 20 margin-left: 3%; 21 padding: 0 1%; 10 22 } 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 26 23 #sidebarsControl { 27 24 clear: left; 28 25 } 26 .widgets.fieldset { 27 margin-bottom: 2em; 28 } 29 29 30 #widgets, #dndnav, #dndextra {30 #widgets, #dndnav, #dndextra, #dndcustom { 31 31 padding: 1em 0; 32 32 } 33 33 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; 34 .widget-name { 35 background: #eef; 43 36 color: #000; 44 padding: 4px ;37 padding: 4px 6px; 45 38 margin: 0.5em 0 0 0; 46 39 border-width: 1px 1px 1px 1px; 47 40 border-style: solid; 48 border-color: # bbb;41 border-color: #999; 49 42 font-weight: bold; 50 43 } 51 .widgets p.widget-name img { 44 .widget-name span { 45 display: block; 46 font-style: normal; 47 font-size: 1.1rem; 48 } 49 .widget-name img { 52 50 cursor: pointer; 53 51 margin-bottom: -1px; … … 58 56 border-style: solid; 59 57 border-color: #666; 60 padding: 4px ;61 background: # E5E3DA;58 padding: 4px 6px; 59 background: #f5f5f5; 62 60 } 63 61
Note: See TracChangeset
for help on using the changeset viewer.