1) am instalat Easy Sub-Forums - merge bine
2) am instalat Forum Icon with ACP Control - si functioneaza si asta, Dar icoanele nu apar si in sub-forum
De aici incepe munca de creatie:
Easy Sub-Forums aduce in wiewforum.php urmatorul cod :
aici am intervenit siwhile( $row = $db->sql_fetchrow($result2) )
{
$forum_data[] = $row;
}
$is_auth_ary = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata, $forum_data);
$x=0;
foreach ($forum_data as $row2 => $value)
{
if ($is_auth_ary[$value['forum_id']]['auth_view'])
{
$x++;
if ($x==1)
{
$template->assign_block_vars ('switch_attached_list',
array( 'L_ATTACHED_FORUM' => $lang['Attached_forums'],
'L_ATTACHED_TOPICS' => $lang['Topics'],
'L_ATTACHED_POSTS' => $lang['Posts'],
'L_LAST_POST'=>$lang['Last_Post']
)
);
}
$attach_forum_link = append_sid('viewforum.php?f=' . $value['forum_id']);
$attach_forum_name = '<a href="' . append_sid('viewforum.php?f=' . $value['forum_id']) . '">' . $value['forum_name'] . '</a>' ;
$attach_forum_desc = $value['forum_desc'];
$attach_forum_topics = $value['forum_topics'];
$attach_forum_posts = $value['forum_posts'];
$last_post_id = $value['forum_last_post_id'];
ce ma deranjeaza este ca daca nu atribui o imagine pt subforum in ACP pe forum imi afiseaza ca imagine lipsa. De aceea trebuie atribuita o imagine 1x1 acolo unde nu doriti totusi sa apara imagine.in loc de:
$attach_forum_name = '<a href="' . append_sid('viewforum.php?f=' . $value['forum_id']) . '">' . $value['forum_name'] . '</a>' ;
am scris:
$attach_forum_name = '<a href="' . append_sid('viewforum.php?f=' . $value['forum_id']) . '">' . '<img src="' . $phpbb_root_path . $value['forum_icon'] . '" alt="'.$forum_row['forum_name'].'" title="'.$forum_row['forum_name'].'" border="0" /> ' . $value['forum_name'] . '</a>' ;
Forumul este cel de mai jos .