News:

SMF 2.1.2 has been released! Take it for a spin! Read more.

Main Menu

Anonymous Board Mod

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

Previous topic - Next topic

Vuhdo


flossy

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

MiY4Gi

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.

Kindred

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.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

flossy

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

Kindred

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.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

MiY4Gi

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.

Kindred

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.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

MiY4Gi

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.

flossy

@ 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.

Sulfur

Quote from: Sirenism on September 29, 2011, 03:41:00 PM
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?

Kindred

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.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

bros

So I have done a fresh
Quote from: MiY4Gi 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.

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

shazoo!

#293
..edited...

shazoo!

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:


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!

Kindred

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.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

shazoo!

Quote from: Kindred 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
Thanks, Kindred!! I'll give it a go!

shazoo!

Quote from: Kindred 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

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

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


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

halpaslan

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?

Kindred

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.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: