For all those who have this forum:
In the forum index page - when it loads, you can see categories > forums listing, but they are all expanded, and when you click on one category, other shrink and you get the one you need (point is that the space is preserved - for better overview of the categories - for those who havent met with this type of forum before)
Is there a way (and in what file) - to add this Javascript or php code.
I am administering this forum for the fist time, and havent find a spot/place - where to insert this code.
This is the idea for the code - If not good, do comment:
So basicaly - in computer mind I would tell him not to load forums (because he does it right now - I pressume), and then when clicked on some of them - just to tell him to do as it does right now - to open only that category.
Thanks Ahead !
phpBB 2 forums Question
Moderator: General Moderators
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Code: Select all
$viewcat = ( !empty($HTTP_GET_VARSїPOST_CAT_URL]) ) ? $HTTP_GET_VARSїPOST_CAT_URL] : -1;Code: Select all
//
// Should we display this category/forum set?
//
$display_forums = false;
for($j = 0; $j < $total_forums; $j++)
{
if ( $is_auth_aryї$forum_dataї$j]ї'forum_id']]ї'auth_view'] && $forum_dataї$j]ї'cat_id'] == $cat_id )
{
$display_forums = true;
}
}
//
// Yes, we should, so first dump out the category
// title, then, if appropriate the forum list
//
if ( $display_forums )
{
$template->assign_block_vars('catrow', array(
'CAT_ID' => $cat_id,
'CAT_DESC' => $category_rowsї$i]ї'cat_title'],
'U_VIEWCAT' => append_sid("index.$phpEx?" . POST_CAT_URL . "=$cat_id"))
);
if ( $viewcat == $cat_id || $viewcat == -1 )
{
for($j = 0; $j < $total_forums; $j++)
{
if ( $forum_dataї$j]ї'cat_id'] == $cat_id )
{
$forum_id = $forum_dataї$j]ї'forum_id'];
if ( $is_auth_aryї$forum_id]ї'auth_view'] )
{
if ( $forum_dataї$j]ї'forum_status'] == FORUM_LOCKED )
{
$folder_image = $imagesї'forum_locked'];
$folder_alt = $langї'Forum_locked'];
}
else
{