Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: artvolt on July 07, 2020, 05:28:18 AM

Title: Buttons below the search form
Post by: artvolt on July 07, 2020, 05:28:18 AM
Please explain, how can place buttons below the search form.

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimages.vfl.ru%2Fii%2F1594113926%2Fe127bbf8%2F31008964_m.jpg&hash=784a2067d2e0febecff19b68954d6f5e0e7ed2b4)
Title: Re: Buttons below the search form
Post by: Looking on July 07, 2020, 06:03:06 AM
If there isn't a mod for it then you will have to edit your theme's index.template and insert the HTML for it.
Title: Re: Buttons below the search form
Post by: artvolt on July 07, 2020, 06:22:08 AM
I understand. Where exactly to make corrections in HTML "index.template", in which line???
Title: Re: Buttons below the search form
Post by: artvolt on July 07, 2020, 11:46:40 AM
Dear forum programmers "simplemachines.org", please explain how to make such buttons under the search form as in this support forum. Where and what changes should be made in "index.template"?

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimages.vfl.ru%2Fii%2F1594136766%2F4e694750%2F31013865_m.jpg&hash=6409e564566a1e8424ad0101b5c401541faa6c19)
Title: Re: Buttons below the search form
Post by: shadav on July 07, 2020, 12:03:36 PM
it is customary to wait 24 hours before bumping a topic (replying again)

and it would depend on what theme you are using

I'm going to assume you are using smf 2.0.17 and the default curve theme

so then
find
echo '
</div>
<div class="news normaltext">
<form id="search_form" action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
<input type="text" name="search" value="" class="input_text" />&nbsp;
<input type="submit" name="submit" value="', $txt['search'], '" class="button_submit" />
<input type="hidden" name="advanced" value="0" />';

// Search within current topic?
if (!empty($context['current_topic']))
echo '
<input type="hidden" name="topic" value="', $context['current_topic'], '" />';
// If we're on a certain board, limit it to this board ;).
elseif (!empty($context['current_board']))
echo '
<input type="hidden" name="brd[', $context['current_board'], ']" value="', $context['current_board'], '" />';

echo '</form>';

after add
echo '
YOUR CODE GOES HERE
';

obviously changing the YOUR CODE GOES HERE with your code
Title: Re: Buttons below the search form
Post by: artvolt on July 07, 2020, 03:12:18 PM
Shadav, many thanks!