SimplePortal

Support => English Support => Topic started by: lastone on January 22, 2010, 02:50:50 PM

Title: How I can show all forum catagories in block & span Global Header and footer???
Post by: lastone on January 22, 2010, 02:50:50 PM
Hi ,
I use SMF 1.1.11 + simpleportal 2.3.1

i have some question
- How I can show all forum catagories in block???
- How I can colspan Global Header and footer 3 column???

Thank You.
This is best mod.
Title: Re: How I can show all forum catagories in block & span Global Header and footer???
Post by: [SiNaN] on January 29, 2010, 10:14:35 AM
- How I can show all forum catagories in block???

You can use this code in a PHP Block (from this (http://simpleportal.net/index.php?topic=1532.0) topic):

Code: [Select]
global $cat_tree, $boards, $boardList, $scripturl, $sourcedir, $user_info, $db_prefix;

$child_depth = 2;

require_once($sourcedir . '/Subs-Boards.php');
getBoardTree();

// Remobe any boards this user can't actually see.
$temp_boards = $boards;
$request = db_query("
SELECT b.ID_BOARD
FROM {$db_prefix}boards AS b
WHERE !($user_info[query_see_board])", __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($request))
unset($temp_boards[$row['ID_BOARD']]);
mysql_free_result($request);

echo '
<div style="padding-left:2px;">';

foreach ($cat_tree as $catid => $tree)
{
echo '
<span class="sp_navigation_block_cat" style="font-weight:bold;"><a href="', $scripturl, '?action=forum#', $tree['node']['id'], '">', $tree['node']['name'], '</a></span><br />';

foreach ($boardList[$catid] as $boardid)
{
if (empty($temp_boards[$boardid]) || ($boards[$boardid]['level'] > $child_depth))
continue;

$prefix = '';
for ($i=0; $i<=$boards[$boardid]['level']; $i++)
$prefix .= '-';

echo '
', $prefix, '<span class="sp_navigation_block_board"><a href="', $scripturl, '?board=', $boards[$boardid]['id'], '">', $boards[$boardid]['name'], '</a></span><br />';
}
}

echo '
</div>';

- How I can colspan Global Header and footer 3 column???

That's not possible as of yet. I guess it will be added in the future versions though.
SimplePortal 2.3.8 © 2008-2024, SimplePortal