News:

Wondering if this will always be free?  See why free is better.

Main Menu

html in php. I need two Search Enginners

Started by nfmovil, May 10, 2016, 09:15:03 PM

Previous topic - Next topic

nfmovil

Hi, i need to use this code

<form id="vb_yt_search-form" action="https://www.youtube.com/user/servicell09/search?query=" method="get" target="_blank">
<table style="width: 100%" align="left" cellpadding="0" cellspacing="0">
<tr>
<td style="width: 680px">    Canal de Youtube :
<input id="vb_yt_search-term" name="query" type="text" maxlength="128" style="width: 300px" onblur="if (this.value == '') {this.value = 'Aqui poner el modelo o la falla';}"
onfocus="if (this.value == 'Aqui poner el modelo o la falla') {this.value = '';}" value="Aqui poner el modelo o la falla" />
<input type="submit" value="Buscar en el Canal Servicell" style="height: 26px" /> </td>
<td class="auto-style1"><strong>
<a href="http://www.youtube.com/subscription_center?add_user=servicell09" target="_blank"></a></strong></td>
</tr>
</table>
 
</form>


into this

// Simple Search?
if ($context['simple_search'])
{
echo '
<fieldset id="simple_search">
<span class="upperframe"><span></span></span>
<div class="roundframe">
<div id="search_term_input">
<strong>', $txt['search_for'], ':</strong>
<input type="text" name="search"', !empty($context['search_params']['search']) ? ' value="' . $context['search_params']['search'] . '"' : '', ' maxlength="', $context['search_string_limit'], '" size="40" class="input_text" />
', $context['require_verification'] ? '' : '&nbsp;<input type="submit" name="submit" value="' . $txt['search'] . '" class="button_submit" />
</div>';

if (empty($modSettings['search_simple_fulltext']))
echo '
<p class="smalltext">', $txt['search_example'], '</p>';

if ($context['require_verification'])
echo '
<div class="verification>
<strong>', $txt['search_visual_verification_label'], ':</strong>
<br />', template_control_verification($context['visual_verification_id'], 'all'), '<br />
<input id="submit" type="submit" name="submit" value="' . $txt['search'] . '" class="button_submit" />
</div>';

echo '
<a href="', $scripturl, '?action=search;advanced" onclick="this.href += \';search=\' + escape(document.forms.searchform.search.value);">', $txt['search_advanced'], '</a>
<input type="hidden" name="advanced" value="0" />
</div>
<span class="lowerframe"><span></span></span>
</fieldset>';
}


how can i use html code inside this php , Search.template.php?

BR

Dzonny

Hello there,

Open file Search.template.php from your themes folder (of from default if your custom theme doesn't have that file) and search for something like:
<fieldset id="simple_search">
<span class="upperframe"><span></span></span>
<div class="roundframe">
<div id="search_term_input">
<strong>', $txt['search_for'], ':</strong>
<input type="text" name="search"', !empty($context['search_params']['search']) ? ' value="' . $context['search_params']['search'] . '"' : '', ' maxlength="', $context['search_string_limit'], '" size="40" class="input_text" />
', $context['require_verification'] ? '' : '&nbsp;<input type="submit" name="submit" value="' . $txt['search'] . '" class="button_submit" />
</div>

That should be lines 33-40.
After that add your code, but be aware that you can't have single quotes inside templates, so just replace ' with " from your code above.

Advertisement: