SimplePortal

Customization => Custom Coding => Topic started by: allemand1 on April 09, 2009, 05:00:12 PM

Title: [Help] Use $board['id'] in SPortal1-1.php!
Post by: allemand1 on April 09, 2009, 05:00:12 PM
I need to use $board['id'] in the function sp_recentTopics.
But it doesnt work... what i have to add to this function to work this command?
Title: Re: [Help] Use $board['id'] in SPortal1-1.php!
Post by: Nathaniel on April 09, 2009, 08:46:46 PM
What exactly do you want to do?

If you want to limit the boards from which topics are shown:
That function uses the 'ssi_recentTopics' function to get its data, you will have to edit that function call. You can send that function a list of boards that you don't want to have shown.

Find this code:
Code: [Select]
$topics = ssi_recentTopics($limit, null, 'array');
Replace with this code:
Code: [Select]
$topics = ssi_recentTopics($limit, array(1,2,3,4), 'array');
The '1,2,3,4' is a list of the boards to exclude.

If you want to display/use the board ID for a particular topic:
Use the variable $topic['board']['id'].
SimplePortal 2.3.8 © 2008-2024, SimplePortal