Changeset 1468:3132a0aca046
- Timestamp:
- 08/19/13 09:55:29 (11 years ago)
- Branch:
- default
- Parents:
- 1466:e67efe636ce1 (diff), 1467:917fc08f3a59 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Files:
-
- 36 edited
Legend:
- Unmodified
- Added
- Removed
-
.hgtags
r1351 r1468 12 12 6fce226121140735a51a8f447c80f1dacd2974ea 2.4.4 13 13 514d5121a12586b7ff320924d44028b677a01020 2.4.4 14 baf879af43beea9764d920c2facd7226e90c5cf3 2.5.115 cfad9f2a9f6ec03206ff5db91985208e833a7528 2.5.2 -
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/categories.php
r1421 r1468 73 73 dcPage::open(__('Categories'), 74 74 dcPage::jsToolMan()."\n". 75 dcPage::jsLoad('js/_categories.js') 75 dcPage::jsLoad('js/_categories.js'), 76 dcPage::breadcrumb( 77 array( 78 html::escapeHTML($core->blog->name) => '', 79 '<span class="page-title">'.__('Categories').'</span>' => '' 80 )) 76 81 ); 77 82 … … 88 93 dcPage::message(__('The category has been successfully moved.')); 89 94 } 90 91 echo '<h2>'.html::escapeHTML($core->blog->name).' › <span class="page-title">'.__('Categories').'</span></h2>';92 95 93 96 $rs = $core->blog->getCategories(array('post_type'=>'post')); … … 155 158 156 159 '<form action="category.php" method="post">'. 157 '< fieldset><legend>'.__('Add a new category').'</legend>'.158 '<p><label class="required" for="cat_title"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:').' '.159 form::field('cat_title',30,255,'','maximal').'</ label></p>'.160 '<p><label for="new_cat_parent">'.__('Parent:').' '.160 '<h3>'.__('Add a new category').'</h3>'. 161 '<p><label class="required" for="cat_title"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:').'</label> '. 162 form::field('cat_title',30,255,'','maximal').'</p>'. 163 '<p><label for="new_cat_parent">'.__('Parent:').'</label> '. 161 164 form::combo('new_cat_parent',array_merge(array(__('(No cat)') => 0),$categories_combo),'','maximal'). 162 '</ label></p>'.163 '<p><input type="submit" value="'.__('Create').'" /> </p>'.164 $core->formNonce(). 165 '</fieldset>'. 165 '</p>'. 166 '<p><input type="submit" value="'.__('Create').'" />'. 167 $core->formNonce().'</p>'. 168 166 169 '</form>'; 167 170 … … 170 173 echo 171 174 '<form action="categories.php" method="post" id="delete-category">'. 172 '< fieldset><legend>'.__('Remove a category').'</legend>'.173 '<p><label for="del_cat">'.__('Choose a category to remove:').' '.174 form::combo('del_cat',$categories_combo,'','maximal').'</ label></p> '.175 '<p><label for="mov_cat">'.__('And choose the category which will receive its entries:').' '.176 form::combo('mov_cat',array_merge(array(__('(No cat)') => ''),$categories_combo),'','maximal').'</ label></p> '.177 '<p><input type="submit" value="'.__('Delete').'" class="delete" /> </p>'.178 $core->formNonce(). 179 '</fieldset>'. 175 '<h3>'.__('Remove a category').'</h3>'. 176 '<p><label for="del_cat">'.__('Choose a category to remove:').'</label> '. 177 form::combo('del_cat',$categories_combo,'','maximal').'</p> '. 178 '<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> '. 180 '<p><input type="submit" value="'.__('Delete').'" class="delete" />'. 181 $core->formNonce().'</p>'. 182 180 183 '</form>'; 181 184 182 185 echo 183 '<form action="categories.php" method="post" id="reset-order" >'.184 '< fieldset><legend>'.__('Reorder categories').'</legend>'.186 '<form action="categories.php" method="post" id="reset-order" class="border-top">'. 187 '<h3>'.__('Reorder categories').'</h3>'. 185 188 '<p>'.__('This will relocate all categories on the top level').'</p> '. 186 '<p><input type="submit" value="'.__('Reorder').'" /> </p>'.189 '<p><input type="submit" value="'.__('Reorder').'" />'. 187 190 form::hidden(array('reset'),1). 188 $core->formNonce(). 189 '</fieldset>'. 191 $core->formNonce().'</p>'. 190 192 '</form>'; 191 193 } -
admin/index.php
r1422 r1468 59 59 if (!$core->auth->user_prefs->dashboard->prefExists('quickentry')) { 60 60 if (!$core->auth->user_prefs->dashboard->prefExists('quickentry',true)) { 61 $core->auth->user_prefs->dashboard->put('quickentry', true,'boolean','',null,true);62 } 63 $core->auth->user_prefs->dashboard->put('quickentry', true,'boolean');61 $core->auth->user_prefs->dashboard->put('quickentry',false,'boolean','',null,true); 62 } 63 $core->auth->user_prefs->dashboard->put('quickentry',false,'boolean'); 64 64 } 65 65 … … 309 309 if ($core->auth->check('usage,contentadmin',$core->blog->id)) 310 310 { 311 $categories_combo = array(' ' => ''); 311 # Getting categories 312 $categories_combo = array(__('(No cat)') => ''); 312 313 try { 313 314 $categories = $core->blog->getCategories(array('post_type'=>'post')); 314 while ($categories->fetch()) { 315 $categories_combo[] = new formSelectOption( 316 str_repeat(' ',$categories->level-1). 317 ($categories->level-1 == 0 ? '' : '• ').html::escapeHTML($categories->cat_title), 318 $categories->cat_id 319 ); 315 if (!$categories->isEmpty()) { 316 while ($categories->fetch()) { 317 $catparents_combo[] = $categories_combo[] = new formSelectOption( 318 str_repeat(' ',$categories->level-1).($categories->level-1 == 0 ? '' : '• ').html::escapeHTML($categories->cat_title), 319 $categories->cat_id 320 ); 321 } 320 322 } 321 323 } catch (Exception $e) { } … … 333 335 form::textarea('post_content',50,7). 334 336 '</p>'. 335 '<p><label for="cat_id" class="classic">'.__('Category:').'</label> '. 336 form::combo('cat_id',$categories_combo).'</p>'. 337 '<p><label for="cat_id" class="classic">'.__('Category:').' '. 338 form::combo('cat_id',$categories_combo).'</label></p>'. 339 ($core->auth->check('categories', $core->blog->id) 340 ? '<div>'. 341 '<p id="new_cat">'.__('Add a new category').'</p>'. 342 '<p><label for="new_cat_title">'.__('Title:').' '. 343 form::field('new_cat_title',30,255,'','maximal').'</label></p>'. 344 '<p><label for="new_cat_parent">'.__('Parent:').' '. 345 form::combo('new_cat_parent',$categories_combo,'','maximal'). 346 '</label></p>'. 347 '</div>' 348 : ''). 337 349 '<p><input type="submit" value="'.__('Save').'" name="save" /> '. 338 350 ($core->auth->check('publish',$core->blog->id) -
admin/index.php
r1421 r1468 121 121 $__dashboard_items = new ArrayObject(array(new ArrayObject,new ArrayObject)); 122 122 123 # Documentation links124 123 $dashboardItem = 0; 125 if ($core->auth->user_prefs->dashboard->doclinks) {126 if (!empty($__resources['doc']))127 {128 $doc_links = '<h3>'.__('Documentation and support').'</h3><ul>';129 130 foreach ($__resources['doc'] as $k => $v) {131 $doc_links .= '<li><a href="'.$v.'" title="'.$k.' '.__('(external link)').'">'.$k.'</a></li>';132 }133 134 $doc_links .= '</ul>';135 $__dashboard_items[$dashboardItem][] = $doc_links;136 $dashboardItem++;137 }138 }139 124 140 125 if ($core->auth->user_prefs->dashboard->dcnews) { … … 180 165 } 181 166 167 # Documentation links 168 if ($core->auth->user_prefs->dashboard->doclinks) { 169 if (!empty($__resources['doc'])) 170 { 171 $doc_links = '<h3>'.__('Documentation and support').'</h3><ul>'; 172 173 foreach ($__resources['doc'] as $k => $v) { 174 $doc_links .= '<li><a href="'.$v.'" title="'.$k.' '.__('(external link)').'">'.$k.'</a></li>'; 175 } 176 177 $doc_links .= '</ul>'; 178 $__dashboard_items[$dashboardItem][] = $doc_links; 179 $dashboardItem++; 180 } 181 } 182 182 183 $core->callBehavior('adminDashboardItems', $core, $__dashboard_items); 183 184 … … 193 194 dcPage::jsLoad('js/_index.js'). 194 195 # --BEHAVIOR-- adminDashboardHeaders 195 $core->callBehavior('adminDashboardHeaders') 196 $core->callBehavior('adminDashboardHeaders'), 197 dcPage::breadcrumb( 198 array( 199 '<span class="page-title">'.__('Dashboard').' : '.html::escapeHTML($core->blog->name).'</span>' => '' 200 ), 201 false) 196 202 ); 197 203 198 echo '<h2>'.html::escapeHTML($core->blog->name).' › <span class="page-title">'.__('Dashboard').'</span></h2>'; 204 # Dotclear updates notifications 205 if ($core->auth->isSuperAdmin() && is_readable(DC_DIGESTS)) 206 { 207 $updater = new dcUpdate(DC_UPDATE_URL,'dotclear',DC_UPDATE_VERSION,DC_TPL_CACHE.'/versions'); 208 $new_v = $updater->check(DC_VERSION); 209 $version_info = $new_v ? $updater->getInfoURL() : ''; 210 211 if ($updater->getNotify() && $new_v) { 212 $message = 213 '<div><p>'.sprintf(__('Dotclear %s is available!'),$new_v).'</p> '. 214 '<ul><li><strong><a href="update.php">'.sprintf(__('Upgrade now'),$new_v).'</a></strong>'. 215 '</li><li><a href="update.php?hide_msg=1">'.__('Remind me later').'</a>'. 216 ($version_info ? ' </li><li><a href="'.$version_info.'">'.__('information about this version').'</a>' : ''). 217 '</li></ul></div>'; 218 dcPage::message($message,false,true); 219 } 220 } 199 221 200 222 if ($core->auth->getInfo('user_default_blog') != $core->blog->id && $core->auth->blog_count > 1) { … … 246 268 $dashboardItems = ''; 247 269 248 # Dotclear updates notifications249 if ($core->auth->isSuperAdmin() && is_readable(DC_DIGESTS))250 {251 $updater = new dcUpdate(DC_UPDATE_URL,'dotclear',DC_UPDATE_VERSION,DC_TPL_CACHE.'/versions');252 $new_v = $updater->check(DC_VERSION);253 $version_info = $new_v ? $updater->getInfoURL() : '';254 255 if ($updater->getNotify() && $new_v) {256 $dashboardItems .=257 '<div id="upg-notify" class="static-msg"><p>'.sprintf(__('Dotclear %s is available!'),$new_v).'</p> '.258 '<ul><li><strong><a href="update.php">'.sprintf(__('Upgrade now'),$new_v).'</a></strong>'.259 '</li><li><a href="update.php?hide_msg=1">'.__('Remind me later').'</a>'.260 ($version_info ? ' </li><li><a href="'.$version_info.'">'.__('information about this version').'</a>' : '').261 '</li></ul></div>';262 }263 }264 265 270 # Errors modules notifications 266 271 if ($core->auth->isSuperAdmin()) … … 283 288 if ($i->count() > 0) 284 289 { 285 $dashboardItems .= '<div >';290 $dashboardItems .= '<div class="db-item">'; 286 291 foreach ($i as $v) { 287 292 $dashboardItems .= $v; … … 317 322 } 318 323 } catch (Exception $e) { } 319 324 320 325 echo 321 326 '<div id="quick">'. … … 323 328 '<form id="quick-entry" action="post.php" method="post">'. 324 329 '<fieldset><legend>'.__('New entry').'</legend>'. 325 '<p class="col"><label for="post_title" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:'). 330 '<p class="col"><label for="post_title" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:').'</label>'. 326 331 form::field('post_title',20,255,'','maximal'). 327 '</ label></p>'.332 '</p>'. 328 333 '<p class="area"><label class="required" '. 329 334 'for="post_content"><abbr title="'.__('Required field').'">*</abbr> '.__('Content:').'</label> '. -
admin/js/_post.js
r1392 r1468 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/_post.js
r1417 r1468 79 79 // Get document format and prepare toolbars 80 80 var formatField = $('#post_format').get(0); 81 var last_post_format = $(formatField).val();82 81 $(formatField).change(function() { 83 // Confirm post format change 84 if(window.confirm(dotclear.msg.confirm_change_post_format_noconvert)){ 85 excerptTb.switchMode(this.value); 86 contentTb.switchMode(this.value); 87 last_post_format = $(this).val(); 88 }else{ 89 // Restore last format if change cancelled 90 $(this).val(last_post_format); 91 } 82 excerptTb.switchMode(this.value); 83 contentTb.switchMode(this.value); 92 84 }); 93 85 … … 134 126 hide: $('#post_password').val() == '' 135 127 }); 136 128 $('#post_status').parent().toggleWithLegend($('#post_status'),{ 129 cookie: 'dcx_post_status' 130 }); 131 $('#post_dt').parent().toggleWithLegend($('#post_dt').parent().children().not('label'),{ 132 cookie: 'dcx_post_dt' 133 }); 134 $('#post_format').parent().toggleWithLegend($('#post_format').parent().children().not('label').add($('#post_format').parents('p').next()),{ 135 cookie: 'dcx_post_format' 136 }); 137 $('#cat_id').parent().toggleWithLegend($('#cat_id'),{ 138 cookie: 'cat_id' 139 }); 140 $('#post_url').parent().toggleWithLegend($('#post_url').parent().children().not('label'),{ 141 cookie: 'post_url' 142 }); 137 143 // We load toolbar on excerpt only when it's ready 138 144 $('#excerpt-area label').toggleWithLegend($('#excerpt-area').children().not('label'),{ … … 161 167 var a = document.createElement('a'); 162 168 a.href = '#'; 169 a.className = 'button'; 163 170 $(a).click(function() { 164 171 var params = { -
admin/post.php
r1460 r1468 218 218 if (!empty($_POST) && !empty($_POST['save']) && $can_edit_post && !$bad_dt) 219 219 { 220 # Create category 221 if (!empty($_POST['new_cat_title']) && $core->auth->check('categories', $core->blog->id)) { 222 223 $cur_cat = $core->con->openCursor($core->prefix.'category'); 224 $cur_cat->cat_title = $_POST['new_cat_title']; 225 $cur_cat->cat_url = ''; 226 227 $parent_cat = !empty($_POST['new_cat_parent']) ? $_POST['new_cat_parent'] : ''; 228 229 # --BEHAVIOR-- adminBeforeCategoryCreate 230 $core->callBehavior('adminBeforeCategoryCreate', $cur_cat); 231 232 $cat_id = $core->blog->addCategory($cur_cat, (integer) $parent_cat); 233 234 # --BEHAVIOR-- adminAfterCategoryCreate 235 $core->callBehavior('adminAfterCategoryCreate', $cur_cat, $cat_id); 236 } 237 220 238 $cur = $core->con->openCursor($core->prefix.'post'); 221 239 … … 283 301 } 284 302 } 303 304 # Getting categories 305 $categories_combo = array(__('(No cat)') => ''); 306 try { 307 $categories = $core->blog->getCategories(array('post_type'=>'post')); 308 if (!$categories->isEmpty()) { 309 while ($categories->fetch()) { 310 $catparents_combo[] = $categories_combo[] = new formSelectOption( 311 str_repeat(' ',$categories->level-1).($categories->level-1 == 0 ? '' : '• ').html::escapeHTML($categories->cat_title), 312 $categories->cat_id 313 ); 314 } 315 } 316 } catch (Exception $e) { } 285 317 286 318 /* DISPLAY … … 423 455 '<p><label for="cat_id" class="ib">'.__('Category').'</label>'. 424 456 form::combo('cat_id',$categories_combo,$cat_id,'maximal'). 425 '</p>')), 457 '</p>'. 458 ($core->auth->check('categories', $core->blog->id) ? 459 '<div>'. 460 '<p id="new_cat">'.__('Add a new category').'</p>'. 461 '<p><label for="new_cat_title">'.__('Title:').' '. 462 form::field('new_cat_title',30,255,'','maximal').'</label></p>'. 463 '<p><label for="new_cat_parent">'.__('Parent:').' '. 464 form::combo('new_cat_parent',$categories_combo,'','maximal'). 465 '</label></p>'. 466 '</div>' 467 : ''))), 426 468 'options-box' => array( 427 469 'title' => __('Options'), -
admin/post.php
r1421 r1468 50 50 } 51 51 52 # Getting categories 53 $categories_combo = array(' ' => ''); 54 try { 55 $categories = $core->blog->getCategories(array('post_type'=>'post')); 56 while ($categories->fetch()) { 57 $categories_combo[] = new formSelectOption( 58 str_repeat(' ',$categories->level-1).($categories->level-1 == 0 ? '' : '• ').html::escapeHTML($categories->cat_title), 59 $categories->cat_id 60 ); 61 } 62 } catch (Exception $e) { } 63 52 64 # Status combo 53 65 foreach ($core->blog->getAllPostStatus() as $k => $v) { … … 82 94 if (!empty($_REQUEST['id'])) 83 95 { 96 $page_title = __('Edit entry'); 97 84 98 $params['post_id'] = $_REQUEST['id']; 85 99 … … 111 125 $post_open_tb = (boolean) $post->post_open_tb; 112 126 113 $page_title = __('Edit entry');114 115 127 $can_edit_post = $post->isEditable(); 116 128 $can_delete= $post->isDeletable(); … … 121 133 if ($next_rs !== null) { 122 134 $next_link = sprintf($post_link,$next_rs->post_id, 123 html::escapeHTML($next_rs->post_title),__(' next entry').' »');135 html::escapeHTML($next_rs->post_title),__('Next entry').' »'); 124 136 $next_headlink = sprintf($post_headlink,'next', 125 137 html::escapeHTML($next_rs->post_title),$next_rs->post_id); … … 128 140 if ($prev_rs !== null) { 129 141 $prev_link = sprintf($post_link,$prev_rs->post_id, 130 html::escapeHTML($prev_rs->post_title),'« '.__(' previous entry'));142 html::escapeHTML($prev_rs->post_title),'« '.__('Previous entry')); 131 143 $prev_headlink = sprintf($post_headlink,'previous', 132 144 html::escapeHTML($prev_rs->post_title),$prev_rs->post_id); … … 314 326 } 315 327 328 if ($post_id) { 329 switch ($post_status) { 330 case 1: 331 $img_status = sprintf($img_status_pattern,__('Published'),'check-on.png'); 332 break; 333 case 0: 334 $img_status = sprintf($img_status_pattern,__('Unpublished'),'check-off.png'); 335 break; 336 case -1: 337 $img_status = sprintf($img_status_pattern,__('Scheduled'),'scheduled.png'); 338 break; 339 case -2: 340 $img_status = sprintf($img_status_pattern,__('Pending'),'check-wrn.png'); 341 break; 342 default: 343 $img_status = ''; 344 } 345 $edit_entry_str = __('“%s”'); 346 $page_title_edit = sprintf($edit_entry_str, html::escapeHTML($post_title)).' '.$img_status; 347 } else { 348 $img_status = ''; 349 } 350 351 316 352 dcPage::open($page_title.' - '.__('Entries'), 317 353 dcPage::jsDatePicker(). … … 324 360 $core->callBehavior('adminPostHeaders'). 325 361 dcPage::jsPageTabs($default_tab). 326 $next_headlink."\n".$prev_headlink 362 $next_headlink."\n".$prev_headlink, 363 dcPage::breadcrumb( 364 array( 365 html::escapeHTML($core->blog->name) => '', 366 __('Entries') => 'posts.php', 367 '<span class="page-title">'.($post_id ? $page_title_edit : $page_title).'</span>' => '' 368 )) 327 369 ); 328 370 … … 354 396 } 355 397 356 echo '<h2>'.html::escapeHTML($core->blog->name).' › '.'<a href="posts.php">'.__('Entries').'</a> › <span class="page-title">';357 if ($post_id) {358 switch ($post_status) {359 case 1:360 $img_status = sprintf($img_status_pattern,__('published'),'check-on.png');361 break;362 case 0:363 $img_status = sprintf($img_status_pattern,__('unpublished'),'check-off.png');364 break;365 case -1:366 $img_status = sprintf($img_status_pattern,__('scheduled'),'scheduled.png');367 break;368 case -2:369 $img_status = sprintf($img_status_pattern,__('pending'),'check-wrn.png');370 break;371 default:372 $img_status = '';373 }374 $edit_entry_str = __('Edit entry “%s”');375 echo sprintf($edit_entry_str, html::escapeHTML($post_title)).' '.$img_status;376 } else {377 echo $page_title;378 }379 echo '</span></h2>';380 381 398 if ($post_id && $post->post_status == 1) { 382 echo '<p><a href="'.$post->getURL().'" onclick="window.open(this.href);return false;" title="'.$post_title.' ('.__('new window').')'.'">'.__('Go to this entry on the site').' <img src="images/outgoing-blue.png" alt="" /></a></p>';399 echo '<p><a class="onblog_link" href="'.$post->getURL().'" onclick="window.open(this.href);return false;" title="'.$post_title.' ('.__('new window').')'.'">'.__('Go to this entry on the site').' <img src="images/outgoing-blue.png" alt="" /></a></p>'; 383 400 } 384 401 if ($post_id) 385 402 { 386 echo '<p >';403 echo '<p class="nav_prevnext">'; 387 404 if ($prev_link) { echo $prev_link; } 388 if ($next_link && $prev_link) { echo ' -'; }405 if ($next_link && $prev_link) { echo ' | '; } 389 406 if ($next_link) { echo $next_link; } 390 407 … … 401 418 exit; 402 419 } 403 404 420 /* Post form if we can edit post 405 421 -------------------------------------------------------- */ 406 422 if ($can_edit_post) 407 423 { 408 echo '<div class="multi-part" title="'.__('Edit entry').'" id="edit-entry">'; 424 $sidebar_items = new ArrayObject(array( 425 'status-box' => array( 426 'title' => __('Status'), 427 'items' => array( 428 'post_status' => 429 '<p class="entry-status"><label for="post_status" class="ib">'.__('Entry status').' '.$img_status.'</label>'. 430 form::combo('post_status',$status_combo,$post_status,'maximal','',!$can_publish). 431 '</p>', 432 'post_dt' => 433 '<p><label for="post_dt" class="ib">'.__('Publication date and hour').'</label>'. 434 form::field('post_dt',16,16,$post_dt,($bad_dt ? 'invalid' : '')). 435 '</p>', 436 'post_lang' => 437 '<p><label for="post_lang" class="ib">'.__('Entry lang').'</label>'. 438 form::combo('post_lang',$lang_combo,$post_lang). 439 '</p>', 440 'post_format' => 441 '<p><label for="post_format" class="ib">'.__('Text formating').'</label>'. 442 form::combo('post_format',$formaters_combo,$post_format,'maximal'). 443 '</p>'. 444 '<p>'.($post_id && $post_format != 'xhtml' ? 445 '<a id="convert-xhtml" class="button maximal" href="post.php?id='.$post_id.'&xconv=1">'. 446 __('Convert to XHTML').'</a>' : '').'</p>')), 447 'metas-box' => array( 448 'title' => __('Ordering'), 449 'items' => array( 450 'post_selected' => 451 '<p><label for="post_selected" class="classic">'. 452 form::checkbox('post_selected',1,$post_selected).' '. 453 __('Selected entry').'</label></p>', 454 'cat_id' => 455 '<p><label for="cat_id" class="ib">'.__('Category').'</label>'. 456 form::combo('cat_id',$categories_combo,$cat_id,'maximal'). 457 '</p>'. 458 ($core->auth->check('categories', $core->blog->id) ? 459 '<div>'. 460 '<p id="new_cat">'.__('Add a new category').'</p>'. 461 '<p><label for="new_cat_title">'.__('Title:').' '. 462 form::field('new_cat_title',30,255,'','maximal').'</label></p>'. 463 '<p><label for="new_cat_parent">'.__('Parent:').' '. 464 form::combo('new_cat_parent',$categories_combo,'','maximal'). 465 '</label></p>'. 466 '</div>' 467 : ''))), 468 'options-box' => array( 469 'title' => __('Options'), 470 'items' => array( 471 'post_open_comment' => 472 '<p><label for="post_open_comment" class="classic">'. 473 form::checkbox('post_open_comment',1,$post_open_comment).' '. 474 __('Accept comments').'</label></p>'. 475 ($core->blog->settings->system->allow_comments ? 476 (isContributionAllowed($post_id,strtotime($post_dt),true) ? 477 '' : 478 '<p class="form-note warn">'. 479 __('Warning: Comments are not more accepted for this entry.').'</p>') : 480 '<p class="form-note warn">'. 481 __('Warning: Comments are not accepted on this blog.').'</p>'), 482 'post_open_tb' => 483 '<p><label for="post_open_tb" class="classic">'. 484 form::checkbox('post_open_tb',1,$post_open_tb).' '. 485 __('Accept trackbacks').'</label></p>'. 486 ($core->blog->settings->system->allow_trackbacks ? 487 (isContributionAllowed($post_id,strtotime($post_dt),false) ? 488 '' : 489 '<p class="form-note warn">'. 490 __('Warning: Trackbacks are not more accepted for this entry.').'</p>') : 491 '<p class="form-note warn">'.__('Warning: Trackbacks are not accepted on this blog.').'</p>'), 492 'post_password' => 493 '<p><label for="post_password" class="ib">'.__('Password').'</label>'. 494 form::field('post_password',10,32,html::escapeHTML($post_password),'maximal'). 495 '</p>', 496 'post_url' => 497 '<div class="lockable">'. 498 '<p><label for="post_url" class="ib">'.__('Edit basename').'</label>'. 499 form::field('post_url',10,255,html::escapeHTML($post_url),'maximal'). 500 '</p>'. 501 '<p class="form-note warn">'. 502 __('Warning: If you set the URL manually, it may conflict with another entry.'). 503 '</p></div>' 504 )))); 505 506 $main_items = new ArrayObject(array( 507 "post_title" => 508 '<p class="col">'. 509 '<label class="required no-margin"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:').'</label>'. 510 form::field('post_title',20,255,html::escapeHTML($post_title),'maximal'). 511 '</p>', 512 513 "post_excerpt" => 514 '<p class="area" id="excerpt-area"><label for="post_excerpt">'.__('Excerpt:').'<span class="form-note">'. 515 __('Add an introduction to the post.').'</span></label> '. 516 form::textarea('post_excerpt',50,5,html::escapeHTML($post_excerpt)). 517 '</p>', 518 519 "post_content" => 520 '<p class="area"><label class="required" '. 521 'for="post_content"><abbr title="'.__('Required field').'">*</abbr> '.__('Content:').'</label> '. 522 form::textarea('post_content',50,$core->auth->getOption('edit_size'),html::escapeHTML($post_content)). 523 '</p>', 524 525 "post_notes" => 526 '<p class="area" id="notes-area"><label for="post_notes">'.__('Personal notes:').'<span class="form-note">'. 527 __('Add unpublished notes.').'</span></label>'. 528 form::textarea('post_notes',50,5,html::escapeHTML($post_notes)). 529 '</p>' 530 ) 531 ); 532 533 # --BEHAVIOR-- adminPostFormItems 534 $core->callBehavior('adminPostFormItems',$main_items,$sidebar_items, isset($post) ? $post : null); 535 536 echo '<div class="multi-part" title="'.($post_id ? __('Edit entry') : __('New entry')).'" id="edit-entry">'; 409 537 echo '<form action="post.php" method="post" id="entry-form">'; 410 538 echo '<div id="entry-wrapper">'; 411 539 echo '<div id="entry-content"><div class="constrained">'; 540 541 echo '<h3 class="hidden">'.__('Edit post').'</h3>'; 542 543 foreach ($main_items as $id => $item) { 544 echo $item; 545 } 546 547 # --BEHAVIOR-- adminPostForm (may be deprecated) 548 $core->callBehavior('adminPostForm',isset($post) ? $post : null); 412 549 413 550 echo 414 '<p class="col"><label class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:'). 415 form::field('post_title',20,255,html::escapeHTML($post_title),'maximal'). 416 '</label></p>'. 417 418 '<p class="area" id="excerpt-area"><label for="post_excerpt">'.__('Excerpt:').'</label> '. 419 form::textarea('post_excerpt',50,5,html::escapeHTML($post_excerpt)). 420 '</p>'. 421 422 '<p class="area"><label class="required" '. 423 'for="post_content"><abbr title="'.__('Required field').'">*</abbr> '.__('Content:').'</label> '. 424 form::textarea('post_content',50,$core->auth->getOption('edit_size'),html::escapeHTML($post_content)). 425 '</p>'. 426 427 '<p class="area" id="notes-area"><label for="post_notes">'.__('Notes:').'</label>'. 428 form::textarea('post_notes',50,5,html::escapeHTML($post_notes)). 429 '</p>'; 430 431 # --BEHAVIOR-- adminPostForm 432 $core->callBehavior('adminPostForm',isset($post) ? $post : null); 433 434 echo 435 '<p>'. 551 '<p class="border-top">'. 436 552 ($post_id ? form::hidden('id',$post_id) : ''). 437 553 '<input type="submit" value="'.__('Save').' (s)" '. … … 458 574 echo '<div id="entry-sidebar">'; 459 575 460 echo 461 '<p><label for="cat_id">'.__('Category:'). 462 form::combo('cat_id',$categories_combo,$cat_id,'maximal'). 463 '</label></p>'. 464 465 ($core->auth->check('categories', $core->blog->id) ? 466 '<div>'. 467 '<p id="new_cat">'.__('Add a new category').'</p>'. 468 '<p><label for="new_cat_title">'.__('Title:').' '. 469 form::field('new_cat_title',30,255,'','maximal').'</label></p>'. 470 '<p><label for="new_cat_parent">'.__('Parent:').' '. 471 form::combo('new_cat_parent',$categories_combo,'','maximal'). 472 '</label></p>'. 473 '</div>' 474 : ''). 475 476 '<p><label for="post_status">'.__('Entry status:'). 477 form::combo('post_status',$status_combo,$post_status,'','',!$can_publish). 478 '</label></p>'. 479 480 '<p><label for="post_dt">'.__('Published on:'). 481 form::field('post_dt',16,16,$post_dt,($bad_dt ? 'invalid' : '')). 482 '</label></p>'. 483 484 '<p><label for="post_format">'.__('Text formating:'). 485 form::combo('post_format',$formaters_combo,$post_format). 486 '</label>'. 487 '</p>'. 488 '<p>'.($post_id && $post_format != 'xhtml' ? '<a id="convert-xhtml" class="button" href="post.php?id='.$post_id.'&xconv=1">'.__('Convert to XHTML').'</a>' : '').'</p>'. 489 490 '<p><label for="post_open_comment" class="classic">'.form::checkbox('post_open_comment',1,$post_open_comment).' '. 491 __('Accept comments').'</label></p>'. 492 ($core->blog->settings->system->allow_comments ? 493 (isContributionAllowed($post_id,strtotime($post_dt),true) ? 494 '' : 495 '<p class="form-note warn">'.__('Warning: Comments are not more accepted for this entry.').'</p>') : 496 '<p class="form-note warn">'.__('Warning: Comments are not accepted on this blog.').'</p>'). 497 498 '<p><label for="post_open_tb" class="classic">'.form::checkbox('post_open_tb',1,$post_open_tb).' '. 499 __('Accept trackbacks').'</label></p>'. 500 ($core->blog->settings->system->allow_trackbacks ? 501 (isContributionAllowed($post_id,strtotime($post_dt),false) ? 502 '' : 503 '<p class="form-note warn">'.__('Warning: Trackbacks are not more accepted for this entry.').'</p>') : 504 '<p class="form-note warn">'.__('Warning: Trackbacks are not accepted on this blog.').'</p>'). 505 506 '<p><label for="post_selected" class="classic">'.form::checkbox('post_selected',1,$post_selected).' '. 507 __('Selected entry').'</label></p>'. 508 509 '<p><label for="post_lang">'.__('Entry lang:'). 510 form::combo('post_lang',$lang_combo,$post_lang). 511 '</label></p>'. 512 513 '<p><label for="post_password">'.__('Entry password:'). 514 form::field('post_password',10,32,html::escapeHTML($post_password),'maximal'). 515 '</label></p>'. 516 517 '<div class="lockable">'. 518 '<p><label for="post_url">'.__('Basename:'). 519 form::field('post_url',10,255,html::escapeHTML($post_url),'maximal'). 520 '</label></p>'. 521 '<p class="form-note warn">'. 522 __('Warning: If you set the URL manually, it may conflict with another entry.'). 523 '</p>'. 524 '</div>'; 525 526 # --BEHAVIOR-- adminPostFormSidebar 576 foreach ($sidebar_items as $id => $c) { 577 echo '<div id="'.$id.'" class="box">'. 578 '<h4>'.$c['title'].'</h4>'; 579 foreach ($c['items'] as $e_name=>$e_content) { 580 echo $e_content; 581 } 582 echo '</div>'; 583 } 584 585 586 # --BEHAVIOR-- adminPostFormSidebar (may be deprecated) 527 587 $core->callBehavior('adminPostFormSidebar',isset($post) ? $post : null); 528 529 588 echo '</div>'; // End #entry-sidebar 530 589 … … 557 616 if ($can_edit_post && $core->auth->check('publish,contentadmin',$core->blog->id)) 558 617 { 559 $combo_action[__(' publish')] = 'publish';560 $combo_action[__(' unpublish')] = 'unpublish';561 $combo_action[__(' mark as pending')] = 'pending';562 $combo_action[__(' mark as junk')] = 'junk';618 $combo_action[__('Publish')] = 'publish'; 619 $combo_action[__('Unpublish')] = 'unpublish'; 620 $combo_action[__('Mark as pending')] = 'pending'; 621 $combo_action[__('Mark as junk')] = 'junk'; 563 622 } 564 623 … … 622 681 '<form action="comment.php" method="post" id="comment-form">'. 623 682 '<div class="constrained">'. 624 '<p><label for="comment_author" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Name:'). 683 '<p><label for="comment_author" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Name:').'</label>'. 625 684 form::field('comment_author',30,255,html::escapeHTML($core->auth->getInfo('user_cn'))). 626 '</ label></p>'.627 628 '<p><label for="comment_email">'.__('Email:'). 685 '</p>'. 686 687 '<p><label for="comment_email">'.__('Email:').'</label>'. 629 688 form::field('comment_email',30,255,html::escapeHTML($core->auth->getInfo('user_email'))). 630 '</ label></p>'.631 632 '<p><label for="comment_site">'.__('Web site:'). 689 '</p>'. 690 691 '<p><label for="comment_site">'.__('Web site:').'</label>'. 633 692 form::field('comment_site',30,255,html::escapeHTML($core->auth->getInfo('user_url'))). 634 '</ label></p>'.693 '</p>'. 635 694 636 695 '<p class="area"><label for="comment_content" class="required"><abbr title="'.__('Required field').'">*</abbr> '. … … 688 747 switch ($rs->comment_status) { 689 748 case 1: 690 $img_status = sprintf($img,__(' published'),'check-on.png');749 $img_status = sprintf($img,__('Published'),'check-on.png'); 691 750 break; 692 751 case 0: 693 $img_status = sprintf($img,__(' unpublished'),'check-off.png');752 $img_status = sprintf($img,__('Unpublished'),'check-off.png'); 694 753 break; 695 754 case -1: 696 $img_status = sprintf($img,__(' pending'),'check-wrn.png');755 $img_status = sprintf($img,__('Pending'),'check-wrn.png'); 697 756 break; 698 757 case -2: 699 $img_status = sprintf($img,__(' junk'),'junk.png');758 $img_status = sprintf($img,__('Junk'),'junk.png'); 700 759 break; 701 760 } … … 720 779 } 721 780 722 dcPage::helpBlock('core_post','core_ wiki');781 dcPage::helpBlock('core_post','core_trackbacks','core_wiki'); 723 782 dcPage::close(); 724 783 ?> -
admin/posts_actions.php
r1399 r1468 16 16 17 17 $params = array(); 18 $action = ''; 18 19 19 20 /* Actions … … 126 127 elseif ($action == 'category' && isset($_POST['new_cat_id'])) 127 128 { 128 try 129 { 130 $core->blog->updPostsCategory($posts_ids,$_POST['new_cat_id']); 129 $new_cat_id = $_POST['new_cat_id']; 130 131 try 132 { 133 if (!empty($_POST['new_cat_title']) && $core->auth->check('categories', $core->blog->id)) 134 { 135 $cur_cat = $core->con->openCursor($core->prefix.'category'); 136 $cur_cat->cat_title = $_POST['new_cat_title']; 137 $cur_cat->cat_url = ''; 138 139 $parent_cat = !empty($_POST['new_cat_parent']) ? $_POST['new_cat_parent'] : ''; 140 141 # --BEHAVIOR-- adminBeforeCategoryCreate 142 $core->callBehavior('adminBeforeCategoryCreate', $cur_cat); 143 144 $new_cat_id = $core->blog->addCategory($cur_cat, (integer) $parent_cat); 145 146 # --BEHAVIOR-- adminAfterCategoryCreate 147 $core->callBehavior('adminAfterCategoryCreate', $cur_cat, $new_cat_id); 148 } 149 150 $core->blog->updPostsCategory($posts_ids, $new_cat_id); 131 151 132 152 http::redirect($redir); … … 246 266 echo '<h2 class="page-title">'.__('Change category for entries').'</h2>'; 247 267 248 # categories list249 268 # Getting categories 250 $categories_combo = array( ' '=> '');269 $categories_combo = array(__('(No cat)') => ''); 251 270 try { 252 271 $categories = $core->blog->getCategories(array('post_type'=>'post')); 253 while ($categories->fetch()) { 254 $categories_combo[] = new formSelectOption( 255 str_repeat(' ',$categories->level-1). 256 ($categories->level-1 == 0 ? '' : '• ').html::escapeHTML($categories->cat_title), 257 $categories->cat_id 258 ); 272 if (!$categories->isEmpty()) { 273 while ($categories->fetch()) { 274 $catparents_combo[] = $categories_combo[] = new formSelectOption( 275 str_repeat(' ',$categories->level-1).($categories->level-1 == 0 ? '' : '• ').html::escapeHTML($categories->cat_title), 276 $categories->cat_id 277 ); 278 } 259 279 } 260 280 } catch (Exception $e) { } … … 264 284 '<p><label for="new_cat_id" class="classic">'.__('Category:').'</label> '. 265 285 form::combo('new_cat_id',$categories_combo,''); 286 287 if ($core->auth->check('categories', $core->blog->id)) { 288 echo 289 '<div>'. 290 '<p id="new_cat">'.__('Add a new category').'</p>'. 291 '<p><label for="new_cat_title">'.__('Title:').' '. 292 form::field('new_cat_title',30,255,'','maximal').'</label></p>'. 293 '<p><label for="new_cat_parent">'.__('Parent:').' '. 294 form::combo('new_cat_parent',$categories_combo,'','maximal'). 295 '</label></p>'. 296 '</div>'; 297 } 266 298 267 299 echo -
admin/posts_actions.php
r1421 r1468 282 282 echo 283 283 '<form action="posts_actions.php" method="post">'. 284 '<p><label for="new_cat_id" class="classic">'.__('Category:').' '. 285 form::combo('new_cat_id',$categories_combo,''). 286 '</label> '; 284 '<p><label for="new_cat_id" class="classic">'.__('Category:').'</label> '. 285 form::combo('new_cat_id',$categories_combo,''); 287 286 288 287 if ($core->auth->check('categories', $core->blog->id)) { … … 327 326 echo 328 327 '<form action="posts_actions.php" method="post">'. 329 '<p><label for="new_lang" class="classic">'.__('Entry lang:').' '. 330 form::combo('new_lang',$lang_combo,''). 331 '</label> '; 328 '<p><label for="new_lang" class="classic">'.__('Entry lang:').'</label> '. 329 form::combo('new_lang',$lang_combo,''); 332 330 333 331 echo … … 345 343 echo 346 344 '<form action="posts_actions.php" method="post">'. 347 '<p><label for="new_auth_id" class="classic">'.__('Author ID:').' '. 348 form::field('new_auth_id',20,255). 349 '</label> '; 345 '<p><label for="new_auth_id" class="classic">'.__('Author ID:').'</label> '. 346 form::field('new_auth_id',20,255); 350 347 351 348 echo -
admin/preferences.php
r1399 r1468 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'). … … 420 433 '<legend>'.__('Change your password').'</legend>'. 421 434 422 '<p><label for="new_pwd">'.__('New password:').'</label>'. 423 form::password('new_pwd',20,255).'</p>'. 435 '<div class="pw-table">'. 436 '<p class="pw-cell"><label for="new_pwd">'.__('New password:').'</label>'. 437 form::password('new_pwd',20,255,'','','',false,' data-indicator="pwindicator" ').'</p>'. 438 '<div id="pwindicator">'. 439 ' <div class="bar"></div>'. 440 ' <p class="label no-margin"></p>'. 441 '</div>'. 442 '</div>'. 424 443 425 444 '<p><label for="new_pwd_c">'.__('Confirm password:').'</label>'. -
admin/preferences.php
r1375 r1468 361 361 362 362 # --BEHAVIOR-- adminPreferencesHeaders 363 $core->callBehavior('adminPreferencesHeaders') 363 $core->callBehavior('adminPreferencesHeaders'), 364 365 dcPage::breadcrumb( 366 array( 367 html::escapeHTML($core->auth->userID()) => '', 368 '<span class="page-title">'.$page_title.'</span>' => '' 369 )) 364 370 ); 365 371 … … 382 388 dcPage::message(__('Default favorites have been successfully updated.')); 383 389 } 384 385 echo '<h2>'.html::escapeHTML($core->blog->name).' › <span class="page-title">'.$page_title.'</span></h2>';386 390 387 391 # User profile … … 393 397 '<div class="two-cols">'. 394 398 '<div class="col">'. 395 '<p><label for="user_name">'.__('Last Name:'). 396 form::field('user_name',20,255,html::escapeHTML($user_name)).'</ label></p>'.397 398 '<p><label for="user_firstname">'.__('First Name:'). 399 form::field('user_firstname',20,255,html::escapeHTML($user_firstname)).'</ label></p>'.400 401 '<p><label for="user_displayname">'.__('Display name:'). 402 form::field('user_displayname',20,255,html::escapeHTML($user_displayname)).'</ label></p>'.403 404 '<p><label for="user_email">'.__('Email:'). 405 form::field('user_email',20,255,html::escapeHTML($user_email)).'</ label></p>'.406 407 '<p><label for="user_url">'.__('URL:'). 408 form::field('user_url',30,255,html::escapeHTML($user_url)).'</ label></p>'.399 '<p><label for="user_name">'.__('Last Name:').'</label>'. 400 form::field('user_name',20,255,html::escapeHTML($user_name)).'</p>'. 401 402 '<p><label for="user_firstname">'.__('First Name:').'</label>'. 403 form::field('user_firstname',20,255,html::escapeHTML($user_firstname)).'</p>'. 404 405 '<p><label for="user_displayname">'.__('Display name:').'</label>'. 406 form::field('user_displayname',20,255,html::escapeHTML($user_displayname)).'</p>'. 407 408 '<p><label for="user_email">'.__('Email:').'</label>'. 409 form::field('user_email',20,255,html::escapeHTML($user_email)).'</p>'. 410 411 '<p><label for="user_url">'.__('URL:').'</label>'. 412 form::field('user_url',30,255,html::escapeHTML($user_url)).'</p>'. 409 413 410 414 '</div>'. … … 412 416 '<div class="col">'. 413 417 414 '<p><label for="user_lang">'.__('User language:'). 415 form::combo('user_lang',$lang_combo,$user_lang,'l10n').'</ label></p>'.416 417 '<p><label for="user_tz">'.__('User timezone:'). 418 form::combo('user_tz',dt::getZones(true,true),$user_tz).'</ label></p>'.418 '<p><label for="user_lang">'.__('User language:').'</label>'. 419 form::combo('user_lang',$lang_combo,$user_lang,'l10n').'</p>'. 420 421 '<p><label for="user_tz">'.__('User timezone:').'</label>'. 422 form::combo('user_tz',dt::getZones(true,true),$user_tz).'</p>'. 419 423 420 424 '</div>'. … … 432 436 '<p class="pw-cell"><label for="new_pwd">'.__('New password:').'</label>'. 433 437 form::password('new_pwd',20,255,'','','',false,' data-indicator="pwindicator" ').'</p>'. 434 435 436 437 438 438 '<div id="pwindicator">'. 439 ' <div class="bar"></div>'. 440 ' <p class="label no-margin"></p>'. 441 '</div>'. 442 '</div>'. 439 443 440 444 '<p><label for="new_pwd_c">'.__('Confirm password:').'</label>'. … … 462 466 '<fieldset><legend>'.__('My options').'</legend>'. 463 467 464 '<p><label for="user_post_format">'.__('Preferred format:'). 465 form::combo('user_post_format',$formaters_combo,$user_options['post_format']).'</ label></p>'.466 467 '<p><label for="user_post_status">'.__('Default entry status:'). 468 form::combo('user_post_status',$status_combo,$user_post_status).'</ label></p>'.469 470 '<p><label for="user_edit_size">'.__('Entry edit field height:'). 471 form::field('user_edit_size',5,4,(integer) $user_options['edit_size']).'</ label></p>'.468 '<p><label for="user_post_format">'.__('Preferred format:').'</label>'. 469 form::combo('user_post_format',$formaters_combo,$user_options['post_format']).'</p>'. 470 471 '<p><label for="user_post_status">'.__('Default entry status:').'</label>'. 472 form::combo('user_post_status',$status_combo,$user_post_status).'</p>'. 473 474 '<p><label for="user_edit_size">'.__('Entry edit field height:').'</label>'. 475 form::field('user_edit_size',5,4,(integer) $user_options['edit_size']).'</p>'. 472 476 473 477 '<p><label for="user_wysiwyg" class="classic">'. … … 485 489 if (count($iconsets_combo) > 1) { 486 490 echo 487 '<p><label for="user_ui_iconset">'.__('Iconset:'). 488 form::combo('user_ui_iconset',$iconsets_combo,$user_ui_iconset).'</ label></p>';491 '<p><label for="user_ui_iconset">'.__('Iconset:').'</label>'. 492 form::combo('user_ui_iconset',$iconsets_combo,$user_ui_iconset).'</p>'; 489 493 } else { 490 494 form::hidden('user_ui_iconset',''); -
admin/style/default.css
r1465 r1468 541 541 } 542 542 543 #upg-notify { 544 } 545 #upg-notify ul { 546 padding-left: 15px; 547 } 548 #upg-notify li { 549 color: #fff; 550 } 543 551 /* ------------------------------------------------------------------ post */ 544 552 #entry-wrapper { … … 1617 1625 } 1618 1626 1627 /* --------------------------------------------------------------- password indcator */ 1628 .pw-table { 1629 display: table; 1630 margin-bottom: 1em; 1631 } 1632 .pw-cell { 1633 display: table-cell; 1634 margin-bottom: 1em; 1635 } 1636 #pwindicator { 1637 display: table-cell; 1638 vertical-align: bottom; 1639 padding-left: 1.5em; 1640 height: 3.8em; 1641 } 1642 #pwindicator .bar { 1643 height: 6px; 1644 margin-bottom: 4px; 1645 } 1646 .pw-very-weak .bar { 1647 background: #900; 1648 width: 30px; 1649 } 1650 .pw-weak .bar { 1651 background: #c00; 1652 width: 60px; 1653 } 1654 .pw-mediocre .bar { 1655 background: #f60; 1656 width: 90px; 1657 } 1658 .pw-strong .bar { 1659 background: #060; 1660 width: 120px; 1661 } 1662 .pw-very-strong .bar { 1663 background: #0c0; 1664 width: 150px; 1665 } 1666 1619 1667 /* --------------------------------------------------------------------------- 1620 1668 Media queries vite fait en attendant la reprise complète du layout -
admin/style/default.css
r1375 r1468 13 13 14 14 /* ------------------------------------------------------------------ html */ 15 html { 16 font-size: 62.5%; 17 } 15 18 body { 16 font: 75%/1.5em Helvetica,Arial,sans-serif;19 font: 1.2rem/1.5 Arial,Helvetica,sans-serif; 17 20 color: #333; 18 background: #f 5f5f5;21 background: #fff; 19 22 margin: 0; 20 23 padding: 0; 21 }22 body.auth {23 background: #fff;24 24 } 25 25 … … 36 36 } 37 37 38 h1, h2, h3, h4, h5, h6, p {38 h1, h2, h3, .as_h3, h4, h5, h6, p { 39 39 margin-top: 0; 40 margin-bottom: 0.6em;40 margin-bottom: 1rem; 41 41 } 42 42 h2 { 43 43 color: #666; 44 font-size: 1.4em; 45 padding: 4px 0; 44 font-size: 1.8rem; 45 padding: 0 0 1.8rem; 46 font-weight: normal; 47 } 48 h2 a:link, h2 a:visited { 49 color: #666; 50 border-color: #000; 46 51 } 47 52 .page-title { 48 53 color: #d30e60; 49 54 } 50 h3 { 55 .page-title img { 56 padding-left: .6rem; 57 vertical-align: middle; 58 } 59 #content > h2 { 60 padding: 0 1.8rem .6rem; 61 margin: 0 -1.8rem 1rem; 62 background: #fff url(bg_h2.png) repeat-x center bottom; 63 } 64 h3, .as_h3 { 65 color: #575859; 66 font-size: 1.4rem; 67 } 68 h4 { 69 font-size: 1.1em; 70 color: #575859; 71 } 72 h5 { 73 font-size: 1em; 74 color: #575859; 75 } 76 #entry-sidebar h5 { 77 font-weight: normal; 51 78 color: #333; 52 font-size: 1.2em; 79 } 80 .entry-status label img { 81 padding-left: .4rem; 82 vertical-align: text-top; 53 83 } 54 84 p, div.p { … … 57 87 hr { 58 88 height: 1px; 59 border-width: 1px 0 0 0;89 border-width: 1px 0 0; 60 90 border-color: #999; 61 91 border-style: solid; … … 83 113 #header { 84 114 background: #575859; 85 height: 3em;86 115 position: relative; 116 border-bottom: 4px solid #A2CBE9; 117 width: 100%; 87 118 } 88 119 #prelude { 89 background: #575859; 90 line-height: 1.5em; 91 margin: 0; 92 padding: 0 1.7em 0 1em; 120 line-height: 1.9; 121 margin: 0; 122 padding: 0; 93 123 overflow: hidden; 94 124 position: absolute; 95 top: 1.2em;125 top: 3em; 96 126 left: 0; 127 background: #A2CBE9; 128 width: 14.5em; 97 129 } 98 130 #prelude li { 99 131 list-style-type: none; 100 margin: 0 1em 0 0;132 margin: 0; 101 133 background:transparent; 102 134 } 103 135 #prelude li a { 104 color:#fff; 105 } 136 padding-left: 1.6rem; 137 background: #A2CBE9; 138 color: #000; 139 border-bottom-color: #A2CBE9; 140 } 106 141 #top { 107 142 margin: 0; 108 143 padding: 0; 109 width: 1 3em;144 width: 14.5em; 110 145 float: left; 111 146 } … … 113 148 padding: 0; 114 149 margin: 0; 115 height: 3 em;150 height: 3.6rem; 116 151 text-indent: -1000px; 117 background: transparent url(dc_logo.png) no-repeat 0 50%;118 152 } 119 153 #top h1 a { 120 154 position: absolute; 121 top: 3px;155 top: 0; 122 156 left: 0; 123 width: 1 30px;124 height: 60px;157 width: 17.4rem; 158 height: 3.6rem; 125 159 border: none; 126 outline: none;127 160 color: #fff; 128 161 } 162 #top h1 a:link { 163 background: transparent url(dc_logos/b-dotclear120.png) no-repeat 0 6px; 164 } 165 #top h1 a:hover, #top h1 a:focus { 166 background: transparent url(dc_logos/b-dotclear120.png) no-repeat 0 -94px; 167 } 129 168 #info-boxes { 130 background: #575859; 131 font-size: .95em; 132 height: 3em; 169 font-size: 1em; 170 line-height: 3em; 133 171 } 134 172 #info-box1 { 135 173 margin: 0; 136 padding: .5em 3px 4px 0;174 padding: 0 3px 0 1.8rem; 137 175 color: #fff; 138 float: left; 139 background: #575859; 176 display: inline-block; 140 177 } 141 178 #info-box2 { 142 margin: .1em 0 00;143 padding: .5em 1.3em 4px0;179 margin: 0; 180 padding: 0 1.3em 0 0; 144 181 color: #fff; 145 182 float: right; 146 183 text-align: right; 147 background: #575859;148 height: 2em;149 184 } 150 185 #info-box1 p { … … 153 188 } 154 189 #info-box1 select { 155 width: 1 5em;190 width: 14.5em; 156 191 } 157 192 #info-box1 a img, #info-box2 a img { … … 159 194 padding-left: .3em; 160 195 } 161 #info-box1 a, #info-box2 a { 162 background: #575859; 196 #info-boxes a { 163 197 font-weight: bold; 164 198 color: #fff; … … 173 207 } 174 208 #info-box2 a.active { 175 border-bottom-color: #f 5f5f5;209 border-bottom-color: #fff; 176 210 margin: 0; 177 211 padding: 1.2em .5em; 178 background-color: #f 5f5f5;212 background-color: #fff; 179 213 color: #333; 180 214 font-weight: bold; 181 215 } 182 216 #info-box2 span { 183 color: # 575859;184 } 185 /* prelude*/217 color: #999; 218 } 219 /* main blocks */ 186 220 #wrapper { 187 221 width: 100%; … … 190 224 width: 100%; 191 225 float: right; 192 margin-left: -1 3em;226 margin-left: -14.5em; 193 227 margin-top: 0; 228 background: #fff url(bg_menu.png); 194 229 } 195 230 #content { 196 margin: 1.5em 1.5em .5em 13em;197 padding: 1em;231 margin: 0 0 0 14.5em; 232 padding: .9rem 1.8rem 1.8rem; 198 233 background: #fff; 199 border-radius: .5em;200 border: 1px solid #ddd;201 234 } 202 235 /* Micro clearfix thx to Nicolas Gallagher */ … … 219 252 } 220 253 .two-cols .col { 221 width: 4 9%;254 width: 47%; 222 255 margin-left: 2%; 223 256 float: left; 224 257 } 225 .two-cols .col:first-child {226 width: 49%;227 margin-left: 0;228 }229 258 .two-cols .col70{ 230 width: 6 9%;259 width: 68%; 231 260 margin-left: 0; 232 261 float: left; 233 262 } 234 . two-cols .col30 {263 .col30 { 235 264 width: 28%; 236 265 margin-left: 2%; 237 266 float: left; 238 267 } 268 .two-cols .col:first-child, 269 .two-cols .col30.first-col { 270 margin-left: 0; 271 margin-right: 2%; 272 } 273 .two-cols .col:last-child, 274 .two-cols .col70.last-col { 275 margin-left: 2%; 276 margin-right: 0; 277 } 239 278 /* -------------------------------------------------------------- layout - onglets */ 240 279 .part-tabs ul { 241 padding: . 3em 0 1px 1em;242 border-bottom: 1px solid # 999;280 padding: .5em 0 .3em 1.2rem; 281 border-bottom: 1px solid #ddd; 243 282 } 244 283 .part-tabs li { … … 248 287 } 249 288 .part-tabs li a { 250 padding: . 3em 0.5em;251 margin-right: .5em;252 border: 1px solid # 999;289 padding: .5em 2em; 290 margin-right: -1px; 291 border: 1px solid #aaa; 253 292 border-bottom: none; 254 background: #dfdfdf;255 293 text-decoration: none; 256 border-top-left-radius: .3em; 257 border-top-right-radius: .3em; 258 color: #000; 259 } 260 .part-tabs li.part-tabs-link a { 261 background: #ffe; 294 color: #333; 295 background-color:#E4E0EC; 262 296 } 263 297 .part-tabs li a:hover, .part-tabs li a:focus { … … 268 302 .part-tabs li.part-tabs-active a { 269 303 background: #fff; 270 border-bottom: 1px solid #fff;271 color: #000;272 304 font-weight: bold; 305 border-bottom-color: #fff; 306 padding-bottom: .7rem; 273 307 } 274 308 /* ------------------------------------------------------------------ main-menu */ 275 309 #main-menu { 276 width: 1 3em;310 width: 14.5em; 277 311 float: left; 278 margin-top: 1.2em; 279 margin-bottom: .5em; 312 margin:0; 313 padding-top: 4.5em; 314 padding-bottom: 1em; 315 background: #f7f7f7; 280 316 } 281 317 #main-menu h3 { 282 margin: 0 0 0.5em;283 padding: .5em 0 0 .5em;284 text- transform: uppercase;318 margin: 0; 319 padding: 1.2rem 0 1rem 2.2rem; 320 text-indent: -1.6rem; 285 321 color: #666; 286 font-size: 1.1em; 322 font-size: 1.4rem; 323 } 324 #main-menu h3 img[alt="cacher"] { 325 vertical-align: top; 287 326 } 288 327 #main-menu ul { 289 font-size: .95em; 290 margin: 0 0 1em 0; 328 margin: 0 0 1.8rem 0; 291 329 padding: 0; 292 330 list-style: none; … … 295 333 display: block; 296 334 margin: 0.5em 0 0; 297 padding: . 2em 0 0 32px;335 padding: .3rem 0 0 30px; 298 336 background-repeat: no-repeat; 299 background-position: 12px .4em; 337 background-position: 8px .3em; 338 } 339 #main-menu li.active { 340 background-color: #fff; 300 341 } 301 342 #main-menu a { 302 font-weight: bold; 343 color: #333; 344 border-bottom-color: #ccc; 303 345 } 304 346 #main-menu .active a { 305 347 border-bottom: none; 306 color: # 333;348 color: #d30e60; 307 349 } 308 350 #main-menu .active { 309 background-color: #fff; 310 padding: .4em 0 .1em 32px; 311 background-position: 12px .4em; 312 border-top: 1px solid #ddd; 313 border-bottom: 1px solid #ddd; 314 margin-right: -1px; 315 } 316 #favorites-menu { 317 margin: 0 0 2em; 351 font-weight: bolder; 352 } 353 #search-menu { 354 padding: .3rem .4rem 0; 355 font-size: 100% 356 } 357 #search-menu p { 358 display: inline-block; 359 border: 1px solid #999; 360 border-radius: .6em; 361 position: relative; 362 height: 2rem; 363 overflow: hidden; 364 } 365 #search-menu #q { 366 width: 12rem; 367 border-bottom-left-radius: .6em; 368 border-top-left-radius: .6em; 369 background: transparent url(search.png) no-repeat 4px center; 370 text-indent: 18px; 371 height: 2rem; 372 padding: 0 2px; 373 border: none; 374 } 375 #search-menu input[type="submit"] { 376 padding: 0 0.3rem; 377 background: #dfdfdf; 378 border-color: #999; 379 color: #444; 380 border-bottom-right-radius: .6em; 381 border-top-right-radius: .6em; 382 border-top-left-radius: 0; 383 border-bottom-left-radius: 0; 384 text-shadow: none; 385 height: 2rem; 386 border: none; 387 border-left: 1px solid #aaa; 388 font-size: 1rem; 389 } 390 #search-menu input[type="submit"]:hover, 391 #search-menu input[type="submit"]:focus { 392 background: #575859; 393 color: #fff; 394 } 395 #favorites-menu, #blog-menu, #system-menu, #plugins-menu { 396 border-bottom: 1px dashed #A2CBE9; 318 397 } 319 398 #favorites-menu h3 { 320 color: #333; 321 text-transform: none; 322 } 323 #favorites-menu a { 324 color: #333; 325 } 326 #favorites-menu .active { 327 background-color: transparent; 328 border: none; 329 } 330 #favorites-menu .active a { 331 font-weight: bold; 332 color: #666; 399 color: #000; 400 font-variant: small-caps; 401 padding-top: .6rem; 333 402 } 334 403 /* ------------------------------------------------------------------ footer */ 335 404 #footer { 336 405 clear: both; 337 padding: . 75em .75em 00;406 padding: .6rem 1.2rem .6rem 0; 338 407 text-align: right; 408 border-top: .1rem solid #ccc; 339 409 } 340 410 #footer p { 341 411 margin: 0; 342 412 padding: 0 1em; 343 text-align: center; 344 font-size: 1.1em; 345 } 346 #footer a { 413 font-size: 1em; 347 414 } 348 415 #footer p span.credit { 349 font-size: .85em;416 font-size: 1rem; 350 417 font-weight: normal; 351 418 } … … 355 422 width: 18em; 356 423 margin: 1.5em auto 0; 357 font-size: 1. 1em;424 font-size: 1.4rem; 358 425 } 359 426 #login-screen h1 { 360 427 text-indent: -2000px; 361 background: transparent url(d otclear-logo2.png) no-repeat top left;362 height: 50px;428 background: transparent url(dc_logos/w-dotclear240.png) no-repeat top left; 429 height: 66px; 363 430 margin-bottom: .5em; 364 margin-left: .5em;431 margin-left: 0; 365 432 } 366 433 #login-screen fieldset, #login-screen .fieldset { 367 border: 1px solid # 999;434 border: 1px solid #A8DC26; 368 435 padding: 1em 1em 0 1em; 369 436 border-radius: 4px; 437 background: #fff; 438 } 439 #login-screen legend { 440 border: 1px solid #A8DC26; 370 441 } 371 442 #login-screen input[type=text], #login-screen input[type=password], #login-screen input[type=submit] { … … 373 444 } 374 445 #login-screen #issue { 375 margin-left: 1 em;376 font-size: 1 em;446 margin-left: 1.5rem; 447 font-size: 1.2rem; 377 448 } 378 449 #login-screen #issue strong {font-weight: normal;} … … 381 452 /* ------------------------------------------------------------------ dashboard */ 382 453 #dashboard-main { 383 float: left;384 overflow: hidden;385 padding: 1em 2% 1em 0;386 width: 70%;387 }388 #dashboard-main.fullwidth {389 width: 100%;390 454 padding: 1em 0; 391 float: none;392 455 } 393 456 #icons { … … 399 462 width: 210px; 400 463 text-align: center; 401 margin: 2em 0 0 0; 464 margin: 1em 0 2em; 465 padding: 1em 0; 402 466 display:inline-block; 467 vertical-align: top; 403 468 } 404 469 #icons a, … … 412 477 #icons a span { 413 478 border-bottom: 1px dotted #f90; 479 color: #333; 480 } 481 #icons a img { 482 padding: 2em; 483 background: #eee; 484 border-radius: 1.6rem; 485 box-shadow: 0 3px 3px 0 #ccc; 486 margin-bottom: .6rem; 487 } 488 #icons a img:hover, #icons a:focus img { 489 background-color: #BBDB58; 414 490 } 415 491 #icons a:focus span, #icons a:hover span { … … 417 493 } 418 494 #quick { 419 clear: left;420 495 margin-top: 2em; 421 496 } … … 432 507 } 433 508 #dashboard-items { 434 float: left; 435 width: 27%; 436 overflow: hidden; 437 padding-bottom: 1em; 438 padding-top: 3em; 509 margin: 3em auto; 510 display: table; 511 width: 100%; 512 border-collapse: collapse; 513 } 514 .db-item { 515 display: table-cell; 516 padding: 1em 3em; 517 vertical-align: top; 518 border: 1px solid #ccc; 439 519 } 440 520 #dashboard-items img { … … 476 556 } 477 557 #entry-content { 478 margin-right: 18em; 558 margin-right: 19em; 559 margin-left: 0; 560 } 561 .multi-part { 562 padding-left: 1.2rem; 563 } 564 #entry-content label { 565 text-transform: uppercase; 566 font-weight: bold; 567 margin-top: 2em; 479 568 } 480 569 #entry-sidebar { 481 570 width: 17em; 482 571 float: right; 572 } 573 #entry-sidebar input[type="text"], 574 #entry-sidebar select { 575 width: 14em; /* to prevent inline with label */ 576 } 577 .box { 578 border-bottom: 1px solid #ddd; 579 margin-bottom: 1em; 483 580 } 484 581 #comments { … … 518 615 } 519 616 #media-details { 617 } 618 .near-icon { 520 619 margin-left: 70px; 620 margin-bottom: 3em; 521 621 } 522 622 #media-details ul { … … 653 753 /* -------------------------------------------------------------------- Themes */ 654 754 #themes { 655 border-bottom: 1px solid #ccc; 656 margin: 1em 0; 755 margin: 0; 756 width: 100%; 757 padding: 0; 758 } 759 #themes h3 { 657 760 } 658 761 #themes div.theme-details { 659 clear: left;660 762 border-top: 1px solid #ccc; 661 padding: 1em 0; 763 padding: 12px; 764 display: inline-block; 765 vertical-align: top; 766 width: 284px; 767 } 768 .current-theme { 769 background: #eef; 662 770 } 663 771 #themes div.theme-details:hover { 664 background: # eee;772 background: #f0f0f0; 665 773 } 666 774 #themes div.theme-details div.theme-shot { 667 float: left;668 775 } 669 776 #themes div.theme-details div.theme-shot img { 670 777 display: block; 671 width: 57px;672 height: 50px;673 778 border: 1px solid #ccc; 779 margin-bottom: 1.5em; 674 780 } 675 781 #themes div.theme-details div.theme-info { 676 margin-left: 67px;677 782 } 678 783 #themes div.theme-details div.theme-info span.theme-desc { … … 683 788 } 684 789 #themes div.theme-details div.theme-actions { 685 margin-left: 67px; 686 } 790 } 791 #themes-actions { 792 border-bottom: 1px solid #999; 793 margin-bottom: 3em; 794 } 795 .theme-css { 796 display: block; 797 } 798 687 799 /* Themes list, JS version */ 688 800 #themes-wrapper { 801 display: table; 802 } 803 #themes-wrapper #themes { 804 display: table-cell; 805 vertical-align: top; 806 padding-left: 1em; 689 807 } 690 808 #theme-box { 691 border: 1px solid #999;692 border-left: none;693 padding: 5px;694 float: right;695 height: 420px;696 width: 320px;697 overflow: auto;809 display: table-cell; 810 vertical-align: top; 811 padding: 1rem 0; 812 width: 312px; 813 background: #eef; 814 border: 1px solid #ccc; 815 border-radius: 3px; 698 816 } 699 817 #theme-box div.theme-shot img { 700 818 display: block; 701 margin: 0 0 0 10px;819 margin: 0 16px; 702 820 width: 280px; 703 821 height: 245px; … … 705 823 } 706 824 #theme-box div.theme-info { 707 margin: 1em 0 0 10px; 708 } 709 #theme-box h3 { 710 margin: 0; 711 } 712 #theme-box div.theme-info span { 713 display: block; 825 margin: 1em 16px; 826 } 827 #theme-box h4 { 828 color: #000; 714 829 } 715 830 #theme-box span.theme-version { … … 724 839 } 725 840 #theme-box div.theme-actions { 726 margin-left: 10px; 727 } 728 #themes-wrapper #themes { 729 border: 1px solid #999; 730 overflow: auto; 731 height: 420px; 732 padding: 5px; 733 margin: 0; 841 padding: 0 16px; 734 842 } 735 843 #themes div.theme-details-js { … … 737 845 width: 120px; 738 846 height: 150px; 739 margin: 0 1 0px 20px;740 padding: 1 0px 10px 0;847 margin: 0 12px 24px; 848 padding: 12px 12px 0; 741 849 text-align: center; 742 850 background: #f3f3f3; 743 border: 1px solid # f3f3f3;851 border: 1px solid #ddd; 744 852 cursor: pointer; 745 853 border-radius: 4px; … … 749 857 } 750 858 #themes div.theme-details-js.theme-selected { 751 background: # E5E3DA;859 background: #ddd; 752 860 border: 1px solid #999; 753 861 } … … 757 865 border: 1px solid #fff; 758 866 } 759 #themes div.theme-details-js h3 {760 font-family: inherit;761 font-weight: normal;762 margin: 0;763 padding: 0;764 }765 867 /* ---------------------------------------------------------- Plugins list */ 766 868 #plugins td.action { … … 776 878 /* ------------------------------------------------------------------ contextual help */ 777 879 #help { 778 margin-top: 2em;880 margin-top: 4em; 779 881 background: #f5f5f5; 780 882 z-index: 100; 781 883 } 782 884 #help-button { 783 position: fixed; 784 top: 3.2em; 885 background: transparent url(../images/page_help.png) no-repeat 6px center; 886 position: absolute; 887 top: 3.6rem; 785 888 right: 0px; 889 padding: 0 2rem 0 3rem; 786 890 cursor: pointer; 787 background: #fc3; 788 border: 1px solid #dde; 789 border-right: none; 790 font-size: 1.1em; 791 font-weight: bold; 792 text-transform: capitalize; 793 padding: .33em .75em .33em 1em; 794 border-radius: 1em 0 0 1em; 795 color: #444; 891 color: #2373A8; 892 line-height: 4.2rem; 893 } 894 #help-button span { 895 padding: .6rem 0 .1rem 0; 896 border-bottom: 1px solid #2373A8; 796 897 } 797 898 .help-box { … … 803 904 } 804 905 #content.with-help #help-button { 805 right: 282px; 906 right: 28.2rem; 907 background-color: #f5f5f5; 908 position: fixed; 909 border-top: 2px solid #FFD478; 910 border-left: 2px solid #FFD478; 911 border-bottom: 2px solid #FFD478; 912 border-bottom-left-radius: 1rem; 913 border-top-left-radius: 1rem; 806 914 } 807 915 #content.with-help #help { 808 916 display: block; 809 917 position: absolute; 810 top: 40px;918 top: 3.6rem; 811 919 right: 0; 812 width: 280px; 813 border-left: 2px solid #fc3; 920 width: 28rem; 921 border-left: 2px solid #FFD478; 922 border-top: 2px solid #FFD478; 814 923 margin-top: 0; 815 924 padding: 10px 0 0 0; … … 829 938 /* ------------------------------------------------------------------ popups */ 830 939 body.popup #wrapper, body.popup #top { 831 margin-top: -1.5em; 940 width: 100%; 941 padding: 0; 942 } 943 body.popup #wrapper { 832 944 float: none; 833 } 834 body.popup #top h1 { 835 background: transparent; 945 margin:0; 946 display: block; 947 } 948 body.popup h1, body.popup #top { 949 margin: 0; 950 border-bottom: 1px solid; 951 font-weight: normal; 952 color: #fff; 953 background: #575859; 954 font-size: 1.5em; 955 text-indent: .6rem; 956 line-height: 1.3em; 836 957 } 837 958 body.popup #main { 838 margin-left: -35px; 839 margin-bottom: 1em; 959 margin-bottom: 1em 0; 840 960 } 841 961 body.popup #content { 842 margin -left: 35px;843 margin-left: 2em; /* 3.2 */844 } 845 body.popup # footer{846 display: none; /* 3.2 */962 margin: 0; 963 padding: .6rem 0 !important; 964 } 965 body.popup #content h2 { 966 margin: 0 0 1em; 847 967 } 848 968 body.popup #footer p { 849 margin-left: 35px;850 969 border: none; 851 970 } … … 859 978 } 860 979 p.error, p.message, p.static-msg { 861 padding-top: 1 em;862 padding-bottom: 1 em;980 padding-top: 1rem; 981 padding-bottom: 1rem; 863 982 } 864 983 div.error, p.error { … … 874 993 div.static-msg a, p.static-msg a { 875 994 color: #fff; 995 } 996 /* ------------------------------------------------------------------ navigation */ 997 .anchor-nav { 998 background: #575859; 999 color: #fff; 1000 padding: .4rem 1.2rem; 1001 float: right; 1002 } 1003 .nav_prevnext { 1004 margin-bottom: 2em; 1005 color: #fff; 1006 } 1007 .nav_prevnext a, a.back { 1008 border: 1px solid #ddd; 1009 padding: .2rem 2rem; 1010 border-radius: 1rem; 1011 background-color: #f0f0f0; 1012 } 1013 a.back:before { 1014 content: "\ab\a0"; 1015 } 1016 a.onblog_link { 1017 color: #333; 1018 float: right; 1019 border: 1px solid #eee; 1020 padding: .2rem 2rem; 1021 border-radius: 1rem; 1022 background-color: #ffe; 876 1023 } 877 1024 /* ------------------------------------------------------------------ debug */ … … 898 1045 /* -------------------------------------------------------------------- CLASSES COMMUNES */ 899 1046 900 .no-margin { 901 margin: 0; 902 } 1047 .no-margin, #entry-content label.no-margin { 1048 margin: 0; 1049 } 1050 .border-top { 1051 border-top: 1px solid #999; 1052 padding-top: 1em; 1053 margin-top: 1em; 1054 } 1055 .fieldset { 1056 background: #fff; 1057 border: 1px solid #aaa; 1058 border-radius: 6px; 1059 padding: 1em .7em .5em; 1060 margin-bottom: 1em; 1061 } 1062 .fieldset h3 { 1063 color: #333; 1064 } 1065 903 1066 /* paragraphe pour bouton Nouveau bidule */ 904 1067 p.top-add { … … 991 1154 -------------------------------------------------------- */ 992 1155 table { 993 font-size: 1 em;1156 font-size: 1.2rem; 994 1157 border-collapse: collapse; 995 1158 margin: 0 0 1em 0; 996 1159 } 997 1160 tr.line:hover { 998 background: # ddd;1161 background: #f3f3f3; 999 1162 } 1000 1163 caption { 1001 1164 color: #333; 1002 font-size: 1.2em;1003 1165 font-weight: bold; 1004 1166 text-align: left; … … 1006 1168 } 1007 1169 1008 t h, td {1170 td { 1009 1171 border-width: 0 0 1px 0; 1010 1172 border-style: solid; 1173 border-color: #e3e3e3; 1174 padding: .4rem .5rem; 1175 vertical-align: top; 1176 } 1177 th { 1178 border-width: 1px 0 1px 0; 1179 border-style: solid; 1011 1180 border-color: #ccc; 1012 padding: 3px 5px; 1181 background: #f3f3ff; 1182 padding: .4rem .5rem; 1013 1183 vertical-align: top; 1014 }1015 th {1016 1184 text-align: left; 1017 border-bottom-color: #666;1018 1185 } 1019 1186 .noborder td, td.noborder, .noborder th, th.noborder { 1020 border-width: 0; 1187 border-width: 0 0 1px 0; 1188 border-color: #ddd; 1189 line-height: 2.4rem; 1190 padding-bottom: 0; 1191 } 1192 .noborder p { 1193 margin-bottom: 0; 1021 1194 } 1022 1195 table .maximal, table.maximal { … … 1032 1205 table.settings, table.prefs { 1033 1206 width: 80%; 1207 border: 1px solid #999; 1208 margin-bottom: 3em; 1209 } 1210 table.settings th, table.prefs th { 1211 background: #eef; 1034 1212 } 1035 1213 table.settings th:first-child, table.prefs th:first-child { … … 1045 1223 width: 40%; 1046 1224 } 1047 1048 1225 td.status { 1049 1226 vertical-align: middle; … … 1084 1261 padding-left: 15px; 1085 1262 } 1086 1087 1263 /* ----------------------------------------------------------------- FORMS */ 1088 1264 form { … … 1091 1267 padding: 0; 1092 1268 } 1093 fieldset , .fieldset{1269 fieldset { 1094 1270 display: block; 1095 1271 margin: 0 0 1em 0; … … 1105 1281 border-width: 1px; 1106 1282 border-style: solid; 1107 border-color: # ccc;1108 background: #f 5f5f5;1283 border-color: #333; 1284 background: #fff; 1109 1285 margin-bottom: 0.5em; 1286 border-radius: 3px; 1110 1287 } 1111 1288 optgroup { … … 1121 1298 border-width: 1px; 1122 1299 border-style: solid; 1123 border-color: # 000 #ccc #ccc #000;1300 border-color: #666 #ccc #ccc #999; 1124 1301 } 1125 1302 input.invalid, textarea.invalid, select.invalid { … … 1130 1307 } 1131 1308 input, textarea, select, option { 1132 font: 1 em"DejaVu Sans","Lucida Grande","Lucida Sans Unicode",Arial,sans-serif;1309 font: 100% "DejaVu Sans","Lucida Grande","Lucida Sans Unicode",Arial,sans-serif; 1133 1310 } 1134 1311 input[type=text], input[type=password], textarea { … … 1136 1313 margin-right: .3em; 1137 1314 } 1138 input[type=checkbox], input[type=radio] {1139 border: none;1140 }1141 1315 textarea { 1142 1316 padding: 2px 0; 1143 1317 } 1144 1145 input[type=checkbox], input[type=radio] { 1318 input[type=checkbox], input[type=radio], input[type=file] { 1319 border: none; 1146 1320 margin: 0; 1147 1321 padding: 0; … … 1162 1336 font-style:italic; 1163 1337 font-weight: normal; 1338 text-transform: none; 1164 1339 color: #666; 1165 1340 } … … 1173 1348 } 1174 1349 p.form-note.info { 1175 background: #eef url(info.png) no-repeat .3em .2em; 1176 border: 1px solid #99f; 1177 } 1178 .form-note a {border-bottom: 1px solid #99f;} 1179 1350 background: #f5eaff url(info.png) no-repeat .3em .2em; 1351 border: 1px solid #ddbaff; 1352 } 1353 .form-note a {border-bottom: 1px solid #ddbaff;} 1354 1355 label.ib { 1356 display: inline-block; 1357 } 1180 1358 label.classic { 1181 1359 display: inline; … … 1214 1392 display: inline; 1215 1393 position: absolute; 1216 left: 1 5em;1394 left: 14.5em; 1217 1395 top: 0; 1218 1396 } … … 1226 1404 a.form-control { 1227 1405 display: none; 1228 font-weight: bold; 1229 background: url(magnifier.png) no-repeat 0 0; 1230 color: green; 1406 background: url(../images/expand.png) no-repeat .4rem center; 1231 1407 padding-left: 20px; 1408 color: #000; 1232 1409 } 1233 1410 .constrained { … … 1239 1416 1240 1417 /* --------------------------------------------------------------- buttons */ 1241 h2 a.button {1242 color: #333;1243 font-weight: normal;1244 font-size: .75em;1245 vertical-align: middle;1246 }1247 1418 /* commun */ 1248 1419 input[type=submit], … … 1250 1421 input[type=button], 1251 1422 a.button, 1252 a.back,1253 1423 a.submit { 1254 1424 display: inline-block; … … 1257 1427 text-align: center; 1258 1428 text-decoration: none; 1259 padding: .1em .5em 0 .5em;1429 padding: .1em .5em; 1260 1430 text-shadow: 0 1px 1px rgba(0,0,0,.3); 1261 1431 border-radius: .2em; 1262 1432 margin-bottom: .1em; 1263 1433 } 1434 h4 a.button {font-weight: normal;} 1435 1264 1436 /* validation */ 1265 1437 input[type=submit], … … 1286 1458 /* suppression et reset */ 1287 1459 a.button, 1288 a.back,1289 1460 input[type=submit].reset, 1290 1461 input[type=submit].delete { … … 1297 1468 } 1298 1469 a.button:hover, 1299 a.back:hover,1300 1470 input[type=reset]:hover, 1301 1471 input[type=submit].reset:hover, 1302 1472 input[type=submit].delete:hover, 1303 1473 a.button:focus, 1304 a.back:focus,1305 1474 input[type=reset]:focus, 1306 1475 input[type=submit].reset:focus, … … 1315 1484 input[type=submit].delete { 1316 1485 color: #c00; 1317 padding-bottom: . 1em;1486 padding-bottom: .2rem; 1318 1487 } 1319 1488 #entry-content .delete { … … 1336 1505 margin-left: 2em; 1337 1506 } 1338 a.back:before { 1339 content: "\ab\a0"; 1340 } 1341 a.button.add { 1342 border-radius: .5em; 1343 margin-bottom: .1em; 1344 background: #2C8FD1 url(../images/add.png) no-repeat 6px center; 1345 color: #fff; 1346 padding: .2em 16px .2em 30px; 1347 border: 1px solid #2373A8; 1348 } 1349 a.button.add:hover, a.button.add:focus { 1350 background-color: #2373A8; 1507 .button.add { 1508 background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #9dce2c), color-stop(1, #8cb82b) ); 1509 background:-moz-linear-gradient( center top, #9dce2c 5%, #8cb82b 100% ); 1510 filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#9dce2c', endColorstr='#8cb82b'); 1511 background-color:#9dce2c; 1512 border:1px solid #83c41a; 1513 padding:.6rem 1.8rem; 1514 color: #000; 1515 text-shadow: 1px 1px 0 #BBDB58; 1516 font-weight: normal; 1517 font-size: 1.4rem; 1518 } 1519 .button.add:hover, .button.add:focus { 1520 background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #8cb82b), color-stop(1, #9dce2c) ); 1521 background:-moz-linear-gradient( center top, #8cb82b 5%, #9dce2c 100% ); 1522 filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#8cb82b', endColorstr='#9dce2c'); 1523 background-color:#8cb82b; 1524 border:1px solid #83c41a; 1525 } 1526 .button-add:focus { 1527 outline: dotted 1px; 1351 1528 } 1352 1529 … … 1384 1561 } 1385 1562 1563 /* ------------------------------------------------------- Filters */ 1564 #filters-form { 1565 border: 1px dashed #999; 1566 border-radius: .6rem; 1567 margin-bottom: 2em; 1568 padding: .5em 1em 0; 1569 } 1570 #filters-form .table { 1571 display: table; 1572 width: 100%; 1573 padding: 0; 1574 margin-bottom: 1em; 1575 margin-top: 1.5em; 1576 } 1577 #filters-form .cell { 1578 padding: 0 2em 0 0; 1579 display: table-cell; 1580 vertical-align: top; 1581 } 1582 #filters-form .filters-options { 1583 padding-left: 2em; 1584 border-left: 1px solid #ccc; 1585 } 1586 #filters-form label.ib, span.ib { 1587 width:7em; 1588 display: inline-block; 1589 } 1590 #filters-form label.ibw, span.ibw { 1591 width: 9em; 1592 display: inline-block; 1593 } 1594 #filters-form select { 1595 width: 14em; 1596 } 1597 1598 /* ---------------------------------------------------- Pagination */ 1599 .pagination { 1600 height: 22px; 1601 margin-top: 1em; 1602 line-height: 22px; 1603 padding: 0 1rem; 1604 border: 1px solid #ddd; 1605 overflow: hidden; 1606 background: #e1e1e1; 1607 background: -moz-linear-gradient(center top , #f2f2f2, #e1e1e1); 1608 background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f2f2f2), color-stop(100%,#e1e1e1)); 1609 -moz-border-radius: 4px; 1610 -webkit-border-radius: 4px; 1611 border-radius: 4px; 1612 clear: left; 1613 } 1614 .pagination a, .pagination strong { 1615 height: 20px; 1616 border: none; 1617 padding: 2px 6px; 1618 background-color : transparent; 1619 background-position : 50% 50%; 1620 background-repeat: no-repeat; 1621 } 1622 .pagination a:hover, .pagination strong { 1623 border-color : #ccc; 1624 background-color: #fff; 1625 } 1626 1386 1627 /* --------------------------------------------------------------- password indcator */ 1387 1628 .pw-table { … … 1423 1664 width: 150px; 1424 1665 } 1666 1667 /* --------------------------------------------------------------------------- 1668 Media queries vite fait en attendant la reprise complète du layout 1669 ---------------------------------------------------------------------------- */ 1670 @media screen and (max-width: 920px) { 1671 #top, #top h1 a {width: 42px !important; height:100%; overflow: hidden; 1672 } 1673 #top h1 a:link { 1674 background: transparent url(dc_logos/b-dotclear120.png) no-repeat -180px 6px; 1675 border-right: 1px solid #ccc; 1676 } 1677 #top h1 a:hover, #top h1 a:focus { 1678 background: url(dc_logos/b-dotclear120.png) no-repeat -180px -94px; 1679 border-right: 1px solid #A2CBE9; 1680 } 1681 } 1682 @media screen and (max-width: 800px) { 1683 #top, #info-boxes, #info-box1, #info-box2 { 1684 display:inline-block; 1685 vertical-align:middle; 1686 margin:0; 1687 padding:0; 1688 line-height: 3.2rem; 1689 } 1690 #info-box1 {margin-left: 1rem;} 1691 #info-box1 select {width: 14rem;} 1692 #main-menu, #main, #content, #content h2, #entry-wrapper, #entry-sidebar, #entry-content, .two-cols .col, .two-cols .col:first-child { 1693 display:block; 1694 width: 98%; 1695 margin:0 auto; 1696 padding:0; 1697 float:none; 1698 text-align: left; 1699 clear: both; 1700 } 1701 #content { 1702 width: 100%; 1703 padding-top: .5em; 1704 } 1705 } 1706 @media screen and (max-width: 720px) { 1707 .smallscreen {display: none;} 1708 #help-button {width:20px; overflow: hidden;} 1709 #info-box2 {float:none;} 1710 #dashboard-items div {display: block;margin-bottom: 1em; padding: 0 1em;} 1711 } 1712 @media screen and (max-width: 492px) { 1713 #header {height:3.6rem;} 1714 #wrapper {font-size: 1.6rem;} 1715 .page-title, #info-boxes, .media-item {display: inline-block;} 1716 div.media-list .media-item {width: 90%; float: none} 1717 #info-box1 select {width: 12rem; margin-right: .6rem;} 1718 #info-box1 p.nomobile, label.nomobile {display: none;} 1719 #help-button {height:26px; width:26px; background-color: #A2CBE9; padding: 0; margin:0;font-size: 1rem;line-height: 68px} 1720 } -
admin/update.php
r1358 r1468 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 echo '<h2>'.__('Dotclear update').'</h2>'; 183 184 if (!empty($_GET['nocache'])) { 185 dcPage::message(__('Manual checking of update done successfully.')); 186 } 187 } 188 178 189 if (!$step) 179 190 { … … 181 192 if (empty($new_v)) 182 193 { 183 echo '<p><strong>'.__('No newer Dotclear version available.').'</strong></p>'; 194 echo '<p><strong>'.__('No newer Dotclear version available.').'</strong></p>'. 195 '<form action="'.$p_url.'" method="get">'. 196 '<p><input type="hidden" name="nocache" value="1" />'. 197 '<input type="submit" value="'.__('Force checking update Dotclear').'" /></p>'. 198 '</form>'; 184 199 } 185 200 else -
admin/update.php
r1462 r1468 171 171 dcPage::jsPageTabs($default_tab). 172 172 dcPage::jsLoad('js/_update.js') 173 : '') 173 : ''), 174 dcPage::breadcrumb( 175 array( 176 __('System') => '', 177 '<span class="page-title">'.__('Dotclear update').'</span>' => '' 178 )) 174 179 ); 175 180 -
inc/admin/lib.dc.page.php
r1461 r1468 164 164 if ($core->error->flag()) { 165 165 echo 166 '<div class="error"><p><strong>'.(count($core->error->getErrors()) > 1 ? __('Errors:') : __('Error:')).'</ p></strong>'.166 '<div class="error"><p><strong>'.(count($core->error->getErrors()) > 1 ? __('Errors:') : __('Error:')).'</strong></p>'. 167 167 $core->error->toHTML(). 168 168 '</div>'; … … 508 508 self::jsVar('dotclear.msg.confirm_delete_theme', 509 509 __('Are you sure you want to delete "%s" theme?')). 510 self::jsVar('dotclear.msg.confirm_delete_backup', 511 __('Are you sure you want to delete this backup?')). 510 512 self::jsVar('dotclear.msg.zip_file_content', 511 513 __('Zip file content')). -
inc/admin/lib.dc.page.php
r1462 r1468 49 49 50 50 # Top of admin page 51 public static function open($title='', $head='')51 public static function open($title='',$head='',$breadcrumb='') 52 52 { 53 53 global $core; … … 73 73 } 74 74 $blog_box = 75 '<p><label for="switchblog" class="classic ">'.76 __('Blogs:').' '.75 '<p><label for="switchblog" class="classic nomobile">'. 76 __('Blogs:').'</label> '. 77 77 $core->formNonce(). 78 78 form::combo('switchblog',$blogs,$core->blog->id). 79 '</ label></p>'.79 '</p>'. 80 80 '<noscript><p><input type="submit" value="'.__('ok').'" /></p></noscript>'; 81 81 } … … 93 93 "<head>\n". 94 94 ' <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />'."\n". 95 ' <title>'.$title.' - '.html::escapeHTML($core->blog->name).' - '.html::escapeHTML(DC_VENDOR_NAME).' - '.DC_VERSION.'</title>'."\n".96 97 95 ' <meta name="ROBOTS" content="NOARCHIVE,NOINDEX,NOFOLLOW" />'."\n". 98 96 ' <meta name="GOOGLEBOT" content="NOSNIPPET" />'."\n". 97 ' <meta name="viewport" content="width=device-width, initial-scale=1.0" />'."\n". 98 ' <title>'.$title.' - '.html::escapeHTML($core->blog->name).' - '.html::escapeHTML(DC_VENDOR_NAME).' - '.DC_VERSION.'</title>'."\n". 99 99 100 100 101 self::jsLoadIE7(). … … 133 134 '<form action="index.php" method="post">'. 134 135 $blog_box. 135 '<p ><a href="'.$core->blog->url.'" onclick="window.open(this.href);return false;" title="'.__('Go to site').' ('.__('new window').')'.'">'.__('Go to site').' <img src="images/outgoing.png" alt="" /></a>'.136 '<p class="nomobile"><a href="'.$core->blog->url.'" onclick="window.open(this.href);return false;" title="'.__('Go to site').' ('.__('new window').')'.'">'.__('Go to site').' <img src="images/outgoing.png" alt="" /></a>'. 136 137 '</p></form>'. 137 138 '</div>'. 138 139 '<div id="info-box2">'. 139 '<a '.(preg_match('/index.php$/',$_SERVER['REQUEST_URI']) ? ' class="active"' : '').'href="index.php">'.__('My dashboard').'</a>'.140 '<span > | </span><a'.(preg_match('/preferences.php(\?.*)?$/',$_SERVER['REQUEST_URI']) ? ' class="active"' : '').'href="preferences.php">'.__('My preferences').'</a>'.141 '<span > | </span><a href="index.php?logout=1" class="logout">'.sprintf(__('Logout %s'),$core->auth->userID()).' <img src="images/logout.png" alt="" /></a>'.140 '<a class="smallscreen'.(preg_match('/index.php$/',$_SERVER['REQUEST_URI']) ? ' active' : '').'" href="index.php">'.__('My dashboard').'</a>'. 141 '<span class="smallscreen"> | </span><a class="smallscreen'.(preg_match('/preferences.php(\?.*)?$/',$_SERVER['REQUEST_URI']) ? ' active' : '').'" href="preferences.php">'.__('My preferences').'</a>'. 142 '<span class="smallscreen"> | </span><a href="index.php?logout=1" class="logout">'.sprintf(__('Logout %s'),$core->auth->userID()).' <img src="images/logout.png" alt="" /></a>'. 142 143 '</div>'. 143 144 '</div>'. … … 158 159 } 159 160 161 // Display breadcrumb (if given) before any error message 162 echo $breadcrumb; 163 160 164 if ($core->error->flag()) { 161 165 echo … … 176 180 "</div>\n". // End of #main 177 181 178 '<div id="main-menu">'."\n"; 182 '<div id="main-menu">'."\n". 183 184 '<form id="search-menu" action="search.php" method="get">'. 185 '<p><label for="q" class="hidden">'.__('Search:').' </label>'.form::field('q',30,255,''). 186 '<input type="submit" value="'.__('OK').'" /></p>'. 187 '</form>'; 179 188 180 189 foreach ($menu as $k => $v) { … … 193 202 echo 194 203 '</div>'."\n". // End of #main-menu 195 '<div id="footer"><a href="http://dotclear.org/" title="'.$text.'"><img src="style/dc_logo _footer.png" alt="'.$text.'" /></a></div>'."\n".204 '<div id="footer"><a href="http://dotclear.org/" title="'.$text.'"><img src="style/dc_logos/w-dotclear90.png" alt="'.$text.'" /></a></div>'."\n". 196 205 "</div>\n"; // End of #wrapper 197 206 … … 204 213 } 205 214 206 public static function openPopup($title='', $head='')215 public static function openPopup($title='',$head='',$breadcrumb='') 207 216 { 208 217 global $core; … … 216 225 'xml:lang="'.$core->auth->getInfo('user_lang').'" '. 217 226 'lang="'.$core->auth->getInfo('user_lang').'">'."\n". 227 '<meta name="viewport" content="width=device-width, initial-scale=1.0" />'."\n". 218 228 "<head>\n". 219 229 ' <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />'."\n". … … 241 251 '<body id="dotclear-admin" class="popup">'."\n". 242 252 243 '<div id="top "><h1>'.DC_VENDOR_NAME.'</h1></div>'."\n";253 '<div id="top hidden"><h1>'.DC_VENDOR_NAME.'</h1></div>'."\n"; 244 254 245 255 echo … … 247 257 '<div id="main">'."\n". 248 258 '<div id="content">'."\n"; 259 260 // display breadcrumb if given 261 echo $breadcrumb; 249 262 250 263 if ($core->error->flag()) { … … 264 277 "</div>\n". // End of #wrapper 265 278 '</body></html>'; 279 } 280 281 public static function breadcrumb($elements=null,$with_home_link=true,$echo=false) 282 { 283 // First item of array elements should be blog's name, System or Plugins 284 $res = '<h2>'.($with_home_link ? 285 '<a class="go_home" href="index.php"><img src="style/dashboard.png" alt="'.__('Go to dashboard').'" /></a>' : 286 '<img src="style/dashboard-alt.png" alt="" />'); 287 $index = 0; 288 foreach ($elements as $element => $url) { 289 $res .= ($with_home_link ? ($index == 1 ? ' : ' : ' › ') : ($index == 0 ? ' ' : ' › ')). 290 ($url ? '<a href="'.$url.'">' : '').$element.($url ? '</a>' : ''); 291 $index++; 292 } 293 $res .= '</h2>'; 294 if ($echo) { 295 echo $res; 296 } 297 return $res; 266 298 } 267 299 … … 333 365 { 334 366 $args = func_get_args(); 367 368 $args = new ArrayObject($args); 369 370 # --BEHAVIOR-- adminPageHelpBlock 371 $GLOBALS['core']->callBehavior('adminPageHelpBlock',$args); 372 335 373 if (empty($args)) { 336 374 return; … … 411 449 412 450 self::jsVar('dotclear.msg.help', 413 __('help')). 451 __('Help about this page')). 452 self::jsVar('dotclear.msg.help_hide', 453 __('Hide')). 414 454 self::jsVar('dotclear.msg.no_selection', 415 455 __('no selection')). … … 436 476 self::jsVar('dotclear.msg.confirm_delete_post', 437 477 __("Are you sure you want to delete this entry?")). 478 self::jsVar('dotclear.msg.click_to_unlock', 479 __("Click here to unlock the field")). 438 480 self::jsVar('dotclear.msg.confirm_spam_delete', 439 481 __('Are you sure you want to delete all spams?')). … … 478 520 self::jsVar('dotclear.msg.confirm_change_post_format', 479 521 __('You have unsaved changes. Switch post format will loose these changes. Proceed anyway?')). 480 self::jsVar('dotclear.msg.confirm_change_post_format_noconvert',481 __("Warning: post format change will not convert existing content. You will need to apply new format by yourself. Proceed anyway?")).482 522 self::jsVar('dotclear.msg.load_enhanced_uploader', 483 523 __('Loading enhanced uploader, please wait.')). … … 489 529 { 490 530 return 491 '<!--[if lt IE 8]>'."\n".492 self::jsLoad('js/ie7/IE 8.js').531 '<!--[if lt IE 9]>'."\n". 532 self::jsLoad('js/ie7/IE9.js'). 493 533 '<link rel="stylesheet" type="text/css" href="style/iesucks.css" />'."\n". 494 534 '<![endif]-->'."\n"; … … 692 732 '<link rel="stylesheet" type="text/css" href="style/jsUpload/style.css" />'."\n". 693 733 694 '<script id="template-upload" type="text/x-tmpl">695 {% for (var i=0, file; file=o.files[i]; i++) { %}696 <div class="template-upload fade">697 <div class="upload-file">698 <div class="upload-fileinfo">699 <span class="upload-filename">{%=file.name%}</span>700 <span class="upload-filesize">({%=o.formatFileSize(file.size)%})</span>701 <span class="upload-filecancel cancel">'.__('Cancel').'</span>702 {% if (!o.files.error && !i && !o.options.autoUpload) { %}703 <input type="submit" class="button start" value="'.__('Send').'"/>704 {% } %}705 <span class="upload-filemsg"></span>706 </div>707 {% if (!o.files.error) { %}708 <div class="upload-progress progress progress-success progress-striped active"><div class="bar" style="width:0%;"></div></div>709 {% } %}710 </div>711 {% } %}712 </script>713 <!-- The template to display files available for download -->714 <script id="template-download" type="text/x-tmpl">715 {% for (var i=0, file; file=o.files[i]; i++) { %}716 <div class="template-download fade">717 <div class="upload-file">718 <div class="upload-fileinfo">719 <span class="upload-filename">{%=file.name%}</span>720 <span class="upload-filesize">({%=o.formatFileSize(file.size)%})</span>721 <span class="upload-filemsg{% if (file.error) { %} upload-error{% } %}">722 {% if (file.error) { %}723 '.__('Error:').' {%=file.error%}724 {% } else { %}725 '.__('File successfully uploaded.').'726 {% } %}727 </span>728 </div>729 <div class="upload-progress">730 {% if (!file.error) { %}731 <div class="bar" style="width:100%;">100%</div>732 {% } %}733 </div>734 </div>735 {% } %}736 </script>'.737 738 self::jsLoad('js/jsUpload/vendor/jquery.ui.widget.js').739 self::jsLoad('js/jsUpload/tmpl.js').740 self::jsLoad('js/jsUpload/load-image.js').741 self::jsLoad('js/jsUpload/jquery.iframe-transport.js').742 self::jsLoad('js/jsUpload/jquery.fileupload.js').743 self::jsLoad('js/jsUpload/jquery.fileupload-process.js').744 self::jsLoad('js/jsUpload/jquery.fileupload-resize.js').745 self::jsLoad('js/jsUpload/jquery.fileupload-ui.js').746 747 734 '<script type="text/javascript">'."\n". 748 735 "//<![CDATA[\n". … … 761 748 self::jsVar('dotclear.jsUpload.msg.clean',__('Clean')). 762 749 self::jsVar('dotclear.jsUpload.msg.upload',__('Upload')). 750 self::jsVar('dotclear.jsUpload.msg.send',__('Send')). 751 self::jsVar('dotclear.jsUpload.msg.file_successfully_uploaded',__('File successfully uploaded.')). 763 752 self::jsVar('dotclear.jsUpload.msg.no_file_in_queue',__('No file in queue.')). 764 753 self::jsVar('dotclear.jsUpload.msg.file_in_queue',__('1 file in queue.')). … … 767 756 self::jsVar('dotclear.jsUpload.base_url',$base_url). 768 757 "\n//]]>\n". 769 "</script>\n"; 758 "</script>\n". 759 760 self::jsLoad('js/jsUpload/vendor/jquery.ui.widget.js'). 761 self::jsLoad('js/jsUpload/tmpl.js'). 762 self::jsLoad('js/jsUpload/template-upload.js'). 763 self::jsLoad('js/jsUpload/template-download.js'). 764 self::jsLoad('js/jsUpload/load-image.js'). 765 self::jsLoad('js/jsUpload/jquery.iframe-transport.js'). 766 self::jsLoad('js/jsUpload/jquery.fileupload.js'). 767 self::jsLoad('js/jsUpload/jquery.fileupload-process.js'). 768 self::jsLoad('js/jsUpload/jquery.fileupload-resize.js'). 769 self::jsLoad('js/jsUpload/jquery.fileupload-ui.js'); 770 770 } 771 771 -
inc/admin/lib.pager.php
r1415 r1468 87 87 html::escapeHTML($this->rs->cat_title)); 88 88 } else { 89 $cat_title = __(' None');89 $cat_title = __('(No cat)'); 90 90 } 91 91 -
inc/admin/lib.pager.php
r1364 r1468 58 58 } 59 59 60 echo '<p >'.__('Page(s)').' : '.$pager->getLinks().'</p>';60 echo '<p class="pagination">'.__('Page(s)').' : '.$pager->getLinks().'</p>'; 61 61 62 62 $blocks = explode('%s',$html_block); … … 71 71 echo $blocks[1]; 72 72 73 echo '<p >'.__('Page(s)').' : '.$pager->getLinks().'</p>';73 echo '<p class="pagination">'.__('Page(s)').' : '.$pager->getLinks().'</p>'; 74 74 } 75 75 } … … 93 93 switch ($this->rs->post_status) { 94 94 case 1: 95 $img_status = sprintf($img,__(' published'),'check-on.png');95 $img_status = sprintf($img,__('Published'),'check-on.png'); 96 96 break; 97 97 case 0: 98 $img_status = sprintf($img,__(' unpublished'),'check-off.png');98 $img_status = sprintf($img,__('Unpublished'),'check-off.png'); 99 99 break; 100 100 case -1: 101 $img_status = sprintf($img,__(' scheduled'),'scheduled.png');101 $img_status = sprintf($img,__('Scheduled'),'scheduled.png'); 102 102 break; 103 103 case -2: 104 $img_status = sprintf($img,__(' pending'),'check-wrn.png');104 $img_status = sprintf($img,__('Pending'),'check-wrn.png'); 105 105 break; 106 106 } … … 108 108 $protected = ''; 109 109 if ($this->rs->post_password) { 110 $protected = sprintf($img,__(' protected'),'locker.png');110 $protected = sprintf($img,__('Protected'),'locker.png'); 111 111 } 112 112 113 113 $selected = ''; 114 114 if ($this->rs->post_selected) { 115 $selected = sprintf($img,__(' selected'),'selected.png');115 $selected = sprintf($img,__('Selected'),'selected.png'); 116 116 } 117 117 … … 170 170 } 171 171 172 echo '<p >'.__('Page(s)').' : '.$pager->getLinks().'</p>';172 echo '<p class="pagination">'.__('Page(s)').' : '.$pager->getLinks().'</p>'; 173 173 174 174 $blocks = explode('%s',$html_block); … … 183 183 echo $blocks[1]; 184 184 185 echo '<p >'.__('Page(s)').' : '.$pager->getLinks().'</p>';185 echo '<p class="pagination">'.__('Page(s)').' : '.$pager->getLinks().'</p>'; 186 186 } 187 187 } … … 192 192 switch ($this->rs->post_status) { 193 193 case 1: 194 $img_status = sprintf($img,__(' published'),'check-on.png');194 $img_status = sprintf($img,__('Published'),'check-on.png'); 195 195 break; 196 196 case 0: 197 $img_status = sprintf($img,__(' unpublished'),'check-off.png');197 $img_status = sprintf($img,__('Unpublished'),'check-off.png'); 198 198 break; 199 199 case -1: 200 $img_status = sprintf($img,__(' scheduled'),'scheduled.png');200 $img_status = sprintf($img,__('Scheduled'),'scheduled.png'); 201 201 break; 202 202 case -2: 203 $img_status = sprintf($img,__(' pending'),'check-wrn.png');203 $img_status = sprintf($img,__('Pending'),'check-wrn.png'); 204 204 break; 205 205 } … … 207 207 $protected = ''; 208 208 if ($this->rs->post_password) { 209 $protected = sprintf($img,__(' protected'),'locker.png');209 $protected = sprintf($img,__('Protected'),'locker.png'); 210 210 } 211 211 212 212 $selected = ''; 213 213 if ($this->rs->post_selected) { 214 $selected = sprintf($img,__(' selected'),'selected.png');214 $selected = sprintf($img,__('Selected'),'selected.png'); 215 215 } 216 216 … … 267 267 } 268 268 269 echo '<p >'.__('Page(s)').' : '.$pager->getLinks().'</p>';269 echo '<p class="pagination">'.__('Page(s)').' : '.$pager->getLinks().'</p>'; 270 270 271 271 $blocks = explode('%s',$html_block); … … 280 280 echo $blocks[1]; 281 281 282 echo '<p >'.__('Page(s)').' : '.$pager->getLinks().'</p>';282 echo '<p class="pagination">'.__('Page(s)').' : '.$pager->getLinks().'</p>'; 283 283 } 284 284 } … … 306 306 switch ($this->rs->comment_status) { 307 307 case 1: 308 $img_status = sprintf($img,__(' published'),'check-on.png');308 $img_status = sprintf($img,__('Published'),'check-on.png'); 309 309 break; 310 310 case 0: 311 $img_status = sprintf($img,__(' unpublished'),'check-off.png');311 $img_status = sprintf($img,__('Unpublished'),'check-off.png'); 312 312 break; 313 313 case -1: 314 $img_status = sprintf($img,__(' pending'),'check-wrn.png');314 $img_status = sprintf($img,__('Pending'),'check-wrn.png'); 315 315 break; 316 316 case -2: 317 $img_status = sprintf($img,__(' junk'),'junk.png');317 $img_status = sprintf($img,__('Junk'),'junk.png'); 318 318 break; 319 319 } … … 374 374 } 375 375 376 echo '<p >'.__('Page(s)').' : '.$pager->getLinks().'</p>';376 echo '<p class="pagination">'.__('Page(s)').' : '.$pager->getLinks().'</p>'; 377 377 378 378 $blocks = explode('%s',$html_block); … … 387 387 echo $blocks[1]; 388 388 389 echo '<p >'.__('Page(s)').' : '.$pager->getLinks().'</p>';389 echo '<p class="pagination">'.__('Page(s)').' : '.$pager->getLinks().'</p>'; 390 390 } 391 391 } -
inc/core/class.dc.blog.php
r1353 r1468 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.blog.php
r1429 r1468 81 81 $this->desc = $b->blog_desc; 82 82 $this->url = $b->blog_url; 83 $this->host = preg_replace('|^([a-z]{3,}://)(.*?)/.*$|','$1$2',$this->url);83 $this->host = http::getHostFromURL($this->url); 84 84 $this->creadt = strtotime($b->blog_creadt); 85 85 $this->upddt = strtotime($b->blog_upddt); … … 91 91 $this->public_path = path::fullFromRoot($this->settings->system->public_path,DC_ROOT); 92 92 93 $this->post_status['-2'] = __(' pending');94 $this->post_status['-1'] = __(' scheduled');95 $this->post_status['0'] = __(' unpublished');96 $this->post_status['1'] = __(' published');97 98 $this->comment_status['-2'] = __(' junk');99 $this->comment_status['-1'] = __(' pending');100 $this->comment_status['0'] = __(' unpublished');101 $this->comment_status['1'] = __(' published');93 $this->post_status['-2'] = __('Pending'); 94 $this->post_status['-1'] = __('Scheduled'); 95 $this->post_status['0'] = __('Unpublished'); 96 $this->post_status['1'] = __('Published'); 97 98 $this->comment_status['-2'] = __('Junk'); 99 $this->comment_status['-1'] = __('Pending'); 100 $this->comment_status['0'] = __('Unpublished'); 101 $this->comment_status['1'] = __('Published'); 102 102 103 103 # --BEHAVIOR-- coreBlogConstruct … … 203 203 @param ids <b>mixed</b> Comment(s) ID(s) 204 204 @param del <b>boolean</b> If comment is delete, set this to true 205 @param affected_posts <b>mixed</b> Posts(s) ID(s) 206 */ 207 public function triggerComments($ids, $del=false, $affected_posts=null) 205 */ 206 public function triggerComments($ids,$del=false) 208 207 { 209 208 $co_ids = dcUtils::cleanIds($ids); 210 $a_ids = dcUtils::cleanIds($affected_posts);211 $a_tbs = array();212 209 213 210 # a) Retrieve posts affected by comments edition 214 if (empty($a_ids)) { 215 $strReq = 216 'SELECT post_id, comment_trackback '. 217 'FROM '.$this->prefix.'comment '. 218 'WHERE comment_id'.$this->con->in($co_ids). 219 'GROUP BY post_id,comment_trackback'; 220 221 $rs = $this->con->select($strReq); 222 223 while ($rs->fetch()) { 224 $a_ids[] = (integer) $rs->post_id; 225 $a_tbs[] = (integer) $rs->comment_trackback; 226 } 211 $strReq = 212 'SELECT post_id, comment_trackback '. 213 'FROM '.$this->prefix.'comment '. 214 'WHERE comment_id'.$this->con->in($co_ids). 215 'GROUP BY post_id,comment_trackback'; 216 217 $rs = $this->con->select($strReq); 218 219 $a_ids = $a_tbs = array(); 220 while ($rs->fetch()) { 221 $a_ids[] = (integer) $rs->post_id; 222 $a_tbs[] = (integer) $rs->comment_trackback; 227 223 } 228 224 … … 259 255 { 260 256 $nb_comment = $nb_trackback = 0; 261 //$cur->nb_comment = $nb_comment;262 257 foreach($b_ids as $b_key => $b_id) 263 258 { … … 510 505 $this->core->callBehavior('coreBeforeCategoryCreate',$this,$cur); 511 506 512 $id = $this->categories()->addNode($cur,$parent); 513 # Update category's cursor 514 $rs = $this->getCategory($id); 515 if (!$rs->isEmpty()) { 516 $cur->cat_lft = $rs->cat_lft; 517 $cur->cat_rgt = $rs->cat_rgt; 518 } 507 $this->categories()->addNode($cur,$parent); 519 508 520 509 # --BEHAVIOR-- coreAfterCategoryCreate … … 2229 2218 $co_ids = dcUtils::cleanIds($ids); 2230 2219 2231 if (empty($ co_ids)) {2220 if (empty($ids)) { 2232 2221 throw new Exception(__('No such comment ID')); 2233 }2234 2235 # Retrieve posts affected by comments edition2236 $affected_posts = array();2237 $strReq =2238 'SELECT distinct(post_id) '.2239 'FROM '.$this->prefix.'comment '.2240 'WHERE comment_id'.$this->con->in($co_ids);2241 2242 $rs = $this->con->select($strReq);2243 2244 while ($rs->fetch()) {2245 $affected_posts[] = (integer) $rs->post_id;2246 2222 } 2247 2223 … … 2273 2249 2274 2250 $this->con->execute($strReq); 2275 $this->triggerComments($co_ids, true, $affected_posts);2251 $this->triggerComments($co_ids,true); 2276 2252 $this->triggerBlog(); 2277 2253 } … … 2328 2304 2329 2305 if ($cur->comment_site !== null && $cur->comment_site != '') { 2330 if (!preg_match('|^http(s?)://| i',$cur->comment_site, $matches)) {2306 if (!preg_match('|^http(s?)://|',$cur->comment_site)) { 2331 2307 $cur->comment_site = 'http://'.$cur->comment_site; 2332 }else{2333 $cur->comment_site = strtolower($matches[0]).substr($cur->comment_site, strlen($matches[0]));2334 2308 } 2335 2309 } -
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) { -
inc/core/class.dc.media.php
r1381 r1468 499 499 @param post_id <b>integer</b> Post ID 500 500 @param media_id <b>integer</b> Optionnal media ID 501 @param return_rs <b>boolean</b> Whether to return a resultset (true) or an array (false, default value). 502 @return <b>array</b> Array or ResultSet of fileItems 503 */ 504 public function getPostMedia($post_id,$media_id=null,$return_rs=false) 501 @return <b>array</b> Array of fileItems 502 */ 503 public function getPostMedia($post_id,$media_id=null) 505 504 { 506 505 $params = array( … … 518 517 $f = $this->fileRecord($rs); 519 518 if ($f !== null) { 520 $res[] = $ return_rs ? new ArrayObject($f) : $f;521 } 522 } 523 524 return $re turn_rs ? staticRecord::newFromArray($res) : $res;519 $res[] = $f; 520 } 521 } 522 523 return $res; 525 524 } 526 525 -
inc/prepend.php
r1352 r1468 123 123 # Constants 124 124 define('DC_ROOT',path::real(dirname(__FILE__).'/..')); 125 define('DC_VERSION','2. 5.3-dev');125 define('DC_VERSION','2.6-dev'); 126 126 define('DC_DIGESTS',dirname(__FILE__).'/digests'); 127 127 define('DC_L10N_ROOT',dirname(__FILE__).'/../locales'); -
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/en/main.po
r1462 r1468 753 753 msgstr "" 754 754 755 msgid "You have one spam comment s."755 msgid "You have one spam comment." 756 756 msgstr "" 757 757 … … 2157 2157 msgstr "" 2158 2158 2159 msgid "Warning: post format change will not convert existing content. You will need to apply new format by yourself. Proceed anyway?"2160 msgstr ""2161 2162 2159 msgid "Loading enhanced uploader, please wait." 2163 2160 msgstr "" -
locales/fr/main.po
r1454 r1468 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 … … 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" … … 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." … … 3060 3078 msgid "Add an introduction to the page." 3061 3079 msgstr "Ajoute une introduction à la page." 3080 3081 msgid "(No cat)" 3082 msgstr "(aucune)" 3083 3084 msgid "Password strength: %s" 3085 msgstr "Force du mot de passe : %s" 3086 3087 msgid "very weak" 3088 msgstr "très faible" 3089 3090 msgid "weak" 3091 msgstr "faible" 3092 3093 msgid "mediocre" 3094 msgstr "moyen" 3095 3096 msgid "strong" 3097 msgstr "fort" 3098 3099 msgid "very strong" 3100 msgstr "très fort" -
locales/fr/main.po
r1462 r1468 793 793 msgstr "Auteur du commentaire :" 794 794 795 msgid "You have one spam comment s."795 msgid "You have one spam comment." 796 796 msgstr "Vous avez un commentaire indésirable." 797 797 … … 1038 1038 #, fuzzy, php-format 1039 1039 msgid "Path <strong>%s</strong> is not writable." 1040 msgstr "Le répertoire <strong>%s</strong> n'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 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" … … 1490 1490 1491 1491 msgid "Plugins" 1492 msgstr " Extensions"1492 msgstr "Plugins" 1493 1493 1494 1494 msgid "Activated plugins" … … 1568 1568 1569 1569 msgid "Search" 1570 msgstr "Recherche "1570 msgstr "Rechercher" 1571 1571 1572 1572 msgid "cancel" … … 1628 1628 1629 1629 msgid "Text formating:" 1630 msgstr " Format du texte :"1630 msgstr "Syntaxe de saisie :" 1631 1631 1632 1632 msgid "Convert to XHTML" … … 1923 1923 msgstr "Requête :" 1924 1924 1925 msgid "Search entries"1926 msgstr "Rechercher d es billets"1927 1928 msgid "Search comments"1929 msgstr "Rechercher d es commentaires"1925 msgid "Search in entries" 1926 msgstr "Rechercher dans les billets" 1927 1928 msgid "Search in comments" 1929 msgstr "Rechercher dans les commentaires" 1930 1930 1931 1931 msgid "schedule" … … 2064 2064 2065 2065 msgid "Mandatory for password recovering procedure." 2066 msgstr " Obligatoire pour la procédure de récupération de mot de passe."2066 msgstr "Indispensable pour la procédure de récupération de mot de passe." 2067 2067 2068 2068 msgid "Password change required to connect" … … 2174 2174 msgstr "Aide" 2175 2175 2176 msgid "Help about this page" 2177 msgstr "Aide pour cette page" 2178 2176 2179 msgid "uncover" 2177 2180 msgstr "dévoiler" … … 2259 2262 2260 2263 msgid "XHTML markup validator" 2261 msgstr "V alidationXHTML"2264 msgstr "Vérifier la validité XHTML" 2262 2265 2263 2266 msgid "XHTML content is valid." … … 2944 2947 msgstr "Date de publication invalide" 2945 2948 2949 msgid "System settings" 2950 msgstr "Réglages système" 2951 2952 msgid "Additional plugins" 2953 msgstr "Modules complémentaires" 2954 2955 msgid "Personal notes:" 2956 msgstr "Notes personnelles :" 2957 2958 msgid "New user" 2959 msgstr "Nouvel utilisateur" 2960 2961 msgid "Published" 2962 msgstr "Publié" 2963 2964 msgid "Unpublished" 2965 msgstr "Non publié" 2966 2967 msgid "Pending" 2968 msgstr "En attente" 2969 2970 msgid "Junk" 2971 msgstr "Indésirable" 2972 2973 msgid "Scheduled" 2974 msgstr "Programmé" 2975 2976 msgid "Protected" 2977 msgstr "Protégé" 2978 2979 msgid "Publish" 2980 msgstr "Publier" 2981 2982 msgid "Unpublish" 2983 msgstr "Mettre hors ligne" 2984 2985 msgid "Mark as pending" 2986 msgstr "Mettre en attente" 2987 2988 msgid "Mark as junk" 2989 msgstr "Mettre en indésirable" 2990 2991 msgid "Next entry" 2992 msgstr "Billet suivant" 2993 2994 msgid "Previous entry" 2995 msgstr "Billet précédent" 2996 2997 msgid "Add an introduction to the post." 2998 msgstr "Ajoute une introduction au billet." 2999 3000 msgid "Add unpublished notes." 3001 msgstr "Ajoute des notes non publiées." 3002 3003 msgid "Edit basename:" 3004 msgstr "Modifier l'URL spécifique :" 3005 3006 msgid "Protect with password" 3007 msgstr "Protéger par un mot de passe" 3008 3009 msgid "Information collected" 3010 msgstr "Informations recueillies" 3011 3012 msgid "Comment submitted" 3013 msgstr "Commentaire déposé" 3014 3015 msgid "Entry status" 3016 msgstr "État du billet" 3017 3018 msgid "Publication date and hour" 3019 msgstr "Date et heure de publication" 3020 3021 msgid "Text formating" 3022 msgstr "Syntaxe de saisie" 3023 3024 msgid "Entry lang" 3025 msgstr "Langue du billet" 3026 3027 msgid "Password" 3028 msgstr "Mot de passe" 3029 3030 msgid "Edit basename" 3031 msgstr "URL spécifique" 3032 3033 msgid "Ordering" 3034 msgstr "Classement" 3035 3036 msgid "Filter posts list" 3037 msgstr "Filtrer la liste des billets" 3038 3039 msgid "entries per page" 3040 msgstr "billets par page" 3041 3042 msgid "Show" 3043 msgstr "Afficher" 3044 3045 msgid "Filter blogs list" 3046 msgstr "Filtrer la liste des blogs" 3047 3048 msgid "blogs per page" 3049 msgstr "blogs par page" 3050 3051 msgid "Filter comments and trackbacks list" 3052 msgstr "Filtrer la liste des commentaires et rétroliens" 3053 3054 msgid "Filter users list" 3055 msgstr "Filtrer la liste des utilisateurs" 3056 3057 msgid "users per page" 3058 msgstr "utilisateurs par page" 3059 3060 msgid "Available themes in your installation" 3061 msgstr "Thèmes disponibles sur votre installation" 3062 3063 msgid "You can also install themes by uploading or downloading zip files." 3064 msgstr "Vous pouvez aussi installer des thèmes en les déposant ou en téléchargeant des fichiers zip." 3065 3066 msgid "Add themes to your installation" 3067 msgstr "Ajouter des thèmes sur votre installation" 3068 3069 msgid "Select this comment" 3070 msgstr "Sélectionner ce commentaire" 3071 3072 msgid "Next page" 3073 msgstr "Page suivante" 3074 3075 msgid "Previous page" 3076 msgstr "Page précédente" 3077 3078 msgid "Add an introduction to the page." 3079 msgstr "Ajoute une introduction à la page." 3080 2946 3081 msgid "(No cat)" 2947 3082 msgstr "(aucune)" -
locales/fr/plugins.po
r1396 r1468 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" -
locales/fr/plugins.po
r1445 r1468 238 238 239 239 #, php-format 240 msgid "%s configuration"241 msgstr " configuration%s"240 msgid "%s filter configuration" 241 msgstr "Configuration du filtre %s" 242 242 243 243 msgid "Information" … … 1024 1024 msgid "" 1025 1025 "On the other hand, in WordPress, a post can not be uncategorized, and a " 1026 "default installation has a first category labelised <i>\"Uncategorized\"</ "1027 " i>.If you did not change that category, you can just ignore it while "1026 "default installation has a first category labelised <i>\"Uncategorized\"</i>." 1027 "If you did not change that category, you can just ignore it while " 1028 1028 "importing your blog, as Dotclear allows you to actually keep your posts " 1029 1029 "uncategorized." … … 1031 1031 "D'autre part, dans WordPress, un billet ne peut pas être sans catégorie, et " 1032 1032 "une installation par défaut possède systématiquement une première catégorie " 1033 "nommée <i>« sans catégorie »</ i>. Si vous n'avez pas changé cette "1033 "nommée <i>« sans catégorie »</ i>. Si vous n'avez pas changé cette " 1034 1034 "catégorie, vous pouvez simplement l'ignorer lors de l'importation sur votre " 1035 1035 "blog, puisque Dotclear vous permet réellement de conserver votre message " … … 1131 1131 1132 1132 msgid "Vacuum tables" 1133 msgstr " Optimiser les tables"1133 msgstr "Vidage des tables" 1134 1134 1135 1135 msgid "Counters" … … 1137 1137 1138 1138 msgid "Reset comments and ping counters" 1139 msgstr "Re calculerles compteurs de commentaires et de signalements"1139 msgstr "Remet à zéro les compteurs de commentaires et de signalements" 1140 1140 1141 1141 msgid "Search engine index" … … 1146 1146 1147 1147 msgid "Index all posts" 1148 msgstr "Index ertous les billets"1148 msgstr "Indexation de tous les billets" 1149 1149 1150 1150 msgid "Index all comments" 1151 msgstr "Index ertous les commentaires"1151 msgstr "Indexation de tous les commentaires" 1152 1152 1153 1153 msgid "Vacuum logs" … … 1155 1155 1156 1156 msgid "Delete all logs" 1157 msgstr "Suppr imertous les journaux"1157 msgstr "Suppression de tous les journaux" 1158 1158 1159 1159 msgid "Empty templates cache directory" … … 1161 1161 1162 1162 msgid "Empty directory" 1163 msgstr "Vid er lerépertoire"1163 msgstr "Vidage du répertoire" 1164 1164 1165 1165 msgid "Pages" … … 1247 1247 1248 1248 msgid "Go to this page on the site" 1249 msgstr " Aller sur cette page"1249 msgstr "Voir cette page sur le site" 1250 1250 1251 1251 msgid "Page status:" … … 1283 1283 1284 1284 msgid "Pings" 1285 msgstr "Signalements "1285 msgstr "Signalements (pings)" 1286 1286 1287 1287 msgid "Ping services" … … 1783 1783 msgid "" 1784 1784 "Once included in a sidebar, widgets have configuration options that you can " 1785 "reach by clicking on the + signnext to their name."1785 "reach by clicking on the arrow next to their name." 1786 1786 msgstr "" 1787 1787 "Une fois inclus dans un bandeau, les widgets ont généralement des options " 1788 "que vous pouvez configurer. Cliquez sur l e signe +à côté de leur nom pour y "1788 "que vous pouvez configurer. Cliquez sur la flèche à côté de leur nom pour y " 1789 1789 "accéder." 1790 1790 … … 1919 1919 #~ msgid "The backup file does not appear to be well formed." 1920 1920 #~ msgstr "Le fichier de sauvegarde semble mal formaté." 1921 1922 msgid "Settings for %s" 1923 msgstr "Réglages pour %s" 1924 1925 msgid "Settings for %s" 1926 msgstr "Réglages pour %s" 1927 1928 msgid "User preferences" 1929 msgstr "Préférences utilisateur" 1930 1931 msgid "Global preferences" 1932 msgstr "Préférences globales" 1933 1934 msgid "Edit theme files" 1935 msgstr "Modifier les fichiers du thème" -
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.iplookup.php
r1361 r1468 78 78 '<form action="'.html::escapeURL($url).'" method="post">'. 79 79 '<fieldset><legend>' . __('IP Lookup servers') . '</legend>'. 80 '<p><label for="bls">'.__('Add here a coma separated list of servers.'). 80 '<p><label for="bls">'.__('Add here a coma separated list of servers.').'</label>'. 81 81 form::textarea('bls',40,3,html::escapeHTML($bls),'maximal'). 82 82 '</p>'. 83 '<p><input type="submit" value="'.__('Save').'" /></ label></p>'.83 '<p><input type="submit" value="'.__('Save').'" /></p>'. 84 84 $this->core->formNonce().'</p>'. 85 85 '</fieldset>'. -
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/attachments/_admin.php
r1467 r1468 12 12 if (!defined('DC_CONTEXT_ADMIN')) { return; } 13 13 14 $core->addBehavior ('adminPostForm Sidebar',array('attachmentAdmin','adminPostFormSidebar'));14 $core->addBehavior ('adminPostFormItems',array('attachmentAdmin','adminPostFormItems')); 15 15 $core->addBehavior ('adminPostAfterForm',array('attachmentAdmin','adminPostAfterForm')); 16 $core->addBehavior('adminPostHeaders',array('attachmentAdmin','postHeaders')); 16 17 17 18 class attachmentAdmin 18 19 { 19 public static function adminPostFormSidebar($post) 20 public static function postHeaders() 21 { 22 return 23 '<script type="text/javascript" src="index.php?pf=attachments/js/post.js"></script>'; 24 } 25 public static function adminPostFormItems($main,$sidebar,$post) 20 26 { 21 27 if ($post !== null) … … 23 29 $core =& $GLOBALS['core']; 24 30 $post_media = $core->media->getPostMedia($post->post_id); 25 echo 26 '<h3 class="clear">'.__('Attachments').'</h3>'; 31 $item = '<h5 class="clear s-attachments">'.__('Attachments').'</h5>'; 27 32 foreach ($post_media as $f) 28 33 { … … 31 36 $ftitle = substr($ftitle,0,16).'...'; 32 37 } 33 echo34 '<div class="media-item ">'.38 $item .= 39 '<div class="media-item s-attachments">'. 35 40 '<a class="media-icon" href="media_item.php?id='.$f->media_id.'">'. 36 41 '<img src="'.$f->media_icon.'" alt="" title="'.$f->basename.'" /></a>'. … … 53 58 54 59 if (empty($post_media)) { 55 echo '<p>'.__('No attachment.').'</p>';56 } else {57 }58 echo '<p><a class="button" href="media.php?post_id='.$post->post_id.'">'.__('Add files to this entry').'</a></p>';60 $item .= '<p class="form-note s-attachments">'.__('No attachment.').'</p>'; 61 } 62 $item .= '<p class="s-attachments"><a class="button" href="media.php?post_id='.$post->post_id.'">'.__('Add files to this entry').'</a></p>'; 63 $sidebar['metas-box']['items']['attachments']= $item; 59 64 } 60 65 }
Note: See TracChangeset
for help on using the changeset viewer.