Changeset 782:01efbf050a8a for plugins
- Timestamp:
- 12/06/11 11:43:14 (14 years ago)
- Branch:
- formfilters
- Parents:
- 781:b509ac00bf4a (diff), 779:58c45f1b96e5 (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. - Location:
- plugins
- Files:
-
- 1 deleted
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/aboutConfig/index.php
r589 r782 132 132 <div id="local" class="multi-part" title="<?php echo __('blog settings'); ?>"> 133 133 134 <?php 134 <?php 135 135 $table_header = '<table class="settings" id="%s"><caption>%s</caption>'. 136 136 '<thead>'. … … 146 146 147 147 $settings = array(); 148 148 149 foreach ($core->blog->settings->dumpNamespaces() as $ns => $namespace) { 149 150 foreach ($namespace->dumpSettings() as $k => $v) { -
plugins/aboutConfig/index.php
r457 r782 4 4 # This file is part of Dotclear 2. 5 5 # 6 # Copyright (c) 2003-201 0Olivier Meunier & Association Dotclear6 # Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear 7 7 # Licensed under the GPL version 2.0 license. 8 8 # See LICENSE file or … … 12 12 if (!defined('DC_CONTEXT_ADMIN')) { return; } 13 13 14 # Local navigation 15 if (!empty($_POST['gs_nav'])) { 16 http::redirect($p_url.$_POST['gs_nav']); 17 exit; 18 } 19 if (!empty($_POST['ls_nav'])) { 20 http::redirect($p_url.$_POST['ls_nav']); 21 exit; 22 } 23 14 24 # Local settings update 15 25 if (!empty($_POST['s']) && is_array($_POST['s'])) … … 76 86 return 77 87 '<tr>'. 78 '<td ><label for="s_'.$id.'">'.sprintf($slabel,html::escapeHTML($id)).'</label></td>'.79 '<t h scope="row">'.$field.'</th>'.88 '<td scope="raw"><label for="s_'.$id.'">'.sprintf($slabel,html::escapeHTML($id)).'</label></td>'. 89 '<td>'.$field.'</td>'. 80 90 '<td>'.$s['type'].'</td>'. 81 91 '<td>'.html::escapeHTML($s['label']).'</td>'. … … 88 98 <?php echo dcPage::jsPageTabs($part); ?> 89 99 <style type="text/css"> 90 .ns-name { background: #dfdfdf; color: #333; padding-top: 0.3em; padding-bottom: 0.3em; font-size: 1.1em; } 100 table.settings { border: 1px solid #999; margin-bottom: 2em; } 101 table.settings th { background: #f5f5f5; color: #444; padding-top: 0.3em; padding-bottom: 0.3em; } 102 p.anchor-nav {float: right; } 91 103 </style> 104 <script type="text/javascript"> 105 //<![CDATA[ 106 $(function() { 107 $("#gs_submit").hide(); 108 $("#ls_submit").hide(); 109 $("#gs_nav").change(function() { 110 window.location = $("#gs_nav option:selected").val(); 111 }) 112 $("#ls_nav").change(function() { 113 window.location = $("#ls_nav option:selected").val(); 114 }) 115 }); 116 //]]> 117 </script> 92 118 </head> 93 119 … … 102 128 } 103 129 ?> 104 <h2><?php echo html::escapeHTML($core->blog->name); ?> › about:config</h2>130 <h2><?php echo html::escapeHTML($core->blog->name); ?> › <span class="page-title">about:config</span></h2> 105 131 106 132 <div id="local" class="multi-part" title="<?php echo __('blog settings'); ?>"> 107 <form action="plugin.php" method="post"> 108 <table> 109 <caption><?php echo __('Local blog settings list'); ?></caption> 110 <thead> 111 <tr> 112 <th scope="col" class="nowrap">Setting ID</th> 113 <th scope="col"><?php echo __('Value'); ?></th> 114 <th scope="col"><?php echo __('Type'); ?></th> 115 <th scope="col" class="maximal"><?php echo __('Description'); ?></th> 116 </tr> 117 </thead> 118 <tbody> 119 <?php 133 134 <?php 135 $table_header = '<table class="settings" id="%s"><caption>%s</caption>'. 136 '<thead>'. 137 '<tr>'."\n". 138 ' <th class="nowrap">Setting ID</th>'."\n". 139 ' <th>'.__('Value').'</th>'."\n". 140 ' <th>'.__('Type').'</th>'."\n". 141 ' <th class="maximalx">'.__('Description').'</th>'."\n". 142 '</tr>'."\n". 143 '</thead>'."\n". 144 '<tbody>'; 145 $table_footer = '</tbody></table>'; 146 120 147 $settings = array(); 121 148 … … 125 152 } 126 153 } 127 128 154 ksort($settings); 129 155 if (count($settings) > 0) { 156 $ns_combo = array(); 157 foreach ($settings as $ns => $s) { 158 $ns_combo[$ns] = '#l_'.$ns; 159 } 160 echo 161 '<form action="plugin.php" method="post">'. 162 '<p class="anchor-nav">'. 163 '<label for="ls_nav" class="classic">'.__('Goto:').'</label> '.form::combo('ls_nav',$ns_combo). 164 ' <input type="submit" value="'.__('Ok').'" id="ls_submit" />'. 165 '<input type="hidden" name="p" value="aboutConfig" />'. 166 $core->formNonce().'</p></form>'; 167 } 168 ?> 169 170 <form action="plugin.php" method="post"> 171 172 <?php 130 173 foreach ($settings as $ns => $s) 131 174 { 132 175 ksort($s); 133 echo '<tr><th scope="row" colspan="4" class="ns-name">namespace: <strong>'.$ns.'</strong></th></tr>'; 134 176 echo sprintf($table_header,'l_'.$ns,$ns); 135 177 foreach ($s as $k => $v) 136 178 { 137 179 echo settingLine($k,$v,$ns,'s',!$v['global']); 138 180 } 139 } 140 ?> 141 </tbody>142 </table> 181 echo $table_footer; 182 } 183 ?> 184 143 185 <p><input type="submit" value="<?php echo __('Save'); ?>" /> 144 186 <input type="hidden" name="p" value="aboutConfig" /> … … 148 190 149 191 <div id="global" class="multi-part" title="<?php echo __('global settings'); ?>"> 150 <form action="plugin.php" method="post"> 151 <table> 152 <caption><?php echo __('Global blog settings list'); ?></caption> 153 <thead> 154 <tr> 155 <th scope="col" class="nowrap">Setting ID</th> 156 <th scope="col"><?php echo __('Value'); ?></th> 157 <th scope="col"><?php echo __('Type'); ?></th> 158 <th scope="col" class="maximal"><?php echo __('Description'); ?></th> 159 </tr> 160 </thead> 161 <tbody> 192 162 193 <?php 163 194 $settings = array(); … … 171 202 ksort($settings); 172 203 204 if (count($settings) > 0) { 205 $ns_combo = array(); 206 foreach ($settings as $ns => $s) { 207 $ns_combo[$ns] = '#g_'.$ns; 208 } 209 echo 210 '<form action="plugin.php" method="post">'. 211 '<p class="anchor-nav">'. 212 '<label for="gs_nav" class="classic">'.__('Goto:').'</label> '.form::combo('gs_nav',$ns_combo). 213 ' <input type="submit" value="'.__('Ok').'" id="gs_submit" />'. 214 '<input type="hidden" name="p" value="aboutConfig" />'. 215 $core->formNonce().'</p></form>'; 216 } 217 ?> 218 219 <form action="plugin.php" method="post"> 220 221 <?php 173 222 foreach ($settings as $ns => $s) 174 223 { 175 224 ksort($s); 176 echo '<tr><th scope="row" colspan="4" class="ns-name">namespace: <strong>'.$ns.'</strong></th></tr>'; 177 225 echo sprintf($table_header,'g_'.$ns,$ns); 178 226 foreach ($s as $k => $v) 179 227 { 180 228 echo settingLine($k,$v,$ns,'gs',false); 181 229 } 182 } 183 ?> 184 </tbody>185 </table> 230 echo $table_footer; 231 } 232 ?> 233 186 234 <p><input type="submit" value="<?php echo __('Save'); ?>" /> 187 235 <input type="hidden" name="p" value="aboutConfig" /> -
plugins/antispam/filters/class.dc.filter.ip.php
r780 r782 4 4 # This file is part of Antispam, a plugin for Dotclear 2. 5 5 # 6 # Copyright (c) 2003-201 0Olivier Meunier & Association Dotclear6 # Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear 7 7 # Licensed under the GPL version 2.0 license. 8 8 # See LICENSE file or … … 123 123 '<div class="multi-part" id="tab_'.$type.'" title="'.$title.'">'. 124 124 125 '<form action="'.html::escapeURL($url).'" method="post">'. 126 '<fieldset><legend>'.__('Add an IP address').'</legend><p>'. 125 '<form action="'.html::escapeURL($url).'" method="post" class="fieldset">'. 127 126 form::hidden(array('ip_type'),$type). 128 '<label class="classic" for="addip_'.$type.'">'.__('Add an IP address ').' '.127 '<label class="classic" for="addip_'.$type.'">'.__('Add an IP address: ').' '. 129 128 form::field(array('addip', 'addip_'.$type),18,255). 130 129 '</label>'; … … 136 135 $res .= 137 136 $core->formNonce(). 138 '<input type="submit" value="'.__('Add').'"/></p>'. 139 '</fieldset></form>'; 137 '</p>'. 138 '<p><input type="submit" value="'.__('Add').'"/></p>'. 139 '</form>'; 140 140 141 141 $rs = $this->getRules($type); … … 149 149 $res .= 150 150 '<form action="'.html::escapeURL($url).'" method="post">'. 151 '< fieldset><legend>' . __('IP list') . '</legend>'.151 '<h3>' . __('IP list') . '</h3>'. 152 152 '<div style="'.$this->style_list.'">'; 153 153 … … 167 167 168 168 $res .= 169 '<p style="'.$p_style.'"><label class="classic" >'.170 form::checkbox(array('delip[]' ),$rs->rule_id,false,'','',$disabled_ip, 'title="'.html::escapeHTML($pattern).'"').' '.169 '<p style="'.$p_style.'"><label class="classic" for="'.$type.'-ip-'.$rs->rule_id.'">'. 170 form::checkbox(array('delip[]',$type.'-ip-'.$rs->rule_id),$rs->rule_id,false,'','',$disabled_ip).' '. 171 171 html::escapeHTML($pattern). 172 172 '</label></p>'; … … 178 178 form::hidden(array('ip_type'),$type). 179 179 '</p>'. 180 '</f ieldset></form>';180 '</form>'; 181 181 } 182 182 -
plugins/antispam/index.php
r776 r782 121 121 { 122 122 echo '<h2>'.html::escapeHTML($core->blog->name).' › <span class="page-title">'.$page_name.'</span></h2>'; 123 124 123 # Information 125 124 $spam_count = dcAntispam::countSpam($core); … … 232 231 </body> 233 232 </html> 233 -
plugins/antispam/index.php
r457 r782 4 4 # This file is part of Antispam, a plugin for Dotclear 2. 5 5 # 6 # Copyright (c) 2003-201 0Olivier Meunier & Association Dotclear6 # Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear 7 7 # Licensed under the GPL version 2.0 license. 8 8 # See LICENSE file or … … 110 110 <body> 111 111 <?php 112 echo '<h2>'.html::escapeHTML($core->blog->name).' › '.$page_name.'</h2>';113 112 114 113 if ($filter_gui !== false) 115 114 { 116 echo '< p><a href="'.$p_url.'">'.__('Return to filters').'</a></p>';117 printf('<h3>'.__('%s configuration').'</h3>',$filter->name);115 echo '<h2>'.html::escapeHTML($core->blog->name).' › <a href="'.$p_url.'">'.$page_name.'</a>'. 116 ' › <span class="page-title">'.sprintf(__('%s configuration'),$filter->name).'</span></h2>'; 118 117 119 118 echo $filter_gui; … … 121 120 else 122 121 { 122 echo '<h2>'.html::escapeHTML($core->blog->name).' › <span class="page-title">'.$page_name.'</span></h2>'; 123 123 # Information 124 124 $spam_count = dcAntispam::countSpam($core); … … 127 127 128 128 echo 129 '<form action="'.$p_url.'" method="post" >'.130 '< fieldset><legend>'.__('Information').'</legend>';129 '<form action="'.$p_url.'" method="post" class="fieldset">'. 130 '<h3>'.__('Information').'</h3>'; 131 131 132 132 if (!empty($_GET['del'])) { … … 150 150 } 151 151 if ($moderationTTL != null && $moderationTTL >=0) { 152 echo '<p>'.sprintf(__('All spam comments older than %s day(s) will be automatically deleted.'), $moderationTTL).'</p>'; 153 } 154 echo '</fieldset></form>'; 152 echo '<p>'.sprintf(__('All spam comments older than %s day(s) will be automatically deleted.'), $moderationTTL).' '. 153 __('You can modify this duration in '). 154 '<a href="blog_pref.php"> '.__('Blog preferences').'</a></p>'; 155 } 156 echo '</form>'; 155 157 156 158 157 159 # Filters 158 160 echo 159 '<form action="'.$p_url.'" method="post">'. 160 '<fieldset><legend>'.__('Available spam filters').'</legend>'; 161 '<form action="'.$p_url.'" method="post" class="fieldset">'; 161 162 162 163 if (!empty($_GET['upd'])) { … … 166 167 echo 167 168 '<table class="dragable">'. 168 '<caption>'.__('A ntispan filters list').'</caption>'.169 '<caption>'.__('Available spam filters').'</caption>'. 169 170 '<thead><tr>'. 170 '<th scope="col">'.__('Order').'</th>'.171 '<th scope="col">'.__('Active').'</th>'.172 '<th scope="col">'.__('Auto Del.').'</th>'.173 '<th scope="col"class="nowrap">'.__('Filter name').'</th>'.174 '<th scope="col"colspan="2">'.__('Description').'</th>'.171 '<th>'.__('Order').'</th>'. 172 '<th>'.__('Active').'</th>'. 173 '<th>'.__('Auto Del.').'</th>'. 174 '<th class="nowrap">'.__('Filter name').'</th>'. 175 '<th colspan="2">'.__('Description').'</th>'. 175 176 '</tr></thead>'. 176 177 '<tbody id="filters-list" >'; … … 192 193 '<td class="nowrap">'.form::checkbox(array('filters_active[]'),$fid,$f->active, '', '', false, 'title="'.__('Active').'"').'</td>'. 193 194 '<td class="nowrap">'.form::checkbox(array('filters_auto_del[]'),$fid,$f->auto_delete, '', '', false, 'title="'.__('Auto Del.').'"').'</td>'. 194 '<t h scope="row" class="nowrap">'.$f->name.'</th>'.195 '<td class="nowrap" scope="raw">'.$f->name.'</td>'. 195 196 '<td class="maximal">'.$f->description.'</td>'. 196 197 '<td class="status">'.$gui_link.'</td>'. … … 203 204 $core->formNonce(). 204 205 '<input type="submit" name="filters_upd" value="'.__('Save').'" /></p>'. 205 '</f ieldset></form>';206 '</form>'; 206 207 207 208 … … 209 210 if (DC_ADMIN_URL) 210 211 { 211 $ham_feed = $core->blog->url.$core->url->getBase('hamfeed').'/'.$code = dcAntispam::getUserCode($core); 212 $spam_feed = $core->blog->url.$core->url->getBase('spamfeed').'/'.$code = dcAntispam::getUserCode($core); 212 $ham_feed = $core->blog->url.$core->url->getURLFor( 213 'hamfeed', 214 $code = dcAntispam::getUserCode($core) 215 ); 216 $spam_feed = $core->blog->url.$core->url->getURLFor( 217 'spamfeed', 218 $code = dcAntispam::getUserCode($core) 219 ); 213 220 214 221 echo 215 '< fieldset><legend>'.__('Syndication').'</legend>'.222 '<h3>'.__('Syndication').'</h3>'. 216 223 '<ul class="spaminfo">'. 217 224 '<li class="feed"><a href="'.$spam_feed.'">'.__('Junk comments RSS feed').'</a></li>'. 218 225 '<li class="feed"><a href="'.$ham_feed.'">'.__('Published comments RSS feed').'</a></li>'. 219 '</ul>'. 220 '</fieldset>'; 226 '</ul>'; 221 227 } 222 228 } -
plugins/blogroll/index.php
r717 r782 242 242 <form action="plugin.php" method="post" id="links-form"> 243 243 <table class="maximal dragable"> 244 <caption><?php echo __('Links list'); ?></caption> 244 245 <thead> 245 246 <tr> 246 <th colspan="3"><?php echo __('Title'); ?></th>247 <th ><?php echo __('Description'); ?></th>248 <th ><?php echo __('URL'); ?></th>249 <th ><?php echo __('Lang'); ?></th>247 <th scope="col" colspan="3"><?php echo __('Title'); ?></th> 248 <th scope="col"><?php echo __('Description'); ?></th> 249 <th scope="col"><?php echo __('URL'); ?></th> 250 <th scope="col"><?php echo __('Lang'); ?></th> 250 251 </tr> 251 252 </thead> … … 265 266 { 266 267 echo 267 '<t dcolspan="5"><strong><a href="'.$p_url.'&edit=1&id='.$rs->link_id.'">'.268 html::escapeHTML($rs->link_desc).'</a></strong></t d>';268 '<th scope="row" colspan="5"><strong><a href="'.$p_url.'&edit=1&id='.$rs->link_id.'">'. 269 html::escapeHTML($rs->link_desc).'</a></strong></th>'; 269 270 } 270 271 else 271 272 { 272 273 echo 273 '<t d><a href="'.$p_url.'&edit=1&id='.$rs->link_id.'">'.274 html::escapeHTML($rs->link_title).'</a></t d>'.274 '<th scope="row"><a href="'.$p_url.'&edit=1&id='.$rs->link_id.'">'. 275 html::escapeHTML($rs->link_title).'</a></th>'. 275 276 '<td>'.html::escapeHTML($rs->link_desc).'</td>'. 276 277 '<td>'.html::escapeHTML($rs->link_href).'</td>'. -
plugins/blogroll/index.php
r457 r782 4 4 # This file is part of Dotclear 2. 5 5 # 6 # Copyright (c) 2003-201 0Olivier Meunier & Association Dotclear6 # Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear 7 7 # Licensed under the GPL version 2.0 license. 8 8 # See LICENSE file or … … 163 163 <html> 164 164 <head> 165 <title> Blogroll</title>165 <title><?php echo __('Blogroll'); ?></title> 166 166 <?php echo dcPage::jsToolMan(); ?> 167 167 <?php echo dcPage::jsConfirmClose('links-form','add-link-form','add-category-form'); ?> … … 215 215 216 216 <body> 217 <h2><?php echo html::escapeHTML($core->blog->name); ?> › Blogroll</h2>217 <h2><?php echo html::escapeHTML($core->blog->name); ?> › <span class="page-title"><?php echo __('Blogroll'); ?></span></h2> 218 218 219 219 <?php … … 312 312 '<fieldset class="two-cols"><legend>'.__('Add a new link').'</legend>'. 313 313 '<p class="col"><label for="link_title" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:').' '. 314 form::field('link_title',30,255,$link_title ,'',2).314 form::field('link_title',30,255,$link_title). 315 315 '</label></p>'. 316 316 317 317 '<p class="col"><label for="link_href" class="required"><abbr title="'.__('Required field').'">*</abbr> '.__('URL:').' '. 318 form::field('link_href',30,255,$link_href ,'',3).318 form::field('link_href',30,255,$link_href). 319 319 '</label></p>'. 320 320 321 321 '<p class="col"><label for="link_desc">'.__('Description:').' '. 322 form::field('link_desc',30,255,$link_desc ,'',4).322 form::field('link_desc',30,255,$link_desc). 323 323 '</label></p>'. 324 324 325 325 '<p class="col"><label for="link_lang">'.__('Language:').' '. 326 form::field('link_lang',5,5,$link_lang ,'',5).326 form::field('link_lang',5,5,$link_lang). 327 327 '</label></p>'. 328 328 '<p>'.form::hidden(array('p'),'blogroll'). 329 329 $core->formNonce(). 330 '<input type="submit" name="add_link" value="'.__('Save').'" tabindex="6"/></p>'.330 '<input type="submit" name="add_link" value="'.__('Save').'" /></p>'. 331 331 '</fieldset>'. 332 332 '</form>'. … … 338 338 '<fieldset><legend>'.__('Add a new category').'</legend>'. 339 339 '<p><label for="cat_title" class=" classic required"><abbr title="'.__('Required field').'">*</abbr> '.__('Title:').' '. 340 form::field('cat_title',30,255,$cat_title ,'',7).'</label> '.340 form::field('cat_title',30,255,$cat_title).'</label> '. 341 341 form::hidden(array('p'),'blogroll'). 342 342 $core->formNonce(). 343 '<input type="submit" name="add_cat" value="'.__('Save').'" tabindex="8"/></p>'.343 '<input type="submit" name="add_cat" value="'.__('Save').'" /></p>'. 344 344 '</fieldset>'. 345 345 '</form>'. … … 356 356 '<p>'.form::hidden(array('p'),'blogroll'). 357 357 $core->formNonce(). 358 '<input type="submit" name="import_links" value="'.__(' import').'" tabindex="10" /></p>'.358 '<input type="submit" name="import_links" value="'.__('Import').'" /></p>'. 359 359 '</fieldset>'. 360 360 '</form>'; … … 399 399 form::hidden(array('p'),'blogroll'). 400 400 $core->formNonce(). 401 '<input type="submit" name="cancel_import" value="'.__(' cancel').'" tabindex="10" /> '.402 '<input type="submit" name="import_links_do" value="'.__(' import').'" tabindex="11" /></p>'.401 '<input type="submit" name="cancel_import" value="'.__('Cancel').'" /> '. 402 '<input type="submit" name="import_links_do" value="'.__('Import').'" /></p>'. 403 403 '</div>'; 404 404 } -
plugins/pages/list.php
r578 r782 15 15 /* Pager class 16 16 -------------------------------------------------------- */ 17 class adminPageList extends admin GenericList17 class adminPageList extends adminPostList 18 18 { 19 public function display($page,$nb_per_page,$enclose_block='')19 public function setColumns() 20 20 { 21 if ($this->rs->isEmpty()) 22 { 23 echo '<p><strong>'.__('No page').'</strong></p>'; 24 } 25 else 26 { 27 $pager = new pager($page,$this->rs_count,$nb_per_page,10); 28 $pager->html_prev = $this->html_prev; 29 $pager->html_next = $this->html_next; 30 $pager->var_page = 'page'; 31 32 $html_block = 33 '<table class="clear"><tr>'. 34 '<th colspan="2">'.__('Title').'</th>'. 35 '<th>'.__('Date').'</th>'. 36 '<th>'.__('Author').'</th>'. 37 '<th>'.__('Comments').'</th>'. 38 '<th>'.__('Trackbacks').'</th>'. 39 '<th>'.__('Status').'</th>'. 40 '</tr>%s</table>'; 41 42 if ($enclose_block) { 43 $html_block = sprintf($enclose_block,$html_block); 44 } 45 46 echo '<p>'.__('Page(s)').' : '.$pager->getLinks().'</p>'; 47 48 $blocks = explode('%s',$html_block); 49 50 echo $blocks[0]; 51 52 while ($this->rs->fetch()) 53 { 54 echo $this->postLine(); 55 } 56 57 echo $blocks[1]; 58 59 echo '<p>'.__('Page(s)').' : '.$pager->getLinks().'</p>'; 60 } 21 $this->addColumn('title',__('Title'),array('adminPostList','getTitle'),' class="maximal"',false); 22 $this->addColumn('date',__('Date'),array('adminPostList','getDate')); 23 $this->addColumn('author',__('Author'),array('adminPostList','getAuthor')); 24 $this->addColumn('comment',__('Comments'),array('adminPostList','getComments')); 25 $this->addColumn('trackback',__('Trackbacks'),array('adminPostList','getTrackbacks')); 26 $this->addColumn('status',__('Status'),array('adminPostList','getStatus')); 61 27 } 62 28 63 pr ivate function postLine()29 protected function getDefaultCaption() 64 30 { 65 $img = '<img alt="%1$s" title="%1$s" src="images/%2$s" />'; 66 switch ($this->rs->post_status) { 67 case 1: 68 $img_status = sprintf($img,__('published'),'check-on.png'); 69 break; 70 case 0: 71 $img_status = sprintf($img,__('unpublished'),'check-off.png'); 72 break; 73 case -1: 74 $img_status = sprintf($img,__('scheduled'),'scheduled.png'); 75 break; 76 case -2: 77 $img_status = sprintf($img,__('pending'),'check-wrn.png'); 78 break; 79 } 80 81 $protected = ''; 82 if ($this->rs->post_password) { 83 $protected = sprintf($img,__('protected'),'locker.png'); 84 } 85 86 $selected = ''; 87 if ($this->rs->post_selected) { 88 $selected = sprintf($img,__('selected'),'selected.png'); 89 } 90 91 $attach = ''; 92 $nb_media = $this->rs->countMedia(); 93 if ($nb_media > 0) { 94 $attach_str = $nb_media == 1 ? __('%d attachment') : __('%d attachments'); 95 $attach = sprintf($img,sprintf($attach_str,$nb_media),'attach.png'); 96 } 97 98 $res = '<tr class="line'.($this->rs->post_status != 1 ? ' offline' : '').'"'. 99 ' id="p'.$this->rs->post_id.'">'; 100 101 $res .= 102 '<td class="nowrap">'. 103 form::checkbox(array('entries[]'),$this->rs->post_id,'','','',!$this->rs->isEditable(),'title="'.__('select this page').'"').'</td>'. 104 '<td class="maximal"><a href="'.$this->core->getPostAdminURL($this->rs->post_type,$this->rs->post_id).'">'. 105 html::escapeHTML($this->rs->post_title).'</a></td>'. 106 '<td class="nowrap">'.dt::dt2str(__('%Y-%m-%d %H:%M'),$this->rs->post_dt).'</td>'. 107 108 '<td class="nowrap">'.$this->rs->user_id.'</td>'. 109 '<td class="nowrap">'.$this->rs->nb_comment.'</td>'. 110 '<td class="nowrap">'.$this->rs->nb_trackback.'</td>'. 111 '<td class="nowrap status">'.$img_status.' '.$selected.' '.$protected.' '.$attach.'</td>'. 112 '</tr>'; 113 114 return $res; 31 return __('Pages list'); 115 32 } 116 33 } -
plugins/pages/list.php
r457 r782 4 4 # This file is part of Dotclear 2. 5 5 # 6 # Copyright (c) 2003-201 0Olivier Meunier & Association Dotclear6 # Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear 7 7 # Licensed under the GPL version 2.0 license. 8 8 # See LICENSE file or … … 64 64 $combo_action[__('publish')] = 'publish'; 65 65 $combo_action[__('unpublish')] = 'unpublish'; 66 $combo_action[__('schedule')] = 'schedule'; 66 67 $combo_action[__('mark as pending')] = 'pending'; 67 68 } … … 93 94 <body> 94 95 <?php 95 echo '<h2>'.html::escapeHTML($core->blog->name).' › '.__('Pages').'</h2>'.96 echo '<h2>'.html::escapeHTML($core->blog->name).' › <span class="page-title">'.__('Pages').'</span></h2>'. 96 97 '<p class="top-add"><a class="button add" href="'.$p_url.'&act=page">'.__('New page').'</a></p>'; 97 98 -
plugins/tags/_admin.php
r776 r782 137 137 138 138 return 139 '<script type="text/javascript" src="index.php?pf=tags/js/jquery.autocomplete.js"></script>'.140 '<script type="text/javascript" src="index.php?pf=tags/js/posts_actions.js"></script>'.141 139 '<script type="text/javascript">'."\n". 142 140 "//<![CDATA[\n". … … 153 151 "\n//]]>\n". 154 152 "</script>\n". 153 '<script type="text/javascript" src="index.php?pf=tags/js/posts_actions.js"></script>'. 154 dcPage::jqueryUI(). 155 155 '<link rel="stylesheet" type="text/css" href="index.php?pf=tags/style.css" />'; 156 156 } … … 172 172 try 173 173 { 174 175 174 $meta =& $GLOBALS['core']->meta; 176 175 $tags = $meta->splitMetaValues($_POST['new_tags']); -
plugins/tags/_admin.php
r756 r782 4 4 # This file is part of Dotclear 2. 5 5 # 6 # Copyright (c) 2003-201 0Olivier Meunier & Association Dotclear6 # Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear 7 7 # Licensed under the GPL version 2.0 license. 8 8 # See LICENSE file or … … 31 31 32 32 $core->addBehavior('adminPreferencesForm',array('tagsBehaviors','adminUserForm')); 33 $core->addBehavior('adminUserForm',array('tagsBehaviors','adminUserForm'));33 // $core->addBehavior('adminUserForm',array('tagsBehaviors','adminUserForm')); 34 34 35 35 $core->addBehavior('adminBeforeUserCreate',array('tagsBehaviors','setTagListFormat')); … … 45 45 public static function dashboardFavs($core,$favs) 46 46 { 47 $favs['tags'] = new ArrayObject(array('tags', __('Tags'),'plugin.php?p=tags&m=tags',47 $favs['tags'] = new ArrayObject(array('tags','Tags','plugin.php?p=tags&m=tags', 48 48 'index.php?pf=tags/icon.png','index.php?pf=tags/icon-big.png', 49 49 'usage,contentadmin',null,null)); … … 63 63 64 64 65 $tag_url = html::stripHostURL($GLOBALS['core']->blog->url.$GLOBALS['core']->url->get Base('tag'));65 $tag_url = html::stripHostURL($GLOBALS['core']->blog->url.$GLOBALS['core']->url->getURLFor('tag')); 66 66 $res['url'] = $tag_url.'/'.rawurlencode(dcMeta::sanitizeMetaID($url)); 67 67 $res['content'] = $content; … … 82 82 echo 83 83 '<h3><label for="post_tags">'.__('Tags:').'</label></h3>'. 84 '<div class="p" id="tags-edit">'.form::textarea('post_tags',20,3,$value,'maximal' ,3).'</div>';84 '<div class="p" id="tags-edit">'.form::textarea('post_tags',20,3,$value,'maximal').'</div>'; 85 85 } 86 86 … … 102 102 public static function postHeaders() 103 103 { 104 $tag_url = $GLOBALS['core']->blog->url.$GLOBALS['core']->url->get Base('tag');105 106 $opts = $GLOBALS['core']-> auth->getOptions();104 $tag_url = $GLOBALS['core']->blog->url.$GLOBALS['core']->url->getURLFor('tag'); 105 106 $opts = $GLOBALS['core']->blog->url.$GLOBALS['core']->auth->getOptions(); 107 107 $type = isset($opts['tag_list_format']) ? $opts['tag_list_format'] : 'more'; 108 108 109 109 return 110 dcPage::jqueryUI().110 '<script type="text/javascript" src="index.php?pf=tags/js/jquery.autocomplete.js"></script>'. 111 111 '<script type="text/javascript" src="index.php?pf=tags/js/post.js"></script>'. 112 112 '<script type="text/javascript">'."\n". … … 131 131 public static function postsActionsHeaders() 132 132 { 133 $tag_url = $GLOBALS['core']->blog->url.$GLOBALS['core']->url->get Base('tag');133 $tag_url = $GLOBALS['core']->blog->url.$GLOBALS['core']->url->getURLFor('tag'); 134 134 135 135 $opts = $GLOBALS['core']->auth->getOptions(); … … 222 222 } 223 223 224 public static function adminPostsActionsContent($core,$action,$hidden_fields )224 public static function adminPostsActionsContent($core,$action,$hidden_fields,$form_uri="posts_actions.php") 225 225 { 226 226 if ($action == 'tags') 227 227 { 228 228 echo 229 '<h2 >'.__('Add tags to entries').'</h2>'.230 '<form action=" posts_actions.php" method="post">'.229 '<h2 class="page-title">'.__('Add tags to entries').'</h2>'. 230 '<form action="'.$form_uri.'" method="post">'. 231 231 '<div><label for="new_tags" class="area">'.__('Tags to add:').'</label> '. 232 232 form::textarea('new_tags',60,3). … … 257 257 } 258 258 259 echo '<h2 >'.__('Remove selected tags from entries').'</h2>';259 echo '<h2 class="page-title">'.__('Remove selected tags from entries').'</h2>'; 260 260 261 261 if (empty($tags)) { … … 267 267 268 268 echo 269 '<form action=" posts_actions.php" method="post">'.269 '<form action="'.$form_uri.'" method="post">'. 270 270 '<fieldset><legend>'.__('Following tags have been found in selected entries:').'</legend>'; 271 271 -
plugins/tags/tags.php
r711 r782 43 43 $col = 1; 44 44 } 45 $cols[$col] .= '<tr class="tagLetter"><t d colspan="2"><span>'.$letter.'</span></td></tr>';45 $cols[$col] .= '<tr class="tagLetter"><th scope="row" colspan="2"><span>'.$letter.'</span></th></tr>'; 46 46 } 47 47 48 48 $cols[$col] .= 49 49 '<tr class="line">'. 50 '<t dclass="maximal"><a href="'.$p_url.51 '&m=tag_posts&tag='.rawurlencode($tags->meta_id).'">'.$tags->meta_id.'</a></t d>'.50 '<th scope="row" class="maximal"><a href="'.$p_url. 51 '&m=tag_posts&tag='.rawurlencode($tags->meta_id).'">'.$tags->meta_id.'</a></th>'. 52 52 '<td class="nowrap"><strong>'.$tags->count.'</strong> '. 53 53 (($tags->count==1) ? __('entry') : __('entries')).'</td>'. … … 57 57 } 58 58 59 $table = '<div class="col"><table class="tags">%s</table></div>'; 59 $table = 60 '<div class="col"><table class="tags"><caption>'. 61 __('Tags list'). 62 '</caption><tbody>%s</tbody></table></div>'; 60 63 61 64 if ($cols[0]) -
plugins/tags/tags.php
r457 r782 4 4 # This file is part of Dotclear 2. 5 5 # 6 # Copyright (c) 2003-201 0Olivier Meunier & Association Dotclear6 # Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear 7 7 # Licensed under the GPL version 2.0 license. 8 8 # See LICENSE file or … … 15 15 <html> 16 16 <head> 17 <title> Tags</title>17 <title><?php echo __('Tags'); ?></title> 18 18 <link rel="stylesheet" type="text/css" href="index.php?pf=tags/style.css" /> 19 19 </head> … … 21 21 <body> 22 22 <h2><?php echo html::escapeHTML($core->blog->name); ?> › 23 < ?php echo __('Tags'); ?></h2>23 <span class="page-title"><?php echo __('Tags'); ?></span></h2> 24 24 25 25 <?php -
plugins/userPref/index.php
r589 r782 128 128 <div id="local" class="multi-part" title="<?php echo __('user preferences'); ?>"> 129 129 130 <?php 130 <?php 131 131 $table_header = '<table class="prefs" id="%s"><caption>%s</caption>'. 132 132 '<thead>'. … … 142 142 143 143 $prefs = array(); 144 144 145 foreach ($core->auth->user_prefs->dumpWorkspaces() as $ws => $workspace) { 145 146 foreach ($workspace->dumpPrefs() as $k => $v) { -
plugins/userPref/index.php
r457 r782 4 4 # This file is part of Dotclear 2. 5 5 # 6 # Copyright (c) 2003-201 0Olivier Meunier & Association Dotclear6 # Copyright (c) 2003-2011 Olivier Meunier & Association Dotclear 7 7 # Licensed under the GPL version 2.0 license. 8 8 # See LICENSE file or … … 11 11 # -- END LICENSE BLOCK ----------------------------------------- 12 12 if (!defined('DC_CONTEXT_ADMIN')) { return; } 13 14 # Local navigation 15 if (!empty($_POST['gp_nav'])) { 16 http::redirect($p_url.$_POST['gp_nav']); 17 exit; 18 } 19 if (!empty($_POST['lp_nav'])) { 20 http::redirect($p_url.$_POST['lp_nav']); 21 exit; 22 } 13 23 14 24 # Local prefs update … … 72 82 return 73 83 '<tr>'. 74 '<t h scope="row"><label for="s_'.$id.'">'.sprintf($slabel,html::escapeHTML($id)).'</label></th>'.84 '<td scope="raw"><label for="s_'.$id.'">'.sprintf($slabel,html::escapeHTML($id)).'</label></td>'. 75 85 '<td>'.$field.'</td>'. 76 86 '<td>'.$s['type'].'</td>'. … … 84 94 <?php echo dcPage::jsPageTabs($part); ?> 85 95 <style type="text/css"> 86 .ws-name { background: #ccc; color: #000; padding-top: 0.3em; padding-bottom: 0.3em; font-size: 1.1em; } 96 table.prefs { border: 1px solid #999; margin-bottom: 2em; } 97 table.prefs th { background: #f5f5f5; color: #444; padding-top: 0.3em; padding-bottom: 0.3em; } 98 p.anchor-nav {float: right; } 87 99 </style> 100 <script type="text/javascript"> 101 //<![CDATA[ 102 $(function() { 103 $("#gp_submit").hide(); 104 $("#lp_submit").hide(); 105 $("#gp_nav").change(function() { 106 window.location = $("#gp_nav option:selected").val(); 107 }) 108 $("#lp_nav").change(function() { 109 window.location = $("#lp_nav option:selected").val(); 110 }) 111 }); 112 //]]> 113 </script> 88 114 </head> 89 115 … … 98 124 } 99 125 ?> 100 <h2><?php echo html::escapeHTML($core->auth->userID()); ?> › user:preferences</h2>126 <h2><?php echo html::escapeHTML($core->auth->userID()); ?> › <span class="page-title">user:preferences</span></h2> 101 127 102 128 <div id="local" class="multi-part" title="<?php echo __('user preferences'); ?>"> 103 <form action="plugin.php" method="post"> 104 <table> 105 <caption><?php echo __('Local user preferences list'); ?></caption> 106 <thead> 107 <tr> 108 <th scope="col" class="nowrap">Pref ID</th> 109 <th scope="col"><?php echo __('Value'); ?></th> 110 <th scope="col"><?php echo __('Type'); ?></th> 111 <th scope="col" class="maximal"><?php echo __('Description'); ?></th> 112 </tr> 113 </thead> 114 <tbody> 115 <?php 129 130 <?php 131 $table_header = '<table class="prefs" id="%s"><caption>%s</caption>'. 132 '<thead>'. 133 '<tr>'."\n". 134 ' <th class="nowrap">Setting ID</th>'."\n". 135 ' <th>'.__('Value').'</th>'."\n". 136 ' <th>'.__('Type').'</th>'."\n". 137 ' <th class="maximalx">'.__('Description').'</th>'."\n". 138 '</tr>'."\n". 139 '</thead>'."\n". 140 '<tbody>'; 141 $table_footer = '</tbody></table>'; 142 116 143 $prefs = array(); 117 144 … … 121 148 } 122 149 } 123 124 150 ksort($prefs); 125 151 if (count($prefs) > 0) { 152 $ws_combo = array(); 153 foreach ($prefs as $ws => $s) { 154 $ws_combo[$ws] = '#l_'.$ws; 155 } 156 echo 157 '<form action="plugin.php" method="post">'. 158 '<p class="anchor-nav">'. 159 '<label for="lp_nav" class="classic">'.__('Goto:').'</label> '.form::combo('lp_nav',$ws_combo). 160 ' <input type="submit" value="'.__('Ok').'" id="lp_submit" />'. 161 '<input type="hidden" name="p" value="aboutConfig" />'. 162 $core->formNonce().'</p></form>'; 163 } 164 ?> 165 166 <form action="plugin.php" method="post"> 167 168 <?php 126 169 foreach ($prefs as $ws => $s) 127 170 { 128 171 ksort($s); 129 echo '<tr><th scope="row" colspan="4" class="ws-name">workspace: <strong>'.$ws.'</strong></th></tr>'; 130 172 echo sprintf($table_header,'l_'.$ws,$ws); 131 173 foreach ($s as $k => $v) 132 174 { 133 175 echo prefLine($k,$v,$ws,'s',!$v['global']); 134 176 } 135 } 136 ?> 137 </tbody>138 </table> 177 echo $table_footer; 178 } 179 ?> 180 139 181 <p><input type="submit" value="<?php echo __('Save'); ?>" /> 140 182 <input type="hidden" name="p" value="userPref" /> … … 144 186 145 187 <div id="global" class="multi-part" title="<?php echo __('global preferences'); ?>"> 146 <form action="plugin.php" method="post"> 147 <table> 148 <caption><?php echo __('Global user preferences list'); ?></caption> 149 <thead> 150 <tr> 151 <th scope="col" class="nowrap">Pref ID</th> 152 <th scope="col"><?php echo __('Value'); ?></th> 153 <th scope="col"><?php echo __('Type'); ?></th> 154 <th scope="col" class="maximal"><?php echo __('Description'); ?></th> 155 </tr> 156 </thead> 157 <tbody> 188 158 189 <?php 159 190 $prefs = array(); … … 167 198 ksort($prefs); 168 199 200 if (count($prefs) > 0) { 201 $ws_combo = array(); 202 foreach ($prefs as $ws => $s) { 203 $ws_combo[$ws] = '#g_'.$ws; 204 } 205 echo 206 '<form action="plugin.php" method="post">'. 207 '<p class="anchor-nav">'. 208 '<label for="gp_nav" class="classic">'.__('Goto:').'</label> '.form::combo('gp_nav',$ws_combo). 209 ' <input type="submit" value="'.__('Ok').'" id="gp_submit" />'. 210 '<input type="hidden" name="p" value="aboutConfig" />'. 211 $core->formNonce().'</p></form>'; 212 } 213 ?> 214 215 <form action="plugin.php" method="post"> 216 217 <?php 169 218 foreach ($prefs as $ws => $s) 170 219 { 171 220 ksort($s); 172 echo '<tr><th scope="row" colspan="4" class="ws-name">workspace: <strong>'.$ws.'</strong></th></tr>'; 173 221 echo sprintf($table_header,'g_'.$ws,$ws); 174 222 foreach ($s as $k => $v) 175 223 { 176 224 echo prefLine($k,$v,$ws,'gs',false); 177 225 } 178 } 179 ?> 180 </tbody>181 </table> 226 echo $table_footer; 227 } 228 ?> 229 182 230 <p><input type="submit" value="<?php echo __('Save'); ?>" /> 183 231 <input type="hidden" name="p" value="userPref" />
Note: See TracChangeset
for help on using the changeset viewer.