Dotclear

Changeset 911:8eb6c605bf39 for plugins


Ignore:
Timestamp:
10/26/12 11:41:00 (13 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Add hidden attribute for pages : active but not listed in widget Pages, fixes #1155

Location:
plugins/pages
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • plugins/pages/_public.php

    r904 r911  
    228228          $params['limit'] = abs((integer) $w->limit); 
    229229          $params['no_content'] = true; 
     230          $params['post_selected'] = false; 
    230231           
    231232          $sort = $w->sortby; 
  • plugins/pages/list.php

    r578 r911  
    8686          $selected = ''; 
    8787          if ($this->rs->post_selected) { 
    88                $selected = sprintf($img,__('selected'),'selected.png'); 
     88               $selected = sprintf($img,__('hidden'),'hidden.png'); 
    8989          } 
    9090           
  • plugins/pages/page.php

    r907 r911  
    3131$post_open_comment = false; 
    3232$post_open_tb = false; 
     33$post_selected = false; 
    3334 
    3435$post_media = array(); 
     
    108109          $post_open_comment = (boolean) $post->post_open_comment; 
    109110          $post_open_tb = (boolean) $post->post_open_tb; 
     111          $post_selected = (boolean) $post->post_selected; 
    110112           
    111113          $page_title = __('Edit page'); 
     
    160162     $post_open_comment = !empty($_POST['post_open_comment']); 
    161163     $post_open_tb = !empty($_POST['post_open_tb']); 
     164     $post_selected = !empty($_POST['post_selected']); 
    162165     $post_lang = $_POST['post_lang']; 
    163166     $post_password = !empty($_POST['post_password']) ? $_POST['post_password'] : null; 
     
    200203     $cur->post_open_comment = (integer) $post_open_comment; 
    201204     $cur->post_open_tb = (integer) $post_open_tb; 
     205     $cur->post_selected = (integer) $post_selected; 
    202206      
    203207     if (isset($_POST['post_url'])) { 
     
    424428     '<p><label for="post_open_comment" class="classic">'.form::checkbox('post_open_comment',1,$post_open_comment).' '. 
    425429     __('Accept comments').'</label></p>'. 
     430 
    426431     '<p><label for="post_open_tb" class="classic">'.form::checkbox('post_open_tb',1,$post_open_tb).' '. 
    427432     __('Accept trackbacks').'</label></p>'. 
    428433      
     434     '<p><label for="post_selected" class="classic">'.form::checkbox('post_selected',1,$post_selected).' '. 
     435     __('Hidden').'</label></p>'. 
     436     '<p class="form-note">'. 
     437     __('If checked this page will be active but not listed in widget Pages.'). 
     438     '</p>'. 
     439 
    429440     '<p><label for="post_position" class="classic">'.__('Page position:').' '. 
    430441     form::field('post_position',3,3,(string) $post_position). 
Note: See TracChangeset for help on using the changeset viewer.

Sites map