Customizing SMF > Modifications and Packages

Anonymous Board Mod

<< < (6/58) > >>

Darkness_:
is it possible to set a board as anonymous board.
and when a user posts something that they have to choose that they want post it anonymouse.

maybe this will be better to explain

there is an option
Post this message with your username (NOT ANONYMOUS)

couldn't this one made
Post this message ANONYMOUS




I hope you will understand me, sorry for my bad english

Darkness_:
I've solved it myself for the ones who want this to



go tho your sources and open post.php
find this code

--- Code: --- // anonymous board mod
if ( $context['anonymousBoard'] && !isset($_POST['post_unanon']) )
{
// Destroy the identifing user data
$user_info['username'] = 'Anonymous';
$user_info['name'] = 'Anonymous';
$user_info['email'] = '';
$user_info['avatar'] = array();
$ID_MEMBER = 0;
}
--- End code ---

and replace it with


--- Code: --- // anonymous board mod
if ( $context['anonymousBoard'] && ($_POST['post_unanon']) )
{
// Destroy the identifing user data
$user_info['username'] = 'Anonymous';
$user_info['name'] = 'Anonymous';
$user_info['email'] = '';
$user_info['avatar'] = array();
$ID_MEMBER = 0;
}
--- End code ---

Kindred:
or, rather than re-coding, you could set the "do not make this post anonymous" checkbox to default ON.

Also, your code could end up filling the error log.

It should be...

if ( $context['anonymousBoard'] && isset($_POST['post_unanon']) )

Darkness_:
It works fine with me, I don't have any problems.
and my eror logs are disabled.

Kindred:
I did not say that it would not WORK. I said that it was improper code that might end up causing errors in the logs.

none-the-less, if you are posting code, for other people to try, it really should be correct code. (and disabling the error log is not really a good idea. The error logs tell you when something needs to be fixed.)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version