1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-06 14:46:56 +02:00

Added basic FAQ breadcrumb. More work to do.

This commit is contained in:
Cameron
2014-09-09 20:22:59 -07:00
parent 542fe9252d
commit 58d18da177
2 changed files with 111 additions and 30 deletions

View File

@@ -185,11 +185,37 @@ class faqs_shortcodes extends e_shortcode
}
}
function sc_faq_search()
function sc_faq_search($parm='')
{
if($parm == 'ajax') //TODo Ajax JS.
{
$frm = e107::getForm();
$tp = e107::getParser();
$text = $frm->open('faq-search-form','get', e_REQUEST_SELF);
$text .= '<span class="input-group e-search">';
$text .= $frm->text('srch', $_GET['srch'], 20,'class=search-query&placeholder='.LAN_SEARCH).'
<span class="input-group-btn"><button class="btn btn-primary" type="submit">'.$tp->toGlyph('fa-search').'</button>';
$text .= '</span></span>';
$text .= $frm->close();
return $text;
}
return ''; // UNDER CONSTRUCTION
$tp = e107::getParser();
return "<div style='text-align:center'><br />".$tp->parseTemplate("{SEARCH=faqs}")."</div>";
}
function sc_faq_breadcrumb() //TODO Category Detection. and proper SEF Urls with category names.
{
$array = array();
$array[0] = array('url'=> e_REQUEST_SELF, 'text'=>LAN_PLUGIN_FAQS_NAME);
return e107::getForm()->breadcrumb($array);
}
}