collapse

* Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

* User Info

 
 
Welcome, Guest. Please login or register.

* Who's Online

  • Dot Guests: 555
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: Yup, Still adore SP
    April 21, 2019, 07:08:06 PM
  • {OCS}MasterSeal: STILL love SP :)
    November 24, 2018, 05:05:50 AM
  • ♦ Ninja ZX-10RR ♦: <3 aegersz
    September 13, 2018, 03:36:09 PM
  • aegersz: I STILL <3 LOVE SimplePortal
    September 13, 2018, 07:11:39 AM
  • aegersz: o LOVE you guys - Simple Portal rocks !
    May 09, 2018, 05:18:59 AM
  • Chen Zhen: our apologies for the site being down.. please read server issues topic
    March 22, 2018, 05:32:38 AM
  • {OCS}MasterSeal: LOL PLEASE forget I just posted that. I found the answer in my own dang post back in 2015. lol sorry!
    July 04, 2017, 10:47:55 PM
  • {OCS}MasterSeal: I know this SB isnt' for support, but I just have a general question. Who would I contact to find out where SP stores its block info? Is it DB driven or files? I searched the site but came up with nothing. probably my fault any insight is appreciated.
    July 04, 2017, 10:43:36 PM
  • ♦ Ninja ZX-10RR ♦: Excuse me but what does Simpleportal have to deal with that?
    February 05, 2017, 08:21:14 PM
  • WhiteEagle: of course IMHO that site appears to be dead :(
    February 04, 2017, 01:08:05 PM
  • WhiteEagle: If I can get that, then I'll use it for that site...
    February 04, 2017, 01:07:35 PM
  • WhiteEagle: decided to not use SMF for any projects, unless I can get a copy of the premium version of the fanfiction archive plugin
    February 04, 2017, 01:06:54 PM
  • expertdecisions: cloudflare
    January 28, 2017, 08:01:47 AM
  • aegersz: SM release 2.0.13 !
    January 12, 2017, 06:00:13 AM
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 AM
  • emanuele: [link]
    November 01, 2016, 12:43:50 PM
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 PM
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 AM
  • {OCS}MasterSeal: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 AM
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 PM

* Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]

If you're interested in helping other members with support requests, consider joining the Community Support Helpers group.

Author Topic: Exclude banned members in "Top Poster" Block  (Read 7644 times)

0 Members and 1 Guest are viewing this topic.

Offline Manu

  • Translator
  • *
  • Posts: 203
  • Gender: Female
  • Angel by Day, Devil by Night
    • Arsenie Official Forum
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Exclude banned members in "Top Poster" Block
« on: November 22, 2009, 05:36:01 AM »
Hi,

is there a way to exclude banned members in the top poster block?
I know I could use other options for the top poster block, like "This week" but we want to show "All Time", but our problem is, the member at position 1 is a banned member.

Is there a way not to show banned members in this block?
Sometimes I'm an angel, sometimes I'm a devil, but I am always 100% woman and if you have a problem with me, learn to deal with it!

Offline Manu

  • Translator
  • *
  • Posts: 203
  • Gender: Female
  • Angel by Day, Devil by Night
    • Arsenie Official Forum
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: Exclude banned members in "Top Poster" Block
« Reply #1 on: December 03, 2009, 03:17:31 PM »
Any idea?  :-[
Sometimes I'm an angel, sometimes I'm a devil, but I am always 100% woman and if you have a problem with me, learn to deal with it!

Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Exclude banned members in "Top Poster" Block
« Reply #2 on: December 10, 2009, 07:56:57 PM »
Moved to the custom coding board.


This edit is for SMF1.1 only.

Code: ("Find (Sources/PortalBlocks.php)") [Select]
      $request = db_query("
         SELECT
            mem.ID_MEMBER, mem.realName, COUNT(*) as posts,
            mem.avatar, a.ID_ATTACH, a.attachmentType, a.filename
         FROM {$db_prefix}messages AS m
            LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)
            LEFT JOIN {$db_prefix}attachments AS a ON (a.ID_MEMBER = m.ID_MEMBER)
         WHERE m.posterTime > $start_time
            AND m.ID_MEMBER != 0
         GROUP BY mem.ID_MEMBER
         ORDER BY posts DESC
         LIMIT $limit", __FILE__, __LINE__);
   }
   else
   {
      $request = db_query("
         SELECT
            m.ID_MEMBER, m.realName, m.posts, m.avatar,
            a.ID_ATTACH, a.attachmentType, a.filename
         FROM {$db_prefix}members as m
            LEFT JOIN {$db_prefix}attachments AS a ON (a.ID_MEMBER = m.ID_MEMBER)
         ORDER BY posts DESC
         LIMIT $limit", __FILE__, __LINE__);
   }

Code: ("Replace") [Select]
      $request = db_query("
         SELECT
            mem.ID_MEMBER, mem.realName, COUNT(*) as posts,
            mem.avatar, a.ID_ATTACH, a.attachmentType, a.filename
         FROM {$db_prefix}messages AS m
            LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)
            LEFT JOIN {$db_prefix}attachments AS a ON (a.ID_MEMBER = m.ID_MEMBER)
         WHERE m.posterTime > $start_time
            AND m.ID_MEMBER != 0
            AND mem.is_activated < 10
         GROUP BY mem.ID_MEMBER
         ORDER BY posts DESC
         LIMIT $limit", __FILE__, __LINE__);
   }
   else
   {
      $request = db_query("
         SELECT
            m.ID_MEMBER, m.realName, m.posts, m.avatar,
            a.ID_ATTACH, a.attachmentType, a.filename
         FROM {$db_prefix}members as m
            LEFT JOIN {$db_prefix}attachments AS a ON (a.ID_MEMBER = m.ID_MEMBER)
         WHERE mem.is_activated < 10
         ORDER BY posts DESC
         LIMIT $limit", __FILE__, __LINE__);
   }
SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.

Offline Manu

  • Translator
  • *
  • Posts: 203
  • Gender: Female
  • Angel by Day, Devil by Night
    • Arsenie Official Forum
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: Exclude banned members in "Top Poster" Block
« Reply #3 on: December 11, 2009, 06:51:07 PM »
Thx for your help, but when I insert the code you posted, I get this error message when I try to set the block to "All Time"

Quote
Unknown column 'mem.is_activated' in 'where clause'
File: /is/htdocs/.../.../.../Sources/PortalBlocks.php
Line: 538

 :-[
Sometimes I'm an angel, sometimes I'm a devil, but I am always 100% woman and if you have a problem with me, learn to deal with it!

Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Exclude banned members in "Top Poster" Block
« Reply #4 on: December 11, 2009, 06:54:19 PM »
Whoops, the members table has a different prefix for the second query, try the replace code below.

Code: [Select]
      $request = db_query("
         SELECT
            mem.ID_MEMBER, mem.realName, COUNT(*) as posts,
            mem.avatar, a.ID_ATTACH, a.attachmentType, a.filename
         FROM {$db_prefix}messages AS m
            LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)
            LEFT JOIN {$db_prefix}attachments AS a ON (a.ID_MEMBER = m.ID_MEMBER)
         WHERE m.posterTime > $start_time
            AND m.ID_MEMBER != 0
            AND mem.is_activated < 10
         GROUP BY mem.ID_MEMBER
         ORDER BY posts DESC
         LIMIT $limit", __FILE__, __LINE__);
   }
   else
   {
      $request = db_query("
         SELECT
            m.ID_MEMBER, m.realName, m.posts, m.avatar,
            a.ID_ATTACH, a.attachmentType, a.filename
         FROM {$db_prefix}members as m
            LEFT JOIN {$db_prefix}attachments AS a ON (a.ID_MEMBER = m.ID_MEMBER)
         WHERE m.is_activated < 10
         ORDER BY posts DESC
         LIMIT $limit", __FILE__, __LINE__);
   }
SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.

Offline Manu

  • Translator
  • *
  • Posts: 203
  • Gender: Female
  • Angel by Day, Devil by Night
    • Arsenie Official Forum
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: Exclude banned members in "Top Poster" Block
« Reply #5 on: December 11, 2009, 07:02:09 PM »
Oops  :-[

Now I get this message when I want to enter the Adminsection

Quote
Warning:  Unexpected character in input:  ''' (ASCII=39) state=1 in /is/htdocs/.../.../.../Sources/PortalBlocks.php on line 1264

Parse error:  syntax error, unexpected '/' in /is/htdocs/.../.../.../Sources/PortalBlocks.php on line 1264
Sometimes I'm an angel, sometimes I'm a devil, but I am always 100% woman and if you have a problem with me, learn to deal with it!

Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Exclude banned members in "Top Poster" Block
« Reply #6 on: December 11, 2009, 07:08:27 PM »
What exactly is located on line 1264 of your PortalBlocks.php file?
SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.

Offline Manu

  • Translator
  • *
  • Posts: 203
  • Gender: Female
  • Angel by Day, Devil by Night
    • Arsenie Official Forum
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: Exclude banned members in "Top Poster" Block
« Reply #7 on: December 12, 2009, 04:33:46 AM »
Line 1264

Code: [Select]
<form action="', $boardurl, '/SSI.php?ssi_function=pollVote" method="post" accept-charset="', $context['character_set'], '">
Sometimes I'm an angel, sometimes I'm a devil, but I am always 100% woman and if you have a problem with me, learn to deal with it!

Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Exclude banned members in "Top Poster" Block
« Reply #8 on: December 12, 2009, 08:19:28 PM »
Hmm, I'm not sure why that line would be causing that error, can you attach your entire PortalBlocks.php file?
SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.

Offline Manu

  • Translator
  • *
  • Posts: 203
  • Gender: Female
  • Angel by Day, Devil by Night
    • Arsenie Official Forum
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: Exclude banned members in "Top Poster" Block
« Reply #9 on: October 28, 2011, 05:09:55 AM »

Hmm, I'm not sure why that line would be causing that error, can you attach your entire PortalBlocks.php file?
Sorry, I made a mistake by adding the code  :-[

Is it possible to provide me with the code for SMF 2.0.1?
I'm working on the upgrade and need to exclude banned members on the Top-Poster Block :)
Sometimes I'm an angel, sometimes I'm a devil, but I am always 100% woman and if you have a problem with me, learn to deal with it!

Offline ccbtimewiz

  • Hero Member
  • *****
  • Posts: 2185
  • Gender: Male
  • $("div.content:dd").hide();
  • SMF Version: None
  • SP Version: None
  • Elkarte Version: None
  • EhPortal Version: None
Re: Exclude banned members in "Top Poster" Block
« Reply #10 on: October 28, 2011, 04:18:28 PM »
Attach ./Sources/PortalBlocks.php

Offline Manu

  • Translator
  • *
  • Posts: 203
  • Gender: Female
  • Angel by Day, Devil by Night
    • Arsenie Official Forum
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: Exclude banned members in "Top Poster" Block
« Reply #11 on: November 01, 2011, 02:59:08 PM »
Attach ./Sources/PortalBlocks.php
The code Nathaniel showed here is only for installed portals on SMF 1.x.x :)
I need it for SMF 2.x.x :)
Sometimes I'm an angel, sometimes I'm a devil, but I am always 100% woman and if you have a problem with me, learn to deal with it!

Offline ccbtimewiz

  • Hero Member
  • *****
  • Posts: 2185
  • Gender: Male
  • $("div.content:dd").hide();
  • SMF Version: None
  • SP Version: None
  • Elkarte Version: None
  • EhPortal Version: None
Re: Exclude banned members in "Top Poster" Block
« Reply #12 on: November 01, 2011, 03:18:22 PM »
Yes, I am aware of this. Please attach your file so I can make the edits for SMF 2.0

Offline Manu

  • Translator
  • *
  • Posts: 203
  • Gender: Female
  • Angel by Day, Devil by Night
    • Arsenie Official Forum
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: Exclude banned members in "Top Poster" Block
« Reply #13 on: November 05, 2011, 08:02:10 AM »
Yes, I am aware of this. Please attach your file so I can make the edits for SMF 2.0
Here's my actual PortalBlocks.php thanks for your help :)
Sometimes I'm an angel, sometimes I'm a devil, but I am always 100% woman and if you have a problem with me, learn to deal with it!

Offline ccbtimewiz

  • Hero Member
  • *****
  • Posts: 2185
  • Gender: Male
  • $("div.content:dd").hide();
  • SMF Version: None
  • SP Version: None
  • Elkarte Version: None
  • EhPortal Version: None
Re: Exclude banned members in "Top Poster" Block
« Reply #14 on: November 05, 2011, 02:35:26 PM »
Find:
Code: [Select]
WHERE m.poster_time > {int:start_time}
AND m.id_member != 0

Replace with:
Code: [Select]
WHERE m.poster_time > {int:start_time}
AND m.id_member != 0
                                AND m.is_activated < 10