I'm sorry if this is in the wrong board, please let me know if I need to delete and repost elsewhere.
I used to have the guest email input box removed on SMF 1.0.3 and now that I have upgraded to 1.1 Beta 3 public, I can't remove it without getting a parse error. Can someone help me do this?
Find, Sources/Post.php:
// Only check if they changed it!
if (!isset($row) || $row['posterEmail'] != $_POST['email'])
{
if (!allowedTo('moderate_forum') && (!isset($_POST['email']) || $_POST['email'] == ''))
$post_errors[] = 'no_email';
if (!allowedTo('moderate_forum') && preg_match('~^[0-9A-Za-z=_+\-/][0-9A-Za-z=_\'+\-/\.]*@[\w\-]+(\.[\w\-]+)*(\.[\w]{2,6})$~', stripslashes($_POST['email'])) == 0)
$post_errors[] = 'bad_email';
}
// Now make sure this email address is not banned from posting.
isBannedEmail($_POST['email'], 'cannot_post', sprintf($txt['you_are_post_banned'], $txt[28]));
And remove it. In the Post template, find and remove:
</tr>
<tr>
<td align="right" style="font-weight: bold;', isset($context['post_error']['no_email']) || isset($context['post_error']['bad_email']) ? 'color: #FF0000;' : '', '" id="caption_email">
', $txt[69], ':
</td>
<td>
<input type="text" name="email" size="25" value="', $context['email'], '" tabindex="', $context['tabindex']++, '" />
</td>
How do I modify files? (http://www.simplemachines.org/community/index.php?topic=24110.0) For later releases of 1.1, you need only run this query:
INSERT INTO smf_settings
(variable, value)
VALUES ('guest_post_no_email', '1');
What is phpMyAdmin? (http://www.simplemachines.org/community/index.php?topic=21919.0)
Please forgive the late response.
-[Unknown]
Thank you so much Unknown!
It allows guest posting without an email now, but there is one problem. When I input a name in the name field it doesn't log it, only shows "Guest" in the post profile info.
Any suggestions as to why this would happen? There's no rush, I don't mind the name not showing as long as no email is required.
Thanks again :)
Find, Subs-Post.php:
if (empty($posterOptions['name']) || empty($posterOptions['email']))
Replace:
if (!isset($posterOptions['name']) || $posterOptions['name'] == '' || (empty($posterOptions['email']) && !empty($posterOptions['id'])))
Sorry about that.
-[Unknown]
Ah, thank you! Works beautifully now :D
how to do this
for Smf Rc 1.1