Problem installing 'Search in Profiles' mod

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!
vegematarian
Beiträge: 32
Registriert: Do 06.Mai, 2004 07:44

Problem installing 'Search in Profiles' mod

Beitrag von vegematarian »

http://www.thepetsitter.com/test/search.txt

I've been running into problems installing this mod.

http://www.thepetsitter.com/forum/search.php

Gettign this error when I search:

Warning: Invalid argument supplied for foreach() in /home/virtual/site2/fst/var/www/html/forum/search.php on line 1321
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

You have installed some code on at the wrong place. Try this version.
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!
vegematarian
Beiträge: 32
Registriert: Do 06.Mai, 2004 07:44

Beitrag von vegematarian »

I installed that but now when I go to search nothing happens.

See http://www.thepetsitter.com/forum/search.php and search user profiles.
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

There is another bug in your search.php I'd fix now. Use the attached file.

And while doing "nothing": Then the script wasn't finding a matched user profile for your search values.
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!
vegematarian
Beiträge: 32
Registriert: Do 06.Mai, 2004 07:44

Beitrag von vegematarian »

Thanks, I notice that if a keyword that is not in a profile I don't get the "
No topics or posts met your search criteria" message. Can this be fixed?
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Yes. Use the new attached file.
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!
vegematarian
Beiträge: 32
Registriert: Do 06.Mai, 2004 07:44

Beitrag von vegematarian »

I did and nothing happens :(

When I search somethign like "jkhjlkhljk" it does nothing, but when I search "pet" I get a listing of members.
vegematarian
Beiträge: 32
Registriert: Do 06.Mai, 2004 07:44

Beitrag von vegematarian »

Also, how would I go about setting up a separate query section on the search.php page so that there can be a type in box for searching profiles alone?

i.e. One would be for searchign keywords, another for searching authors, and a 3rd searching profiles (rather than having the searching keywords and profiles combined)
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

1. The last search.php I've posted will give me the message on none found profiles. Courios this will not work for you. The script will create the message, if no user-id can found for the search keywords....

2. Why creating a 3rd field for entering search values? I'll search for posts or for users and get results with usernames or posts, not both.
And how to display results for posts and users on one screen (If found)???
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!
vegematarian
Beiträge: 32
Registriert: Do 06.Mai, 2004 07:44

Beitrag von vegematarian »

i want to set it up w/ its own search box because non board members will be search profiles and I dont want to confuse people who dont know what the board is.

i.e. people who chat on the board can use the keyword and author search where people who arent memebers of the board will be searching profiles
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Okay, good idea, but which result should be returned if a member will enter keywords for posts and user profiles? Both is possible on one screen, but usefull :confused:
So I've created the searching on profiles with the same textfield as you use it for search for posts to avoid this problem...

Creating a new field to enter keywords for searching for userprofiles I can code, surely, but please define which search will get a higher priority (if entered for both any keywords): userprofile or posts?
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!
vegematarian
Beiträge: 32
Registriert: Do 06.Mai, 2004 07:44

Beitrag von vegematarian »

Here is a mockup of what I would like it to look like:

http://www.thepetsitter.com/forum/search_body2.php
vegematarian
Beiträge: 32
Registriert: Do 06.Mai, 2004 07:44

Beitrag von vegematarian »

[quote="oxpus @ 5.Mai 2004, 06:56";p="5341"]Okay, good idea, but which result should be returned if a member will enter keywords for posts and user profiles? Both is possible on one screen, but usefull :confused:
So I've created the searching on profiles with the same textfield as you use it for search for posts to avoid this problem...

Creating a new field to enter keywords for searching for userprofiles I can code, surely, but please define which search will get a higher priority (if entered for both any keywords): userprofile or posts?[/quote]

I want them to be able to search for either.

See my mock up to get an idea of what I mean.
vegematarian
Beiträge: 32
Registriert: Do 06.Mai, 2004 07:44

Beitrag von vegematarian »

Another question may be....can it be possible to have two separate search pages? (One that searches the boards and another that searches profiles only?)
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

First: Please use the Edit-Button to combine the posts until an other user have replied to this. Thanks.

Going on: The mod was build to be able to search for posts or matching user profiles.
I think, the best way to search for anything will be using one form. A central searchform for all search methods like the default way.
Okay yes, it is possible to create a seperate form, but I think this will not usefull for users like newbies (Think about two search links on a navigation ;) ).

So I'll create a seperate textfield to search for user profiles and disable the checkbox (radio-button) for this (like your mock). Entering keywords for searching in profiles will getting a higher priority as searching for posts (Entered keywords for this will be ignored).

So stay tuned, I'll submit a new version of this mod the next days and inform you here about 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!
vegematarian
Beiträge: 32
Registriert: Do 06.Mai, 2004 07:44

Beitrag von vegematarian »

Thanks.

What I need the two separate search fields is because one is for board users and one is for people who wont be joining the board (they will only be looking up people who are on the board).

i.e. I have a board for pet sitters to talk to each other about pet sitting but I also want the other search to work for people who are looking for pet sitters in their area. (By searching profiles, they search zip codes or cities).

***If you can create two separate search pages for me that would be great. I can list one on the forums and one on my home page, so no one gets confused.***
Zuletzt geändert von vegematarian am Fr 07.Mai, 2004 08:28, insgesamt 1-mal geändert.
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Version 1.0.5 now contents the seperate field for searching in profiles.
The best way I think to let the search form as it is.

To create a seperate form just for the searching in profiles copy the search.php to search2.php, replace in this new file

Code: Alles auswählen

$template->set_filenames(array(
	'body' => 'search_body.tpl')
);
with

Code: Alles auswählen

$template->set_filenames(array(
	'body' => 'search_simple_body.tpl')
);
copy the attached file to templates/yourtemplatefolders/ and insert a new link to search2.php where ever you want.
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!
vegematarian
Beiträge: 32
Registriert: Do 06.Mai, 2004 07:44

Beitrag von vegematarian »

Hey, thanks.

Almost complete for:

http://www.thepetsitter.com/forum/search2.php

except that when I do a search on the new search page and nothing is listed in a profile, instead of the "No topics or posts met your search criteria" message, I get taken to:

http://www.thepetsitter.com/forum/search.php

UPDATE: It is actually not picking up ANY keywords that are listed in profiles. If I search for a word that is in a profile, I don't get results...instead it takes me to:

http://www.thepetsitter.com/forum/search.php
Zuletzt geändert von vegematarian am Fr 07.Mai, 2004 19:39, insgesamt 4-mal geändert.
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Please attach your current files here in a zip file:
search.php
search2.php
search_body.tpl
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!
vegematarian
Beiträge: 32
Registriert: Do 06.Mai, 2004 07:44

Beitrag von vegematarian »

[quote="oxpus @ 5.Mai 2004, 21:46";p="5394"]Please attach your current files here in a zip file:
search.php
search2.php
search_body.tpl[/quote]

I had to change this:

Code:

'S_SEARCH_ACTION' => append_sid("search.$phpEx?mode=results"),


change to
Code:

'S_SEARCH_ACTION' => append_sid("search2.$phpEx?mode=results"),


but now the problem is that when I search at:

http://www.thepetsitter.com/forum/search2.php

nothing happens.

See attached per requested files.



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

Beitrag von oxpus »

Thx for the files.
A first test on my local board will display the same result, so I must look for the error.
I'll fix it as soon as possible.

EDIT:
Now the fixed files. Replace your existing files this these ones.
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!
vegematarian
Beiträge: 32
Registriert: Do 06.Mai, 2004 07:44

Beitrag von vegematarian »

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

Beitrag von oxpus »

No Problem.
Have fun with this.
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!
vegematarian
Beiträge: 32
Registriert: Do 06.Mai, 2004 07:44

Beitrag von vegematarian »

By the way, I was wondering if you could help me w/ something else (or direct me in the right place).

I'm looking for a mod that will allow me to search through profiles of select individuals.

i.e. Say I have a dating site with 50 members. 25 of those members are paying members and are allowed to be searched by the public, whereas the other 25 are not because they have not paid. Is this possible to setup?

So if someone does a search for someone in their area, only those who have paid me will show up.
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

First you can use this mod to add an option field to the profile: Add X to Profile
After doing that I can increase the search with checking for this new user-field.
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