News:

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

Main Menu

Ignore user isn't ignoring the user

Started by cloksin, September 14, 2011, 12:05:00 PM

Previous topic - Next topic

cloksin

I'm having a problem getting the ignore user function to work properly.  SMF2.0 RC3.  I've got the "enable buddy/ignore lists" option turned on in "Features and Options" under the admin menu.  On the member profile under "Look and Layout" "Hide messages posted by members on my ignore list" is checked and under "Personal Messaging" the "Recieve personal messages from:" drop down has "All members, except those on my ignore list" selected.  The problem is that I a still receiving PMs from people on my ignore list and the messages by people on my ignore list are not being hidden.

Does anyone know why this might be and what I can do to fix it?
SMF 2.0.1
SimplePortal 2.3.3

Illori

i would suggest you upgrade to 2.0 first and see if the issue still occurs. there are many bug and security fixes since rc3.

cloksin

Don't have the time or resources to upgrade, so that's not an option. Any suggestions on how to fix thus without an upgrade?
SMF 2.0.1
SimplePortal 2.3.3

Illori

it might have been a but that has been fixed as it works fine in 2.0. also you will limited if any support for RC3 as there are newer versions released and many bugs and security fixes since rc3.

ACAMS

I have already asked how to fix this, and we are just doomed to having this and a couple other things not working .... either that or spend MONTHS getting our forum back in order updating to 2.0, and by then I am sure other "bugs" will pop up and here we go again!

cloksin

written before ACAMS post




Yeah Yeah Yeah Yeah *rolls eyes and lets out a sigh*

If I wanted a sales pitch I would have gone to the sales department.  As I stated before I do not have the time nor the resources to do an upgrade so that will not be happening.  I need a fix for this problem in RC3, which is why I stated what version I was using in my opening post.  Now if you would kindly stop littering my thread so that someone who might be of actual use could post in here and possibly attempt to answer the question that I actually asked.

Unless of course you are volunteering to perform the upgrade for me, then by all means I will consider your solution as a viable one.

But since this is a community forum, and I am asking the community for help with a problem, it really matters not which version I am on and whether or not SMF still supports it, since I am not asking SMF for support, I am asking the community if anyone might have a solution to my problem.
SMF 2.0.1
SimplePortal 2.3.3

Illori

since you are going to be so rude, i did some research since most users dont have access to the information. this was fixed in svn revision 10340 which does the following

profile.template.php

Code (find) Select

<option value="0"', empty($context['receive_from']) ? ' selected="selected"' : '', '>', $txt['pm_receive_from_everyone'], '</option>';

Code (replace) Select

  <option value="0"', empty($context['receive_from']) || (empty($modSettings['enable_buddylist']) && $context['receive_from'] < 3) ? ' selected="selected"' : '', '>', $txt['pm_receive_from_everyone'], '</option>';


Code (find) Select

<option value="3"', ((!empty($context['receive_from']) && $context['receive_from'] > 2) || (empty($modSettings['enable_buddylist']) && !empty($context['receive_from']))) ? ' selected="selected"' : '', '>', $txt['pm_receive_from_admins'], '</option>


Code (replace) Select
<option value="3"', !empty($context['receive_from']) && $context['receive_from'] > 2 ? ' selected="selected"' : '', '>', $txt['pm_receive_from_admins'], '</option>

this was reported http://dev.simplemachines.org/mantis/view.php?id=4596

no idea if this code affects anything else but that seems to be the fix.

ACAMS


Illori

well without telling you all the changes between rc3 and 2.0 i dont know what other fix would apply to your issue.

Illori

sources/subs-post.php

Code (find) Select

function getPostTopic($id_msg)

Code (replace) Select
function getTopicForPost($id_msg)

Code (find) Select
  'msg' => (int) $_REQUEST['msg'],
Code (replace) Select
  'msg' => $id_msg,
Code (add after) Select
    return $id_topic;
}

function getTopicsPostedInBy($id_member, $topic_list, $howMany)
{
    global $smcFunc;

    $result = $smcFunc['db_query']('', '
        SELECT id_topic
        FROM {db_prefix}messages
        WHERE id_topic IN ({array_int:topic_list})
            AND id_member = {int:current_member}
        GROUP BY id_topic
        LIMIT ' . $howMany,
        array(
            'current_member' => $id_member,
            'topic_list' => $topic_list,
        )
    );
    while ($row = $smcFunc['db_fetch_assoc']($result))
        $participants[$row['id_topic']] = true;
    $smcFunc['db_free_result']($result);
}


sources/Post.php

Code (find) Select
$topic = getPostTopic($_REQUEST['msg']);
Code (replace) Select
$topic = getTopicForPost($_REQUEST['msg']);

sources/load.php

Code (find) Select
{
    global $txt, $scripturl, $context, $modSettings;    
    global $board_info, $board, $topic, $user_info, $smcFunc;    

    // Assume they are not a moderator.


Code (replace) Select
{
    global $txt, $scripturl, $context, $modSettings, $sourcedir;
global $board_info, $board, $topic, $user_info, $smcFunc;

    // Assume they are not a moderator.

Code (find) Select
$_REQUEST['msg'] = (int) $_REQUEST['msg'];        

        // Looking through the message table can be slow, so try using the cache first.        
        if (($topic = cache_get_data('msg_topic-' . $_REQUEST['msg'], 120)) === NULL)        
        {        
            $request = $smcFunc['db_query']('', '            
                SELECT id_topic            
                FROM {db_prefix}messages
                WHERE id_msg = {int:id_msg}
                LIMIT 1',
                array(
                    'id_msg' => $_REQUEST['msg'],
                )
            );

            // So did it find anything?      
            if ($smcFunc['db_num_rows']($request))
            {
                list ($topic) = $smcFunc['db_fetch_row']($request);
                $smcFunc['db_free_result']($request);
                // Save save save.
                cache_put_data('msg_topic-' . $_REQUEST['msg'], $topic, 120);
            }
        }

Code (replace) Select

$_REQUEST['msg'] = (int) $_REQUEST['msg'];        

           // Looking through the message table can be slow, so try using the cache first.
        if (($topic = cache_get_data('msg_topic-' . $_REQUEST['msg'], 120)) === NULL)
            {
                        require_once($sourcedir . '/Subs-Post.php');
                       $topic = getTopicForPost($_REQUEST['msg']);
           
                      // Save save save.
                      cache_put_data('msg_topic-' . $_REQUEST['msg'], $topic, 120);
           
        }


http://dev.simplemachines.org/mantis/view.php?id=4401

svn revision 10759


cloksin

not sure where you got all that code from, but that last link has a really simple solution that worked for me.

sources/Subs-Post.php

Code (find) Select

(pm_receive_from = {int:admins_only}' . (!empty($modSettings['enable_buddylist']) ? '' : ' OR


Code (replace) Select

(pm_receive_from = {int:admins_only}' . (empty($modSettings['enable_buddylist']) ? '' : ' OR


Just remove the "!" which is telling it to ignore the ignore list, without the "!" it will NOT ignore the ignore list.  I've implemented and tested this on my forum and it fixed the problem for me.

SMF 2.0.1
SimplePortal 2.3.3

Illori

that is all the code in the commit that was marked to fix the problem, i dont know if all of it is needed but it is all there.

cloksin

I'm pretty sure you don't need all of that, since those first two snippets from subs-post don't even exist. Do a search all you want in that file and you'll never find that code. I can't say for the rest of it though, after I couldn't find the first two snippets I gave up looking.
SMF 2.0.1
SimplePortal 2.3.3

Joker™

Quote from: cloksin on September 14, 2011, 09:58:10 PM
I'm pretty sure you don't need all of that, since those first two snippets from subs-post don't even exist. Do a search all you want in that file and you'll never find that code. I can't say for the rest of it though, after I couldn't find the first two snippets I gave up looking.
Glad you go it sorted, but I'm sure that you might face some more issue if you stay on RC3, as a lot of bugs have been fixed since RC3.

Try to upgrade your forum from RC3 to SMF 2.0 :).
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Advertisement: