Welcome to Geeklog, Anonymous Monday, July 14 2025 @ 06:19 am EDT
Geeklog Forums
How to Customize Search?
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?
How can I customize functions or include "all pages" for gl in-site search?
25
19
Quote
Status: offline
Site Admin
Admin
Registered: 09/27/05
Posts: 1475
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).
22
28
Quote
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?
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?
25
23
Quote
Status: offline
Site Admin
Admin
Registered: 09/27/05
Posts: 1475
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.
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.
25
22
Quote
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.
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.
29
25
Quote
All times are EDT. The time is now 06:19 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