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: 1014
  • 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]

Installation errors? Mod incompatibilities? Upgrade problems? Make your way over to the Install and Upgrade Support board for all your solutions!

Author Topic: Board News problem  (Read 4377 times)

0 Members and 1 Guest are viewing this topic.

Offline Eloryn

  • Semi Newbie
  • *
  • Posts: 10
  • SMF Version: 1.1.10
  • SP Version: 2.3.1
Board News problem
« on: December 18, 2009, 12:28:46 AM »
SMF 1.1.11, SP 2.3.1

I have serveral boards, all private but one. Within the Board News block I'd like to show from three different boards.

If I use the default settings, it works as expected. You can only see posts from those boards that you have access too. If unregistered or logged out, you see posts from the one public board. When you login you see posts from those boards you have access too.

However, I'd prefer to be able to pick the boards shown. When I choose which boards to show, they show to everyone, with or without the correct permissions. So if I pick my three boards, two of them being private, even those logged out or unregistered can see posts from the private boards in the block.

Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Board News problem
« Reply #1 on: December 18, 2009, 07:58:27 PM »
Code: ("Find (Sources/PortalBlocks.php)") [Select]
$request = db_query("
SELECT t.ID_FIRST_MSG
FROM {$db_prefix}topics AS t
INNER JOIN {$db_prefix}boards AS b ON (b.ID_BOARD = t.ID_BOARD)
INNER JOIN {$db_prefix}messages AS m ON (m.ID_MSG = t.ID_FIRST_MSG)
WHERE " . (empty($board) ? $user_info['query_see_board'] . "
AND t.ID_FIRST_MSG >= " . ($modSettings['maxMsgID'] - 45 * min($limit, 5)) : "b.ID_BOARD IN (" . implode(', ', $board) . ")") . "
AND (t.locked != 1 OR m.icon != 'moved')
ORDER BY t.ID_FIRST_MSG DESC
LIMIT $limit", __FILE__, __LINE__);

Code: ("Replace") [Select]
$request = db_query("
SELECT t.ID_FIRST_MSG
FROM {$db_prefix}topics AS t
INNER JOIN {$db_prefix}boards AS b ON (b.ID_BOARD = t.ID_BOARD)
INNER JOIN {$db_prefix}messages AS m ON (m.ID_MSG = t.ID_FIRST_MSG)
WHERE " . $user_info['query_see_board'] . (empty($board) ? "
AND t.ID_FIRST_MSG >= " . ($modSettings['maxMsgID'] - 45 * min($limit, 5)) : "b.ID_BOARD IN (" . implode(', ', $board) . ")") . "
AND (t.locked != 1 OR m.icon != 'moved')
ORDER BY t.ID_FIRST_MSG 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 Eloryn

  • Semi Newbie
  • *
  • Posts: 10
  • SMF Version: 1.1.10
  • SP Version: 2.3.1
Re: Board News problem
« Reply #2 on: December 18, 2009, 11:01:24 PM »
I really appreciate the help. However it now wants to download \index.php like its a file (when opening home).

Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Board News problem
« Reply #3 on: December 18, 2009, 11:10:43 PM »
Huh. I don't think that that is a related issue. The edit in my post above was not substantial, so its highly unlikely that it is the cause of that issue.

Does it only occur when that edit has been made? Can you remove the edit and see if its still happening?
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 Eloryn

  • Semi Newbie
  • *
  • Posts: 10
  • SMF Version: 1.1.10
  • SP Version: 2.3.1
Re: Board News problem
« Reply #4 on: December 19, 2009, 02:38:52 AM »
Yeah, I checked it like five times. Permissions are all the same. Seems a bit odd to me also. But I've gone back and forth with the original and the fix. Using firefox.

Edit: All the other buttons work fine. Clicking Home button and it tries to download the index.php. Undo the fix and the problem goes away.

Offline Eloryn

  • Semi Newbie
  • *
  • Posts: 10
  • SMF Version: 1.1.10
  • SP Version: 2.3.1
Re: Board News problem
« Reply #5 on: December 19, 2009, 02:50:40 AM »
Okay, a little more progress on this. I swapped fix back in again, as some kind of sadistic last test to prove I wasn't crazy. And this time it worked..... Which only proved to me I was crazy because I knew what I saw before. lol.

I then went in and changed the boards it uses for the news (selected three of them [one public, two private]). And the problem is back. Home button wants to download index.php.

When turning off all selected boards (default setting), the problem goes away.

Offline Eloryn

  • Semi Newbie
  • *
  • Posts: 10
  • SMF Version: 1.1.10
  • SP Version: 2.3.1
Re: Board News problem
« Reply #6 on: December 19, 2009, 02:53:49 AM »
And I just verified the original again. It hasn't got this problem, no matter what boards are selected. But it still has the original problem, of course.

Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Board News problem
« Reply #7 on: December 19, 2009, 08:08:33 PM »
Hmm, I still can't work out why that edit would be causing any issues.

Does the problem occur (without the edit made) if you set the block so that all boards are shown? (Deselect all boards to do that)
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 Eloryn

  • Semi Newbie
  • *
  • Posts: 10
  • SMF Version: 1.1.10
  • SP Version: 2.3.1
Re: Board News problem
« Reply #8 on: December 20, 2009, 01:14:01 PM »
It only happens with this edit, and only when certain boards are chosen. It does not happen without this. And it does not happen if I have the default settings (no boards selected).

If I use the fix, and choose a board, it does not work.

Offline Eloryn

  • Semi Newbie
  • *
  • Posts: 10
  • SMF Version: 1.1.10
  • SP Version: 2.3.1
Re: Board News problem
« Reply #9 on: December 29, 2009, 03:49:12 AM »
Now that Christmas is over, is anyone able to help me with this?

Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Board News problem
« Reply #10 on: January 01, 2010, 09:31:33 PM »
Could you please attach your Sources/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 Eloryn

  • Semi Newbie
  • *
  • Posts: 10
  • SMF Version: 1.1.10
  • SP Version: 2.3.1
Re: Board News problem
« Reply #11 on: January 01, 2010, 11:51:41 PM »
There ya go. Thanks, for the help too.

Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Board News problem
« Reply #12 on: January 12, 2010, 08:50:53 PM »
Sorry for the wait on this issue, the replace code should be:
Code: [Select]
$request = db_query("
SELECT t.ID_FIRST_MSG
FROM {$db_prefix}topics AS t
INNER JOIN {$db_prefix}boards AS b ON (b.ID_BOARD = t.ID_BOARD)
INNER JOIN {$db_prefix}messages AS m ON (m.ID_MSG = t.ID_FIRST_MSG)
WHERE " . $user_info['query_see_board'] . (empty($board) ? "
AND t.ID_FIRST_MSG >= " . ($modSettings['maxMsgID'] - 45 * min($limit, 5)) : "AND b.ID_BOARD IN (" . implode(', ', $board) . ")") . "
AND (t.locked != 1 OR m.icon != 'moved')
ORDER BY t.ID_FIRST_MSG 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 Eloryn

  • Semi Newbie
  • *
  • Posts: 10
  • SMF Version: 1.1.10
  • SP Version: 2.3.1
Re: Board News problem
« Reply #13 on: January 14, 2010, 12:13:11 AM »
I think that's the same as the first? I can't see anything different. But I did copy/paste it as is, and I still have the same problem.

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Board News problem
« Reply #14 on: January 20, 2010, 02:30:03 PM »
Try this one instead:

Code: ("Find (Sources/PortalBlocks.php)") [Select]
$request = db_query("
SELECT t.ID_FIRST_MSG
FROM {$db_prefix}topics AS t
INNER JOIN {$db_prefix}boards AS b ON (b.ID_BOARD = t.ID_BOARD)
INNER JOIN {$db_prefix}messages AS m ON (m.ID_MSG = t.ID_FIRST_MSG)
WHERE " . (empty($board) ? $user_info['query_see_board'] . "
AND t.ID_FIRST_MSG >= " . ($modSettings['maxMsgID'] - 45 * min($limit, 5)) : "b.ID_BOARD IN (" . implode(', ', $board) . ")") . "
AND (t.locked != 1 OR m.icon != 'moved')
ORDER BY t.ID_FIRST_MSG DESC
LIMIT $limit", __FILE__, __LINE__);

Code: ("Replace") [Select]
$request = db_query("
SELECT t.ID_FIRST_MSG
FROM {$db_prefix}topics AS t
INNER JOIN {$db_prefix}boards AS b ON (b.ID_BOARD = t.ID_BOARD)
INNER JOIN {$db_prefix}messages AS m ON (m.ID_MSG = t.ID_FIRST_MSG)
WHERE " . $user_info['query_see_board'] . (empty($board) ? "
AND t.ID_FIRST_MSG >= " . ($modSettings['maxMsgID'] - 45 * min($limit, 5)) : " AND b.ID_BOARD IN (" . implode(', ', $board) . ")") . "
AND (t.locked != 1 OR m.icon != 'moved')
ORDER BY t.ID_FIRST_MSG DESC
LIMIT $limit", __FILE__, __LINE__);
And slowly, you come to realize... It's all as it should be...

Offline Eloryn

  • Semi Newbie
  • *
  • Posts: 10
  • SMF Version: 1.1.10
  • SP Version: 2.3.1
Re: Board News problem
« Reply #15 on: January 21, 2010, 12:50:21 AM »
Awesome, that fixed it. Thanks for all the help.

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Board News problem
« Reply #16 on: January 21, 2010, 02:57:59 AM »
You're welcome. ;)
And slowly, you come to realize... It's all as it should be...