News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Recent post from SSI.php got trimmed?

Started by PokémonS, May 22, 2015, 10:29:37 PM

Previous topic - Next topic

PokémonS

SMF 2.0.10

Hi,



Look at screenshot above, the second recent post must be showed 10 posts, but now it's only 1 post.
It got fully trimmed when members post 100 posts outside the "inside_board" of recent post.

Is there any way to fix this?

Thanks.
きみと手をつなごう つらいときはもっと
ゼロからはじめよう ほら ほら 手をつなごう
みんな手をつなごう つらいときはもっと
力を合わせよう ほら ほら 手をつなごう

margarett

Yeah, we've seen that before. There is a hardcoded limit to prevent the query from fetching too many results. Let me see if I can find the topic...

Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

PokémonS

Quote from: margarett on May 23, 2015, 07:40:49 AM
Yeah, we've seen that before. There is a hardcoded limit to prevent the query from fetching too many results. Let me see if I can find the topic...

Thanks for answer, okay I still looking for the fixes.
きみと手をつなごう つらいときはもっと
ゼロからはじめよう ほら ほら 手をつなごう
みんな手をつなごう つらいときはもっと
力を合わせよう ほら ほら 手をつなごう

Kindred

any "fixes" that you put in place will likely have an impact on resource usage of the system... there is a reason that the search routine that fills the recent array is limited...
Сл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."

PokémonS

Quote from: Kindred on May 23, 2015, 04:31:38 PM
any "fixes" that you put in place will likely have an impact on resource usage of the system... there is a reason that the search routine that fills the recent array is limited...

Wait, so I recently read some notes here:

http://support.simplemachines.org/function_db/index.php?action=view_function;id=514

"The system defaults to pulling only the most recent 125 posts before parsing this function. Of those 125 posts, this function then compares that the posts a) are NOT in the exclude board list, b) ARE in the include board list and c) are in a board which the current user has permissions to view. [This means that you MAY get less than the requested number of posts displayed.]"

So, if I invert my include_board to exclude_board, will this problem solved?

For example: there are 4 boards, include_board are 2 and 3.
If I invert it, then exclude_board are 1 and 4.

Or still impacting resources?
きみと手をつなごう つらいときはもっと
ゼロからはじめよう ほら ほら 手をつなごう
みんな手をつなごう つらいときはもっと
力を合わせよう ほら ほら 手をつなごう

Kindred

No, but you'll have exactly the same results as you do now.
Сл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."

margarett

What you need is to increase the number of posts fetched. That will (obviously) increase memory utilization which shouldn't be a problem anyway.

Find this (in SSI.php)
'min_message_id' => $modSettings['maxMsgID'] - 25 * min($num_recent, 5),
The maths is easy:
a) pick the latest post ID
b) pick the minimum value between 5 and the number of posts you're requesting
c) multiply b) with 25
d) subtract a) - c)

That determines the smallest post ID that the function will retrieve. It isn't related to any permission (or if the IDs in the middle even exist...).
Pick that 25 and make it bigger. Like twice or three times 25.
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

PokémonS

Quote from: margarett on May 24, 2015, 07:59:40 PM
What you need is to increase the number of posts fetched. That will (obviously) increase memory utilization which shouldn't be a problem anyway.

Find this (in SSI.php)
'min_message_id' => $modSettings['maxMsgID'] - 25 * min($num_recent, 5),
The maths is easy:
a) pick the latest post ID
b) pick the minimum value between 5 and the number of posts you're requesting
c) multiply b) with 25
d) subtract a) - c)

That determines the smallest post ID that the function will retrieve. It isn't related to any permission (or if the IDs in the middle even exist...).
Pick that 25 and make it bigger. Like twice or three times 25.

Thanks! Changed to double.
きみと手をつなごう つらいときはもっと
ゼロからはじめよう ほら ほら 手をつなごう
みんな手をつなごう つらいときはもっと
力を合わせよう ほら ほら 手をつなごう

Advertisement: