1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-19 20:21:51 +02:00

Download search template fix.

This commit is contained in:
Cameron 2014-01-05 11:26:19 -08:00
parent 42c3588e29
commit 39e3a1b021
2 changed files with 28 additions and 8 deletions

View File

@ -34,7 +34,7 @@ if (!e107::isInstalled('download'))
if(deftrue('BOOTSTRAP'))
{
define("IMAGE_DOWNLOAD", (file_exists(THEME."images/download.png") ? THEME."images/download.png" : e_IMAGE."generic/download.png"));
define("IMAGE_NEW", (file_exists(THEME."images/new.png") ? THEME."images/new.png" : e107::getParser()->toGlyph('icon-star',false)));
define("IMAGE_NEW", (file_exists(THEME."images/new.png") ? THEME."images/new.png" : 'icon-star.glyph'));
}
else
{

View File

@ -867,12 +867,30 @@ class download_shortcodes extends e_shortcode
function sc_download_cat_search()
{
return "<form class='form-search' method='get' action='".e_BASE."search.php'>
<p>
<input class='tbox search-query' type='text' name='q' size='30' value='' placeholder=\"".LAN_dl_41."\" maxlength='50' />
<input class='btn btn-primary button' type='submit' name='s' value='".LAN_GO."' />
$text = "<form class='form-search form-inline' method='get' action='".e_BASE."search.php'>";
$text .= '<div><div class="input-group">';
$text .= "<input class='tbox form-control search-query' type='text' name='q' size='30' value='' placeholder=\"".LAN_dl_41."\" maxlength='50' />
<input type='hidden' name='r' value='0' />
<input type='hidden' name='t' value='downloads' />
";
$text .= '
<span class="input-group-btn">
<button class="btn btn-default" type="submit" name="s" value="1">
<span class="glyphicon glyphicon-search"></span>
</button>
</span>
</div><!-- /input-group -->
</div></form>';
return $text;
return "<form class='form-search form-inline' method='get' action='".e_BASE."search.php'>
<div class='input-group'>
<input class='tbox form-control search-query' type='text' name='q' size='30' value='' placeholder=\"".LAN_dl_41."\" maxlength='50' />
<button class='btn btn-primary button' type='submit' name='s' value='1' />".LAN_GO."</button>
<input type='hidden' name='r' value='0' />
</p>
</div>
</form>";
}
@ -906,12 +924,14 @@ class download_shortcodes extends e_shortcode
private function renderNewIcon()
{
if(strstr(IMAGE_NEW,'<i '))
if(strstr(IMAGE_NEW,'<i ') || strstr(IMAGE_NEW,'<span'))
{
return IMAGE_NEW;
}
return e107::getParser()->toIcon(IMAGE_NEW);
return "<img src='".IMAGE_NEW."' alt='*' style='vertical-align:middle' />";
// return "<img src='".IMAGE_NEW."' alt='*' style='vertical-align:middle' />";
}
}
?>