moving search box

Started by goldenstudios, June 16, 2020, 01:09:12 PM

Previous topic - Next topic

goldenstudios


hi how can I put the search bar on the homepage above all threads?

Arantor

On the *homepage* where there are boards, or on the list of topics, above the topics? Or both?

Should the search box have all the same filters it currently does?

goldenstudios



I would like to put the search bar just above the top thread list
ex:

and secondly I would like to improve the search method but this could be done after I moved the block


Arantor

You didn't answer my question but this can't be done without you answering my questions.

goldenstudios

only there are boards homepage

Arantor

And what theme are you using?


Arantor

So there's nothing to remove from the index.template.php of the theme, and you'll need to modify the theme's BoardIndex.template.php (the Aqua one, not the Curve one)

Code (find) Select

function template_main()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;

// Show some statistics if stat info is off.


Code (replace) Select

function template_main()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;

echo '
<form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '" style="margin: 10px auto 20px auto; text-align: center;">
    <input type="text" name="search" class="input_text">
    <input type="submit" name="submit" value="Go" class="button_submit">
</form>';

// Show some statistics if stat info is off.

goldenstudios


it works thank you very much  ;) ;)... if I wanted to add a writing next to the box to the left how can I do?

Arantor

function template_main()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;

echo '
<form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '" style="margin: 10px auto 20px auto; text-align: center;">
    My text goes here: <input type="text" name="search" class="input_text">
    <input type="submit" name="submit" value="Go" class="button_submit">
</form>';

// Show some statistics if stat info is off.

goldenstudios

thanks a lot man ;) work
if I want to lengthen the search bar?

Sir Osis of Liver



function template_main()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;

echo '
<form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '" style="margin: 10px auto 20px auto; text-align: center;">
    <input type="text" name="search" class="input_text" size="50">
    <input type="submit" name="submit" value="Go" class="button_submit">
</form>';

// Show some statistics if stat info is off.


Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

goldenstudios

thanks, last thing if you want to highlight the edge of the box look in red is it possible?

Sir Osis of Liver



<input type="text" name="search" value="" class="input_text" size="50" style="border: 2px red solid"/>


Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

goldenstudios


Advertisement: