MemHT Portal is a Free PHP CMS and Blog
It permit the creation and the management online of websites with few and easy steps.
It's completelly customizable, expandable and suitable for all needs.
Moderators: Moderators
Forum RSS feedReply
Searching in documents (if you install this addons)
AuthorText
adminik
Moderator
Polski Support

Avatar

Posts: 185
Contributes: 175

Gender: _MALE_
Online: No

Languages: Polski & English
Version: Last xD
Country: Polska
Date: 02/04/2008 16:34
Searching in documents (if you install this addons)
#post5609
Open pages/search/index.php file:
In line 45 add:
code
$row = $dblink->get_row("SELECT titolo FROM memht_pagine WHERE nome='documents' AND enabled=1"); $ptitle['doc'] = outCode($row['titolo']);


In line 77 add:
code
case "documents": doc($query); break;


In line 88 add:
code
doc($query);


In line 277 add:

code
function doc($query) {
        global $dblink,$results,$fs,$ptitle;
       
        $result = $dblink->get_list("SELECT * FROM memht_documents_content WHERE MATCH(title,content) AGAINST('$query' IN BOOLEAN MODE) ORDER BY id DESC LIMIT $results");
        if ($result) {
                echo "<div><img src='images/bullet_paper.gif' border='0'> <a href='http://www.memht.com/index.php?page=documents' title='".$ptitle['doc']."'><b>".$ptitle['doc']."</b></a></div>\n";
                foreach ($result as $row) {
                        echo "<div>- <a href='http://www.memht.com/index.php?page=documents&title=".urlencode(outCode($row['title']))."'>".outCode($row['title'])."</a></div>\n";
                }
                echo "<br>";
                $fs = true;
        }
}
 

Save and upload to server.

In attachment is modyfied file index.php (rename to index.php)
Attachment: index_5n9c8.php
Edited: 02/04/2008 16:37
Image
quote
Czy Z Legala Czy Z Podziemia Ulica Się Nie Zmienia! - RPK

quote
Poland is my country and the house. Do not reveal the and do not go from here ...
Delete Edit Quote
 
mem
MemHT's Dad
Admin & Developer

Avatar

Posts: 5130
Contributes: 2473

Gender: _MALE_
Online: Yes
Date: 02/04/2008 17:41
Re: Searching in documents (if you install this addons)
#post5612
Nice, thanks
Delete Edit Quote
 
Reply
Tags Cloud
Advertising
News Archive
Language
Help MemHT Portal
Navigator
Users Block
Hi Guest
IP: 38.103.63.59

Username
Password
New files
MemHT Wiki
Friends
MemHT Portal is a free software released under the GNU/GPL License by Miltenovik Manojlo