Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: mrbones on October 07, 2009, 02:11:45 PM

Title: Possible to exclude a certain board from SSI?
Post by: mrbones on October 07, 2009, 02:11:45 PM
I've got an SSI include on my home page that shows the most recent posts. Is it possible to exclude a certain board from showing up on there?

Here's the home page: www.atvflorida.com (http://www.atvflorida.com)

I want to get rid of the Politics board from showing up. Is it possible?

It would be nice to also exclude it from the Board Index, too.
Title: Re: Possible to exclude a certain board from SSI?
Post by: LOVELORD on October 07, 2009, 02:44:10 PM
Do you try to close that boards for guest...
Title: Re: Possible to exclude a certain board from SSI?
Post by: karlbenson on October 07, 2009, 03:22:42 PM
It is possible to exclude boards in 2.0 with an extra parameter.
function ssi_recentPosts($num_recent = 8, $exclude_boards = null, $include_boards = null, $output_method = 'echo')

I'm not sure whether its possible for 1.1.x though as some new parameters were added
Title: Re: Possible to exclude a certain board from SSI?
Post by: mrbones on October 07, 2009, 04:59:55 PM
How can I find out?
Title: Re: Possible to exclude a certain board from SSI?
Post by: mrbones on October 09, 2009, 04:29:29 PM
Can anybody please help?
Title: Re: Possible to exclude a certain board from SSI?
Post by: mrbones on October 14, 2009, 03:47:28 PM
Anybody?
Title: Re: Possible to exclude a certain board from SSI?
Post by: mrbones on October 19, 2009, 01:28:37 PM
?
Title: Re: Possible to exclude a certain board from SSI?
Post by: Marcus Forsberg on October 20, 2009, 09:24:50 AM
Quote from: mrbones on October 07, 2009, 04:59:55 PM
How can I find out?

How about trying the code karlbenson posted and see if it works for your version? :)
Title: Re: Possible to exclude a certain board from SSI?
Post by: Arantor on October 20, 2009, 09:45:48 AM
Or even look it up in the function DB - http://support.simplemachines.org/function_db/index.php?action=view_function;id=514

How are you calling it currently?
Title: Re: Possible to exclude a certain board from SSI?
Post by: mrbones on October 20, 2009, 01:17:56 PM
Current call is: ssi_recentTopics()

I looked at the link and came up with this:

ssi_recentPosts ([10[,('53')]]);

Testing page: http://www.atvflorida.com/index2.php

This is the board I'm trying to exclude from the call.

http://www.atvflorida.com/forum/index.php/board,53.0.html


It must be wrong because the output looks the same. What did I mess up?
Title: Re: Possible to exclude a certain board from SSI?
Post by: Arantor on October 20, 2009, 01:30:47 PM
The [ and ] mean the things are optional. Plus the formatting wasn't quite right and confused it a little.

Try: ssi_recentPosts (10, array(53));
Title: Re: Possible to exclude a certain board from SSI?
Post by: mrbones on October 20, 2009, 01:39:59 PM
That did it! Thank you, thank you, thank you!

I put the code on the home page.

http://www.atvflorida.com/index.php

No more Politics on the home page! Yahoo!