Changeset 1208 for plugins/blocNotes
- Timestamp:
- 06/07/09 01:18:20 (14 years ago)
- Location:
- plugins/blocNotes
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/blocNotes/_define.php
r1183 r1208 26 26 27 27 $this->registerModule( 28 /* Name */ 29 /* Description*/ 30 /* Author */ 31 /* Version */ '1.0.2',32 /* Permissions */ 28 /* Name */ 'Bloc-Notes', 29 /* Description*/ 'Display notebooks on the backend', 30 /* Author */ 'Moe (http://gniark.net/)', 31 /* Version */ '1.0.3', 32 /* Permissions */ 'usage,contentadmin' 33 33 ); 34 34 ?> -
plugins/blocNotes/_install.php
r1183 r1208 71 71 } 72 72 73 # table 74 $s = new dbStruct($core->con,$core->prefix); 75 76 # add blocNotes column to (dc_)user 77 $s->user 78 ->blocNotes('text',0,true,null) 79 ; 80 81 $si = new dbStruct($core->con,$core->prefix); 82 $changes = $si->synchronize($s); 83 84 # store users setting in (dc_)user 85 if (version_compare($i_version,'1.0.3','<')) 86 { 87 # users setting (global) 88 $rs = $core->con->select('SELECT setting_value, setting_id '. 89 'FROM '.$core->prefix.'setting '. 90 'WHERE setting_ns = \'blocnotes\' '. 91 'AND (setting_id LIKE \'blocNotes_text_%\');'); 92 93 while($rs->fetch()) 94 { 95 $user_id = str_replace('blocNotes_text_','',$rs->setting_id); 96 97 $cur = $core->con->openCursor($core->prefix.'user'); 98 $cur->blocNotes = base64_decode($rs->setting_value); 99 $cur->update('WHERE user_id = \''.$user_id.'\';'); 100 } 101 102 # delete old settings 103 $core->con->execute('DELETE FROM '.$core->prefix.'setting '. 104 'WHERE setting_ns = \'blocnotes\' '. 105 'AND (setting_id LIKE \'blocNotes_text_%\');'); 106 } 107 73 108 # La procédure d'installation commence vraiment là 74 109 $core->setVersion('blocNotes',$m_version); -
plugins/blocNotes/inc/lib.blocNotes.php
r1183 r1208 37 37 38 38 $set = $core->blog->settings; 39 40 $notes = $core->con->select('SELECT blocNotes '. 41 'FROM '.$core->prefix.'user '. 42 'WHERE user_id = \''. 43 $core->con->escape($core->auth->userID()).'\'')->f(0); 39 44 40 45 echo '<p class="area" id="blocNotes_personal">'. … … 43 48 '</label>'. 44 49 form::textarea('blocNotes_personal_text',80,5, 45 html::escapeHTML(base64_decode( 46 $set->{'blocNotes_text_'.$core->auth->userID()}), 47 'maximal')). 50 html::escapeHTML($notes),'maximal'). 48 51 '</p>'. 49 52 '<p class="area" id="blocNotes">'. … … 66 69 if (isset($_POST['blocNotes_text'])) 67 70 { 71 # Personal notebook 72 $cur = $core->con->openCursor($core->prefix.'user'); 73 $cur->blocNotes = $_POST['blocNotes_personal_text']; 74 $cur->update('WHERE user_id = \''.$core->con->escape($core->auth->userID()).'\''); 75 68 76 $core->blog->settings->setNameSpace('blocnotes'); 69 # Bloc-Notes' text 70 $core->blog->settings->put( 71 'blocNotes_text_'.$core->auth->userID(), 72 base64_encode($_POST['blocNotes_personal_text']),'text', 73 'Bloc-Notes\' personal text',true,true); 77 # Blog-specific notebook 74 78 $core->blog->settings->put('blocNotes_text', 75 79 base64_encode($_POST['blocNotes_text']),'text', -
plugins/blocNotes/post.js
r377 r1208 2 2 3 3 This file is part of Bloc-Notes. 4 Copyright 2008 Moe (http://gniark.net/)4 Copyright 2008,2009 Moe (http://gniark.net/) 5 5 6 6 Bloc-Notes is free software; you can redistribute it and/or modify … … 17 17 along with this program. If not, see <http://www.gnu.org/licenses/>. 18 18 19 Icon (icon.png) is from Silk Icons : http://www.famfamfam.com/lab/icons/silk/ 19 Icon (icon.png) is from Silk Icons : 20 http://www.famfamfam.com/lab/icons/silk/ 20 21 21 22 ***** END LICENSE BLOCK *****/
Note: See TracChangeset
for help on using the changeset viewer.