[2.0.20] Search Data

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
16
80%
Very Good
3
15%
Good
0
No votes
Fair
0
No votes
Poor
1
5%
 
Total votes: 20

Joe Belmaati
Registered User
Posts: 2110
Joined: Sun Sep 28, 2003 7:35 pm
Location: Denmark

Post by Joe Belmaati »

Hi,
it appears that you don't have a value for your sitename ($board_config['sitename']). Try the following:

Code: Select all

$search_referer = (@strpos($search_referer, $board_config['sitename']) === FALSE) ? $search_referer : '';
Image
Php Baby
Registered User
Posts: 5
Joined: Wed Oct 18, 2006 3:04 am
Location: France

Post by Php Baby »

Thank you very much for your reply.

That's Ok with the Errors, i don't have anymore.
I tried to search myself words, they are written in the Track Search (i will see tomorrow if it works also with my members, cause before, only my words often appeared)

It still a problem: when a look some Profile, that sort of search is not shown in track search...
Joe Belmaati
Registered User
Posts: 2110
Joined: Sun Sep 28, 2003 7:35 pm
Location: Denmark

Post by Joe Belmaati »

If you go back a few pages there's a fix for that.
Image
Php Baby
Registered User
Posts: 5
Joined: Wed Oct 18, 2006 3:04 am
Location: France

Post by Php Baby »

Sorry i don't find what could correspond to my problem when searching about Profiles...(i turned all pages twice and more :roll: )

Well, i think if i had installed a previous version it could have work :?:
I have version 2.0.6.....and i installed the version 1.2.6.a...

Actually, my code in fonction search is:

Code: Select all

//
// Track search data
//
function track_search(&$user_id, &$user_ip, &$search_time, &$search_keywords, &$search_author, &$search_referer, $search_failed, $search_terms, $search_fields, &$search_return_chars, &$search_cat, &$search_forum, &$search_sort_by, &$search_sort_dir)
{
	global $db, $board_config, $userdata;

	$search_config = unserialize($board_config['search_data']);

	if($search_config['status'] || ($search_config['admin'] && $userdata['user_level'] == ADMIN) || ($search_config['mod'] && $userdata['user_level'] == MOD))
	{
		return;
	}

	$search_keywords = (empty($search_keywords)) ? $search_author : $search_keywords;

	if (!empty($search_keywords))
	{
		$search_author = str_replace("\'", "''", trim($search_author));
		$search_keywords = str_replace("\'", "''", trim($search_keywords));
		$search_referer = (@strpos($search_referer, $board_config['sitename']) === FALSE) ? $search_referer : '';
		
		$sql = "INSERT INTO " . SEARCH_PHRASES_TABLE . " (search_user_id, search_user_ip, search_time, search_phrase, search_author, search_referer, search_failed, search_terms, search_fields, search_return_chars, search_cat, search_forum, search_sort_by, search_sort_dir)
		VALUES ($user_id, '$user_ip', $search_time, '$search_keywords', '$search_author', '$search_referer', $search_failed, '$search_terms', '$search_fields', '$search_return_chars', '$search_cat', '$search_forum', '$search_sort_by', '$search_sort_dir')";
		if (!$db->sql_query($sql))
		{
			message_die(GENERAL_ERROR, 'Could insert search information', '', __LINE__, __FILE__, $sql);
		}
	}
}
and only the the track search for "words" is shown in the results.
Joe Belmaati
Registered User
Posts: 2110
Joined: Sun Sep 28, 2003 7:35 pm
Location: Denmark

Post by Joe Belmaati »

Joe Belmaati wrote: Nope, you've got it right, but you have found a bug in the MOD.

OPEN includes/functions_search.php

FIND

Code: Select all

	if($search_config['status'] || ($search_config['admin'] && $userdata['user_level'] == ADMIN) || ($search_config['mod'] && $userdata['user_level'] == MOD))
REPLACE WITH

Code: Select all

	if($search_config['s'] || ($search_config['na'] && $userdata['user_level'] == ADMIN) || ($search_config['nm'] && $userdata['user_level'] == MOD))
Image
Php Baby
Registered User
Posts: 5
Joined: Wed Oct 18, 2006 3:04 am
Location: France

Post by Php Baby »

It still the same... :(

Well i have a version of phpbb to old for that mod i think...

But Thank you for your help.
Tim Horsey
Registered User
Posts: 29
Joined: Wed Aug 30, 2006 5:46 pm

Post by Tim Horsey »

Hi guys,

A simple question, I hope.

What are the installation instructions for this?

I've looked in the zip and there is no .txt or .doc files

Thanks in advance
saaiberke
Registered User
Posts: 1126
Joined: Wed Jul 20, 2005 8:13 am
Location: Gent/Belgium
Contact:

Post by saaiberke »

Tim Horsey wrote: I've looked in the zip and there is no .txt or .doc files


I see 2 .mod files with info and instructions for the installation. ;)

Grtz,

Nic
Tim Horsey
Registered User
Posts: 29
Joined: Wed Aug 30, 2006 5:46 pm

Post by Tim Horsey »

So sorry,

I was looking for .txt, .doc, .rtf or readme files :o

I will open these files and read very carefully. Thanks for your help
saaiberke
Registered User
Posts: 1126
Joined: Wed Jul 20, 2005 8:13 am
Location: Gent/Belgium
Contact:

Post by saaiberke »

Tim Horsey wrote: So sorry,

I was looking for .txt, .doc, .rtf or readme files :o

I will open these files and read very carefully. Thanks for your help


You're welcome. And success with the installation!

Grtz,

Nic
Tim Horsey
Registered User
Posts: 29
Joined: Wed Aug 30, 2006 5:46 pm

Post by Tim Horsey »

saaiberke,

I have installed the mod, with abosolutly no problems and it is working well.
I have 2 questions for my wish list:-
1. Is it possible to link page to the front (Log In) page or to all the pages?
2. I have installed the Statistics_Mod_V4, is it possible to include the output from your search mod into that page display?

No great shakes if 2 can't be done but 1 would be really useful

I hope you can come back with a positive answer, but thanks anyway for a great mod
User avatar
Roks
Registered User
Posts: 119
Joined: Thu Sep 14, 2006 1:15 am

Post by Roks »

Thank for the MOD, very usefull.
saaiberke
Registered User
Posts: 1126
Joined: Wed Jul 20, 2005 8:13 am
Location: Gent/Belgium
Contact:

Post by saaiberke »

Tim Horsey wrote: saaiberke,

I have installed the mod, with abosolutly no problems and it is working well.
I have 2 questions for my wish list:-
1. Is it possible to link page to the front (Log In) page or to all the pages?
2. I have installed the Statistics_Mod_V4, is it possible to include the output from your search mod into that page display?

No great shakes if 2 can't be done but 1 would be really useful

I hope you can come back with a positive answer, but thanks anyway for a great mod


Tim,

I think you're mistaking :) I'm not the MOD author and I only know little PHP.

Joe Belmaati is the author and the one that can give you an answer ;)

Grtz,

Nic
Tim Horsey
Registered User
Posts: 29
Joined: Wed Aug 30, 2006 5:46 pm

Post by Tim Horsey »

Tim Horsey wrote: I have installed the mod, with abosolutly no problems and it is working well.
I have 2 questions for my wish list:-
1. Is it possible to link page to the front (Log In) page or to all the pages?
2. I have installed the Statistics_Mod_V4, is it possible to include the output from your search mod into that page display?

No great shakes if 2 can't be done but 1 would be really useful

I hope you can come back with a positive answer, but thanks anyway for a great mod


Sorry about geting the names wrong :!:

For Joe Belmaati:
Could these things be done :?:
Joe Belmaati
Registered User
Posts: 2110
Joined: Sun Sep 28, 2003 7:35 pm
Location: Denmark

Post by Joe Belmaati »

Please explain 1) a bit better. 2) is probably doable, however, it requires a custom hack which I don't have the time to help you with.
Image
Post Reply

Return to “[2.0.x] MOD Database Releases”