Can the search be changed from search all words to search any?
Hinkstar
Joined: Dec 17, 2005
Posts: 91
Monday 13 November, 2006 17:52
Posted: Monday 13 November, 2006 22:21
Hi Stephane,
I'm not sure I understand you. Could you be more specific, maybe an example?
Aikon Site Admin
Joined:
Posts: 802
Location: 21º57´E - 47º03´N
Monday 13 November, 2006 22:21
Posted: Monday 13 November, 2006 22:45
If i do a search for pots and pans
it will only return articles with pots and pans
I would like it to return articles with pots and or pans
Hinkstar
Joined: Dec 17, 2005
Posts: 91
Monday 13 November, 2006 22:45
Posted: Tuesday 14 November, 2006 13:50
Right now the queries are made to search for entire word. But can be done.
If you have some coding skills you could play with the SearchNews() function from index.php. There is the place where the queries are made.
Aikon Site Admin
Joined:
Posts: 802
Location: 21º57´E - 47º03´N
Tuesday 14 November, 2006 13:50
Posted: Wednesday 15 November, 2006 14:52
Unfortunately beyond my capabilities at present.
If you do have any time for this it would be great.
Hinkstar
Joined: Dec 17, 2005
Posts: 91
Wednesday 15 November, 2006 14:52
Posted: Thursday 16 November, 2006 02:18
I'll look over....soon.
Aikon Site Admin
Joined:
Posts: 802
Location: 21º57´E - 47º03´N
Thursday 16 November, 2006 02:18
Posted: Tuesday 28 November, 2006 21:41
I thought i'd have a crack at this and allthough I couldn't get my head around the searchnews in index.php, I have been able via a tutorial to get a search block going.
It has a few problems I hope you can help me with,
1, I cant get it to find and display the site's image .$image["urls_image"].
2, href=\"".$row["news_link"]."\" should give the link url but gives my domain url
3, I cant get the input form to display within php
I took a step back after being unsuccessful with the block and at trying to add it as a function in MH index.php.
So far I have it running as a stand alone program, take a look http://www.ontheball.info/searchtest.php
If you like it, have any idea's, let me know.
I'm curently thinking it could be a used as a MH addon module, maybe.
Hinkstar
Joined: Dec 17, 2005
Posts: 91
Wednesday 29 November, 2006 14:40
Posted: Thursday 30 November, 2006 03:13
I really don't know what is there.
I told you on the queries are made SearchNews().
The principle to create a query to look after all[any of] the words from one sentences [2,3 words] is to explode [using the space] the search text and look for individual parts of exploded string:
something like:
Code:
$string=" WHERE news_title LIKE '%$part1%' OR '%$part2%' OR '%$part3%'........";
and later:
Quote:
$sql = "SELECT * FROM ".$prefix."_multiheadlines_news".$string." AND....other things
Unfortunatelly right know I don't have time for modding this.
Maybe you should have reported this on "Features requests" topic so when I'm gonna release the next vers. I'll include it.
The time now is Friday 09 January, 2009 07:44 | All times are GMT + 2 Hours
Page 1 of 1
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum