Recently I was building a forum for a work project and the users must be able to post anonymously when they want. I saw the anonymous board mod, but I didn't want to make the whole board anonymous, just the actual topic/post. I took the code and modified it a little so that users can post the topic anonymously if they want. More could be added and a mod with permissions could be made, but for now here is the solution. Thanks to the original coders/developers.
In Modifications.english.php (located in Themes\Default\languages)
At the bottom BEFORE
?>
Paste this
$txt['post_anon'] = 'Post message anonymously';
In Post.template.php (located in Themes\Default)
AFTER this
// Finally, the submit buttons.
Paste this
echo '<br>'. $txt['post_anon'] .' <input type="checkbox" name="post_anon" />';
In Display.template.php (located in Themes\Default)
AFTER this
// Is visual verification enabled?
if ($context['require_verification'])
echo '
<strong>', $txt['verification'], ':</strong>', template_control_verification($context['visual_verification_id'], 'quick_reply'), '<br />';
echo '
<div class="quickReplyContent">
<textarea cols="600" rows="7" name="message" tabindex="', $context['tabindex']++, '"></textarea>
</div>
Paste this
<br>'. $txt['post_anon'] .' <input type="checkbox" name="post_anon" />
In Post.php (located in Sources)
AFTER this
// No errors as yet.
$post_errors = array();
Paste this
if (isset($_POST['post_anon']))
{
// Destroy the identifing user data
$user_info['username'] = 'Anonymous';
$user_info['name'] = 'Anonymous';
$user_info['email'] = '';
$user_info['id'] = 0;
}
//didn't try it, but if you change the $user_info['id'] = # to another number corresponding to a users number then it SHOULD take over the post. So if you actually created an Anonymous account with a picture/profile and the ID (hover over a users name and you should see u=#) then that will show up so you dont' have a plain jane looking Guest post..hopefully