mirror of
https://github.com/e107inc/e107.git
synced 2025-08-05 06:07:32 +02:00
Forum {SEARCH} updated to include placeholder
This commit is contained in:
@@ -164,6 +164,10 @@ class forum_shortcodes extends e_shortcode
|
|||||||
return $text;
|
return $text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @example {SEARCH: placeholder=Search forums} - sets placeholder 'Search forums'
|
||||||
|
* @example {SEARCH: buttonclass=btn btn-small} - sets button class 'btn btn-small'
|
||||||
|
*/
|
||||||
function sc_search($parm=null)
|
function sc_search($parm=null)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -172,8 +176,8 @@ class forum_shortcodes extends e_shortcode
|
|||||||
$srchIcon = LAN_SEARCH;
|
$srchIcon = LAN_SEARCH;
|
||||||
}
|
}
|
||||||
|
|
||||||
$buttonclass = (!empty($parm['buttonclass'])) ? "class='".$parm['buttonclass']."'" : "class='btn btn-default btn-secondary button'";
|
$buttonclass = (!empty($parm['buttonclass'])) ? "class='".$parm['buttonclass']."'" : "class='btn btn-default btn-secondary button'";
|
||||||
|
$placeholder = (!empty($parm['placeholder'])) ? $parm['placeholder'] : LAN_SEARCH;
|
||||||
|
|
||||||
// String candidate for USERLIST wrapper
|
// String candidate for USERLIST wrapper
|
||||||
return "
|
return "
|
||||||
@@ -182,7 +186,7 @@ class forum_shortcodes extends e_shortcode
|
|||||||
<input type='hidden' name='r' value='0' />
|
<input type='hidden' name='r' value='0' />
|
||||||
<input type='hidden' name='t' value='forum' />
|
<input type='hidden' name='t' value='forum' />
|
||||||
<input type='hidden' name='forum' value='all' />
|
<input type='hidden' name='forum' value='all' />
|
||||||
<input class='tbox form-control' type='text' name='q' size='20' value='' maxlength='50' />
|
<input class='tbox form-control' type='text' name='q' size='20' value='' placeholder='".$placeholder."' maxlength='50' />
|
||||||
<span class='input-group-btn'>
|
<span class='input-group-btn'>
|
||||||
<button ".$buttonclass." type='submit' name='s' value='search' >".$srchIcon."</button>
|
<button ".$buttonclass." type='submit' name='s' value='search' >".$srchIcon."</button>
|
||||||
</span>
|
</span>
|
||||||
|
@@ -306,7 +306,10 @@
|
|||||||
return empty($viewable) ? '' : $viewable;
|
return empty($viewable) ? '' : $viewable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @example {SEARCH: placeholder=Search forums} - sets placeholder 'Search forums'
|
||||||
|
* @example {SEARCH: buttonclass=btn btn-small} - sets button class 'btn btn-small'
|
||||||
|
*/
|
||||||
function sc_search($parm=null)
|
function sc_search($parm=null)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -315,8 +318,8 @@
|
|||||||
$srchIcon = LAN_SEARCH;
|
$srchIcon = LAN_SEARCH;
|
||||||
}
|
}
|
||||||
|
|
||||||
$buttonclass = (!empty($parm['buttonclass'])) ? "class='".$parm['buttonclass']."'" : "class='btn btn-default btn-secondary button'";
|
$buttonclass = (!empty($parm['buttonclass'])) ? "class='".$parm['buttonclass']."'" : "class='btn btn-default btn-secondary button'";
|
||||||
|
$placeholder = (!empty($parm['placeholder'])) ? $parm['placeholder'] : LAN_SEARCH;
|
||||||
|
|
||||||
// String candidate for USERLIST wrapper
|
// String candidate for USERLIST wrapper
|
||||||
return "
|
return "
|
||||||
@@ -325,7 +328,7 @@
|
|||||||
<input type='hidden' name='r' value='0' />
|
<input type='hidden' name='r' value='0' />
|
||||||
<input type='hidden' name='t' value='forum' />
|
<input type='hidden' name='t' value='forum' />
|
||||||
<input type='hidden' name='forum' value='all' />
|
<input type='hidden' name='forum' value='all' />
|
||||||
<input class='tbox form-control' type='text' name='q' size='20' value='' maxlength='50' />
|
<input class='tbox form-control' type='text' name='q' size='20' value='' placeholder='".$placeholder."' maxlength='50' />
|
||||||
<span class='input-group-btn'>
|
<span class='input-group-btn'>
|
||||||
<button ".$buttonclass." type='submit' name='s' value='search' >".$srchIcon."</button>
|
<button ".$buttonclass." type='submit' name='s' value='search' >".$srchIcon."</button>
|
||||||
</span>
|
</span>
|
||||||
|
Reference in New Issue
Block a user