Anonymous Board Mod

Started by JMV290, November 04, 2007, 07:12:46 PM

Previous topic - Next topic

MiY4Gi

Quote from: Arantor on July 27, 2012, 08:40:18 PM
It working properly on 2.0.

I'm not sure what you mean. Are you saying that the mod works perfectly fine on 2.0 without the fix? Both during topic replying AND topic creation?

Most users reported that they could reply anonymously, but not create new topics anonymously. Perhaps the majority of that 30 000 people who downloaded the mod haven't experienced these errors, but this fix would then be for the minority who have the problem.
Check out my new website, MyAnimeClub.net. I plan to create the largest anime community, and most fun and user-friendly anime forum in the world. It's still in the development stage though.

Arantor

I assumed that's what you fixed in this...

The majority of people who downloaded this mod did so for 1.1.x...

MiY4Gi

I see, so you were just confirming that the fix works on 2.0?

So that 30000+ downloads were for the 1.1.x version? That would explain why there are so few people reporting the problem. The 1.1.x version doesn't have the cache problem.

Check out my new website, MyAnimeClub.net. I plan to create the largest anime community, and most fun and user-friendly anime forum in the world. It's still in the development stage though.

shazoo!

I had the problem on 2.0.2

Arantor

Nope. I was clarifying what I thought you'd managed to achieve with your posted fix, since that was the question asked.

As for the downloads, it's been around literally years, so 30k downloads is rather tame, really.


shazoo!, so try the changes, see if that helps.

littlenicki

Hello MiY4Gi,

do you also happen to know the fix for the SMF 1.1 version? People using SMF 1.1 seem to have been looking for a fix for years.

Would be nice to get this problem solved.

Thank you
Fomer SMF user. Switched to Invision Power Board and VBulletin

shazoo!

Quote from: Arantor on July 27, 2012, 09:04:05 PM
Nope. I was clarifying what I thought you'd managed to achieve with your posted fix, since that was the question asked.

As for the downloads, it's been around literally years, so 30k downloads is rather tame, really.


shazoo!, so try the changes, see if that helps.
Seems to work beautifully, thank you!

MiY4Gi

Quote from: littlenicki on July 27, 2012, 09:18:08 PM
Hello MiY4Gi,

do you also happen to know the fix for the SMF 1.1 version? People using SMF 1.1 seem to have been looking for a fix for years.

Would be nice to get this problem solved.

Thank you

Sorry, unfortunately I only had a look at the SMF 2.0 version. What's wrong with the SMF 1.1 version?
Check out my new website, MyAnimeClub.net. I plan to create the largest anime community, and most fun and user-friendly anime forum in the world. It's still in the development stage though.

MiY4Gi

Shazoo, I'm curious. Were your users still using the mod, even with the bug? How did that work?
Check out my new website, MyAnimeClub.net. I plan to create the largest anime community, and most fun and user-friendly anime forum in the world. It's still in the development stage though.

littlenicki

Hello MiY4Gi,

the problem has been mentioned several times in this topic. That is on the SMF 1.1 people can post anonymous replies, but cannot start anonymous topics.

A fix would greatly be appreciated

Regards
Fomer SMF user. Switched to Invision Power Board and VBulletin

shazoo!

Quote from: MiY4Gi on July 28, 2012, 12:21:49 PM
Shazoo, I'm curious. Were your users still using the mod, even with the bug? How did that work?
I had to turn it off.  The section we were using it on, wasn't one that needed anonymous 100%, I wanted to use it in case they WANTED to be anonymous, but most of my users use quick reply, which is why I wanted to find out how to add the checkbox to the quick reply too.

It worked TOO well, making everyone anonymous lol

Now that you gave this fix, I'm going to look into it again and have it defaulted OFF (unchecked) and see if it works better now

MiY4Gi

Quote from: shazoo! on July 28, 2012, 12:35:26 PM
I had to turn it off.  The section we were using it on, wasn't one that needed anonymous 100%, I wanted to use it in case they WANTED to be anonymous, but most of my users use quick reply, which is why I wanted to find out how to add the checkbox to the quick reply too.

It worked TOO well, making everyone anonymous lol

Now that you gave this fix, I'm going to look into it again and have it defaulted OFF (unchecked) and see if it works better now

Is it possible to do that with this mod? I thought you had to set the whole board to anonymous, so people needed to select NOT TO BE anonymous when posting?

Anyway, I'll try to figure out how to add the option to the quick reply.
Check out my new website, MyAnimeClub.net. I plan to create the largest anime community, and most fun and user-friendly anime forum in the world. It's still in the development stage though.

shazoo!

#252
Quote from: MiY4Gi on July 28, 2012, 01:17:32 PM
Quote from: shazoo! on July 28, 2012, 12:35:26 PM
I had to turn it off.  The section we were using it on, wasn't one that needed anonymous 100%, I wanted to use it in case they WANTED to be anonymous, but most of my users use quick reply, which is why I wanted to find out how to add the checkbox to the quick reply too.

It worked TOO well, making everyone anonymous lol

Now that you gave this fix, I'm going to look into it again and have it defaulted OFF (unchecked) and see if it works better now

Is it possible to do that with this mod? I thought you had to set the whole board to anonymous, so people needed to select NOT TO BE anonymous when posting?

Anyway, I'll try to figure out how to add the option to the quick reply.

Kindred posted some instructions in this thread on how to turn it off by default (have the box unchecked):

Quote from: Kindred on December 12, 2011, 01:29:09 PM
Well, forcing the installation past the warnings means that the mod will be partially installed and will likely cause errors in your forum until the installation is either completed or removed.

As I said in the wiki, you will have to manually edit any of the files/sections which throw errors on the automatic installation.

And no... the errors are not due to additional themes.  The errors are likely due to other mods which have alreayd modified the target installation code.

As for your other question.... it does help to read the previous pages of this thread....
Quote from: rumfa on April 14, 2008, 08:35:56 AM
Find post.template.php
<input type="checkbox" name="post_unanon" />

Change in:
<input type="checkbox" checked name="post_unanon" />

or

Quote from: Darkness_ on February 14, 2008, 04:50:28 PM
find this code in post.php
// 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;
}


and replace it with

// 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;
}


shazoo!

#253
Darkness' edit actually flips what the checkbox does.  so you check it become anonymous, quick reply posts anonymous

rumfa's edit, makes the default box checked, but quick reply also posts anonymously.

so both are pretty much useless to me. :(

NOTE:  my code looks a little different from Darkness', he has:

// anonymous board mod
if ( $context['[b]anonymousBoard[/b]'] && !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;
}


While mine says:

if ( $context['[b]anonymous_board[/b]'] && !isset($_POST['post_unanon']) )
{
// Destroy the identifing user data
$user_info['username'] = 'Anonymous';
$user_info['name'] = 'Anonymous';
$user_info['email'] = '';
$user_info['id'] = 0;
}


Note: anonymous_board and anonymousBoard, it looks like he just removes the ! from isset in the code and keeps everything else in tact, which is what I did.

MiY4Gi

So basically Darkness's and Rumfa's hotfixes solve only half your problem. You need to extend the anonymous functionality to the quick reply. Is that the problem you're having?

As for the code differences between you and Darkness_on, I'm not sure, but I believe $ID_MEMBER is a variable from SMF 1.0, and so you won't see it in SMF 2.0. It looks like Darkness_on is using 1.0 while you're using 2.0. 

Anyway, what is the purpose of those [b] tags wrapped around "anonymous_board"? Did you put them there? Never mind, I guess you were trying to bold those words, but you didn't realise that bbcodes wouldn't work inside [code] tags.
Check out my new website, MyAnimeClub.net. I plan to create the largest anime community, and most fun and user-friendly anime forum in the world. It's still in the development stage though.

Arantor

$ID_MEMBER is a 1.1.x thing, the 2.0 equivalent is $user_info['id'].

shazoo!

Quote from: MiY4Gi on July 29, 2012, 02:05:47 PM
So basically Darkness's and Rumfa's hotfixes solve only half your problem. You need to extend the anonymous functionality to the quick reply. Is that the problem you're having?

As for the code differences between you and Darkness_on, I'm not sure, but I believe $ID_MEMBER is a variable from SMF 1.0, and so you won't see it in SMF 2.0. It looks like Darkness_on is using 1.0 while you're using 2.0. 

Anyway, what is the purpose of those [b] tags wrapped around "anonymous_board"? Did you put them there? Never mind, I guess you were trying to bold those words, but you didn't realise that bbcodes wouldn't work inside [code] tags.
Exactly

Yes, I tried to bold it :/  thank you!

MiY4Gi

Over the next couple of days I'll have a look to see if I can solve your problem, that is, try to extend the mod to the quick reply. I don't think it will be too hard.
Check out my new website, MyAnimeClub.net. I plan to create the largest anime community, and most fun and user-friendly anime forum in the world. It's still in the development stage though.

shazoo!

Quote from: MiY4Gi on July 29, 2012, 06:07:20 PM
Over the next couple of days I'll have a look to see if I can solve your problem, that is, try to extend the mod to the quick reply. I don't think it will be too hard.
you.are.awesome.

THANKYOU!!

MiY4Gi

Right, to add the "Post with your username" tick box to your quick reply here's what you do.

Open /Themes/default/Display.template.php

Find:


if ($context['show_spellchecking'])
echo '
<input type="button" value="', $txt['spell_check'], '" onclick="spellCheck(\'postmodify\', \'message\');" tabindex="', $context['tabindex']++, '" class="button_submit" />';


Add below:



// anonymous board mod
if ( $context['anonymous_board'] )
echo ' '. $txt['Post_anonymous'] .' <input type="checkbox" name="post_unanon" />';



As for the reversal of the ticky box function, that is, making it so that if you tick the box then you post anonymously, and if you leave it unticked, then you post like normal, you would apply Darkness's hotfix:

Open /Sources/Post.php

Find:


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


Replace with:


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


You just need to remove the "!" from in front of "isset".

You may also want to change the wording of the tick box:

Open /Themes/default/languages/Modifications.english.php

Find:


$txt['makeBoard_anonymous']='Make this board anonymous';
$txt['Post_anonymous'] = '<b>Post with your username? (NOT ANONYMOUS)</b>';
$txt['mboards_anon_board_desc'] = 'New replies and topics will be posted anonymously by default';


Then change the bits on the right of the equal signs to reflect your new wording, e.g.

$txt['Post_anonymous'] = '<b>Post with your username? (NOT ANONYMOUS)</b>';       
becomes           
$txt['Post_anonymous'] = '<b>Post anonymously?</b>';

$txt['mboards_anon_board_desc'] = 'New replies and topics will be posted anonymously by default';       
becomes     
$txt['mboards_anon_board_desc'] = 'Users can choose to post anonymously.';

Let  me know if you experience any problems.
Check out my new website, MyAnimeClub.net. I plan to create the largest anime community, and most fun and user-friendly anime forum in the world. It's still in the development stage though.

Advertisement: