PDA

View Full Version : Sort Members By State


ranger2kxlt
05-23-2003, 05:49 PM
I think this would be a great hack and definately useful for boards with chapters and stuff where people get together on a regular basis.

Anyways heres what i need. I will be changing the location field on the profile into a text box and a drop down box. The drop down box will contain the states and canadian provinces... whatever... and the text box will be for the city.

It will still display the same way as it always has and everything, just i was wanting to be able to sort members by state and i think this is the only way i can get it done. Anyways... after this i am lost on what to do to get it to sort this way. I know how to do the query to make it sort, but i cant make it support more than one page?? How can i do that?

$DB_site->query("SELECT blah, blah, blah, state, blah FROM user ORDER BY state ASC");

Can someone write a hack to have this done?

ranger2kxlt
05-24-2003, 07:50 AM
anyone interested? I know there has to be more people that would be interested in this type of thing... speak up!

ranger2kxlt
05-26-2003, 04:01 AM
I can't believe that no one would be interested in this hack? Can someone at least point me in the right direction so i know what i will have to do???

bharvey42
05-26-2003, 03:08 PM
I would be interested in it as well.

ranger2kxlt
06-04-2003, 04:48 AM
Ok im turning this request into a beg! Please someone help with this!!

Chris M
06-04-2003, 09:01 AM
I'm not entirely sure what the memberlist.php file uses as a variable to call the information to be displayed, but modify that query, and then create a new column in the memberlist template, called "State", then a new column in the memberlistbit template, and enter the variable name followed by [state]

i.e. $memberinfo[state]

As I said, I am not sure what the variable is;)

Satan

PixelFx
06-04-2003, 10:32 AM
what if your not in a state? say your in a provence ;) or an international user .. maybe adding system to group by country would be better...

;)

ranger2kxlt
06-05-2003, 04:19 AM
It may be for some... but my site pertains to the united states and canada as the cars are not offered anywhere else and that is why i asked for it this way.

ranger2kxlt
06-05-2003, 04:21 AM
Satan thanks a bunch for the help... at least its something to start with. I will be working on this tomorrow but im highly doubting much progress with come of it... but we will see :)

ranger2kxlt
06-06-2003, 07:17 AM
Update on this... suprisingly Im almost complete! Hope some people will be interested in this... its not the smallest hack ever.

I first had to hardcode in the location field instead of having it as a custom profile field in the admin cp... then i had to make it edittable in the profile and add a new collumn to the member list and edit the profile and postbit. I have everything working bug free except the sort which i havent attempted yet. Shouldnt be a problem though and I will get to it tomorrow.

ranger2kxlt
06-08-2003, 07:10 AM
Complete!

https://vborg.vbsupport.ru/showthread.php?s=&threadid=54010