Changeset 2495:dc8c7974ff0b for plugins
- Timestamp:
- 10/27/13 09:46:02 (12 years ago)
- Branch:
- default
- Location:
- plugins
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/antispam/index.php
r2322 r2495 117 117 echo 118 118 dcPage::jsLoad('js/jquery/jquery-ui.custom.js'). 119 dcPage::jsLoad('js/jquery/jquery.ui.touch-punch.js'). 119 120 dcPage::jsLoad('index.php?pf=antispam/antispam.js'); 120 121 } -
plugins/blogroll/index.php
r2256 r2495 27 27 { 28 28 $default_tab = 'import-links'; 29 29 30 30 try 31 31 { … … 35 35 throw new Exception(__('Unable to move uploaded file.')); 36 36 } 37 37 38 38 require_once dirname(__FILE__).'/class.dc.importblogroll.php'; 39 39 try { … … 44 44 throw $e; 45 45 } 46 47 46 47 48 48 if (empty($imported)) { 49 49 unset($imported); … … 69 69 } 70 70 } 71 71 72 72 dcPage::addSuccessNotice(__('links have been successfully imported.')); 73 http::redirect($p_url); 73 http::redirect($p_url); 74 74 } 75 75 76 76 if (!empty($_POST['cancel_import'])) { 77 77 $core->error->add(__('Import operation cancelled.')); 78 $default_tab = 'import-links'; 78 $default_tab = 'import-links'; 79 79 } 80 80 … … 86 86 $link_desc = $_POST['link_desc']; 87 87 $link_lang = $_POST['link_lang']; 88 88 89 89 try { 90 90 $blogroll->addLink($link_title,$link_href,$link_desc,$link_lang); … … 102 102 { 103 103 $cat_title = $_POST['cat_title']; 104 104 105 105 try { 106 106 $blogroll->addCategory($cat_title); … … 124 124 } 125 125 } 126 126 127 127 if (!$core->error->flag()) { 128 128 dcPage::addSuccessNotice(__('Items have been successfully removed.')); … … 145 145 foreach ($order as $pos => $l) { 146 146 $pos = ((integer) $pos)+1; 147 147 148 148 try { 149 149 $blogroll->updateOrder($l,$pos); … … 152 152 } 153 153 } 154 154 155 155 if (!$core->error->flag()) { 156 156 dcPage::addSuccessNotice(__('Items order has been successfully updated')); … … 172 172 <title><?php echo __('Blogroll'); ?></title> 173 173 <?php echo dcPage::jsConfirmClose('links-form','add-link-form','add-category-form'); ?> 174 <?php 174 <?php 175 175 $core->auth->user_prefs->addWorkspace('accessibility'); 176 176 if (!$core->auth->user_prefs->accessibility->nodragdrop) { 177 177 echo 178 178 dcPage::jsLoad('js/jquery/jquery-ui.custom.js'). 179 dcPage::jsLoad('js/jquery/jquery.ui.touch-punch.js'). 179 180 dcPage::jsLoad('index.php?pf=blogroll/blogroll.js'); 180 181 } … … 213 214 { 214 215 $position = (string) $rs->index()+1; 215 216 216 217 echo 217 218 '<tr class="line" id="l_'.$rs->link_id.'">'. 218 219 '<td class="handle minimal">'.form::field(array('order['.$rs->link_id.']'),2,5,$position,'position','',false,'title="'.__('position').'"').'</td>'. 219 220 '<td class="minimal">'.form::checkbox(array('remove[]'),$rs->link_id,'','','',false,'title="'.__('select this link').'"').'</td>'; 220 221 221 222 222 223 if ($rs->is_cat) 223 224 { … … 235 236 '<td>'.html::escapeHTML($rs->link_lang).'</td>'; 236 237 } 237 238 238 239 echo '</tr>'; 239 240 } … … 245 246 <p class="col"> 246 247 <?php 247 echo 248 echo 248 249 form::hidden('links_order',''). 249 250 form::hidden(array('p'),'blogroll'). … … 252 253 <input type="submit" name="saveorder" value="<?php echo __('Save order'); ?>" /></p> 253 254 <p class="col right"><input type="submit" class="delete" name="removeaction" 254 value="<?php echo __('Delete selected links'); ?>" 255 value="<?php echo __('Delete selected links'); ?>" 255 256 onclick="return window.confirm(' 256 257 <?php echo html::escapeJS(__('Are you sure you want to delete selected links?')); ?>');" /></p> … … 330 331 '<th>'.__('Description').'</th>'. 331 332 '</tr>'; 332 333 333 334 $i = 0; 334 335 foreach ($imported as $entry) { … … 336 337 $title = html::escapeHTML($entry->title); 337 338 $desc = html::escapeHTML($entry->desc); 338 339 echo 339 340 echo 340 341 '<tr><td>'.form::checkbox(array('entries[]'),$i,'','','').'</td>'. 341 342 '<td nowrap><a href="'.$url.'">'.$title.'</a>'. … … 345 346 '<td>'.$desc. 346 347 '<input type="hidden" name="desc['.$i.']" value="'.$desc.'" />'. 347 '</td></tr>'."\n"; 348 '</td></tr>'."\n"; 348 349 $i++; 349 350 } … … 352 353 '<div class="two-cols">'. 353 354 '<p class="col checkboxes-helpers"></p>'. 354 355 355 356 '<p class="col right">'. 356 357 form::hidden(array('p'),'blogroll'). -
plugins/pages/list.php
r2256 r2495 55 55 <title><?php echo __('Pages'); ?></title> 56 56 <?php 57 echo dcPage::jsLoad('js/jquery/jquery-ui.custom.js'). 57 echo 58 dcPage::jsLoad('js/jquery/jquery-ui.custom.js'). 59 dcPage::jsLoad('js/jquery/jquery.ui.touch-punch.js'). 58 60 dcPage::jsLoad('index.php?pf=pages/list.js'). 59 61 '<script type="text/javascript">'. … … 89 91 $post_list->display($page,$nb_per_page, 90 92 '<form action="plugin.php" method="post" id="form-entries">'. 91 93 92 94 '%s'. 93 95 94 96 '<div class="two-cols">'. 95 97 '<p class="col checkboxes-helpers"></p>'. 96 98 97 99 '<p class="col right"><label for="action" class="classic">'.__('Selected pages action:').'</label> '. 98 100 form::combo('action',$pages_actions_page->getCombo()). -
plugins/simpleMenu/index.php
r2256 r2495 204 204 // Fourth step, menu item to be added 205 205 try { 206 if (($item_label != '') && ($item_url != '')) 206 if (($item_label != '') && ($item_url != '')) 207 207 { 208 208 // Add new item menu in menu array … … 215 215 $core->blog->settings->system->put('simpleMenu',serialize($menu)); 216 216 $core->blog->triggerBlog(); 217 217 218 218 // All done successfully, return to menu items list 219 219 dcPage::addSuccessNotice(__('Menu item has been successfully added.')); … … 229 229 } 230 230 } else { 231 231 232 232 # Remove selected menu items 233 233 if (!empty($_POST['removeaction'])) … … 251 251 $core->blog->settings->system->put('simpleMenu',serialize($menu)); 252 252 $core->blog->triggerBlog(); 253 253 254 254 // All done successfully, return to menu items list 255 255 dcPage::addSuccessNotice(__('Menu items have been successfully removed.')); … … 295 295 } 296 296 } 297 297 298 298 # Order menu items 299 299 $order = array(); … … 328 328 dcPage::addSuccessNotice(__('Menu items have been successfully updated.')); 329 329 http::redirect($p_url); 330 } 330 } 331 331 catch (Exception $e) { 332 332 $core->error->add($e->getMessage()); 333 333 } 334 334 } 335 335 336 336 } 337 337 … … 342 342 <head> 343 343 <title><?php echo $page_title; ?></title> 344 <?php 344 <?php 345 345 $core->auth->user_prefs->addWorkspace('accessibility'); 346 346 if (!$core->auth->user_prefs->accessibility->nodragdrop) { 347 347 echo 348 348 dcPage::jsLoad('js/jquery/jquery-ui.custom.js'). 349 dcPage::jsLoad('js/jquery/jquery.ui.touch-punch.js'). 349 350 dcPage::jsLoad('index.php?pf=simpleMenu/simplemenu.js'); 350 351 } … … 474 475 } 475 476 // Entête table 476 echo 477 echo 477 478 '<div class="table-outer">'. 478 479 '<table class="dragable">'. -
plugins/widgets/index.php
r2412 r2495 53 53 } 54 54 } 55 55 56 56 # Append 1 widget 57 57 $wid = false; … … 60 60 $wid = $wid[0]; 61 61 } 62 62 63 63 # Append widgets 64 64 if (!empty($addw)) … … 73 73 $widgets_custom = new dcWidgets(); 74 74 } 75 75 76 76 foreach ($addw as $k => $v) 77 77 { … … 91 91 } 92 92 } 93 93 94 94 try { 95 95 $core->blog->settings->addNamespace('widgets'); … … 151 151 $_POST['w'] = array(); 152 152 } 153 153 154 154 try 155 155 { … … 163 163 } 164 164 } 165 165 166 166 if (!isset($_POST['w']['nav'])) { 167 167 $_POST['w']['nav'] = array(); … … 173 173 $_POST['w']['custom'] = array(); 174 174 } 175 175 176 176 $widgets_nav = dcWidgets::loadArray($_POST['w']['nav'],$__widgets); 177 177 $widgets_extra = dcWidgets::loadArray($_POST['w']['extra'],$__widgets); 178 178 $widgets_custom = dcWidgets::loadArray($_POST['w']['custom'],$__widgets); 179 179 180 180 $core->blog->settings->addNamespace('widgets'); 181 181 $core->blog->settings->widgets->put('widgets_nav',$widgets_nav->store()); … … 183 183 $core->blog->settings->widgets->put('widgets_custom',$widgets_custom->store()); 184 184 $core->blog->triggerBlog(); 185 185 186 186 http::redirect($p_url); 187 187 } … … 200 200 $core->blog->settings->widgets->put('widgets_custom',''); 201 201 $core->blog->triggerBlog(); 202 202 203 203 http::redirect($p_url); 204 204 } … … 218 218 echo 219 219 dcPage::jsLoad('js/jquery/jquery-ui.custom.js'). 220 dcPage::jsLoad('js/jquery/jquery.ui.touch-punch.js'). 220 221 dcPage::jsLoad('index.php?pf=widgets/widgets.js'); 221 222 ?> 222 <?php 223 $core->auth->user_prefs->addWorkspace('accessibility'); 223 <?php 224 $core->auth->user_prefs->addWorkspace('accessibility'); 224 225 $user_dm_nodragdrop = $core->auth->user_prefs->accessibility->nodragdrop; 225 226 ?> … … 325 326 ($w->desc() != '' ? ' <span class="form-note">'.__($w->desc()).'</span>' : '').'</dt>'. 326 327 '<dd>'; 327 328 328 329 $w_settings = $w->settings(); 329 330 if (empty($w_settings)) … … 350 351 break; 351 352 } 352 353 353 354 $widget_elements->content .= 354 355 '<li>'. … … 368 369 { 369 370 $res = '<h3>'.$title.'</h3>'; 370 371 371 372 if (!($widgets instanceof dcWidgets)) 372 373 { 373 374 $widgets = $default_widgets; 374 375 } 375 376 376 377 $res .= '<ul id="'.$id.'" class="connected">'; 377 378 378 379 $res .= '<li class="empty-widgets" '.(!$widgets->isEmpty() ? 'style="display: none;"' : '').'>'.__('No widget for now.').'</li>'; 379 380 380 381 $i = 0; 381 382 foreach ($widgets->elements() as $w) … … 383 384 $upDisabled = $i == 0 ? '" disabled="" src="images/disabled_' : '" src="images/'; 384 385 $downDisabled = $i == count($widgets->elements())-1 ? '" disabled="" src="images/disabled_' : '" src="images/'; 385 386 386 387 $iname = 'w['.$pr.']['.$i.']'; 387 388 388 389 $res .= 389 390 '<li>'.form::hidden(array($iname.'[id]'),html::escapeHTML($w->id())). … … 399 400 '<div class="widgetSettings hidden-if-drag">'.$w->formSettings($iname,$j).'</div>'. 400 401 '</li>'; 401 402 402 403 $i++; 403 404 $j++; 404 405 } 405 406 406 407 $res .= '</ul>'; 407 408 408 409 $res .= '<ul class="sortable-delete"'.($i > 0 ? '':' style="display: none;"').'><li class="sortable-delete-placeholder">'. 409 410 __('Drag widgets here to remove.').'</li></ul>'; 410 411 411 412 return $res; 412 413 }
Note: See TracChangeset
for help on using the changeset viewer.