News:

SMF 2.1.4 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

halpaslan

Do you think it can be or not?

Kindred

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.
Слaва
Украинi

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

machinenoob

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

Jade Elizabeth

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.

Kindred

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...
Слaва
Украинi

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

Jade Elizabeth

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.

Kindred

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.
Слaва
Украинi

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

Jade Elizabeth

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.

Kindred

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
Слaва
Украинi

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

Jade Elizabeth

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.

Logan.uy

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?

Kindred

#311
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...
Слaва
Украинi

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

Somsom

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?

Kindred

Please be more specific...

"would not install" is not a useful description of a problem
Слaва
Украинi

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

dougiefresh

Quote from: Somsom 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?
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....

Somsom

Quote from: dougiefresh on January 08, 2016, 09:48:51 AM
Quote from: Somsom 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?
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?


Kindred

Слaва
Украинi

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

Somsom

Thanks.

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

Somsom

Quote from: MiY4Gi on July 27, 2012, 08:29:31 PM
Here's the fix for the Anonymous Board Mod (SMF 2.0) all you guys have been waiting for.

In Load.php

Find:


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


Then below the above code add:


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


Next, find and delete:


$context['anonymous_board'] = $row['anonymous_board'];


Now find:


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:



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


This is what your final code should look like:


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

lntit

Hi there!

I'm banging on a weird error that appear in the error log:
http://-----/index.php?board=48.0
8: Undefined index: anonymous_board
File: /-----/forum/Sources/Load.php
Line: 780

$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. :)

Advertisement: