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?
No good deed goes unpunished / All helpful urges should be circumvented

I have something to say: it's better to burn out than to fade away. There can be only one.

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.
No good deed goes unpunished / All helpful urges should be circumvented

I have something to say: it's better to burn out than to fade away. There can be only one.

goldenstudios

only there are boards homepage

Arantor

And what theme are you using?
No good deed goes unpunished / All helpful urges should be circumvented

I have something to say: it's better to burn out than to fade away. There can be only one.


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.
No good deed goes unpunished / All helpful urges should be circumvented

I have something to say: it's better to burn out than to fade away. There can be only one.

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.
No good deed goes unpunished / All helpful urges should be circumvented

I have something to say: it's better to burn out than to fade away. There can be only one.

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.


"The best laid schemes o' mice an' men / Gang aft a-gley." - Robert Burns

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"/>


"The best laid schemes o' mice an' men / Gang aft a-gley." - Robert Burns

goldenstudios


Advertisement: