News:

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

Main Menu

SSI bug?

Started by J. S., May 19, 2006, 05:38:11 AM

Previous topic - Next topic

J. S.

In SSI.php we have:
function ssi_recentPosts($num_recent = 8, $exclude_boards = null, $output_method = 'echo')

that fill return 8 results, all the time. Try http://www.simplemachines.org/community/SSI.php?ssi_function=recentPosts;limit=10 and you`ll see only 8 results. The ;limit=X option is good for nothing.
That $num_recent should have a default value, like 5, and if in the url I have a limit then $num_recent = $limit.

kegobeer

The SSI function works perfectly.  You don't pass the limit in the URL, you pass the limit when you call the function.
"The truth of the matter is that you always know the right thing to do. The hard part is doing it." - Norman Schwarzkopf
Posting and you (Click "WATCH THIS MOVIE")

J. S.

Quote from: kegobeer on May 19, 2006, 09:05:54 PM
The SSI function works perfectly.  You don't pass the limit in the URL, you pass the limit when you call the function.
meaning?

xduugu

<?php ssi_recentPosts($num_recent, $exclude_boards) ?>

Kindred

more specifically...

<?php ssi_recentPosts(10,null,'echo') ?>

or

<?php ssi_recentPosts(10) ?>
Сл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."

Orstio

If you want to use "limit" in the query string like that, you could also do this:

<?php ssi_recentPosts($_REQUEST['limit']) ?>

Leipe Po

better use $_POST or $_GET,

$_REQUEST doesnt care if somebody uses a form or by url, witch give you less control...
There is only one thing more importend to me then coding:
My Girlfriend

Microsoft - "You've got questions.  We've got dancing paperclips."

Rudolf

Actually with SMF you need to use $_REQUEST if I am not mistaken.
Some developer correct me if I do.
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

Leipe Po

$_GET or $_POST works just as perfectly
There is only one thing more importend to me then coding:
My Girlfriend

Microsoft - "You've got questions.  We've got dancing paperclips."

Advertisement: