+ removing of the result sidebar

This commit is contained in:
kelson42 2011-03-18 07:07:44 +00:00
parent 9e8ebdaf6e
commit 5e162d6f47
2 changed files with 13 additions and 14 deletions

View File

@ -35,7 +35,6 @@ namespace kiwix {
}
searchInIndex(removeAccents(search), resultsCount, verbose);
this->resultOffset = this->results.begin();
return;
@ -72,10 +71,9 @@ namespace kiwix {
return retVal;
}
const string Searcher::searchInIndexAndReturnHtml(string &search, const unsigned int resultsCount,
const string templatePath, const bool verbose) {
const string Searcher::getHtml() {
const STLW::string & sSourceFile = "/tmp/hello.tmpl";
const STLW::string & sSourceFile = "/var/www/kiwix/moulinkiwix/templates/results.tmpl";
VMOpcodeCollector oVMOpcodeCollector;
StaticText oSyscalls;
StaticData oStaticData;
@ -118,15 +116,17 @@ namespace kiwix {
// Fill data
CDT oData;
CDT resultsCDT(CDT::ARRAY_VAL);
CDT result1;
result1["title"] = "title1";
result1["url"] = "url1";
CDT result2;
result2["title"] = "title2";
result2["url"] = "url2";
resultsCDT[0] = result1;
resultsCDT[1] = result2;
this->resultOffset = this->results.begin();
while (this->resultOffset != this->results.end()) {
CDT result;
result["title"] = this->resultOffset->title;
result["url"] = this->resultOffset->url;
resultsCDT.PushBack(result);
this->resultOffset++;
}
this->resultOffset = this->results.begin();
oData["results"] = resultsCDT;
STLW::string sResult;

View File

@ -62,8 +62,7 @@ namespace kiwix {
void search(std::string &search, const unsigned int resultsCount, const bool verbose=false);
bool getNextResult(string &url, string &title, unsigned int &score);
void reset();
const string searchInIndexAndReturnHtml(string &search, const unsigned int resultsCount,
const string templatePath, const bool verbose=false);
const string getHtml();
protected:
virtual void closeIndex() = 0;