Hi, how do I show recent posts just from one board in 2.0? I see there is an include function but I don't know how to use this?
function ssi_recentPosts($num_recent = 8, $exclude_boards = null, $include_boards = null, $output_method = 'echo')
I think you can just leave $exclude_boards blank so if the board ID was 1 you should be able to do:
Well, tried that already but didn't worked. Actually the whole page doesn't load then.
doesn't work either
OK, you need to find out the id of your board. In the example the id was assumed to be 1 (the 3rd parameter).
Yes I have already, board nr 34. There are 2 post in there at the moment and they are not showing up.
Anything in any error logs? (SMF or web-server)
Does it work on any other boards? (Perhaps it only checks recent posts since a certain time? I haven't looked too closely at the function)
No errors. The function does work for all, only not if I select one board as given in the example above.
I've just tried this function and it displays my last 3 posts (on my local test forum).
My test on smf 2 beta 3.1
^^ my settings are correct, have included SSI correct as everything else included works fine. It's just this function that isn't working for me.
Can it be that it has to do something with the fact that the board is only visable for 1 group? Although I am a part of that particular group I still don't see a thing.
I think you should try first to make the board accesible to anyone and see if that works. It might be a permission problem.
Well. I have tried that as well and unfortunatelly no succes either... :(
Maybe someone is willing to take a look at my SSI included here? Thanks in advance!!!
Yeap, it's a different SSI.php . It looks like smf beta 3.0 . However it's strange that is almost double in size than mine.
That could be, because I have much modifications and addons made in it.
I have checked my version against your version of recentpost function. Except for the output (have made a little tweak in the table) the codings are the same. Have tested it already and still no luck.
I am getting really confused about this...
OK Time to do some debugging.
Try adding this to your page
echo $context['user']['is_logged'] ? $context['user']['name'] : 'Guest';
Anywhere after SSI is called, what does it says there?
When logged in it gives my name, when logged out is says ´Guest´
Can you post your full file?
Here is my SSI and my custom page Club.php
Thanks, but no results still...
Does your other SSI function like ssi_mededelingclub(33, 1, 0, 400) work?
Yes, those work! So I guess it has to do something with the recentpost function...but I've looked at it till I got dizzie and unfortunatelly I couldn't find what is wrong with it....
I've used your SSI instead of mine for testing and it doesn't work indeed. With the default SSI works, so the problem is somewhere in the modded SSI.
OK got it:
Your function has a modified signature, so the correct calling is
The order of the params got changed somehow and now(default smf 2 beta 3.1) the echo is the last instead of the 3rd.
Wow, thank you so much mike_sw and Dragooon! It works fine now! I have no idea how params got changed though!