Ignore User

Started by Rudolf, September 12, 2005, 01:00:12 PM

Previous topic - Next topic

digit

I still need help resolving my aforementioned "undefined index: karma" error...

http://www.simplemachines.org/community/index.php?topic=49149.msg615433#msg615433

I have it narrowed down to the text below....

I get the error with this text in Display.template.php.....



// Otherwise, show the guest's email.
elseif (empty($message['member']['hide_email']))
echo '

<br />
<a href="mailto:', $message['member']['email'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/email_sm.gif" alt="' . $txt[69] . '" title="' . $txt[69] . '" border="0" />' : $txt[69]), '</a>';

if ($message['is_ignored']==1) echo '</div>';
//IGNORE - START make Ignore/Unignore link in poster_info
echo '';
if ($context['user']['is_logged'])
if ($message['is_ignored']==0)
   //echo '<a href="'. $scripturl . '?action=ignore;u=' .$message['member']['id'] . ';topic=' . $context['current_topic'] . '">' . $txt['ignore'] . '</a> <br />';
   echo '
        <br /><a href="', $scripturl, '?action=ignore;u=' , $message['member']['id'], ';topic=', $context['current_topic'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/ignore.gif" alt="' . $txt['ignore'] . '" border="0" />' : $txt['ignore']), '</a>';
     else if ($message['is_ignored']!=2) echo '<br /><a href="', $scripturl, '?action=unignore;u=' , $message['member']['id'], ';topic=', $context['current_topic'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/unignore.gif" alt="' . $txt['unignore'] . '" border="0" />' : $txt['unignore']), '</a>';
//IGNORE - START      
      // Is karma display enabled?  Total or +/-?
if ($modSettings['karmaMode'] == '1')
echo '
<br /><br />
', $modSettings['karmaLabel'], ' ', $message['member']['karma']['good'] - $message['member']['karma']['bad'], '<br />';
elseif ($modSettings['karmaMode'] == '2')
echo '
<br /><br />
', $modSettings['karmaLabel'], ' +', $message['member']['karma']['good'], '/-', $message['member']['karma']['bad'], '<br />';

// Is this user allowed to modify this member's karma?
if ($message['member']['karma']['allow'])
echo '
<a href="', $scripturl, '?action=modifykarma;sa=applaud;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.' . $context['start'], ';m=', $message['id'], ';sesc=', $context['session_id'], '">', $modSettings['karmaApplaudLabel'], '</a>
<a href="', $scripturl, '?action=modifykarma;sa=smite;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';m=', $message['id'], ';sesc=', $context['session_id'], '">', $modSettings['karmaSmiteLabel'], '</a><br />';




If I remove this code....




if ($modSettings['karmaMode'] == '1')
echo '
<br /><br />
', $modSettings['karmaLabel'], ' ', $message['member']['karma']['good'] - $message['member']['karma']['bad'], '<br />';
elseif ($modSettings['karmaMode'] == '2')
echo '
<br /><br />
', $modSettings['karmaLabel'], ' +', $message['member']['karma']['good'], '/-', $message['member']['karma']['bad'], '<br />';

// Is this user allowed to modify this member's karma?
if ($message['member']['karma']['allow'])
echo '
<a href="', $scripturl, '?action=modifykarma;sa=applaud;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.' . $context['start'], ';m=', $message['id'], ';sesc=', $context['session_id'], '">', $modSettings['karmaApplaudLabel'], '</a>
<a href="', $scripturl, '?action=modifykarma;sa=smite;uid=', $message['member']['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';m=', $message['id'], ';sesc=', $context['session_id'], '">', $modSettings['karmaSmiteLabel'], '</a><br />';





leaving only this...




// Otherwise, show the guest's email.
elseif (empty($message['member']['hide_email']))
echo '

<br />
<a href="mailto:', $message['member']['email'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/email_sm.gif" alt="' . $txt[69] . '" title="' . $txt[69] . '" border="0" />' : $txt[69]), '</a>';

if ($message['is_ignored']==1) echo '</div>';
//IGNORE - START make Ignore/Unignore link in poster_info
echo '';
if ($context['user']['is_logged'])
if ($message['is_ignored']==0)
   //echo '<a href="'. $scripturl . '?action=ignore;u=' .$message['member']['id'] . ';topic=' . $context['current_topic'] . '">' . $txt['ignore'] . '</a> <br />';
   echo '
        <br /><a href="', $scripturl, '?action=ignore;u=' , $message['member']['id'], ';topic=', $context['current_topic'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/ignore.gif" alt="' . $txt['ignore'] . '" border="0" />' : $txt['ignore']), '</a>';
     else if ($message['is_ignored']!=2) echo '<br /><a href="', $scripturl, '?action=unignore;u=' , $message['member']['id'], ';topic=', $context['current_topic'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/unignore.gif" alt="' . $txt['unignore'] . '" border="0" />' : $txt['unignore']), '</a>';
//IGNORE - START      
      // Is karma display enabled?  Total or +/-?



the error goes away.

- good thing I don't have karma enabled!

Thanks in advance if you can help me resolve this error!


Happily using a heavily modified 1.1.16 version of SMF!

2748011 Posts in 320998 Topics by 50986 Members


SOLD my website - thanks it was a good run - they converted to vbadvanced. (and screwed it up good!)

1milehi

if someone could please direct me to the page or message # in this thread that deals with this:

i installed the 11 rc2 mod and am using the helio multi theme as board default.  when i go into any thread, i get this error message:

Fatal error: Cannot redeclare isignored() (previously declared in /home/bhonline/public_html/Sources/Display.php:1201) in /home/bhonline/public_html/Sources/Display.php on line 1226 

i'm really lost with all the unrelated stuff that was posted early on - can anyone help?  i've uninstalled the mod now but would like it to get it to work if it's a simple fix.

thank you.

1milehi

okay.  reading the mod "readme" info helped  ;D ... BUT, even after switching to the smf default board theme, and reinstalling, i'm still getting that fatal error when i go into any thread.  so, i uninstalled again.

:(

Rudolf

Can you post the code between the lines 1275 and 1250 of your Display.php file?
I suppose that the function is declared two times.
You don't have to edit that file manually... if that's what you did.
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

Rudolf

Quote from: digit on August 10, 2006, 02:52:13 AM
I still need help resolving my aforementioned "undefined index: karma" error...

I still think it's some other mod you have installed, or some modification you made in some file ... or a bug in SMF.
There's nothing in my mod that could cause that error, and on a standard SMF installtion I don't get an error with or without karma enabled.
Anyway, as a quick fix you can try to do the following:
Replace the line:
if ($message['member']['karma']['allow'])
with
if (isset($message['member']['karma']) && $message['member']['karma']['allow'])

I'm on holidays so I can't get to my computer for a couple of weeks, if still no go, i will take another look when I back home.
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

1milehi

#165
Quote from: Rudolf on August 13, 2006, 10:08:50 AM
Can you post the code between the lines 1275 and 1250 of your Display.php file?
I suppose that the function is declared two times.
You don't have to edit that file manually... if that's what you did.

no, i didn't touch anything manually.  i don't even know where the display.php file is.  do you want to see it for the SMF default theme or for the board default i am using?

also, even tho i deleted/uninstalled the package, i'm still getting an "undefined index:  ignoreset" message.  ???

thank you for your help.

J. Williams

Display.php is in sources directory
Joshua Jon Williams
Back in Action.

1milehi

thanks j j  :)

i'm not sure if this is what you're looking for rudolf (as i can't tell the line numbers) but this is what i found:


Quote//IGNORE - START
function isIgnored($posterID, $groupID)
{ global $ID_MEMBER, $db_prefix, $modSettings;
   
   if ($ID_MEMBER == $posterID) return 2;

if (!$modSettings['ign_admin'])
   if (($groupID==1) || ($groupID==2) || ($groupID==3)) return 2;   

   $res = db_query("SELECT * FROM {$db_prefix}ignore WHERE ID_MEMBER = $ID_MEMBER AND LOCATE(',{$posterID},',ignore_list)", __FILE__, __LINE__);
   if (mysql_num_rows($res)) return 1;
   else return 0;
}//IGNORE - END

Skipdawg

Is this mod going to work fine with 1.1 RC3 or will it need to be updated?
Skipdawg's Community

Powered by SMF 1.1.3

Rudolf

Quote from: 1milehi on August 20, 2006, 09:01:44 AM
thanks j j  :)

i'm not sure if this is what you're looking for rudolf (as i can't tell the line numbers) but this is what i found:

yes this is my code
make sure that this code is only once in that file
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

Rudolf

I haven't checked yet the RC3 version
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

Skipdawg

Anyone tested this on RC3 yet? Going through and grabbing some of the mods that the update did not allow to re-apply that were deleted.
Skipdawg's Community

Powered by SMF 1.1.3

Skipdawg

Suggestion if and or when this is updated for 1.1 RC3/Gold?

Could it be setup to where Administrators and Global Moderators and other forum management of that level have the ignore feature disabled. For if these users have a problem member they can always ban the trouble maker.

Leave the feature in place though for the Local Moderators. Possible?

I had a few members that liked this feature. But when I updated it did not show as compatible so it was removed.
Skipdawg's Community

Powered by SMF 1.1.3

URPG

Is it working with RC3?

Rudolf

Right now I installed on a new RC3 forum and it seems to work fine, installation was ok and the functions seem ok.
I'll be updating the next weekend based on the feedback from a couple of users (a big thanks to them!), and double checking for RC3.
But it works OK to me.
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

URPG

Will give it a try tonight...

pheasant_plucker

I have this on rc3 and it seemed to instal ok but it will not change anything when you change the ignore selection. Boards are still visible?

Gerry

fledgling

Just wondering if the RC3 version will be released soon.
Karen

Rudolf

I'm working on it right now.
I have a couple of new features I'd like to add, all based on requests and feedback from here.

Here's the list:

  • Add a setting to enable/disable this feature for administrators and moderators (they won't be able to ignore members)
  • In the Profile summary show the number of users ignoring the viewed user.
  • In the Profile a separate page for administrators and moderators to view two lists: Ignored and Ignored by (the members this member is ignoring and the members this member is ignored by)
  • Remove/hide the posts from the topic summary
  • Try to hide posts from various index pages - on Main index the last posts of boards and the recent posts, on board index the last post of topics (these are optional, it will make in the mod if it's not too complicated)
  • Other technical adjustments, code optimization

It should be ready today, or if not the next weekend.
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

fledgling

Thank you. Looking forward to this, I have a situation on my board that this will handle.

Advertisement: