#57458
04/09/2004 12:31 PM
|
Joined: Nov 2001
Posts: 96
Member
|
Member
Joined: Nov 2001
Posts: 96 |
I have a simple HTML page that lists certain members of my board. What I want to do is have those names change automatically if they change their public name. In other words, I want it to pull the most current display name for a list of members each time this page loads.
How can I accomplish this?
|
|
|
#57459
04/09/2004 12:42 PM
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
Is it viewed by the public or just you?
|
|
|
#57460
04/09/2004 12:48 PM
|
Joined: Jan 2000
Posts: 5,833 Likes: 20
UBBDev / UBBWiki Owner Time Lord
|
UBBDev / UBBWiki Owner Time Lord
Joined: Jan 2000
Posts: 5,833 Likes: 20 |
I think everyone as he could probably care less if they change their names ... Wait on brett, he has a php function built just for pulling PDN's on a project he's doing for me ...
|
|
|
#57461
04/09/2004 2:26 PM
|
Joined: Nov 2001
Posts: 745
Admin Emeritus
|
Admin Emeritus
Joined: Nov 2001
Posts: 745 |
I've got one of those already done: function UBB_login_bits($CGIURL) { if (isset($_COOKIE["ubber{$Cookie_Number}"])) { $ubbinfo = split("&",$_COOKIE["ubber{$Cookie_Number}"]); $ubbdisplayname = $ubbinfo[2]; $ubbhexpwd = $ubbinfo[1]; $ubbmemberid = $ubbinfo[4]; $displine = "<font size="1">Welcome <a href="$CGIURL/ultimatebb.cgi?ubb=my_profile">".$ubbdisplayname."</a> [<a href="$CGIURL/ultimatebb.cgi?ubb=logoff">Logoff</a>]</font>"; echo($displine); } else { echo("<font size="1"><a href="$CGIURL/ultimatebb.cgi?ubb=login">Login</a>, <a href="$CGIURL/ultimatebb.cgi?ubb=agree">Register</a> or <a href="$CGIURL/ultimatebb.cgi?ubb=lost_password">Lost Password</a></font> "); } } Note: I am including my vars_config.inc.php to get the $CGIURL and the cookie number
|
|
|
#57462
04/09/2004 2:41 PM
|
Joined: Jan 2000
Posts: 5,833 Likes: 20
UBBDev / UBBWiki Owner Time Lord
|
UBBDev / UBBWiki Owner Time Lord
Joined: Jan 2000
Posts: 5,833 Likes: 20 |
lol looks like bretts a bit
|
|
|
#57463
04/09/2004 3:00 PM
|
Joined: Nov 2001
Posts: 96
Member
|
Member
Joined: Nov 2001
Posts: 96 |
But it doesn't help me with my specific problem. As I said, I have a list of people to contend with. It is a list that everyone will see. Example: quote:
This line mentions member #2221. And this line mentions member # 3334.
I want this to look like: quote: [qb]This line mentions Jake the Snake. And this line mentions The Iron Sheik.[/qb] The list of member numbers will be hardcoded, but I want the names to change if they change their display name.
|
|
|
#57464
04/09/2004 3:06 PM
|
Joined: Jan 2000
Posts: 5,833 Likes: 20
UBBDev / UBBWiki Owner Time Lord
|
UBBDev / UBBWiki Owner Time Lord
Joined: Jan 2000
Posts: 5,833 Likes: 20 |
The code Sub posted above should relay the PDN. You'll need to adapt it a bit but it basically replicates the welcome on the board...
|
|
|
#57465
04/09/2004 3:31 PM
|
Joined: Nov 2001
Posts: 745
Admin Emeritus
|
Admin Emeritus
Joined: Nov 2001
Posts: 745 |
Actually, for his list, we might need to do some reading of pdnlist.cgi
|
|
|
#57466
04/09/2004 3:37 PM
|
Joined: Nov 2001
Posts: 745
Admin Emeritus
|
Admin Emeritus
Joined: Nov 2001
Posts: 745 |
Here's some quick and untested code to get the DispName of the usernumber you pass to it, with the leading zeros: function UBB_dispname($ubbmemberid) { // UBB.classic Variables $varspath = "/path/to/noncgi"; include("$varspath/vars_config.inc.php"); $ubbpath = $MembersPath . "/"; $ubbmemberfile = $ubbpath . $ubbmemberid . ".cgi"; if (file_exists($ubbmemberfile)) { $ubbfileinfo = file($ubbmemberfile); $ubbdisplayname = trim($ubbfileinfo[15]); } echo "<a href="$CGIURL/ultimatebb.cgi?ubb=profile;u=$ubbmemberid">$ubbdispname</a> "; }
|
|
|
#57467
04/09/2004 4:34 PM
|
Joined: Jan 2000
Posts: 5,833 Likes: 20
UBBDev / UBBWiki Owner Time Lord
|
UBBDev / UBBWiki Owner Time Lord
Joined: Jan 2000
Posts: 5,833 Likes: 20 |
Looks good; I'm going to try to integrate most of UGN into the board, as much as possible that is ..
|
|
|
#57468
04/10/2004 4:49 PM
|
Joined: Nov 2001
Posts: 96
Member
|
Member
Joined: Nov 2001
Posts: 96 |
|
|
|
#57469
04/12/2004 12:46 PM
|
Joined: Nov 2001
Posts: 96
Member
|
Member
Joined: Nov 2001
Posts: 96 |
Could you do me a favor and write me a sample HTML page with your function that displays, say, member #2? I can’t seem to get mine working.
|
|
|
#57470
04/12/2004 1:30 PM
|
Joined: Nov 2001
Posts: 745
Admin Emeritus
|
Admin Emeritus
Joined: Nov 2001
Posts: 745 |
|
|
|
#57471
04/12/2004 5:50 PM
|
Joined: May 2001
Posts: 1,042 Likes: 7
Moderator
|
Moderator
Joined: May 2001
Posts: 1,042 Likes: 7 |
As mentioned earlier by Gizzy, i was helping him out making a PHP readable script. Right now, it just reads the user cookie, but functions are in there to do other things like get profile by login name or public name. http://www.pavioni.com/profile.txt To get a profile by number just use the function. $profile = OpenProfile('00000001'); $profile = OpenProfile('1'); This file can be use/modified for reference as needed by anyone.
|
|
|
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.
|
|
Posts: 808
Joined: July 2001
|
|
Forums63
Topics37,573
Posts293,925
Members13,849
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|