Welcome to Geeklog, Anonymous Sunday, November 24 2024 @ 09:11 am EST

Geeklog Forums

How to Customize Search?


OMAL

Anonymous
nerdy
I have an issue with search function. Some of the keywords visitors frequently input are words used in some pages. Those pages are type of neither "stories","comments","events","links" nor "staticpages" so that seaching end up with no results.
How can I customize functions or include "all pages" for gl in-site search?
 Quote

Status: offline

Laugh

Site Admin
Admin
Registered: 09/27/05
Posts: 1470
Location:Canada
What are the pages generated from? The search function only works with items that you mention along with any plugins that support it (most do).


One of the Geeklog Core Developers.
 Quote

OMAL

Anonymous
Thanks for your quick reply, Laugh.

Those pages are one of main pages, but considering the search and results, those pages are generated by a custom php function.Urls for them are like "domainname/index.php?some-unique-parameters".

I'd like to know whether it's possible to customize seach.php function or not. Where are they?Are those written by simple PHP?
 Quote

Status: offline

Laugh

Site Admin
Admin
Registered: 09/27/05
Posts: 1470
Location:Canada
Yes you can write a custom search function called "CUSTOM_dopluginsearch"

It has to be called and return the search results in a certain way.

See the file /system/lib-plugins.php and PLG_doSearch function for an idea of what to do.

I would also check out the links plugin function.inc file for the function plugin_dopluginsearch_links

It has a more simply search function which you may be able to base your new CUSTOM_dopluginsearch function on.

One of the Geeklog Core Developers.
 Quote

OMAL

Anonymous
Thank you.
I'll check it out.
I have another idea that reads a csv file and merge it with results from search.php but that method is not simple because I have to update the csv.file every time people create a new page of the kind. So I'll try the way you informed first.
 Quote

All times are EST. The time is now 09:11 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content