Kunena 7.0.4 Released

The Kunena team has announce the arrival of Kunena 7.0.4 [K 7.0.4] in stable which is now available for download as a native Joomla extension for J! 5.4.x/6.0.x. This version addresses most of the issues that were discovered in K 6.2 / K 6.3 / K 6.4 and issues discovered during the last development stages of K 7.0

Topics that are moved into this category are generally considered to be closed. Users may want to add additional information but these topics should not be resurrected in order to discuss new problems or unrelated matters.

Question Is there any way to add different images to tabs ?

More
16 years 9 months ago #22838 by google
Hi, i'm designing a new template. Because my skills are limited I'm wondering if anyone can help me. I want to add for every tab another image, is there any way to do this ? Of course I'm talking about modifying the code.
Thank you.

Please Log in or Create an account to join the conversation.

More
16 years 9 months ago #22841 by Lintzy
Yes, it is possible. You must give every <li> tag an own ID. I have done it for you (kunena 1.5.3 / template default_ex) i named them tab1, tab2, tab3, see red marked code.

These IDs you can design with CSS.

File fb_layout_php

line 190 - 281

$header .= ' <li id="tab1" ';
if ($func == 'latest' || $func == '') $header .= ' class="Kunena_item_active" ';
$header .=' >'.CKunenaLink::GetShowLatestLink('<span>'.(array_key_exists('showlatest', $fbIcons) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons . '" border="0" alt="' . _KUNENA_ALL_DISCUSSIONS . '" title="' . _KUNENA_ALL_DISCUSSIONS . '"/>' : _KUNENA_ALL_DISCUSSIONS).'</span>');
$header .= '</li>';

if ($my_id != 0)
{
$header .= ' <li id="tab2" ';
if ($func == 'mylatest') $header .= ' class="Kunena_item_active" ';
$header .=' >'.CKunenaLink::GetShowMyLatestLink('<span>'.(array_key_exists('showmylatest', $fbIcons) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons . '" border="0" alt="' . _KUNENA_MY_DISCUSSIONS . '" title="' . _KUNENA_MY_DISCUSSIONS . '"/>' : _KUNENA_MY_DISCUSSIONS).'</span>');
$header .= '</li>';
}

$header .= '<li id="tab3" ';
if ($func == 'listcat' ) $header .= ' class="Kunena_item_active" ';
$header .=' >'.CKunenaLink::GetCategoryListLink('<span>'.(array_key_exists('home', $fbIcons) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons . '" border="0" alt="' . _KUNENA_CATEGORIES . '" title="' . _KUNENA_CATEGORIES . '" />' : _KUNENA_CATEGORIES).'</span>');
$header .= '</li>';

if ($my_id != 0)
{
$header .= ' <li id="tab4" ';
if ($func == 'myprofile' ) $header .= ' class="Kunena_item_active" ';
$header .=' >'.CKunenaLink::GetMyProfileLink($fbConfig, $my_id, '<span>'.(array_key_exists('profile', $fbIcons) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons . '" border="0" alt="' . _GEN_MYPROFILE . '" title="' . _GEN_MYPROFILE . '"/>' : _GEN_MYPROFILE).'</span>');
$header .= '</li>';
}

switch ($type)
{
case 3:
//Threaded view option removed from Kunena
// if ($view == "flat") {
// $header .= '<li>';
// $header .= CKunenaLink::GetViewLink('view', $id, $catid, 'threaded', '<span>'. _GEN_THREADED_VIEW .'</span>');
// $header .= '</li>';
// }
// else
// {
// $header .= '<li>';
// $header .= CKunenaLink::GetViewLink('view', $id, $catid, 'flat', '<span>'. _GEN_FLAT_VIEW .'</span>');
// $header .= '</li>';
// }

break;

case 2:
//Threaded view option removed from Kunena
// if ($view == "flat")
// {
// $header .= '<li>';
// $header .= CKunenaLink::GetViewLink('showcat', $id, $catid, 'threaded', '<span>'. _GEN_THREADED_VIEW .'</span>');
// $header .= '</li>';
// }
// else
// {
// $header .= '<li>';
// $header .= CKunenaLink::GetViewLink('showcat', $id, $catid, 'flat', '<span>'. _GEN_FLAT_VIEW .'</span>');
// $header .= '</li>';
// }
if ($is_moderator)
{
if ($numPending > 0)
{
$numcolor = '<font color="red">';
$header .= '<li>';
$header .= CKunenaLink::GetPendingMessagesLink( $catid, '<span>'.(array_key_exists('pendingmessages', $fbIcons)
? '<img src="' . KUNENA_URLICONSPATH . $fbIcons . '" border="0" alt="' . $numPending . ' ' . _SHOWCAT_PENDING . '" />' : $numcolor . '' . $numPending . '</font> ' . _SHOWCAT_PENDING).'</span>');
$header .= '</li>';
}
}
break;

case 1:
default:

break;
}

if ($fbConfig->enablerulespage)
{
$header .= ' <li id="tab5" ';
if ($func == 'rules' ) $header .= ' class="Kunena_item_active" ';
$header .= ' >'.CKunenaLink::GetRulesLink($fbConfig, '<span>'.(array_key_exists('rules', $fbIcons) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons . '" border="0" alt="' . _GEN_RULES . '" title="' . _GEN_RULES . '"/>' : _GEN_RULES).'</span>');
$header .= '</li>';
}
if ($fbConfig->enablehelppage)
{
$header .= ' <li id="tab6" ';
if ($func == 'faq' ) $header .= ' class="Kunena_item_active" ';
$header .= ' >'.CKunenaLink::GetHelpLink($fbConfig, '<span>'.(array_key_exists('help', $fbIcons) ? '<img src="' . KUNENA_URLICONSPATH . $fbIcons . '" border="0" alt="' . _GEN_HELP . '" title="' . _GEN_HELP . '"/>' : _GEN_HELP).'</span>');
$header .= '</li>';
}

Please Log in or Create an account to join the conversation.

More
16 years 9 months ago #22847 by google
Hmm, it doesn't work , i must be doing something wrong.
For example I set this id for testing but it doesn't seem to work:

#tab1 {
background:transparent url(images/kunena.logo.png) no-repeat;
}

I'm sure i'm missing something.

Please Log in or Create an account to join the conversation.

More
16 years 9 months ago #22849 by Lintzy
google wrote:

Hmm, it doesn't work , i must be doing something wrong.
For example I set this id for testing but it doesn't seem to work:

{
background:transparent url(images/kunena.logo.png) no-repeat;
}

I'm sure i'm missing something.


you have two possibilities:


li#tab1 {
list-style-image: url(images/kunena.logo.png);
}

or

li#tab1 {
background: url(images/kunena.logo.png) no-repeat left center;
}

for "left" (horizontal) and "center" (vertical) you can put px in it, to place it exactly.

Please Log in or Create an account to join the conversation.

More
16 years 9 months ago - 16 years 9 months ago #22861 by google
I don't know where i'm wrong but it doesn't work. I've attached here kunena.forum.css and fb_layout.php from default_ex template. I only added tab1 to categories in fb_layout.

File Attachment:

File Name: files.zip
File Size:9.08 KB
Last edit: 16 years 9 months ago by google.

Please Log in or Create an account to join the conversation.

More
16 years 9 months ago - 16 years 9 months ago #22862 by Lintzy
There is no attachment, please give me an url to your forum.

Edit: Ok, now there is the attachement ;) , but could you give me the url to your forum, please? I must look live site.
Last edit: 16 years 9 months ago by Lintzy.

Please Log in or Create an account to join the conversation.

Time to create page: 0.283 seconds