Previous Thread
Next Thread
Print Thread
Rate Thread
#209230 03/20/2001 5:43 PM
Joined: Jan 2001
Posts: 32
User
User
Offline
Joined: Jan 2001
Posts: 32
Sorry for the not very descriptive title for this.

I am trying to alter showmembers.php such that it displays the users' real name entered in their profiles rather than their usernames (login names).

I have made the following little alterations, all of which individually seem to work eslewhere, but here they do not result in '$RealName' being displayed either instead of or alongside the '$Username':

// Jock - add real name to the list of things to fetch from the database
$query = "
SELECT U_Username,U_Registered,U_Extra1,U_Homepage,U_TotalPosts,U_Status,U_Name
FROM w3t_Users
ORDER BY " .$Sorting[$sb][1]. "
$limitit
";
$sth = $dbh -> do_query($query);
$total = $dbh -> total_rows($sth);
$newpage = 0;

// -----------------------
// Set the first row color
$color = "lighttable";

// ----------------------------------------------------------------
// Cycle through the users
for($i=0;$i<$total;$i++){

// Jock - add real name to the list call
list ($Username,$Reged,$ICQ,$Home,$Posts,$Status,$RealName) = $dbh -> fetch_array($sth);

if ($Home) {
$Home = "<a href="http://$Home" target="new">$Home</a>";
}
if ( (ereg("[0-9]",$ICQ)) && ($config[ICQ_Status]) ){
$ICQ = "<img src="http://online.mirabilis.com/scripts/online.dll?icq=$ICQ&img=1">";
}
$Reged = $html -> convert_time($Reged,$user[U_TimeOffset]);
$EUsername = rawurlencode($Username);

// Jock - do we add real names if so do so change $Username to $PUsername in output below too
$PUsername = $Username;
if ($RealName && $config[realnames]){
$PUsername = $PUsername." - ".$RealName;
}

echo "
<tr class="$color">
<td>
<a href="$config[phpurl]/showprofile.php?Cat=$Cat&User=$EUsername&page=$page&what=showmembers">$PUsername</a>
</td><td>
$Status


Sponsored Links
Joined: Jan 2001
Posts: 32
User
User
Offline
Joined: Jan 2001
Posts: 32
Sorted - see PHP Bug reports - it was losing the variable in config.inc.php



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
Gizmo
Gizmo
Portland, OR, USA
Posts: 5,833
Joined: January 2000
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
Morgan 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)