search working, updated system reference
This commit is contained in:
parent
b41a0ed8d8
commit
82a512b074
@ -1 +1 @@
|
|||||||
Subproject commit 45543a45b8bd0f6277edf66b66bf88e8dc29f086
|
Subproject commit ab1f4a62e8c4653b8f0663e5c1f83ac4e8a423b3
|
||||||
@ -7,12 +7,12 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
function search(){
|
function search(){
|
||||||
$("#nav_search_btn").click(function(){
|
$("#nav_search_btn").click(function(){
|
||||||
$('#contentframe').load('./?page=search¶m='+$('#nav_search').val());
|
system.load('search;param.'+$('#nav_search').val());
|
||||||
});
|
});
|
||||||
$(document).keypress(function(e) {
|
$(document).keypress(function(e) {
|
||||||
var hasFocus = $('#nav_search').is(':focus');
|
var hasFocus = $('#nav_search').is(':focus');
|
||||||
if(e.which === 13 && hasFocus) {
|
if(e.which === 13 && hasFocus) {
|
||||||
$('#contentframe').load('./?page=search¶m='+$('#nav_search').val());
|
system.load('search;param.'+$('#nav_search').val());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -22,26 +22,5 @@ function tabs(){
|
|||||||
$('#tabs_user_list li').each(function(){
|
$('#tabs_user_list li').each(function(){
|
||||||
$(this).removeClass('active');});
|
$(this).removeClass('active');});
|
||||||
$(this).parent().addClass('active');
|
$(this).parent().addClass('active');
|
||||||
//system.load('start;filter.'+$(this).attr('filter'));
|
|
||||||
//btn_element();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/*function btn_element(){
|
|
||||||
$(".list_element").click(function(){
|
|
||||||
system.load('article;article.'+$(this).attr('text_id'))
|
|
||||||
//load_element($(this).attr('text_id'));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function load_element(text_id){
|
|
||||||
$('#contentframe').load('./?page=get_element&text_id=' + text_id, function(){
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function load_list(filter){
|
|
||||||
$('#contentframe').load('./?page=get_list&filter=' + filter, function(){
|
|
||||||
btn_element();
|
|
||||||
});
|
|
||||||
}*/
|
|
||||||
@ -8,15 +8,16 @@ class default_search extends \SYSTEM\PAGE\Page {
|
|||||||
|
|
||||||
public function html(){
|
public function html(){
|
||||||
$vars = array();
|
$vars = array();
|
||||||
|
$vars['title'] = $this->param;
|
||||||
$vars['search'] = '';
|
$vars['search'] = '';
|
||||||
$elements = \DBD\NEOPOLIMATRIX_GENERATE_ELEMENTLIST_FULLTEXT_SEARCH::QA(array('%'.$this->param.'%','%'.$this->param.'%'));
|
$elements = \SYSTEM\PAGE\text::search($this->param, 'neopolimatrix');
|
||||||
foreach($elements as $element){
|
foreach($elements as $element){
|
||||||
$element['title'] = $element['id'];
|
$element['title'] = $element['id'];
|
||||||
$element['published'] = date_format(new DateTime($element['timestamp']), 'H:i d-m-Y');
|
$element['published'] = date_format(new DateTime($element['time_create']), 'H:i d-m-Y');
|
||||||
$element['ago'] = \SYSTEM\time::time_ago_string(strtotime($element['timestamp']));
|
$element['ago'] = \SYSTEM\time::time_ago_string(strtotime($element['time_create']));
|
||||||
$vars['search'] .= SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_search/tpl/element.tpl'), $element);
|
$vars['search'] .= SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_search/tpl/element.tpl'), $element);
|
||||||
}
|
}
|
||||||
$vars['title'] = $this->param;
|
$vars = array_merge($vars, \SYSTEM\PAGE\text::tag('time'));
|
||||||
return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_search/tpl/search.tpl'), $vars);
|
return SYSTEM\PAGE\replace::replaceFile(SYSTEM\SERVERPATH(new PPAGE(),'default_search/tpl/search.tpl'), $vars);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,10 +1,10 @@
|
|||||||
<div style="width: 750px; margin: auto; margin-bottom: 50px; text-align: justify;">
|
<div style="width: 750px; margin: auto; margin-bottom: 50px; text-align: justify;">
|
||||||
<p style="float: left; font-size: 10pt; margin-top: 7px;">Author: <i>${author}</i></p>
|
<p style="float: left; font-size: 10pt; margin-top: 7px;">Author: <i>${author_name}</i></p>
|
||||||
<p style="float: right; font-size: 10pt; margin-top: 7px;">Veröffentlicht: ${timestamp}</p>
|
<p style="float: right; font-size: 10pt; margin-top: 7px;">Veröffentlicht: ${ago}</p>
|
||||||
<div style="clear: both;"></div>
|
<div style="clear: both;"></div>
|
||||||
<div style="border-top: solid 1px black; width: 100%;"></div>
|
<div style="border-top: solid 1px black; width: 100%;"></div>
|
||||||
<h2>${title}</h2>
|
<h2>${title}</h2>
|
||||||
<br>
|
<br>
|
||||||
${deDE}
|
${text}
|
||||||
<br>
|
<br>
|
||||||
</div>
|
</div>
|
||||||
@ -1,5 +0,0 @@
|
|||||||
<?php
|
|
||||||
class PLIB extends \SYSTEM\PATH {
|
|
||||||
public static function getPath(){
|
|
||||||
return \SYSTEM\C_ROOT.'neopolimatrix/lib/'.\SYSTEM\C_SUBPATH;}
|
|
||||||
}
|
|
||||||
Loading…
x
Reference in New Issue
Block a user