SimplePortal

Customization => Blocks and Modifications => Block Requests => Topic started by: raffo on September 24, 2010, 07:52:18 AM

Title: Recent posts block
Post by: raffo on September 24, 2010, 07:52:18 AM
is possible to select the exact number id of the posts that will be shown?

not how many, but which... for ex.: posts id number 3 and 6
Title: Re: Recent posts block
Post by: AngelinaBelle on September 24, 2010, 10:23:38 AM
This won't do exactly what you want.
But you could copy function ab_customPageMsg and change it to do the subject.
Code: [Select]
// Change this
$msg_ids = array(3,6);
 
// You won't need to change what's below here
global $sourcedir;
@include_once ($sourcedir . '/Subs-ab.php'
foreach ($msg_ids as $msg_id)
{
     ab_customPageMsg($msg_id, TRUE);
     echo '
<br />
<hr />
';
}
Title: Re: Recent posts block
Post by: raffo on September 24, 2010, 12:17:39 PM
thanks, but i haven't understood what i have to do... :(

what do you mean for "change it to do the subject"?
Title: Re: Recent posts block
Post by: AngelinaBelle on September 24, 2010, 02:17:39 PM
The attached file goes in your Sources directory.
The code in the post goes in a php block.
 
If you like it, you may use it just like that.
If you want it a little different, you may change the file to do what you like.
 
I have learned a lot be copying other peoples' code and making small changes.  Maybe you can do the same.
 
Cheers!
Title: Re: Recent posts block
Post by: raffo on September 24, 2010, 02:20:20 PM
thanks!

i'll try it!!! :)
SimplePortal 2.3.8 © 2008-2024, SimplePortal