Changeset 2354
- Timestamp:
- 06/12/10 10:04:27 (13 years ago)
- Location:
- plugins/contactMe
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/contactMe
-
Property
svn:ignore
set to
_disabled
-
Property
svn:ignore
set to
-
plugins/contactMe/_define.php
r227 r2354 15 15 /* Name */ "ContactMe", 16 16 /* Description*/ "Add a simple contact form on your blog", 17 /* Author */ "Olivier Meunier ",18 /* Version */ '1. 0',17 /* Author */ "Olivier Meunier and contributors", 18 /* Version */ '1.1', 19 19 /* Permissions */ 'admin' 20 20 ); -
plugins/contactMe/_public.php
r623 r2354 37 37 global $core, $_ctx; 38 38 39 if (!$core->blog->settings->c m_recipients) {39 if (!$core->blog->settings->contactme->cm_recipients) { 40 40 self::p404(); 41 41 exit; … … 98 98 99 99 # Checks recipients addresses 100 $recipients = explode(',',$core->blog->settings->c m_recipients);100 $recipients = explode(',',$core->blog->settings->contactme->cm_recipients); 101 101 $rc2 = array(); 102 102 foreach ($recipients as $v) { … … 114 114 115 115 # Check message form spam 116 if ($core->blog->settings->c m_use_antispam && class_exists('dcAntispam') && isset($core->spamfilters))116 if ($core->blog->settings->contactme->cm_use_antispam && class_exists('dcAntispam') && isset($core->spamfilters)) 117 117 { 118 118 # Fake cursor to check spam … … 148 148 149 149 $subject = $_ctx->contactme['subject']; 150 if ($core->blog->settings->c m_subject_prefix) {151 $subject = $core->blog->settings->c m_subject_prefix.' '.$subject;150 if ($core->blog->settings->contactme->cm_subject_prefix) { 151 $subject = $core->blog->settings->contactme->cm_subject_prefix.' '.$subject; 152 152 } 153 153 $subject = mail::B64Header($subject); … … 215 215 { 216 216 $f = $GLOBALS['core']->tpl->getFilters($attr); 217 return '<?php echo '.sprintf($f,'$core->blog->settings->c m_page_title').'; ?>';217 return '<?php echo '.sprintf($f,'$core->blog->settings->contactme->cm_page_title').'; ?>'; 218 218 } 219 219 220 220 public static function ContactMeFormCaption($attr) 221 221 { 222 return '<?php echo $core->blog->settings->c m_form_caption; ?>';222 return '<?php echo $core->blog->settings->contactme->cm_form_caption; ?>'; 223 223 } 224 224 225 225 public static function ContactMeMsgSuccess($attr) 226 226 { 227 return '<?php echo $core->blog->settings->c m_msg_success; ?>';227 return '<?php echo $core->blog->settings->contactme->cm_msg_success; ?>'; 228 228 } 229 229 230 230 public static function ContactMeMsgError($attr) 231 231 { 232 return '<?php echo sprintf($core->blog->settings->c m_msg_error,html::escapeHTML($_ctx->contactme["error_msg"])); ?>';232 return '<?php echo sprintf($core->blog->settings->contactme->cm_msg_error,html::escapeHTML($_ctx->contactme["error_msg"])); ?>'; 233 233 } 234 234 … … 264 264 265 265 # Widget function 266 public static function contactMeWidget( &$w)266 public static function contactMeWidget($w) 267 267 { 268 268 global $core; … … 272 272 } 273 273 274 if (!$core->blog->settings->c m_recipients) {274 if (!$core->blog->settings->contactme->cm_recipients) { 275 275 return; 276 276 } -
plugins/contactMe/index.php
r248 r2354 11 11 # -- END LICENSE BLOCK ------------------------------------ 12 12 13 $cm_recipients = $core->blog->settings->c m_recipients;14 $cm_subject_prefix = $core->blog->settings->c m_subject_prefix;15 $cm_page_title = $core->blog->settings->c m_page_title;16 $cm_form_caption = $core->blog->settings->c m_form_caption;17 $cm_msg_success = $core->blog->settings->cm_msg_success;18 $cm_msg_error = $core->blog->settings->c m_msg_error;19 $cm_use_antispam = $core->blog->settings->c m_use_antispam;13 $cm_recipients = $core->blog->settings->contactme->cm_recipients; 14 $cm_subject_prefix = $core->blog->settings->contactme->cm_subject_prefix; 15 $cm_page_title = $core->blog->settings->contactme->cm_page_title; 16 $cm_form_caption = $core->blog->settings->contactme->cm_form_caption; 17 $cm_msg_success = $core->blog->settings->contactme->cm_msg_success; 18 $cm_msg_error = $core->blog->settings->contactme->cm_msg_error; 19 $cm_use_antispam = $core->blog->settings->contactme->cm_use_antispam; 20 20 21 21 $antispam_enabled = $core->plugins->moduleExists('antispam'); … … 78 78 79 79 # Everything's fine, save options 80 $core->blog->settings-> setNamespace('contactme');81 $core->blog->settings-> put('cm_recipients',$cm_recipients,'string','ContactMe recipients');82 $core->blog->settings-> put('cm_subject_prefix',$cm_subject_prefix,'string','ContactMe subject prefix');83 $core->blog->settings-> put('cm_page_title',$cm_page_title,'string','ContactMe page title');84 $core->blog->settings-> put('cm_form_caption',$cm_form_caption,'string','ContactMe form caption');85 $core->blog->settings-> put('cm_msg_success',$cm_msg_success,'string','ContactMe success message');86 $core->blog->settings-> put('cm_msg_error',$cm_msg_error,'string','ContactMe error message');80 $core->blog->settings->addNamespace('contactme'); 81 $core->blog->settings->contactme->put('cm_recipients',$cm_recipients,'string','ContactMe recipients'); 82 $core->blog->settings->contactme->put('cm_subject_prefix',$cm_subject_prefix,'string','ContactMe subject prefix'); 83 $core->blog->settings->contactme->put('cm_page_title',$cm_page_title,'string','ContactMe page title'); 84 $core->blog->settings->contactme->put('cm_form_caption',$cm_form_caption,'string','ContactMe form caption'); 85 $core->blog->settings->contactme->put('cm_msg_success',$cm_msg_success,'string','ContactMe success message'); 86 $core->blog->settings->contactme->put('cm_msg_error',$cm_msg_error,'string','ContactMe error message'); 87 87 88 88 if ($antispam_enabled) { 89 $core->blog->settings-> put('cm_use_antispam',!empty($_POST['cm_use_antispam']),'boolean','ContactMe should use comments spam filter');89 $core->blog->settings->contactme->put('cm_use_antispam',!empty($_POST['cm_use_antispam']),'boolean','ContactMe should use comments spam filter'); 90 90 } 91 91
Note: See TracChangeset
for help on using the changeset viewer.