search module?

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
saltydog
Power Poster
Power Poster
Posts: 281
Joined: Fri Mar 04, 2005 9:06 am

search module?

Post 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.
tijntjethf

Re: search module?

Post 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 :(
User avatar
petert
Power Poster
Power Poster
Posts: 282
Joined: Wed Feb 09, 2005 9:30 pm
Location: behind my desk

Re: search module?

Post 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
Mambo sucks, that's why I am here.
Now they call it Joomla, but it still sucks!

CMSMS rules!
tijntjethf

Re: search module?

Post 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..
User avatar
petert
Power Poster
Power Poster
Posts: 282
Joined: Wed Feb 09, 2005 9:30 pm
Location: behind my desk

Re: search module?

Post 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.
Mambo sucks, that's why I am here.
Now they call it Joomla, but it still sucks!

CMSMS rules!
tijntjethf

Re: search module?

Post by tijntjethf »

hmm.. let's see if i can do something with phpdig then... :)
tijntjethf

Re: search module?

Post by tijntjethf »

that looks nice :)

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

Re: search module?

Post 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.. :(
User avatar
petert
Power Poster
Power Poster
Posts: 282
Joined: Wed Feb 09, 2005 9:30 pm
Location: behind my desk

Re: search module?

Post 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?
Mambo sucks, that's why I am here.
Now they call it Joomla, but it still sucks!

CMSMS rules!
tijntjethf

Re: search module?

Post by tijntjethf »

petert wrote:
tijntjethf wrote: ...
did you adjust the link and depth params?
They are both zero.. thought that whas correctly?
User avatar
petert
Power Poster
Power Poster
Posts: 282
Joined: Wed Feb 09, 2005 9:30 pm
Location: behind my desk

Re: search module?

Post 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
Mambo sucks, that's why I am here.
Now they call it Joomla, but it still sucks!

CMSMS rules!
tijntjethf

Re: search module?

Post 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.
:(
brownrl
Forum Members
Forum Members
Posts: 74
Joined: Thu Sep 23, 2004 11:06 am

Re: search module?

Post 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.
tijntjethf

Re: search module?

Post 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 :)
kishman155
Translator
Translator
Posts: 169
Joined: Sat Mar 12, 2005 12:30 pm
Location: Vienna

Re: search module?

Post 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
Post Reply

Return to “Modules/Add-Ons”