Previous Thread
Next Thread
Print Thread
Rating: 10
Page 1 of 2 1 2
#217645 06/01/2002 10:47 PM
Joined: Jun 2002
Posts: 2
dex
Offline
Lurker
Lurker
Offline
Joined: Jun 2002
Posts: 2
Hey there....I'm not the best php coder, however, here's something i've been thinking of and would LOVE for someone to take on as a challenge

I'd like my users to be able to search through the user database...

ie:
have fields like: date added, user name, user age, etc.

and then get a results page of just a list of the users that match their search criteria...

Anyone up for it?

Thanks in advance!

Sponsored Links
puresx #217646 06/02/2002 11:03 AM
Joined: Jan 2000
Posts: 796
MTO Offline
Addict
Addict
Offline
Joined: Jan 2000
Posts: 796
Yes, this is something I would love as well. <img src="/threads/php/images/icons/grin.gif" alt="" />

------------- The following is reproduced from an old Search Profile Page request.

A Search profile page: Page for only searching profiles (no posts).

Search by:
Sex: [_]Male / [_]Female
Age: Between [__] and [__] years old.
Description: [__________]
Name: [__________]
Occupation: [__________]
Hobbies: [__________]
Country: [__________]
City: [__________]
Has a picture: [_]
Has ICQ: [_]
Has MSN: [_]
Has a webpage: [_]
Only ads of last: [_____] days.


If possible, option to search by the user defined variables.


You thinking privacy? Only those who have marked wishing to be available in the Who's Online screen would show up in the profile searches. All that would need to be done is change the wording to include this.


D_Wolfwood #217647 06/02/2002 5:26 PM
Joined: Jun 2002
Posts: 2
dex
Offline
Lurker
Lurker
Offline
Joined: Jun 2002
Posts: 2
absolutely...i want the user to select age, location, etc...

then they get a list of users that match their input...

seems simple, but i cant figure it out for the life of me!

someone PLEASE help us!!!!!

TIA!

puresx #217648 06/02/2002 5:58 PM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
My users want this as well.
They would like the ability to find members who live in their area.... or in their age range... etc.

Daine #217649 03/03/2003 3:33 PM
Joined: Apr 2001
Posts: 186
Member
Member
Offline
Joined: Apr 2001
Posts: 186
old but still wanted ;O)

thomas

Sponsored Links
shame4me #217650 08/10/2003 3:09 PM
Joined: Jan 2001
Posts: 9
ivf Offline
Newbie
Newbie
Offline
Joined: Jan 2001
Posts: 9
Did anyone ever do this?

marmz #217651 08/10/2003 10:07 PM
Joined: Jan 2000
Posts: 796
MTO Offline
Addict
Addict
Offline
Joined: Jan 2000
Posts: 796
I was just about to ask and search around for that!
Also very interested.

D_Wolfwood #217652 08/12/2003 11:28 PM
Joined: Mar 2001
Posts: 644
Member
Member
Offline
Joined: Mar 2001
Posts: 644
I've begun working on this. Give me a little time, but I think I can pull it off. It's a good idea and I have a good portion of it done.

I'll definitely post it here when it's ready for testing.

I do have tons of other projects going on at the same time, so no promise on time frame.

#217653 08/13/2003 9:28 AM
Joined: Jun 2003
Posts: 1,025
Junior Member
Junior Member
Offline
Joined: Jun 2003
Posts: 1,025
Are planning on making this work with Nikos's Contact Management System or something else?

BrokenToy #217654 08/13/2003 10:29 AM
Joined: Jan 2000
Posts: 796
MTO Offline
Addict
Addict
Offline
Joined: Jan 2000
Posts: 796
Yes, it would be great if it could work with the Contact Management System or just as well easily add more profile fields.

Looking forward to your work, Zackary!

Sponsored Links
D_Wolfwood #217655 08/13/2003 8:59 PM
Joined: Mar 2001
Posts: 644
Member
Member
Offline
Joined: Mar 2001
Posts: 644
I haven't looked at his mod actually, will take a look at it when time permits. Maybe I can develop it both ways.

But I'm taking tonight off, it's mah birfday! Just got back from stuffing myself with a free meal at the local mexican resturaunt.

*pats belly and sits and stares blankly at monitor for a few minutes, then clicks Continue*

#217656 08/13/2003 9:57 PM
Joined: Jan 2000
Posts: 796
MTO Offline
Addict
Addict
Offline
Joined: Jan 2000
Posts: 796
Happy birthday!

D_Wolfwood #217657 08/14/2003 2:59 AM
Joined: Aug 2002
Posts: 1,191
Kahuna
Kahuna
Joined: Aug 2002
Posts: 1,191
Happy birthday Zack! If you need any help on the CMS please let me know.


Nikos
Hal_dup2 #217658 08/14/2003 8:41 AM
Joined: Mar 2001
Posts: 644
Member
Member
Offline
Joined: Mar 2001
Posts: 644
Hehe, thanks guys.

I've been quietly developing my own addons and have loathed to even consider documenting them as they are very specific to my board/site and I didn't think anyone else would want/need them, but I check here multiple times daily and I keep wanting to kick something back to this community that has helped me so much.

I did small ports in .Classic, but Perl realy didn't click with me, I'm finding PHP to be incredibly more intuitive to work with and refreshingly easier to grasp.

I'll probably jump back on this mod this weekend, I've got the framework set for a basic user search using stock .Threads install, once that's complete, I'll document it, then install the CMS add on and I think it should be easily expanded on.

Right now though, work has me buried, with 2 guys in training, and 2 on vacation, I'm putting on a lot of miles this week. So, I'll probably not get anything else done until this weekend, (in between working on my basement and yard work ).

#217659 08/14/2003 9:22 AM
Joined: Jun 2003
Posts: 1,025
Junior Member
Junior Member
Offline
Joined: Jun 2003
Posts: 1,025
Happy Birthday Zack!

BrokenToy #217660 08/18/2003 1:20 AM
Joined: Mar 2001
Posts: 644
Member
Member
Offline
Joined: Mar 2001
Posts: 644
Ok, rough weekend. Finished sheetrocking my basement, but didn't get as far as I'd have liked to with this add on.

I have made a lot of progress though. I think a few more nights of beating on it should produce something worthwhile.

I have it to the point of being able to search on a couple of the given options, name, gender, occupation, but need to finish it yet. I've made minimal changes to the actual threads files as I am creating a new page to use for this.

Unfortunately, it's much too late and I have to be up for work in 5 hours, so I'm going to get some sleep.

Hope to have something for ya'll to beat on by week's end.

I think once I get it out in beta I'll get some better ideas from you guys to finalize some of the options that will be desired.

Anyways, I'm off!

PS Thanks for the birthday wishes.

#217661 08/18/2003 7:28 AM
Joined: Jan 2000
Posts: 796
MTO Offline
Addict
Addict
Offline
Joined: Jan 2000
Posts: 796
Yes, make sure you have time to sleep

Things sounds great!

D_Wolfwood #217662 08/18/2003 11:46 PM
Joined: Mar 2001
Posts: 644
Member
Member
Offline
Joined: Mar 2001
Posts: 644
ARGH, had a nice long update post typed up... and CRASH. Bye bye IE window.

Well, to sum it all up... I've got my add on working. All that's left is to search based on age, which could take some doing.

Hopefully I'll have a demo to play with soon, so you guys can tell me if I'm heading in the right direction. Biggest pain will be making a "generic" database to search on, as I don't want to use my member's info on a demo site. Not to mention I don't have the CMS add on installed on my live site.

If anyone is willing to create a "bogus" database to work with, I'd be eternally grateful.

Anyway, will check in tomorrow! Same bat time, same bat channel!

#217663 08/20/2003 12:57 AM
Joined: Mar 2001
Posts: 644
Member
Member
Offline
Joined: Mar 2001
Posts: 644
Sooo close I can taste it!

I've figured out how to check the user's age for searching on and it's working great.

Unfortunately, I'm having trouble outputting the information to be viewable.

Can't decide if I want to push all the results into an array or find another way. Still on track to have a demo up by week's end.

Sleepy time!

#217664 08/20/2003 9:42 AM
Joined: Jan 2000
Posts: 796
MTO Offline
Addict
Addict
Offline
Joined: Jan 2000
Posts: 796
Is the age search in the format of "between X and Y years old?
That's the way I think it should be...

As for your database testing... we could just pop in and register fake accounts to add to the search.


D_Wolfwood #217665 08/20/2003 10:34 AM
Joined: Mar 2001
Posts: 644
Member
Member
Offline
Joined: Mar 2001
Posts: 644
[]MTO said:
Is the age search in the format of "between X and Y years old?
That's the way I think it should be...

[/]

Sure is.

And it even works. Thanks to JoshPet's (and dimopoulos' code from the birthday add on. )

I'm just struggling with how to store the results of the age query into a variable so it can easily be output to the results page.

Right now anything that is within the scope of the search is being written to an array, which should be fine, but it's doubling up on the values, creating an odd array.

For example:
Code
<br />Array<br />(<br />    [0] => Array<br />        (<br />            [0] => Zackary Stoutheart<br />            [U_Name] => Zackary Stoutheart<br />            [1] => 4<br />            [U_Number] => 4<br />            [2] => Aug<br />            [U_BirthMonth] => Aug<br />            [3] => 13<br />            [U_BirthDay] => 13<br />            [4] => 1974<br />            [U_BirthYear] => 1974<br />        )<br /><br />)<br />


I'm still doing some research on how best to store the results for extraction later... The above is produced by adding the extracted mysql_query into an array by using a statement such as: $resultsarray[] = $result;

Where $result is the information for the user, again extracted from the query.

Hmm, don't even know if that made any sense.

I'd sure like a better way to store this, if anyone can offer a suggestion. This is the last big hurdle to getting this in beta. The rest will be cosmetic changes and I've already mapped out in my head a way to use the other 4 custom fields as well.

At least I'm learning AND having fun at the same time... though I may need to do more sheetrocking, since there's a big dent in the wall next to my desk where I've repeatedly banged my head.

Anyway, back to work before someone notices me slacking.

#217666 08/20/2003 11:03 AM
Joined: Jun 2003
Posts: 1,025
Junior Member
Junior Member
Offline
Joined: Jun 2003
Posts: 1,025
It sounds like it is really coming along nicely. Do you still need a database? I will create one with about 50 users tonight if you still need one for testing purposes.

Don't worry about the dent, a good tape and texture man can take care of that.

BrokenToy #217667 08/20/2003 11:30 AM
Joined: Mar 2001
Posts: 644
Member
Member
Offline
Joined: Mar 2001
Posts: 644
Sure Slayer.

If you want to do it that is. I may just put the wife to work registering bogus users and populating the fields we're using.

Although, I need to look around work here, we have some test databases for use with a certain software package and I might be able to grab that and import it to mySQL.

I'd just need to populate the occupation, birthday info, and hobbies fields then.

It should have full addresses, phone numbers and names in it... (all bogus of course)

#217668 08/20/2003 2:58 PM
Joined: Jun 2003
Posts: 1,025
Junior Member
Junior Member
Offline
Joined: Jun 2003
Posts: 1,025
Cool. If you can use the test databases you have lying around that would be spiffy. Let me know. I don't have the birthday mod installed so that would still need to be populated.

BrokenToy #217669 08/20/2003 3:45 PM
Joined: Mar 2001
Posts: 644
Member
Member
Offline
Joined: Mar 2001
Posts: 644
Whoops, snuck home early and forgot to look to see if I had that database. Sheesh.

No worries, will start the wife doing some data entry tonight.

#217670 08/20/2003 4:59 PM
Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286
Good to see you have her fully trained


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Gorlum #217671 08/20/2003 6:09 PM
Joined: Mar 2001
Posts: 644
Member
Member
Offline
Joined: Mar 2001
Posts: 644
LOL Ian.. Not quite trained yet.

Actually... she went out for drinks after work with her co-workers... Think I'll be creating the test database myself.

ANYWAY....

[:"red"] *plays a fanfare of trumpets* [/]

I figured out the age thing! I've been sitting here trying different ways to output the array and something clicked... or snapped, not sure, something happened. ANYWAY, I forgot the most SIMPLE RULE...

*K*I*S*S*

DUH.

So it's working 100% now.

I'm off to create a test database and then will pop back here with a URL and a demo for ya'll.

This is by no means complete. There's many things I can do to clean up (and document ) my code, as well as I still need to pop by the validator and fix my 300+ "problems". (checked two nights ago *shudder* )

Anyways, just hang on folks, another hour or two and I'll be back.

PS: I think this calls for massive fruit dancing.

#217672 08/20/2003 6:10 PM
Joined: Mar 2001
Posts: 644
Member
Member
Offline
Joined: Mar 2001
Posts: 644
Ooops, sorry for the mega smiley count on that last post. I'm a bit excited right now.

Joined: Mar 2001
Posts: 644
Member
Member
Offline
Joined: Mar 2001
Posts: 644
Ok here goes.

Remember, it's not perfect, I'm still learning.

Test site is: http://softest.sofguild.com/threads/ubbthreads.php

Feel free to create some users to test the search function. I've only got a total of 16 on there now, got tired of doing the data entry.

No email verification is required.

I made a post there to explain some details about the add on.

This thread has probably gone outside of the bounds of the rules of this forum, I hope that we can discuss this a little further before I post this as a beta modification.

Enjoy!

Joined: May 2003
Posts: 1,068
Junior Member
Junior Member
Offline
Joined: May 2003
Posts: 1,068
Very cool, I played around with it and every search I narrowed down appeared to render the proper result. I will look forward to seeing this released

Joined: Mar 2001
Posts: 644
Member
Member
Offline
Joined: Mar 2001
Posts: 644
Very cool, thanks for testing it.

Going to wait till probably this time tomorrow for feedback before I post it in the modifications forum.

Well, actually, I'm going to try to get it to fully validate first.. So maybe Friday. LOL

I just want to know if there's more options people want/need that I could "easily" add before release.


Joined: Jan 2000
Posts: 796
MTO Offline
Addict
Addict
Offline
Joined: Jan 2000
Posts: 796
Wooow! Looking great! I'm liking what I see
Anyway... I'm always looking for ways to improve things, so here are my other suggestions & observations.

----------------

Edit Profile Screen:
- Just template cosmetic fixes: "Geographic Location (State, Country, etc.) " should be right after "Location Country" or it will seem repetitive to most people. "Location Country" should probably be before "city".

- Maybe we could have a "Be available in profile searches? Yes/No"


Search Members Page:

- When you first enter, it shows results. I havent searched for anything yet... Results should be empty. Is there a limit to the number of results per page? Or will it show all 3000 members in the same page if you had them?

- How about a "Text in bio" search field?

- "Name" search field. Should search within "Display name" and "Full name".

- "Country" search field. Maybe should search within both location & origin country?

- "Has a picture" field. Maybe too much to ask for... But it would be nice if an avatar wouldnt be considered a picture and users could actually really add a picture to their profile since these are usually not pictures (though mine is).


Search results
- I think it would be really nice if it would display some information about them. Maybe show the avatar, Name, Full name, number of posts, age, country, and the first 15 words or so of their bio.

- X results per page.



------------------

Anyway... Great job! It's looking great.

Joined: Mar 2001
Posts: 644
Member
Member
Offline
Joined: Mar 2001
Posts: 644
First things first... I got it to validate. Was a little panicky when I saw over 200 errors... Amazing the things we forget as we're coding eh?

Ok, on to MTO's comments:

[]MTO said:
Wooow! Looking great! I'm liking what I see
Anyway... I'm always looking for ways to improve things, so here are my other suggestions & observations.
[/]

Thanks, and I agree, I can see a bunch of ways to make this better. It's good to have others give input as well.

[]
Edit Profile Screen:
- Just template cosmetic fixes: "Geographic Location (State, Country, etc.) " should be right after "Location Country" or it will seem repetitive to most people. "Location Country" should probably be before "city".
[/]

Actually, that's straight out of the CMS mod. When I release this the prerequisites will be the CMS mod and the birthday mod. Although... I could probably wrap it into a single add on. I'll have to ask for permission first if I decide to do that. I did notice some errors in documentation in the two mods.

[]
- Maybe we could have a "Be available in profile searches? Yes/No"
[/]

I agree. I didn't do this right off as I was trying to steer clear of database modifications. But an extra field can't hurt.

[]
Search Members Page:

- When you first enter, it shows results. I havent searched for anything yet... Results should be empty. Is there a limit to the number of results per page? Or will it show all 3000 members in the same page if you had them?
[/]

Right, I have the fields set to "empty" on load, mostly so I could quickly see changes as I ran the first queries and I knew how many members SHOULD show up, if all fields are empty.

I could get it to just show the form on load, sure.

[]
- How about a "Text in bio" search field?
[/]

Can do that. Shouldn't be too hard. Tons easier than that darned age thing. Just wait until you see THAT code.

[]
- "Name" search field. Should search within "Display name" and "Full name".
[/]

Hmm, true, I didn't know which field I should use. Only a few members of my board use the Display Name field and the Full Name field was populated, I THINK when I ported from .Classic. This should also be easy to add. Just another part of the query.

[]
- "Country" search field. Maybe should search within both location & origin country?
[/]

Also debated on this... Perhaps have both available? Again, very easy, just one more AND to the changeable query I built.

[]
- "Has a picture" field. Maybe too much to ask for... But it would be nice if an avatar wouldnt be considered a picture and users could actually really add a picture to their profile since these are usually not pictures (though mine is).
[/]

Good point. Avatars on my site are taken from screenshots in the games we play on. Avatar and Picture are one in the same right now. So that's the field I'm searching on... we could add another field to the DB that is a "true" picture field and add it to the showprofile template.

[]
Search results
- I think it would be really nice if it would display some information about them. Maybe show the avatar, Name, Full name, number of posts, age, country, and the first 15 words or so of their bio.

- X results per page.
[/]

I want to do this. Right now I didn't know what people would want to see there. Avatars in the list could make the page quite long and cumbersome. Then again, some table tweaking could fix that.

As far as having x number of results per page. I know that this would be needed, because I expect some of the sites that use this would have WAY more than my 350 users. Talk about a long page with 3000+ results.


[]
Anyway... Great job! It's looking great. [/]

Again thanks. And you and I are thinking along the same wave length regarding the changes. Think I mentioned before that I had other ideas mapped out in my head already. I dreamt about coding PHP all last night.

Will sleep on it and start making more changes tomorrow.

Joined: Mar 2001
Posts: 644
Member
Member
Offline
Joined: Mar 2001
Posts: 644
Ok, I took a night off... I needed it.

Working through the suggestions list. Right now I've got it so the page loads clean, meaning that no results are shown.

Next step is to add in the name options... by default, what do ya'll think we should display in the results list for name? For now I'll leave it as the U_Username field.

Will update again once I've worked through MTO's suggestions.

Anyone else get a chance to play with it and see anything they'd like to see added/improved?

I'm leaving my test site open, so if anyone pops by and gets an error on that page, don't panic, just means I'm working out the kinks.


Joined: Mar 2001
Posts: 644
Member
Member
Offline
Joined: Mar 2001
Posts: 644
Man, I'm really getting tired of IE crashing when I add a graemlin from the "More Graemlins >>>" screen. Must be a Java problem.

Even copied my post, but didn't think to paste it to notepad.

Oh well, can't remember what all I typed, lots of updates, following the suggestions list...

Please take a look and let me know of any of the stupid errors I made. It's definitely not done yet, but I'd like to know if I'm on the right track.

Test BETA site is here: Clicky!

Ok night night.

Joined: Jan 2000
Posts: 796
MTO Offline
Addict
Addict
Offline
Joined: Jan 2000
Posts: 796
I see great improvements! :-)

- In member name maybe it could follow this format "Display name (full name)". Example: "MTO (Mateo Byler)". That would also give more sense to the results if your search yields the full name.

- Put the flag instead of the country code. Contry in alt & title image tag.

- It would be nice if one could order the results once they come up. So that if I click on the text "Age" (top) it would order the results by age. If I click on Posts, by posts, and so on... That could come handy in big communities.


And just the previoussly suggested things, X results per page, picture instead of (or and) avatar...

Hey, I like it!



Out of curiosity... are you using templates & language files?

Joined: Mar 2001
Posts: 644
Member
Member
Offline
Joined: Mar 2001
Posts: 644
Yup, got lots to do yet. Just making sure I'm headed the right direction.

Sortorder was always intended, didn't I mention that before?

Yes, using a template... and umm.. language files... as in, am I grabbing the column headers etc from the language files? Kinda... Umm, meaning, yes, but no...

I have used a few so far, when I'm done I'll go back through and do the language thing. Should be much easier than doing it on the way.

Display Name (Full Name) hmm... what happens when Full Name is empty? As it will be for many boards? Unless someone requires it on theirs I expect. Ohh wait, I had an idea... never mind... I think I got it.

Ok, time to go get breakfast, followed by a rousing hour of grocery shopping... There's nothing to eat! AUGH.

Joined: Jan 2000
Posts: 796
MTO Offline
Addict
Addict
Offline
Joined: Jan 2000
Posts: 796
I'd say you are headed in the right direction, at least in one I like

-the "Display name (full name)" thing is mostly because I can image some confusion if someone searches for "Mateo" in the name field but sees no "Mateo" and instad sees a "MTO" so when things like that happen they might just wonder why that result came up.
As for how to do it... maybe you can take a look at the "Status" pal side panel... it does exactly that "Site users see you as MTO (Mateo Byler)...."


Joined: Mar 2001
Posts: 644
Member
Member
Offline
Joined: Mar 2001
Posts: 644
[]MTO said:
I'd say you are headed in the right direction, at least in one I like

-the "Display name (full name)" thing is mostly because I can image some confusion if someone searches for "Mateo" in the name field but sees no "Mateo" and instad sees a "MTO" so when things like that happen they might just wonder why that result came up.
As for how to do it... maybe you can take a look at the "Status" pal side panel... it does exactly that "Site users see you as MTO (Mateo Byler)...."

[/]

Done, piece of cake.

Countries list, showing flags, done.

Going to start sorting next. Should be fairly easy... Leaving the multi-page thing till last.

Joined: Jan 2000
Posts: 796
MTO Offline
Addict
Addict
Offline
Joined: Jan 2000
Posts: 796
I was able to post html code in several of the fields: Address, city, zip code, phone number and cell number. You might want to filter those for security.

Page 1 of 2 1 2

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)