News:

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

Main Menu

How to set SSI functions to array mode?

Started by darrenbeige, November 19, 2008, 12:15:35 PM

Previous topic - Next topic

darrenbeige

Noob question. I have tried <?php ssi_topBoards(array);  ?> but it returns error. Help?

ccbtimewiz

.. What are you trying to do? Why don't you just return the values so you can load them yourself?

darrenbeige

I want to use the SSI functions in array mode, which then allows me to style them to my hearts content. I am asking how to do this?


[SiNaN]

SSI functions are like this:

ssi_function(param1, param2, $output_method)

You should set $output_method as 'array'.

Example:

$array = ssi_boardNews(59, 10, null, null, 'array');

foreach ($array as $topic)
   echo '<a href="', $topic['href'], '">', $topic['subject'], '</a><br />';

For more info, see this topic:

http://www.simplemachines.org/community/index.php?topic=14906.0
Former SMF Core Developer | My Mods | SimplePortal

darrenbeige

How would I set this for the SSI Karma function?

Could you give an example? I don't know what all the INT, and BOOL's mean on the MOD page.

http://custom.simplemachines.org/mods/index.php?mod=885

Thanks,


[SiNaN]

It's the same:

$array = ssi_karmaxxx(5, true, 'array');

I'm sure you will understand it better if you check the topics I've linked.

Also, it better to ask support from the mod of the author, in mod's own support topic:

http://www.simplemachines.org/community/index.php?topic=187945.0
Former SMF Core Developer | My Mods | SimplePortal

Advertisement: