Advertisement:

Author Topic: Anonymous Board Mod  (Read 124855 times)

Offline MiY4Gi

  • Full Member
  • ***
  • Posts: 523
  • Gender: Male
  • Mm...
    • MyAnimeClub.net
Re: Anonymous Board Mod
« Reply #240 on: July 27, 2012, 08:54:14 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.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,982
    • StoryBB/StoryBB on GitHub
Re: Anonymous Board Mod
« Reply #241 on: July 27, 2012, 08:57:12 PM »
I assumed that's what you fixed in this...

The majority of people who downloaded this mod did so for 1.1.x...
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline MiY4Gi

  • Full Member
  • ***
  • Posts: 523
  • Gender: Male
  • Mm...
    • MyAnimeClub.net
Re: Anonymous Board Mod
« Reply #242 on: July 27, 2012, 09:00:25 PM »
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.

Offline shazoo!

  • Jr. Member
  • **
  • Posts: 129
  • Gender: Female
Re: Anonymous Board Mod
« Reply #243 on: July 27, 2012, 09:03:34 PM »
I had the problem on 2.0.2

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,982
    • StoryBB/StoryBB on GitHub
Re: Anonymous Board Mod
« Reply #244 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.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline littlenicki

  • Jr. Member
  • **
  • Posts: 195
Re: Anonymous Board Mod
« Reply #245 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
Fomer SMF user. Switched to Invision Power Board and VBulletin

Offline shazoo!

  • Jr. Member
  • **
  • Posts: 129
  • Gender: Female
Re: Anonymous Board Mod
« Reply #246 on: July 28, 2012, 09:57:53 AM »
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!

Offline MiY4Gi

  • Full Member
  • ***
  • Posts: 523
  • Gender: Male
  • Mm...
    • MyAnimeClub.net
Re: Anonymous Board Mod
« Reply #247 on: July 28, 2012, 11:02:15 AM »
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.

Offline MiY4Gi

  • Full Member
  • ***
  • Posts: 523
  • Gender: Male
  • Mm...
    • MyAnimeClub.net
Re: Anonymous Board Mod
« Reply #248 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?
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.

Offline littlenicki

  • Jr. Member
  • **
  • Posts: 195
Re: Anonymous Board Mod
« Reply #249 on: July 28, 2012, 12:32:56 PM »
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

Offline shazoo!

  • Jr. Member
  • **
  • Posts: 129
  • Gender: Female
Re: Anonymous Board Mod
« Reply #250 on: July 28, 2012, 12:35:26 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

Offline MiY4Gi

  • Full Member
  • ***
  • Posts: 523
  • Gender: Male
  • Mm...
    • MyAnimeClub.net
Re: Anonymous Board Mod
« Reply #251 on: July 28, 2012, 01:17:32 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.

Offline shazoo!

  • Jr. Member
  • **
  • Posts: 129
  • Gender: Female
Re: Anonymous Board Mod
« Reply #252 on: July 28, 2012, 02:15:47 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):

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....
Find post.template.php
Code: [Select]
<input type="checkbox" name="post_unanon" />
Change in:
Code: [Select]
<input type="checkbox" checked name="post_unanon" />

or

find this code in post.php
Code: [Select]
// 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

Code: [Select]
// 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;
}
« Last Edit: July 29, 2012, 06:19:12 AM by shazoo! »

Offline shazoo!

  • Jr. Member
  • **
  • Posts: 129
  • Gender: Female
Re: Anonymous Board Mod
« Reply #253 on: July 29, 2012, 06:41:57 AM »
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:

Code: [Select]
// 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:

Code: [Select]
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.
« Last Edit: July 29, 2012, 07:09:02 AM by shazoo! »

Offline MiY4Gi

  • Full Member
  • ***
  • Posts: 523
  • Gender: Male
  • Mm...
    • MyAnimeClub.net
Re: Anonymous Board Mod
« Reply #254 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.
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.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,982
    • StoryBB/StoryBB on GitHub
Re: Anonymous Board Mod
« Reply #255 on: July 29, 2012, 02:06:33 PM »
$ID_MEMBER is a 1.1.x thing, the 2.0 equivalent is $user_info['id'].
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline shazoo!

  • Jr. Member
  • **
  • Posts: 129
  • Gender: Female
Re: Anonymous Board Mod
« Reply #256 on: July 29, 2012, 05:31:55 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!

Offline MiY4Gi

  • Full Member
  • ***
  • Posts: 523
  • Gender: Male
  • Mm...
    • MyAnimeClub.net
Re: Anonymous Board Mod
« Reply #257 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.
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.

Offline shazoo!

  • Jr. Member
  • **
  • Posts: 129
  • Gender: Female
Re: Anonymous Board Mod
« Reply #258 on: July 29, 2012, 06:37:33 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!!

Offline MiY4Gi

  • Full Member
  • ***
  • Posts: 523
  • Gender: Male
  • Mm...
    • MyAnimeClub.net
Re: Anonymous Board Mod
« Reply #259 on: August 01, 2012, 04:49:46 PM »
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:

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

Add below:

Code: [Select]

// 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:

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

Replace with:

Code: [Select]
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:

Code: [Select]
$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.