Mod Name / Version - User List Location 1.1<br /> ver 1.1 fixes some errors in my directions <img src="/forum/images/graemlins/wink.gif" alt="" /><br />Description - Adds the Location and Ability to sort by location to the User List<br />Working Under - 6.1 (code should be the same for 6.0.x)<br />Any pre-requisites - none<br />Author(s) - JoshPet<br />Credits - msula <br />Files Altered - showmembers.php, showmembers.tmpl<br />Database Altered - no <br />New Files - none<br />Notes - Haven't tested this... simply modified my profile status bar stuff to the userlist. Should work fine. Let me know. <img src="/threads/php/images/icons/smile.gif" alt="" /><br />Created on - September 8, 2002<br /><br />As always.... back up your files and database before installing any hacks. <img src="/threads/php/images/icons/wink.gif" alt="" /><br /><br />Again, I haven't tested this..... let us know how it works for you. <img src="/threads/php/images/icons/smile.gif" alt="" />
#224300 - 11/13/0211:01 PMRe: [6.x] User List Sort By Location 1.1
[Re: Daine]
JoshPet
I type Like navaho
Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
I had never used or tested this.<br /><br />Finally had the need to install this on a site, and found a few typos in my directions.<br /><br />I've updated the first post to version 1.1 which fixes my errors in the instructions.... <br />And I guess it's no longer "untested". Works for me! <img src="/forum/images/graemlins/laugh.gif" alt="" />
#224302 - 11/15/0212:04 AMRe: [6.x] User List Sort By Location 1.1
[Re: Daine]
Gardener
Addict
Registered: 05/11/99
Posts: 1956
Loc: Sweden, Uppsala
Small note, there is a missing </td> tag in the instructions for the template, it should look like this:<br /><br /><pre><font class="small">code:</font><hr><br />Change it to this:<br /><br /><td align="left" width="15%" nowrap="nowrap"><br /><a href="{$config['phpurl']}/showmembers.php?Cat=$Cat&sb=$sortstatus&page=$page"><br />{$ubbt_lang['USER_STATUS']} $StatusS<br /></a><br />[:"red"]</td>[/] <br /><td align="left" width="15%" nowrap="nowrap"><br /><a href="{$config['phpurl']}/showmembers.php?Cat=$Cat&sb=$sortlocation&page=$page"><br />Location $LocationS<br /></a><br /></pre><hr><br /><br />Also, further down in the script there is a colspan that needs to changed.<br /><br />Otherwise it seems to work fine.
#224303 - 11/15/0212:26 AMRe: [6.x] User List Sort By Location 1.1
[Re: c0bra]
JoshPet
I type Like navaho
Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Thanks! <img src="/forum/images/graemlins/smile.gif" alt="" /><br /><br />Good eye.<br /><br />I've corrected the instructions attached to the first post. <img src="/forum/images/graemlins/smile.gif" alt="" />
#224304 - 04/20/0403:36 PMRe: [6.x] User List Sort By Location 1.1
[Re: Daine]
Pasqualist
Member
Registered: 01/30/03
Posts: 285
Loc: Amsterdam, The Netherlands
Josh, I used this mod for 6.4 now and it works!! well... 95% <br /> <br />And I hope that someone here is able to help me sloving the missing 5% <img src="http://www.ubbdev.com/forum/images/graemlins/laugh.gif" alt="" /> <br /> <br />What's not working is the SORTING. When I click on 'location' in my User List, it sorts something, but I can't figure out what. <br /> <br />Can I send my showmembers.php to someone to check it out ? <br /> <br />Thanks! <br /> <br />Pasqual
#224305 - 04/20/0403:59 PMRe: [6.x] User List Sort By Location 1.1
[Re: 10k]
Pasqualist
Member
Registered: 01/30/03
Posts: 285
Loc: Amsterdam, The Netherlands
Ok, I figured out that when clicking on 'Location' it does sort!! Only problem is that it shows the blanks first in stead of 'a' <img src="http://www.ubbdev.com/forum/images/graemlins/frown.gif" alt="" /><br /><br />I have no idea how I can correct this... anyone ?
#224306 - 04/20/0404:43 PMRe: [6.x] User List Sort By Location 1.1
[Re: 10k]
scroungr
Old Hand
Registered: 10/17/03
Posts: 2409
Loc: Richmond, VA
I don't know this script that well but try to put in a ltrim() and why your at it a rtrim()
_________________________
Couchtomatoe - www.couch-tomatoe.cc My abilities are for hire for installs, upgrades, custom themes and custom modifications.
#224307 - 04/20/0405:21 PMRe: [6.x] User List Sort By Location 1.1
[Re: 234234]
Pasqualist
Member
Registered: 01/30/03
Posts: 285
Loc: Amsterdam, The Netherlands
Thanks for the suggestion scroungr, but I've got zero-point-one knowledge of php/sql <img src="http://www.ubbdev.com/forum/images/graemlins/wink.gif" alt="" /> <br /> <br />Applying the hack above was a piece of cake, but now I have no idea where I should put the ltrim() and rtrim(). <br />Can I send you my file ?
#224308 - 04/20/0406:07 PMRe: [6.x] User List Sort By Location 1.1
[Re: 10k]
scroungr
Old Hand
Registered: 10/17/03
Posts: 2409
Loc: Richmond, VA
As I said not to sure of this mod.. hopes Josh speaks soon <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" /> but I would try a ltrim here<br /><br />find list ($Username,$Reged,$ICQ,$Home,$Posts,$Status,$Location) = $dbh -> fetch_array($sth);<br />place under it<br /><br />$Username = ltrim(rtrim($Username));<br /><br />and see what the outcome is
_________________________
Couchtomatoe - www.couch-tomatoe.cc My abilities are for hire for installs, upgrades, custom themes and custom modifications.
#224309 - 04/21/0412:09 AMRe: [6.x] User List Sort By Location 1.1
[Re: 234234]
JoshPet
I type Like navaho
Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
I'm not sure of a way around that - the sorting is being done in the MySQL query with an ORDER BY statement. This mod just adds an additional field to the existing user list functionality. The other user list fields all behave the same way... if you click on home page or ICQ number, all the ones without answers come first.