| Author |
Message |
scottdallas

Joined: 04 May 2006 Posts: 2027 Location: US |
|
|
| Sat May 05, 2007 4:36 pm |
|
 |
Guest
|
|
|
Please login to hide the ads.
|
|
|
|
 |
astrostart

Joined: 11 Feb 2007 Posts: 124 Location: The Netherlands |
|
|
|
Wow, this looks cool.
Do you have a preview so I can check it out before installing it?
_________________ My site: http://www.astrostart.nl | Thanks to everyone here who has helped me! |
|
| Sun May 06, 2007 3:42 pm |
|
 |
yesitsfree
Joined: 03 May 2007 Posts: 89
|
|
|
|
Excellent Thanks for this
I now have it working on my site
Although I had to remove some code out of the show_searchresults.php page due to security errors on my hosting server the part I removed was
 |  | //Search history start
$file_path = "../data/search-history.txt";
if(!file_exists($file_path)) touch($file_path);
$search_file = file($file_path);
if($search){
function plus_one(){
global $search_file, $search, $file_path;
$file = fopen($file_path, w);
foreach($search_file as $line){
$line_arr = explode("|", $line);
if(trim($line_arr[1]) == trim($search)){
$count = $line_arr[0]+1;
fwrite($file, $count."|".$line_arr[1]);
}
else fwrite($file, $line);
}
fclose($file);
}
foreach($search_file as $line){
$line_arr = explode("|", $line);
$all_words[] = trim($line_arr[1]);
}
if(in_array($search, $all_words)){
plus_one();
}
else {
$add_file = fopen($file_path, a);
fwrite($add_file, "1|".$search."\n");
fclose($add_file);
}
}
//Search history end
|
now works fine
see at www.security4free.co.uk new site being developed so not much on it.
_________________ yesitsfree freeware http://www.yesitsfree.co.uk
Security4free http://www.security4free.co.uk
UK community website directory http://www.wvis.co.uk
Holiday Lets Directory ttp://www.holidayletsdirectory.com |
|
| Sun May 06, 2007 7:23 pm |
|
 |
scottdallas

Joined: 04 May 2006 Posts: 2027 Location: US |
|
|
| Sun May 06, 2007 7:31 pm |
|
 |
yesitsfree
Joined: 03 May 2007 Posts: 89
|
|
|
| Sun May 06, 2007 7:33 pm |
|
 |
scottdallas

Joined: 04 May 2006 Posts: 2027 Location: US |
|
|
|
Ah and now http://www.security4free.co.uk/ has a working example I'm glad you got it working. looks and works great. fast and easy
You could change the text here:
 |  | Your Search Results Are Below |
to
 |  | Your Search Results for '<b><?php echo("$search"); ?></b>' Are Below |
If you want to display the keyword they searched
_________________ www.scodal.com is an example of cnr as a social forum - www.scottdizzle.com is an example of cnr as a personal website to share whatever cool stuff i feel like. i have another, but it's nsfw. pm me 
Last edited by scottdallas on Sun May 06, 2007 7:36 pm; edited 1 time in total |
|
| Sun May 06, 2007 7:34 pm |
|
 |
yesitsfree
Joined: 03 May 2007 Posts: 89
|
|
|
| Sun May 06, 2007 7:36 pm |
|
 |
yesitsfree
Joined: 03 May 2007 Posts: 89
|
|
|
| Sun May 06, 2007 7:39 pm |
|
 |
scottdallas

Joined: 04 May 2006 Posts: 2027 Location: US |
|
|
|
yeah! that looks sweet!
_________________ www.scodal.com is an example of cnr as a social forum - www.scottdizzle.com is an example of cnr as a personal website to share whatever cool stuff i feel like. i have another, but it's nsfw. pm me  |
|
| Sun May 06, 2007 7:49 pm |
|
 |
yesitsfree
Joined: 03 May 2007 Posts: 89
|
|
|
| Sun May 06, 2007 8:01 pm |
|
 |
astrostart

Joined: 11 Feb 2007 Posts: 124 Location: The Netherlands |
|
|
|
I have installed it on my website: www.astrostart.nl (upper right corner)
If I search for one word, it works fantastic, but when I search for two words, it can't find anything.
For instance:
zwart - enough results
zwart gat - no results
That's weird, because there are a lot of news with zwart gat (black hole) on my site.
Do you have a solution? 
_________________ My site: http://www.astrostart.nl | Thanks to everyone here who has helped me! |
|
| Tue May 08, 2007 11:56 am |
|
 |
astrostart

Joined: 11 Feb 2007 Posts: 124 Location: The Netherlands |
|
|
|
And another question (yeah, I'm annoying)
This is my template for next and previous news:
 |  | <p align=center>[prev-link]<< Nieuwere berichten[/prev-link] | [next-link]Oudere berichten >>[/next-link]</p> |
However, when I'm on the search page and click 'oudere berichten' (older messages) it takes me to the following link:
http://www.astrostart.nl/search.php?skip=10
And I can't see any newsmessages. Do you have a solution for this? [/code]
_________________ My site: http://www.astrostart.nl | Thanks to everyone here who has helped me! |
|
| Tue May 08, 2007 12:02 pm |
|
 |
scottdallas

Joined: 04 May 2006 Posts: 2027 Location: US |
|
|
|
Does this fix it? When I had bad search result pagination links FI-DD helped me here
http://english.cutenews.ru/forum/viewtopic.php?t=908&highlight=search+pagination
and I uploaded the zip of the file with the modifications he helped me make in case anyone else had similar issues. As far as the mulitple word search.. I have trouble with that too i think that's not the iframe-search having trouble but the search code itself.
_________________ www.scodal.com is an example of cnr as a social forum - www.scottdizzle.com is an example of cnr as a personal website to share whatever cool stuff i feel like. i have another, but it's nsfw. pm me  |
|
| Wed May 09, 2007 1:49 am |
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2857 Location: Germany |
|
|
|
You have to install the boolean search if you want to search for more than one word.
|
|
| Wed May 09, 2007 6:07 pm |
|
 |
astrostart

Joined: 11 Feb 2007 Posts: 124 Location: The Netherlands |
|
|
|
Well, I did. But now I've overwritten it with this search.php file. So now it is not possible anymore 
_________________ My site: http://www.astrostart.nl | Thanks to everyone here who has helped me! |
|
| Wed May 09, 2007 6:29 pm |
|
 |
|