- Posts: 3
- Thank you received: 0
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
Question Putting the search function somewhere else?
- harrybarry
-
Topic Author
- Offline
- New Member
-
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!
Please Log in or Create an account to join the conversation.
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 . '&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 . '&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.
Please Log in or Create an account to join the conversation.
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 . '&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
Please Log in or Create an account to join the conversation.
- jenmgregory
-
- Offline
- New Member
-
- Posts: 5
- Thank you received: 0
Please Log in or Create an account to join the conversation.
'\') this.value=\'' . _GEN_SEARCH_BOX . '\';" onfocus="if(this.value=