Advertisement:

Author Topic: Anonymous Board Mod  (Read 124868 times)

Offline Vuhdo

  • Newbie
  • *
  • Posts: 7
Re: Anonymous Board Mod
« Reply #280 on: March 10, 2013, 03:41:27 AM »
I'll see if I can do something later.

Great TY!

Offline flossy

  • Newbie
  • *
  • Posts: 7
Re: Anonymous Board Mod
« Reply #281 on: April 16, 2013, 11:57:54 AM »
I seem to be having one problem.

I am currently using SMF 2.0.4. I have added anonymous board mod and it's working however i am having one slight problem. 4/5 times, The first poster is not anonymous and is showing their usernames however all replies are anonymous. Only first poster is not. Then every now and then. Randomly. i'd say 1/5 times. The first poster would be anonymous. lol

Is there a way i can fix this or do you know why this is happening?

It is not a live forum so i have deleted the boards and mod. Cleared cache and reinstalled the mod and new boards and still doing the same thing. :s

Offline MiY4Gi

  • Full Member
  • ***
  • Posts: 523
  • Gender: Male
  • Mm...
    • MyAnimeClub.net
Re: Anonymous Board Mod
« Reply #282 on: April 16, 2013, 06:52:09 PM »
Very strange problem. Unless you can find some pattern in the occurrences of the problem, there really isn't much help anyone can offer. Does the SMF error log say anything? What about the server error log? Generally I would associate any intermittent errors like the one you're having to failing hardware. But I think it could also be lack of hardware resources such as ram shortages or server overloads, etc.
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 Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,753
  • Gender: Male
    • Kindred-999 on GitHub
Re: Anonymous Board Mod
« Reply #283 on: April 16, 2013, 07:30:17 PM »
Actually,  can duplicate the problem...   But it becomes even odder.
On boards which are not set to be anon, there is no option...  But the first poster of the  thread is forced anonymous.

It seems like the first post in threads is treated the opposite of the setting.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline flossy

  • Newbie
  • *
  • Posts: 7
Re: Anonymous Board Mod
« Reply #284 on: April 16, 2013, 09:48:02 PM »
Thanks for the fast responses.

@kindred, have you used this mod previously and it was working good? if so, what did you do different between when it worked well to now?

I originally thought maybe it's being on smf 2.0.4 but i read the replies of this topic and nobody else on 2.0.4 has brought it up so ;/

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,753
  • Gender: Male
    • Kindred-999 on GitHub
Re: Anonymous Board Mod
« Reply #285 on: April 16, 2013, 10:41:57 PM »
I wrote the mod, back for 1.1.x...   I have not tried it on 2.0.x since then though.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline MiY4Gi

  • Full Member
  • ***
  • Posts: 523
  • Gender: Male
  • Mm...
    • MyAnimeClub.net
Re: Anonymous Board Mod
« Reply #286 on: April 17, 2013, 01:04:58 PM »
Ah, sorry I forgot about that bug. If I recall it has something to do with the way the cache of SMF 2.0 works. There is an anonymous mod variable that would occasionally not get defined, and that is what's causing the problem (iirc). Last year I posted a fix for it: http://www.simplemachines.org/community/index.php?topic=204149.msg3380492#msg3380492

I assumed that the mod had been updated with the fix, but I was mistaken.
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 Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,753
  • Gender: Male
    • Kindred-999 on GitHub
Re: Anonymous Board Mod
« Reply #287 on: April 17, 2013, 01:13:44 PM »
yup, MiY4Gi, that's it... :)   thanks for reminding me.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline MiY4Gi

  • Full Member
  • ***
  • Posts: 523
  • Gender: Male
  • Mm...
    • MyAnimeClub.net
Re: Anonymous Board Mod
« Reply #288 on: April 17, 2013, 03:07:58 PM »
Okay, for those that want to hide the "Post un-anonomously" ticky box from all users except admins and mods, here's what you need to do:

Open /Themes/default/Post.template.php

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

Code: (replace) [Select]
// anonymous board mod
if ( $context['anonymous_board'] && $context['user']['is_admin'] || $context['anonymous_board'] && $context['user']['is_mod'] )
echo ' '. $txt['Post_anonymous'] .' <input type="checkbox" name="post_unanon" />';

If you chose to also display that line on your Quick Reply box then:

Open /Themes/default/Display.template.php.

Repeat as for Post.template.php.

Once I learn how to add it as an option under board settings, then I'll post the code here. For now you'll just have to hardcode the membergroups.
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 flossy

  • Newbie
  • *
  • Posts: 7
Re: Anonymous Board Mod
« Reply #289 on: April 17, 2013, 10:35:27 PM »
@ MiY4Gi, Thank you so much. i did suspect the cache which is why i wrote in my post that i cleared the cache both on my browser and on smf but didn't work. Working perfectly now. thank you.

Offline Sulfur

  • Semi-Newbie
  • *
  • Posts: 56
Re: Anonymous Board Mod
« Reply #290 on: June 29, 2013, 11:09:30 AM »
It installed on SMF 2.0 perfectly and works when a user replies to a topic that's been created. However if you create a new topic in that board the topic creators name still shows and is not anonymous. The only way to fix it is to run the included SQL:

Code: [Select]
UPDATE `smf_messages` SET `id_member`=0 WHERE `id_board`=[BOARD NUMBER];
UPDATE `smf_messages` SET `poster_name`='Anonymous' WHERE `ID_BOARD`=[BOARD NUMBER];
UPDATE `smf_messages` SET `poster_email`='' WHERE `id_board`=[BOARD NUMBER];
UPDATE `smf_messages` SET `modified_name`='Anonymous' WHERE `modified_name`<>'' AND `id_board`=[BOARD NUMBER];

This fixes the problem for topics that were posted, but doesn't fix the problem of the creator of the topic having the option to post anonymously when first posting that topic. I hope that made sense. I don't want to have to run that SQL every time someone creates a post because it defeats the purpose of having this mod in place.

Any ideas on how I can possibly fix this?

Can someone help me in this? it gives me an error...

#1054 - Unknown column 'posterName' in 'field list'

already try with real_name but nothing... can someone help?

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,753
  • Gender: Male
    • Kindred-999 on GitHub
Re: Anonymous Board Mod
« Reply #291 on: June 30, 2013, 07:36:50 AM »
poster_name
not
posterName

smf 2.0.x does nto use camel case
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline bros

  • Full Member
  • ***
  • Posts: 644
Re: Anonymous Board Mod
« Reply #292 on: February 14, 2014, 04:56:51 PM »
So I have done a fresh
Ah, sorry I forgot about that bug. If I recall it has something to do with the way the cache of SMF 2.0 works. There is an anonymous mod variable that would occasionally not get defined, and that is what's causing the problem (iirc). Last year I posted a fix for it: http://www.simplemachines.org/community/index.php?topic=204149.msg3380492#msg3380492

I assumed that the mod had been updated with the fix, but I was mistaken.

I tried that fix on a test board I set up and I had to manually uninstall the mod because the forums refused to load. :P

Offline shazoo!

  • Jr. Member
  • **
  • Posts: 129
  • Gender: Female
Re: Anonymous Board Mod
« Reply #293 on: April 22, 2014, 03:51:10 PM »
..edited...
« Last Edit: April 22, 2014, 05:05:08 PM by shazoo! »

Offline shazoo!

  • Jr. Member
  • **
  • Posts: 129
  • Gender: Female
Re: Anonymous Board Mod
« Reply #294 on: February 01, 2015, 04:28:17 PM »
Hi, getting the following error in my log:

//.../index.php?action=post;board=29.0
8: Undefined index: anonymous_board
File://.../Themes/default/Alerts.template.php (main sub template - eval?)
Line: 542

as well as:

//.../index.php?action=post2;start=0;board=21
8: Undefined index: anonymous_board
File: //.../Sources/Post.php
Line: 1333

which shows the following:

Code: [Select]
1332: // Anonymous board mod
==>1333: if ( $context['anonymous_board'] && isset($_POST['post_unanon']) )
1334: {
1335: // Destroy the identifing user data
1336: $user_info['username'] = 'Anonymous';
1337: $user_info['name'] = 'Anonymous';
1338: $user_info['email'] = '';
1339: $user_info['id'] = 0;
1340: }
1341:
1342:

Any help would be very much appreciated!

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,753
  • Gender: Male
    • Kindred-999 on GitHub
Re: Anonymous Board Mod
« Reply #295 on: February 01, 2015, 04:36:33 PM »
looks like a conflict between some other mod and this one...

you can try this... replace the if line with this...

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


untested, YMMV
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline shazoo!

  • Jr. Member
  • **
  • Posts: 129
  • Gender: Female
Re: Anonymous Board Mod
« Reply #296 on: February 01, 2015, 05:40:53 PM »
looks like a conflict between some other mod and this one...

you can try this... replace the if line with this...

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


untested, YMMV
Thanks, Kindred!! I'll give it a go!

Offline shazoo!

  • Jr. Member
  • **
  • Posts: 129
  • Gender: Female
Re: Anonymous Board Mod
« Reply #297 on: February 01, 2015, 05:47:32 PM »
looks like a conflict between some other mod and this one...

you can try this... replace the if line with this...

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


untested, YMMV

Ok, so it looks like I get a new error now, which prevents the check box from showing on the new topic post.php, but it shows on reply and edit:

//.../index.php?action=post;board=26.0
8: Undefined index: anonymous_board
File: //.../forum/Themes/default/Post.template.php
Line: 542

Code: [Select]
541: // anonymous board mod
==>542: if ( $context['anonymous_board'] )
543: echo ' '. $txt['Post_anonymous'] .' <input type="checkbox" name="post_unanon" />';
544:

I'm thinking it's clashing with the hidden post mod, because I see it erroring at the same time:

//.../index.php?action=post;topic=5712.0;last_msg=94399
8: Undefined index: hiddenOption
File: /.../Sources/Post.php
Line: 2635

Code: [Select]
2633: // Hide the post in preview or not? --- XD
2634: $row['can_view_post'] = 1;
==>2635: if (!empty($modSettings['allow_hiddenPost']) && $row['hiddenOption'] > 0)
2636: {
2637: global $sourcedir;
2638: require_once($sourcedir . '/HidePost.php');
2639: $row['id_topic'] = $topic;
2640: $context['current_message'] = $row;
2641: $row['body'] = getHiddenMessage();
2642: $row['can_view_post'] = $context['can_view_post'];
2643: }

Offline halpaslan

  • Newbie
  • *
  • Posts: 5
Re: Anonymous Board Mod
« Reply #298 on: March 12, 2015, 04:40:39 PM »
Is it possible to use this mod in a time interval.
For example my post is anonymous for 2 days. After 2 days my profile is shown on my post. Is it possible to modify this mod look like that?

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,753
  • Gender: Male
    • Kindred-999 on GitHub
Re: Anonymous Board Mod
« Reply #299 on: March 12, 2015, 05:26:17 PM »
No. Not at all.

This mod permanently erases the user id from the post. It is not just hidden, and therefore is not recoverable.

Doing what you ask would be a completely different mod.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.