BoardIndex.template.php - $board['last_post']['link'] Limit ?

Started by Snrj, September 09, 2014, 04:01:18 PM

Previous topic - Next topic

margarett

I have no idea what you are trying to do... :(
Last post link is exactly that... A post to the last message in a board or in a topic. Are you trying to get multiple last post in a board, is that it?
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

Arantor

I know what he's trying to do: display the last 5 topics in a board.

Without a *serious* redesign of all SMF's internals, or a truly enormous performance hit, there's no way to do it.

Hj Ahmad Rasyid Hj Ismail

I thought there is a way to see the recent post of a board via clicking unread icon in the BoardIndex. That will list all unread posts (not only five new posts) of that board in recent post page. But that is not answering the question.

As for the question, I guess if the OP really needs such a display in BoardIndex, may be he can use a portal block that can call 5 latest posts for each of his boards.

Arantor

Sure there is, click on the board icon. Gives you a URL like index.php?action=unread;board=60.0;children

And doing that block for every board means one query for every single board. Hence the phrase 'truly enormous performance hit'.

Hj Ahmad Rasyid Hj Ismail

Yes. Truly enormous. The more the boards the more the hits.

Arantor


Hj Ahmad Rasyid Hj Ismail

Huhuhuhu... that's how some smallest thing can hit us most. :)

Arantor

Hardly a small thing.

To explain; normally you can make use of indexes (there isn't one for id_board/id_last_msg which is a shame but not a huge killer to add), but including the approval into the mix means you have to sort the rows by hand because the index will not be used even if you try to force it simply because approval is such a terrible thing to index because of its lack of specificity. Indexing something with only two values is no good unless you're looking for the sparse values.

Hj Ahmad Rasyid Hj Ismail

Actually, it's quite hard for me to understand that part. I only know how to do what the OP wants via portal and its consequences. But how to mod the same is totally out of my knowledge.

I only know and understand few SMF php code. However, I neither know nor understand SMF database. That's why I never made any mod that directly deals and relates to database. :(

Advertisement: