News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Problem with recent_post

Started by nicola.volpi86, November 14, 2014, 05:58:22 AM

Previous topic - Next topic

nicola.volpi86

Goodmorning
I have used this array in my script to visualize 10 recent posts in a widget.

$recent = ssi_recentTopics($num_recent = 10, $exclude_boards = array(46,47,48,76), $output_method = 'echo');

But every time the number of the recents post change. Sometimes more, sometimes less.

Do you know how could I solve that problem ?

Thanks in advance



kat

#1
Hi, Nicola!



If it helps, I believe that Simple Portal has a pre-configured block, to do exactly what you want.

If you don't want to install the portal, itself, maybe if you look at the code that they use, for that, you could... er... "borrow" it? ;)

nicola.volpi86

What preconfigured bock you are referring ?


nicola.volpi86

I have tried to us the plugin in wordpress BNS SMF Forum but doesn't work. So I have to do all with my hand  :D

So i have to solve that problem

Thanks for the help

kat


margarett

You get more than 10 posts?
Less, there might be an explanation (recently discussed in other topic). But more? :o
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

Kindred

first of all...   you don't need to define the variables in the function call
and -- unless you are returning the array to display the function return in a different format form the default, you don't need to define the function as a variable...

ssi_recentTopics(10, array(46,47,48,76), 'echo');

would work just fine

second -- this will actually display UP TO 10...   there was a discussion on this in another thread, just recently.

the script pulls the 125 more recent posts.
it then sorts through for any that a) match your defined array for boards and b) are accessible to the user viewing the list
--   so, it is completely possible that - of the 125 most recent posts - fewer than 10 of them are in the board you specify AND accessible to the user viewing the list.
Сл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."

Advertisement: