Page 1 of 5

search module?

Posted: Fri Mar 04, 2005 9:09 am
by saltydog
Hi,

is there any module avaiable to replace the standard {search} module? I mean, it would be useful to have a local database search, instead of going thru google..

Thanks to all.

Re: search module?

Posted: Wed Apr 06, 2005 7:05 am
by tijntjethf
I'm trying to build something like this, for my own CMSMS.
I'm prety far, but i have got one problem :(
How can i take care of the {vars} like {cms_selflink} etc, so they get parsed correctly?

hope sombody can help me out here :(

Re: search module?

Posted: Wed Apr 06, 2005 7:23 am
by petert
I am halfway to integrating phpDig http://phpdig.net into cmsms.

From their website:
PhpDig is a web spider and search engine written in PHP, using a MySQL database and flat file support. PhpDig builds a glossary with words found in indexed pages. On a search query, it displays a result page containing the search keys, ranked by occurrence.

The beauty of the spider method is that it will index the rendered pages. So no messing with content tables from the database, pure pages is what is searched.
The approach will be similair to what the folks at phpCMS do, http://phpcms.de

Re: search module?

Posted: Wed Apr 06, 2005 8:24 am
by tijntjethf
That's not exactly what i am looking for, i'm making something like this:


[searchbox]


---

Searchresults

Page Title

textextext (first 500 chars of the page)

---

And so on.. the searchpart is done, otherwise i would use phpdig, but now i only need to parse the results..

Re: search module?

Posted: Wed Apr 06, 2005 8:52 am
by petert
tijntjethf wrote: And so on.. the searchpart is done, otherwise i would use phpdig, but now i only need to parse the results..
No, that is not true.
You are parsing the database content. That way you have to resolve all the internal links yourself (cms_selflink). All the other functionality will have to be duplicated by you to make a useable search function.
I have a lot of pages which are detail pages of a master list. With your method my search function would have to duplicate all the display functionality from the detailpage in the search code.

phpDig lets you exclude parts of your 'templates'. It even reads your robots.txt file, it will even follow the robot meta tags in the head of your pages.

Re: search module?

Posted: Wed Apr 06, 2005 9:21 am
by tijntjethf
hmm.. let's see if i can do something with phpdig then... :)

Re: search module?

Posted: Wed Apr 06, 2005 10:01 am
by tijntjethf
that looks nice :)

i think i could do something with it.. thanx :)

Re: search module?

Posted: Thu Apr 07, 2005 10:32 am
by tijntjethf
Hey,

Are you going to post it here @ CMSMS.org, as a module?
Becouse it's not necessary if 2 people are working on the same thing ;)

If not, do you know why my site issn't get indexed? he only does the first page.. :(

Re: search module?

Posted: Thu Apr 07, 2005 10:38 am
by petert
tijntjethf wrote: Are you going to post it here @ CMSMS.org, as a module?
yep, not much time this week, but I will publish it here
tijntjethf wrote: If not, do you know why my site issn't get indexed? he only does the first page.. :(
did you adjust the link and depth params?

Re: search module?

Posted: Thu Apr 07, 2005 11:55 am
by tijntjethf
petert wrote:
tijntjethf wrote: ...
did you adjust the link and depth params?
They are both zero.. thought that whas correctly?

Re: search module?

Posted: Thu Apr 07, 2005 11:58 am
by petert
tijntjethf wrote: did you adjust the link and depth params?

They are both zero.. thought that whas correctly?
http://www.phpdig.net/navigation.php?action=doc#toc6

Re: search module?

Posted: Thu Apr 07, 2005 12:18 pm
by tijntjethf
(k zie dat je ook nederlands bent, dus dan toch maar verder in ons mooie taaltje, net zo makkelijk ;))

hmm.. ook met andere instellingen werkt het niet..

Hij pakt wel de pagina's die op de hoofpagina zelf staan... maar vanuit het menu? niet dus..
dit werkt ook niet bij het bulletmenu.
:(

Re: search module?

Posted: Fri Apr 08, 2005 8:46 am
by brownrl
What would be the problem of making a search module that goes through the content pages and finds text in their content. Then every page that has that search in it is then show in a simple list with the title and the first 500 chars or so shown?

Why do you have to use a third party thing such as phpdig?

Making a link to the pages that come back wouldn't be so hard. You'll have the page alias.

Ok so you might need to add some more if you want to search news articles.

Next month I will be working on a site that needs searching on it. When I make the search I'll submit here.

Re: search module?

Posted: Sat Apr 09, 2005 5:16 pm
by tijntjethf
Well, i whas that far.. but i have a couple of modules etc. on my site, and when you display the fires 500 chars, the modules haven't been 'translated' into the right text, it just shows {cms_module module="module_name"}, not the acutaly module itself :)

Re: search module?

Posted: Tue Apr 12, 2005 9:37 pm
by kishman155
Maybe you could do this by plugins like News search cms_dbprefic()."modules_news in row strip tags and so on
Here is some code maybe it could help you

Code: Select all

//for each
//strip tags
$text = "result from database";
$suche = $_post[searchstring];
$text1 = strchr($text,$suche);
$var = substr($text,0,500);
echo $var;
mfg
Kris