Dotclear


Ignore:
Timestamp:
03/28/08 22:28:15 (16 years ago)
Author:
Moe
Message:

blocNotes : now with personal and blog-specific notebook

File:
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/blocNotes/lib.blocNotes.php

    r369 r377  
    3030          } 
    3131 
    32           public static function textarea(&$post='') 
     32          public static function form() 
    3333          { 
    3434               global $core; 
    3535 
    36                echo('<p class="area" id="blocNotes">'. 
    37                     '<label for="blocNotes_text">'.__('Bloc-notes :').'</label>'. 
    38                     form::textarea('blocNotes_text',80,20, 
     36               echo '<p class="area" id="blocNotes_personal">'. 
     37                    '<label for="blocNotes_personal_text">'. 
     38                         __('Personal notebook (other users can&#39;t edit it) :'). 
     39                    '</label>'. 
     40                    form::textarea('blocNotes_personal_text',80,10, 
     41                    html::escapeHTML($core->blog->settings->{'blocNotes_text_'.$core->auth->userID()})). 
     42                    '</p>'. 
     43                    '<p class="area" id="blocNotes">'. 
     44                    '<label for="blocNotes_text">'. 
     45                         __('Blog-specific notebook (all the users of the blog can edit it) :'). 
     46                    '</label>'. 
     47                    form::textarea('blocNotes_text',80,10, 
    3948                    html::escapeHTML($core->blog->settings->blocNotes_text)). 
    40                     '</p>'); 
     49                    '</p>'. 
     50                    '<p>'. 
     51                    __('These notes may be read by anyone, don&#39;t write some sensitive information (password, personal information, etc.)'). 
     52                    '</p>'; 
    4153          } 
    4254 
    43           public static function adminPost() 
     55          public static function putSettings() 
    4456          { 
    4557               global $core; 
     
    4961                    $core->blog->settings->setNameSpace('blocnotes'); 
    5062                    # Bloc-Notes' text 
     63                    $core->blog->settings->put('blocNotes_text_'.$core->auth->userID(), 
     64                         $_POST['blocNotes_personal_text'],'text','Bloc-Notes\' personal text',true,true); 
    5165                    $core->blog->settings->put('blocNotes_text', 
    5266                         $_POST['blocNotes_text'],'text','Bloc-Notes\' text'); 
Note: See TracChangeset for help on using the changeset viewer.

Sites map