我是OSClass的新用戶。此代碼從oc-content\themes\modern\inc.search.php
,在OSClass的搜索欄中添加地點搜索選項
<form action="<?php echo osc_base_url(true); ?>" method="get" class="search" onsubmit="javascript:return doSearch();">
<input type="hidden" name="page" value="search" />
<fieldset class="main">
<input type="text" name="sPattern" id="query" value="<?php echo osc_esc_html((osc_search_pattern() != '') ? osc_search_pattern() : $sQuery); ?>" />
<?php if (osc_count_categories()) { ?>
<?php osc_categories_select('sCategory', null, __('Select a category', 'modern')); ?>
<?php } ?>
<button type="submit"><?php _e('Search', 'modern'); ?></button>
</fieldset>
<div id="search-example"></div>
</form>
在這裏,我需要添加一個選項來搜索。那就是地方,與#查詢相同。我能做什麼?
在哪裏我可以改變(s)好工作,以此搜索?
我知道下面的代碼,
<input type="text" name="sCity" id="sCity" value="<?php _e('Enter your city here'); ?>" />
認爲我們給的結果類似以下,
但是,我的要求是sCity
也一樣sPattern
。請參閱兩者中的value
。 sPattern在重定向時顯示相同的結果。但sCity不會。我需要它。
抱歉不好英語。 – KarSho 2013-03-08 09:31:20