Changeset 1947
- Timestamp:
- 12/09/09 00:57:12 (13 years ago)
- Location:
- plugins/typo
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/typo/CHANGELOG
r655 r1947 1 Typo plugin 1.5 for Dotclear 2 2 =========================================== 3 * PHP 5.3 Compliance 4 * DC 2.2 new setting namespace 5 1 6 Typo plugin 1.4 for Dotclear 2 2 7 =========================================== -
plugins/typo/CREDITS
r1820 r1947 2 2 3 3 Dotclear Typo plugin 4 Copyright (c) 200 8Franck Paul4 Copyright (c) 2009 Franck Paul 5 5 <http://open-time.net/> 6 6 All rights reserved. -
plugins/typo/_admin.php
r1820 r1947 32 32 class adminTypo 33 33 { 34 public static function adminPostsActionsCombo( &$args)34 public static function adminPostsActionsCombo($args) 35 35 { 36 36 global $core; … … 50 50 51 51 '<p><label class="classic">'. 52 form::checkbox('set_typo','1',$core->blog->settings->typo _active).52 form::checkbox('set_typo','1',$core->blog->settings->typo->typo_active). 53 53 ' '.__('Apply typographic replacements for selected entries').'</label></p>'. 54 54 … … 63 63 } 64 64 65 public static function adminPostsActions( &$core,$posts,$action,$redir)65 public static function adminPostsActions($core,$posts,$action,$redir) 66 66 { 67 67 if ($action == 'typo' && !empty($_POST['set_typo']) … … 106 106 $excerpt = &$ref['excerpt_xhtml']; 107 107 if ($excerpt) { 108 if ($core->blog->settings->typo _entries) {108 if ($core->blog->settings->typo->typo_entries) { 109 109 $excerpt = SmartyPants($excerpt); 110 110 } … … 115 115 $content = &$ref['content_xhtml']; 116 116 if ($content) { 117 if ($core->blog->settings->typo _entries) {117 if ($core->blog->settings->typo->typo_entries) { 118 118 $content = SmartyPants($content); 119 119 } … … 124 124 } 125 125 126 public static function updateTypoComments( &$blog,&$cur)126 public static function updateTypoComments($blog,$cur) 127 127 { 128 128 global $core; 129 if ($core->blog->settings->typo _active && $core->blog->settings->typo_comments)129 if ($core->blog->settings->typo->typo_active && $core->blog->settings->typo->typo_comments) 130 130 { 131 131 /* Transform typo for comment content (XHTML) */ 132 132 if (!(boolean)$cur->comment_trackback) { 133 133 if ($cur->comment_content != null) { 134 if ($core->blog->settings->typo _comments)134 if ($core->blog->settings->typo->typo_comments) 135 135 $cur->comment_content = SmartyPants($cur->comment_content); 136 136 } -
plugins/typo/_define.php
r1820 r1947 15 15 /* Description*/ "Brings smart typographic replacements for your blog entries and comments", 16 16 /* Author */ "Franck Paul", 17 /* Version */ '1. 4',17 /* Version */ '1.5', 18 18 /* Permissions */ 'contentadmin' 19 19 ); -
plugins/typo/_public.php
r1820 r1947 19 19 class dcTypo 20 20 { 21 public static function updateTypoComments( &$blog,&$cur)21 public static function updateTypoComments($blog,$cur) 22 22 { 23 23 global $core; 24 24 25 if ($core->blog->settings->typo _active && $core->blog->settings->typo_comments)25 if ($core->blog->settings->typo->typo_active && $core->blog->settings->typo->typo_comments) 26 26 { 27 27 /* Transform typo for comment content (XHTML) */ 28 28 if (!(boolean)$cur->comment_trackback) { 29 29 if ($cur->comment_content != null) { 30 if ($core->blog->settings->typo _comments)30 if ($core->blog->settings->typo->typo_comments) 31 31 $cur->comment_content = SmartyPants($cur->comment_content); 32 32 } … … 34 34 } 35 35 } 36 public static function previewTypoComments( &$prv)36 public static function previewTypoComments($prv) 37 37 { 38 38 global $core; 39 39 40 if ($core->blog->settings->typo _active && $core->blog->settings->typo_comments)40 if ($core->blog->settings->typo->typo_active && $core->blog->settings->typo->typo_comments) 41 41 { 42 42 /* Transform typo for comment content (XHTML) */ 43 43 if ($prv['content'] != null) { 44 if ($core->blog->settings->typo _comments)44 if ($core->blog->settings->typo->typo_comments) 45 45 $prv['content'] = SmartyPants($prv['content']); 46 46 } -
plugins/typo/index.php
r1820 r1947 14 14 15 15 // Setting default parameters if missing configuration 16 if (is_null($core->blog->settings->typo _active)) {16 if (is_null($core->blog->settings->typo->typo_active)) { 17 17 try { 18 $core->blog->settings-> setNameSpace('typo');18 $core->blog->settings->addNamespace('typo'); 19 19 20 20 // Default state is active for entries content and inactive for comments 21 $core->blog->settings-> put('typo_active',true,'boolean');22 $core->blog->settings-> put('typo_entries',true,'boolean');23 $core->blog->settings-> put('typo_comments',false,'boolean');21 $core->blog->settings->typo->put('typo_active',true,'boolean'); 22 $core->blog->settings->typo->put('typo_entries',true,'boolean'); 23 $core->blog->settings->typo->put('typo_comments',false,'boolean'); 24 24 $core->blog->triggerBlog(); 25 25 http::redirect(http::getSelfURI()); … … 30 30 } else { 31 31 // Setting new 1.3 parameter if missing in configuration 32 if (is_null($core->blog->settings->typo _entries)) {32 if (is_null($core->blog->settings->typo->typo_entries)) { 33 33 try { 34 34 // Default state is active for entries content 35 $core->blog->settings-> setNameSpace('typo');36 $core->blog->settings-> put('typo_entries',true,'boolean');35 $core->blog->settings->addNamespace('typo'); 36 $core->blog->settings->typo->put('typo_entries',true,'boolean'); 37 37 $core->blog->triggerBlog(); 38 38 http::redirect(http::getSelfURI()); … … 45 45 46 46 // Getting current parameters 47 $typo_active = (boolean)$core->blog->settings->typo _active;48 $typo_entries = (boolean)$core->blog->settings->typo _entries;49 $typo_comments = (boolean)$core->blog->settings->typo _comments;47 $typo_active = (boolean)$core->blog->settings->typo->typo_active; 48 $typo_entries = (boolean)$core->blog->settings->typo->typo_entries; 49 $typo_comments = (boolean)$core->blog->settings->typo->typo_comments; 50 50 51 51 // Saving new configuration … … 53 53 try 54 54 { 55 $core->blog->settings-> setNameSpace('typo');55 $core->blog->settings->addNamespace('typo'); 56 56 57 57 $typo_active = (empty($_POST['active']))?false:true; 58 58 $typo_entries = (empty($_POST['entries']))?false:true; 59 59 $typo_comments = (empty($_POST['comments']))?false:true; 60 $core->blog->settings-> put('typo_active',$typo_active,'boolean');61 $core->blog->settings-> put('typo_entries',$typo_entries,'boolean');62 $core->blog->settings-> put('typo_comments',$typo_comments,'boolean');60 $core->blog->settings->typo->put('typo_active',$typo_active,'boolean'); 61 $core->blog->settings->typo->put('typo_entries',$typo_entries,'boolean'); 62 $core->blog->settings->typo->put('typo_comments',$typo_comments,'boolean'); 63 63 $core->blog->triggerBlog(); 64 64 $msg = __('Configuration successfully updated.'); -
plugins/typo/locales/fr/main.po
r1820 r1947 8 8 "Report-Msgid-Bugs-To: \n" 9 9 "POT-Creation-Date: 2009-01-05 19:57+0100\n" 10 "PO-Revision-Date: 2009-10-30 08: 18+0100\n"11 "Last-Translator: Kozlika <kozlika@free.fr>\n"10 "PO-Revision-Date: 2009-10-30 08:24+0100\n" 11 "Last-Translator: Franck Paul <carnet.franck.paul@gmail.com>\n" 12 12 "Language-Team: Franck Paul <franck.paul@free.fr>\n" 13 13 "MIME-Version: 1.0\n"
Note: See TracChangeset
for help on using the changeset viewer.