Advertisement:

Author Topic: Anonymous Board Mod  (Read 124780 times)

Offline halpaslan

  • Newbie
  • *
  • Posts: 5
Re: Anonymous Board Mod
« Reply #300 on: March 14, 2015, 06:20:28 PM »
Do you think it can be or not?

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,629
  • Gender: Male
    • Kindred-999 on GitHub
Re: Anonymous Board Mod
« Reply #301 on: March 14, 2015, 07:00:14 PM »
Well, anything CAN be done, if you know how to code it.

In this case, however, what you have asked for is not possible with the current mod. Period.
Therefore, if you feel that you need it, you should post a request in the mod requests board... And given that it is a very niche request, you may have to be willing to pay someone to code it for you.
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 machinenoob

  • Semi-Newbie
  • *
  • Posts: 49
Re: Anonymous Board Mod
« Reply #302 on: July 12, 2015, 09:25:30 PM »
just a heads up, the fix where the checkbox is not showing was not fixed/implemented, goto page 15 and look for the link to fix it

Offline Jade Elizabeth

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,652
  • Gender: Female
  • Keep your enemies close and your friends closer ;)
    • jadetrainor on LinkedIn
    • @alundra on Twitter
    • Jades-World
Re: Anonymous Board Mod
« Reply #303 on: August 23, 2015, 09:43:30 PM »
Is this working on 2.0 properly? I've seen a few fixes and I am wondering if that is something I need to do or just might need to do?

Also would it be simple enough to perhaps record the username somewhere? (can display beside the IP for admins or anyone who has log ip perms)

Also would it be simple enough to force quick replies to be NOT anonymous. That should be an opt in thing only is all.

If actual solutions could be provided that would be more helpful than yes or no. And if no, please let me know why so I can avoid pursuing it :).
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,629
  • Gender: Male
    • Kindred-999 on GitHub
Re: Anonymous Board Mod
« Reply #304 on: August 23, 2015, 10:25:56 PM »
Recording the username would require a complete rewrite of the mod. It, very purposefully, replaces the username and identifying information with anonymous filler.

Making quick replies anon or not anon would be a matter of adding the conditional check at the quick reply...
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 Jade Elizabeth

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,652
  • Gender: Female
  • Keep your enemies close and your friends closer ;)
    • jadetrainor on LinkedIn
    • @alundra on Twitter
    • Jades-World
Re: Anonymous Board Mod
« Reply #305 on: August 23, 2015, 10:34:55 PM »
Well if it's replacing that information it still receives it, so couldn't it place the username in a side field and then replace the info for the main ones? I don't even care if it's just a field in the database that I have to go into phpmyadmin to get, because honestly I am hoping to never need it lol. But I need it there for security. If people use a proxy or what ever I would like to know.

Hell if it would post a topic in the moderation area with a link to the post and the user who posted that would work too. Any sort of record would be preferred.

Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,629
  • Gender: Male
    • Kindred-999 on GitHub
Re: Anonymous Board Mod
« Reply #306 on: August 23, 2015, 10:54:45 PM »
As I said, that would require recording the mod...

You know my statement.., almost anything is POSSIBLE, if you know how to code it...   However, what you are asking is outside of the design of the mod. If dougiefresh opts to rebuild the mod, you can ask him if he's willing to code that...  But since it would seem to be an edge case, you may have to code it yourself.
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 Jade Elizabeth

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,652
  • Gender: Female
  • Keep your enemies close and your friends closer ;)
    • jadetrainor on LinkedIn
    • @alundra on Twitter
    • Jades-World
Re: Anonymous Board Mod
« Reply #307 on: August 25, 2015, 02:20:27 AM »
Do you mean actually fully rebuild the mod or do you mean recode a portion of it?
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,629
  • Gender: Male
    • Kindred-999 on GitHub
Re: Anonymous Board Mod
« Reply #308 on: August 25, 2015, 06:53:53 AM »
to be anything more than an ugly hack, it would require recoding a significant portion.

It's not all that big a mod to start with.... :P
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 Jade Elizabeth

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,652
  • Gender: Female
  • Keep your enemies close and your friends closer ;)
    • jadetrainor on LinkedIn
    • @alundra on Twitter
    • Jades-World
Re: Anonymous Board Mod
« Reply #309 on: August 26, 2015, 02:00:58 AM »
I'm too afraid to look cause I don't think I will understand it XD.
But I will take a look lol.
Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Offline Logan.uy

  • Newbie
  • *
  • Posts: 5
Re: Anonymous Board Mod
« Reply #310 on: September 01, 2015, 11:24:18 PM »
I'm having problems trying to use it.

It's installed.
The selected sub forum was modified by selecting the "Make this board anonymous:" check box.

But when a topic is created, the name of the creator is shown.

Do you have some tips for this issue?

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,629
  • Gender: Male
    • Kindred-999 on GitHub
Re: Anonymous Board Mod
« Reply #311 on: September 01, 2015, 11:29:09 PM »
did you try reading through this thread? There are at least two fixes posted in this thread... here's one
http://www.simplemachines.org/community/index.php?topic=204149.msg3380492#msg3380492

not sure where the other one is...
« Last Edit: January 08, 2016, 07:57:46 AM by Kindred »
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 Somsom

  • Newbie
  • *
  • Posts: 5
Re: Anonymous Board Mod
« Reply #312 on: January 08, 2016, 04:34:21 AM »
I tried installing this mod in my 2.0.11 smf but it would not install. I really really need this mod as I feel it will be of great use in my new forum. Can someone help please?

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,629
  • Gender: Male
    • Kindred-999 on GitHub
Re: Anonymous Board Mod
« Reply #313 on: January 08, 2016, 07:57:25 AM »
Please be more specific...

"would not install" is not a useful description of a problem
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 dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,859
  • Mod King
    • XPtsp.com Community
Re: Anonymous Board Mod
« Reply #314 on: January 08, 2016, 09:48:51 AM »
I tried installing this mod in my 2.0.11 smf but it would not install. I really really need this mod as I feel it will be of great use in my new forum. Can someone help please?
I downloaded the mod and tried it on a clean SMF 2.0.11 forum.  It installs fine without emulation.  So clearly, it's not a "mod won't install" issue.  It's a "this mod won't install without errors" issue....  And nobody will help unless you provide more details....

Offline Somsom

  • Newbie
  • *
  • Posts: 5
Re: Anonymous Board Mod
« Reply #315 on: January 08, 2016, 10:52:03 AM »
I tried installing this mod in my 2.0.11 smf but it would not install. I really really need this mod as I feel it will be of great use in my new forum. Can someone help please?
I downloaded the mod and tried it on a clean SMF 2.0.11 forum.  It installs fine without emulation.  So clearly, it's not a "mod won't install" issue.  It's a "this mod won't install without errors" issue....  And nobody will help unless you provide more details....

Please pardon me. I am not very technical .You are right. It wont install without errors. Is there anyway I can get it installed without error?


Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,629
  • Gender: Male
    • Kindred-999 on GitHub
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 Somsom

  • Newbie
  • *
  • Posts: 5
Re: Anonymous Board Mod
« Reply #317 on: January 08, 2016, 12:55:38 PM »
Thanks.

Its working fine now. It turns out that I had downloaded and uploaded the wrong file

Offline Somsom

  • Newbie
  • *
  • Posts: 5
Re: Anonymous Board Mod
« Reply #318 on: January 10, 2016, 07:54:51 AM »
Here's the fix for the Anonymous Board Mod (SMF 2.0) all you guys have been waiting for.

In Load.php

Find:

Code: [Select]
'cur_topic_starter' => empty($topic) ? 0 : $row['id_member_started'],

Then below the above code add:

Code: [Select]
                                'anonymous_board' => $row['anonymous_board'],

Next, find and delete:

Code: [Select]
$context['anonymous_board'] = $row['anonymous_board'];

Now find:

Code: [Select]
else
{
// Otherwise the topic is invalid, there are no moderators, etc.
$board_info = array(
'moderators' => array(),
'error' => 'exist'
);
$topic = null;
$board = 0;
}
$smcFunc['db_free_result']($request);
}

And below the above code add:

Code: [Select]

        // Is the board anonymous?   
$context['anonymous_board'] = $board_info['anonymous_board'];

This is what your final code should look like:

Code: [Select]
// Basic operating information. (globals... :/)
$board_info = array(
'id' => $board,
'moderators' => array(),
'cat' => array(
'id' => $row['id_cat'],
'name' => $row['cname']
),
'name' => $row['bname'],
'description' => $row['description'],
'num_topics' => $row['num_topics'],
'unapproved_topics' => $row['unapproved_topics'],
'unapproved_posts' => $row['unapproved_posts'],
'unapproved_user_topics' => 0,
'parent_boards' => getBoardParents($row['id_parent']),
'parent' => $row['id_parent'],
'child_level' => $row['child_level'],
'theme' => $row['id_theme'],
'override_theme' => !empty($row['override_theme']),
'profile' => $row['id_profile'],
'redirect' => $row['redirect'],
'posts_count' => empty($row['count_posts']),
'cur_topic_approved' => empty($topic) || $row['approved'],
'cur_topic_starter' => empty($topic) ? 0 : $row['id_member_started'],
                                'anonymous_board' => $row['anonymous_board'],
);

// Load the membergroups allowed, and check permissions.
$board_info['groups'] = $row['member_groups'] == '' ? array() : explode(',', $row['member_groups']);

do
{
if (!empty($row['id_moderator']))
$board_info['moderators'][$row['id_moderator']] = array(
'id' => $row['id_moderator'],
'name' => $row['real_name'],
'href' => $scripturl . '?action=profile;u=' . $row['id_moderator'],
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row['id_moderator'] . '">' . $row['real_name'] . '</a>'
);
}
while ($row = $smcFunc['db_fetch_assoc']($request));

// If the board only contains unapproved posts and the user isn't an approver then they can't see any topics.
// If that is the case do an additional check to see if they have any topics waiting to be approved.
if ($board_info['num_topics'] == 0 && $modSettings['postmod_active'] && !allowedTo('approve_posts'))
{
$smcFunc['db_free_result']($request); // Free the previous result

$request = $smcFunc['db_query']('', '
SELECT COUNT(id_topic)
FROM {db_prefix}topics
WHERE id_member_started={int:id_member}
AND approved = {int:unapproved}
AND id_board = {int:board}',
array(
'id_member' => $user_info['id'],
'unapproved' => 0,
'board' => $board,
)
);

list ($board_info['unapproved_user_topics']) = $smcFunc['db_fetch_row']($request);
}

if (!empty($modSettings['cache_enable']) && (empty($topic) || $modSettings['cache_enable'] >= 3))
{
// !!! SLOW?
if (!empty($topic))
cache_put_data('topic_board-' . $topic, $board_info, 120);
cache_put_data('board-' . $board, $board_info, 120);
}
}
else
{
// Otherwise the topic is invalid, there are no moderators, etc.
$board_info = array(
'moderators' => array(),
'error' => 'exist'
);
$topic = null;
$board = 0;
}
$smcFunc['db_free_result']($request);
}

        // Is the board anonymous?   
$context['anonymous_board'] = $board_info['anonymous_board'];

Now it's just up to the mod developer to incorporate the above code into the mod. If you would like to know what was causing the problem, then read this thread.

Thank you very much for this

Offline lntit

  • Jr. Member
  • **
  • Posts: 130
  • Gender: Male
Re: Anonymous Board Mod
« Reply #319 on: February 02, 2016, 07:05:22 PM »
Hi there!

I'm banging on a weird error that appear in the error log:
Code: [Select]
http://-----/index.php?board=48.0
8: Undefined index: anonymous_board
File: /-----/forum/Sources/Load.php
Line: 780
Code: [Select]
$context['anonymous_board'] = $board_info['anonymous_board'];
I figured out that this error occurs only if someone clicks on a link to a topic, post or board that has been deleted.
Here the code around line 780:
Code: (php) [Select]
// If there aren't any, skip.
if ($smcFunc['db_num_rows']($request) > 0)
{
$row = $smcFunc['db_fetch_assoc']($request);

// Set the current board.
if (!empty($row['id_board']))
$board = $row['id_board'];

// Basic operating information. (globals... :/)
$board_info = array(
'id' => $board,
'moderators' => array(),
'cat' => array(
'id' => $row['id_cat'],
'name' => $row['cname']
),
'name' => $row['bname'],
'description' => $row['description'],
'num_topics' => $row['num_topics'],
'unapproved_topics' => $row['unapproved_topics'],
'unapproved_posts' => $row['unapproved_posts'],
'unapproved_user_topics' => 0,
'parent_boards' => getBoardParents($row['id_parent']),
'parent' => $row['id_parent'],
'child_level' => $row['child_level'],
'theme' => $row['id_theme'],
'override_theme' => !empty($row['override_theme']),
'profile' => $row['id_profile'],
'redirect' => $row['redirect'],
'posts_count' => empty($row['count_posts']),
'cur_topic_approved' => empty($topic) || $row['approved'],
'cur_topic_starter' => empty($topic) ? 0 : $row['id_member_started'],

'anonymous_board' => $row['anonymous_board'],
);

// Load the membergroups allowed, and check permissions.
$board_info['groups'] = $row['member_groups'] == '' ? array() : explode(',', $row['member_groups']);

do
{
if (!empty($row['id_moderator']))
$board_info['moderators'][$row['id_moderator']] = array(
'id' => $row['id_moderator'],
'name' => $row['real_name'],
'href' => $scripturl . '?action=profile;u=' . $row['id_moderator'],
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row['id_moderator'] . '">' . $row['real_name'] . '</a>'
);
}
while ($row = $smcFunc['db_fetch_assoc']($request));

// If the board only contains unapproved posts and the user isn't an approver then they can't see any topics.
// If that is the case do an additional check to see if they have any topics waiting to be approved.
if ($board_info['num_topics'] == 0 && $modSettings['postmod_active'] && !allowedTo('approve_posts'))
{
$smcFunc['db_free_result']($request); // Free the previous result

$request = $smcFunc['db_query']('', '
SELECT COUNT(id_topic)
FROM {db_prefix}topics
WHERE id_member_started={int:id_member}
AND approved = {int:unapproved}
AND id_board = {int:board}',
array(
'id_member' => $user_info['id'],
'unapproved' => 0,
'board' => $board,
)
);

list ($board_info['unapproved_user_topics']) = $smcFunc['db_fetch_row']($request);
}

if (!empty($modSettings['cache_enable']) && (empty($topic) || $modSettings['cache_enable'] >= 3))
{
// !!! SLOW?
if (!empty($topic))
cache_put_data('topic_board-' . $topic, $board_info, 120);
cache_put_data('board-' . $board, $board_info, 120);
}
}
else
{
// Otherwise the topic is invalid, there are no moderators, etc.
$board_info = array(
'moderators' => array(),
'error' => 'exist'
);
$topic = null;
$board = 0;
}
$smcFunc['db_free_result']($request);
}

    // Is the board anonymous?   
$context['anonymous_board'] = $board_info['anonymous_board'];

if (!empty($topic))
$_GET['board'] = (int) $board;

if (!empty($board))
{
// Now check if the user is a moderator.
$user_info['is_mod'] = isset($board_info['moderators'][$user_info['id']]);

if (count(array_intersect($user_info['groups'], $board_info['groups'])) == 0 && !$user_info['is_admin'])
$board_info['error'] = 'access';

// Build up the linktree.
$context['linktree'] = array_merge(
$context['linktree'],
array(array(
'url' => $scripturl . '#c' . $board_info['cat']['id'],
'name' => $board_info['cat']['name']
)),
array_reverse($board_info['parent_boards']),
array(array(
'url' => $scripturl . '?board=' . $board . '.0',
'name' => $board_info['name']
))
);
}

I'd really love to know how I can fix it. :)