Search in user profile 1.0.6 [OXPUS] not working with 2.0.10

Allgemeiner Support zum phpBB 2 Board und phpBB 2 Modifikationen
Forumsregeln
Auch wenn hier der Support für phpBB 2 weiterhin aufrecht erhalten bleibt, weisen wir darauf hin, dass das phpBB 2 nicht mehr offiziell unterstützt und weiterentwickelt wird!
Antworten
ford
Beiträge: 5
Registriert: Mi 25.Aug, 2004 18:17

Search in user profile 1.0.6 [OXPUS] not working with 2.0.10

Beitrag von ford »

Hey oxpus

This seems to be a really cool mod, from what I can decipher in German. However, there seems to be incompatibilities between this MOD and phpBB 2.0.10.

I hope development of this MOD has not been abandoned :D . I would love to see this work in 2.0.10.

Thank you in advance

Ford
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

No, this mod also works in phpBB 2.0.10.
OXPUS.de is a real phpBB 2.0.10 and the mod is installed and working here errorfree...
What does not work? Will the search on your board will not return a result?
Then attach your search.php here to take a look on it.
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
ford
Beiträge: 5
Registriert: Mi 25.Aug, 2004 18:17

Beitrag von ford »

Hey oxpus

Thanks for your quick reply - I'm very thankful for that!

Installed:
  • phpBB 2.0.10
    Visual confirmation MOD (from contrib folder of 2.0.10)
    Custom Profile MOD (xdata 0.1.1)
    EasyMOD 0.1.13
Please note: I did not try to install this with EasyMOD.

I first uploaded the profile_search_db_update.php file and ran it from the browser without problem.

Alright! First this is from your MOD.

search.php

Code: Alles auswählen

#
#-----[ FIND ]------------------------------------------
#
if ( !empty($HTTP_POST_VARS['search_time']) || !empty($HTTP_GET_VARS['search_time']))
{
	$search_time = time() - ( ( ( !empty($HTTP_POST_VARS['search_time']) ) ? intval($HTTP_POST_VARS['search_time']) : intval($HTTP_GET_VARS['search_time']) ) * 60 );
}
else
{
	$search_time = 0;
}
However, 2.0.10 looks like this:

Code: Alles auswählen

if ( !empty($HTTP_POST_VARS['search_time']) || !empty($HTTP_GET_VARS['search_time']))
{
	$search_time = time() - ( ( ( !empty($HTTP_POST_VARS['search_time']) ) ? intval($HTTP_POST_VARS['search_time']) : intval($HTTP_GET_VARS['search_time']) ) * 86400 );
	$topic_days = (!empty($HTTP_POST_VARS['search_time'])) ? intval($HTTP_POST_VARS['search_time']) : intval($HTTP_GET_VARS['search_time']);
}
else
{
	$search_time = 0;
	$topic_days = 0;
}
This presents no major problem as I see it.

Next:

Code: Alles auswählen


#
#-----[ FIND ]------------------------------------------
#
//
// Sorting Search Results - END
//
Now, this I had a hard time finding. Did you mean somewhere around this part??

Code: Alles auswählen

//
// Sorting
//
$s_sort_by = "";
for($i = 0; $i < count($sort_by_types); $i++)
{
	$s_sort_by .= '<option value="' . $i . '">' . $sort_by_types[$i] . '</option>';
}
Next:

Code: Alles auswählen

#
#-----[ FIND ]------------------------------------------
#
else if ( $search_keywords != '' || $search_author != '' || $search_id || )
It looks as if an extra "||" is missing after $search_id in 2.0.10:

Code: Alles auswählen

else if ( $search_keywords != '' || $search_author != '' || $search_id )
Next:

Code: Alles auswählen

#
#-----[ FIND ]------------------------------------------
#
		else
		{
			message_die(GENERAL_MESSAGE, $lang['No_search_match']);
		}
	}
}
in comparison to (2.0.10):

Code: Alles auswählen

{
		message_die(GENERAL_MESSAGE, $lang['No_search_match']);
	}
}
(notice that a } is missing in 2.0.10)

Best regards from

Ford
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Okay, there might be some typos in the how to, I must fix.
But the mod itself will run...

Now download the version 1.0.7 and use this release.
I'll fix the howto and a point of inserting on the wrong place.
Undo all changes from 1.0.6 and reinstall the new release.
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
ford
Beiträge: 5
Registriert: Mi 25.Aug, 2004 18:17

Beitrag von ford »

Thanks for your reply to my queries. I really appreciate that! Will try out 1.0.7. and let you know how it goes.

Cheers

Ford
ford
Beiträge: 5
Registriert: Mi 25.Aug, 2004 18:17

Beitrag von ford »

It works! Thank you very much.

Ford :ok
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Nice to hear.
And also thx for the hints!
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
ford
Beiträge: 5
Registriert: Mi 25.Aug, 2004 18:17

Beitrag von ford »

Hey oxpus

Perhaps you would be interested in some suggestions for further development?

I think it would be neat to see an entirely separate "Search Profiles" page. The site that I'm developing will be heavily focused on user profiles and the ability to search on these (perhaps you can guess what it is that I'm doing ;))

With the help of the Custom User Profile MOD (xdata 0.1.1) by Zayin I am adding many extra fields to the profile. I know that several hacks exist to do this, but I found this to be a very good one.

However, apart from your MOD (which allows for adding custom profile fields into the search routine) there seems to exist only few other possibilities for searching in profiles.

niwotata did work on another custom profile MOD (social networking mod) but abandoned the project because he ran into fundamental design errors. This MOD allowed you to search on multiple criteria. See his notes below:
##############################################################
##
## Author Notes:
## social networking mod
## main feature: ( I will rephrase these later)
## - friend list, both parties has to agree to become friends
## - show friends on one's profile or on a seperate friends page
## - show connection between one user and another, maximum 3 degree of seperation,
## i.e. will show friend's friend's friend, but will not show friend's friend's friend's friend.
## - can add, delete friend
## - can invite outside friend to join, upon registration, he automatically become the friend of the user who invited him
## - friend can make comment, user has to approve it before others can see it
## - user enter extra information when registering or editing their own profiles
## - display extra user information on profile
## - extra information has link to a list of people who share the same infomation, like same favorite song, etc.
## - admin can add, delete, edit types of extra user information,
## - admin can provide options, including empty option, for single or multiple selection type of user information
## - admin can change display order, decide if a information field is linkable on profile.
## - user can search other users based on extra user information
## - 2 search mode, quick search and detailed search, in detailed search you can provide multiple search criteria,
## for example, you can search gender=female, status=single etc.
##
##
##############################################################

Do you think it is possible to set up a search method like the "detailed search" which niwotata refers to in his notes? Basically, this is really what I'm looking for. If I had the skill, I would try and code it myself based on your and niwotata's work, but my PHP skills are very limited. It would greatly enhance the functionality of my board :), and I'm quite sure that others are in need of this kind of hack.

I would be very interested to hear your thoughts on this.

Many kind regards

Ford
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

If you will search for the notes, you must just replace in my mod the table and the fields you will searching for. That's all ;)
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
Antworten