SimplePortal
Support => English Support => Topic started by: DaRKeN on February 22, 2013, 06:28:07 PM
-
Hello, I'm using your main message code, exactly this:
You can even call the block functions, without the block template, using the proper parameters. And with some JavaScript, you can have pretty blocks like this:
http://simpleportal.net/index.php?page=blocks_in_block_sample#sp_collapse_54 (http://simpleportal.net/index.php?page=blocks_in_block_sample#sp_collapse_54)
global $txt;
$txt['recent_topics'] = 'Recent Topics';
$txt['recent_posts'] = 'Recent Posts';
$buttons = array(
'recent_topics' => array(
'text' => 'recent_topics',
'image' => '',
'lang' => true,
'url' => '#recent_topics" id="b_rt" onclick="change_display(\'rp\'); return false;',
'active' => true,
),
'recent_posts' => array(
'text' => 'recent_posts',
'image' => '',
'lang' => true,
'url' => '#recent_posts" id="b_rp" onclick="change_display(\'rt\'); return false;',
),
);
echo '
<div style="overflow: auto;">
', template_button_strip($buttons), '
</div>
<div id="recent_topics">
', sp_recent(array('type' => 1, 'display' => 1), 0), '
</div>
<div id="recent_posts" style="display: none;">
', sp_recent(array('display' => 1), 0), '
</div>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
function change_display(block)
{
var current = block == \'rt\' ? 1 : 0;
document.getElementById(\'recent_topics\').style.display = current ? \'none\' : \'\';
document.getElementById(\'recent_posts\').style.display = current ? \'\' : \'none\';
document.getElementById(\'b_rt\').className = current ? \'button_strip_recent_topics\' : \'button_strip_recent_topics active\';
document.getElementById(\'b_rp\').className = current ? \'button_strip_recent_posts active\' : \'button_strip_recent_posts\';
}
// ]]></script>';
But it shows me only 5 posts and 5 new songs, as could control the number of posts and topics to display?
Thank you.
-
These blocks have parameters to control the number of posts displayed.
* Please check the settings for the blocks you are displaying
* If you find that, no matter how high you set the number of posts/topics to display, you are still getting limitations on the number of recent posts or topics displayed, please see the discussion in http://simpleportal.net/index.php?topic=12186.0