diff options
| author | Savetheinternet <savetheinternet@n0v4.com> | 2011-02-17 20:12:09 +1100 |
|---|---|---|
| committer | Savetheinternet <savetheinternet@n0v4.com> | 2011-02-17 20:12:09 +1100 |
| commit | 5170cd7aa896d8ebc1f1882cb7645cb30d958c15 (patch) | |
| tree | 3fe1ecee4dafcafebf8f5dde7919595980fe2e7c | |
| parent | 7ecac9937d17ad166d0823c0811fb4f7008f7ee4 (diff) | |
Ability to customize default name ("Anonymous")
| -rw-r--r-- | inc/config.php | 7 | ||||
| -rw-r--r-- | post.php | 4 |
2 files changed, 7 insertions, 4 deletions
diff --git a/inc/config.php b/inc/config.php index f386ab2a..fdca67e9 100644 --- a/inc/config.php +++ b/inc/config.php @@ -306,10 +306,13 @@ $config['button_newtopic'] = 'New Topic'; $config['button_reply'] = 'New Reply'; + // The default name (ie. Anonymous) + $config['anonymous'] = 'Anonymous'; + // The string passed to date() for post times // http://php.net/manual/en/function.date.php - $config['post_date'] = 'm/d/y (D) H:i:s'; + $config['post_date'] = 'm/d/y (D) H:i:s'; // Always act as if they had typed "noko" in the email field no mattter what - $config['always_noko'] = false; + $config['always_noko'] = false; ?>
\ No newline at end of file @@ -142,7 +142,7 @@ error($config['error']['noimage']); } - $post['name'] = (!empty($_POST['name'])?$_POST['name']:'Anonymous'); + $post['name'] = (!empty($_POST['name'])?$_POST['name']:$config['anonymous']); $post['subject'] = $_POST['subject']; $post['email'] = utf8tohtml($_POST['email']); $post['body'] = $_POST['body']; @@ -189,7 +189,7 @@ if($mod && $mod['type'] >= MOD && preg_match('/^((.+) )?## (.+)$/', $post['name'], $match)) { if(($mod['type'] == MOD && $match[3] == 'Mod') || $mod['type'] >= ADMIN) { $post['mod_tag'] = $match[3]; - $post['name'] = !empty($match[2])?$match[2]:'Anonymous'; + $post['name'] = !empty($match[2])?$match[2]:$config['anonymous']; } } else { $post['mod_tag'] = false; |
