SimplePortal

Customization => Custom Coding => Topic started by: Verso on April 19, 2009, 04:44:53 PM

Title: Recent Posts & Recent Topics
Post by: Verso on April 19, 2009, 04:44:53 PM
I have just installed this portal and am enjoying setting it up.

I've reached a situation I can't seem to fix.

I have a section of my site that is set up for RSS feeds. I do not want these included in the Recent Posts & Recent Topics.


Can this be done?
Title: Re: Recent Posts & Recent Topics
Post by: Nathaniel on April 19, 2009, 05:29:21 PM
Not entirely sure that I understood what you want to do.
Do you have Recent Post/Recent Topics blocks that you don't want to show in a certain area?
Title: Re: Recent Posts & Recent Topics
Post by: Eliana Tamerin on April 20, 2009, 12:26:05 AM
No, he has topics in boards he doesn't want to show up in Recent Posts/Topics block. In other words, he wants to exempt boards from being queried for recent posts/topics for that block.
Title: Re: Recent Posts & Recent Topics
Post by: Verso on April 20, 2009, 02:22:46 AM
No, he has topics in boards he doesn't want to show up in Recent Posts/Topics block. In other words, he wants to exempt boards from being queried for recent posts/topics for that block.


This is correct
Title: Re: Recent Posts & Recent Topics
Post by: Nathaniel on April 20, 2009, 02:37:55 AM
Okay, sorry I must've been a bit 'out of it' this morning. ;)

That is extremely easy as those blocks rely on imformation from the ssi functions.

These edits are for your SPortal(x).php file, replace (x) with your SMF version number, '1-1' or '2'.

Compact Recent Block:
Replace this code:
Code: [Select]
$items = $type($limit, null, null, 'array');
With this code:
Code: [Select]
$items = $type($limit, array(1, 2, 3), null, 'array');

Replace this code:
Code: [Select]
$posts = ssi_recentPosts($limit, null, null, 'array');
With this code:
Code: [Select]
$posts = ssi_recentPosts($limit, array(1, 2 ,3), null, 'array');
Replace this code:
Code: [Select]
$topics = ssi_recentTopics($limit, null, null, 'array');
With this code:
Code: [Select]
$topics = ssi_recentTopics($limit, array(1, 2 ,3), null, 'array');
Replace the '1, 2, 3' list, with a list of Board Ids that you want to hide If you onlt want to hide one board then just put the single ID there.
Title: Re: Recent Posts & Recent Topics
Post by: Verso on April 20, 2009, 03:54:26 AM
That worked a treat.........


Many thanks
SimplePortal 2.3.8 © 2008-2024, SimplePortal