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 Putting the search function somewhere else?

More
16 years 9 months ago - 16 years 9 months ago #22503 by harrybarry
Hey all,

I'm trying this great software out on my site but If you go www.werkict.com
you will see (top right) that the search function is below a menu module when you are logged in. I was wondering what would be the best solution for this visual glitch? I was thinking that placing the search button somewhere else in the forum might do the trick. Hope you can point me in the right direction to make it visual descent.
Thanks in advance! ;)
Last edit: 16 years 9 months ago by harrybarry.

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

More
16 years 9 months ago #23075 by Lintzy
Here is a solution, that I figured out - like on the screenshot.







This works with Kunena 1.5.3 and Template default_ex


edit profilebox.php (components/com_kunena/template/default/plugin/profilebox)

and ADD the red marked code between line 208 and 209

<td>
<div class = "fb_profilebox_modul">
<?php
$document = &JFactory::getDocument();
$renderer = $document->loadRenderer('modules');
$options = array('style' => 'xhtml');
$position = 'kunena_profilebox';
echo $renderer->render($position, $options, null);
?>
</div>
</td>

<?php
}
?>
<td valign = "middle" class = "td-1 fbm fb_profileboxcnt" align="right"><?php
{
echo '<div id="fb_searchbox"><form action="' . JRoute::_(KUNENA_LIVEURLREL . '&amp;func=search') . '" name="searchFB" method="post">';
$boxsize = strlen(_GEN_SEARCH_BOX);

if ($boxsize <= 15)
$boxsize = 15;

echo '<input class="fb_search_inputbox fbs" type="text" name="q" size="'. $boxsize . '" value="' . _GEN_SEARCH_BOX . '" onblur="if(this.value==\'\') this.value=\'' . _GEN_SEARCH_BOX . '\';" onfocus="if(this.value==\'' . _GEN_SEARCH_BOX . '\') this.value=\'\';" />';
echo ' <input type="submit" value="'._KUNENA_GO.'" name="submit" class="fb_button fbs"/>';
echo '</form></div>';

}
?></td>

</tr>
</tbody>


Edit fb_layout.php (/components/com_kunena/template/default_ex)

and DELETE the red marked code (line 287 - 296)

function getSearchBox()
{
$return = '<div id="fb_searchbox"><form action="' . JRoute::_(KUNENA_LIVEURLREL . '&amp;func=search') . '" name="searchFB" method="post">';
$boxsize = strlen(_GEN_SEARCH_BOX);

if ($boxsize <= 15)
$boxsize = 15;

$return .= '<input class="fb_search_inputbox fbs" type="text" name="q" size="'. $boxsize . '" value="' . _GEN_SEARCH_BOX . '" onblur="if(this.value==\'\') this.value=\'' . _GEN_SEARCH_BOX . '\';" onfocus="if(this.value==\'' . _GEN_SEARCH_BOX . '\') this.value=\'\';" />';
$return .= ' <input type="submit" value="'._KUNENA_GO.'" name="submit" class="fb_button fbs"/>';
$return .= '</form></div>';
return $return;

}
?>


Last step (than it looks good in IE8 too)
edit header.html (/components/com_kunena/template/default_ex)

and DELETE the red marked line

<table width="100%" border="0" cellspacing="0" cellpadding="0" id="Kunena_top">
<tr>
<td align="left" nowrap="nowrap">{MENU}</td>
<td align="right" width="5%">{SEARCHBOX}</td>
<td align="right" width="1%" ><img id="BoxSwitch_topprofilebox__topprofilebox_tbody" class="hideshow" src="{PB_IMGSWITCHURL}" alt="" /></td>
</tr>
</table>



IMPORTANT:


I have seen that you are using a modified template:
Versie: 1.1.8 NL Ultimate: Jelle Kok , Officiele versie door: Kunena

So the line numbers may be different. Please check the code exactly ;)

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

More
16 years 9 months ago #23076 by Spock
Lintzy a BIG Thank you ;)

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

More
16 years 9 months ago - 16 years 9 months ago #23134 by Lintzy
You are welcome :)

I have forgotten something very important. My solution above only works, if you are logged out. To see the searchbox also, when you are logged in, you must ADD additional code (red marked) into profilebox.php (between line 161 and 162)

<td>
<div class = "fb_profilebox_modul">
<?php
$document = &JFactory::getDocument();
$renderer = $document->loadRenderer('modules');
$options = array('style' => 'xhtml');
$position = 'kunena_profilebox';
echo $renderer->render($position, $options, null);
?>
</div>
</td>
<?php
}
?>
<td valign = "middle" class = "td-2 fbm fb_profileboxcnt" align="right"><?php
{
echo '<div id="fb_searchbox"><form action="' . JRoute::_(KUNENA_LIVEURLREL . '&amp;func=search') . '" name="searchFB" method="post">';
$boxsize = strlen(_GEN_SEARCH_BOX);

if ($boxsize <= 15)
$boxsize = 15;

echo '<input class="fb_search_inputbox fbs" type="text" name="q" size="'. $boxsize . '" value="' . _GEN_SEARCH_BOX . '" onblur="if(this.value==\'\') this.value=\'' . _GEN_SEARCH_BOX . '\';" onfocus="if(this.value==\'' . _GEN_SEARCH_BOX . '\') this.value=\'\';" />';
echo ' <input type="submit" value="'._KUNENA_GO.'" name="submit" class="fb_button fbs"/>';
echo '</form></div>';

}
?></td>

</tr>
</tbody>
</table>

<?php
}
else
{
// LOGOUT AREA

Last edit: 16 years 9 months ago by Lintzy.

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

More
16 years 9 months ago #25028 by jenmgregory
This is an excellent tip and I'm glad I found it!

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

Time to create page: 0.244 seconds