You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 246 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - How do I change USERNAME to NICKNAME in YOUR ACCOUNT GREETIN [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
portrower8
Lieutenant
Lieutenant


Joined: Mar 25, 2004
Posts: 202


PostPosted: Tue Oct 12, 2004 1:23 pm Reply with quoteBack to top

I have this in YOUR ACCOUNT:
If I want the greeting to pull a value from a field I named "nickname" in the same table, how do I do this?

I tried,but messed up...

function userinfo($username, $bypass=0, $hid=0, $url=0) {
global $user, $cookie, $sitename, $prefix, $user_prefix, $db, $admin, $broadcast_msg, $my_headlines, $module_name, $subscription_url;
$sql = "SELECT * FROM ".$prefix."_bbconfig";
$result = $db->sql_query($sql);
while ( $row = $db->sql_fetchrow($result) )
{
$board_config[$row['config_name']] = $row['config_value'];
}
$sql2 = "SELECT * FROM ".$user_prefix."_users WHERE username='$username'";
$result2 = $db->sql_query($sql2);
$num = $db->sql_numrows($result2);
$userinfo = $db->sql_fetchrow($result2);
if(!$bypass) cookiedecode($user);
include("header.php");
OpenTable();
echo "<center>";
if(($username == $cookie[1]) AND ($userinfo[user_password] == $cookie[2])) {
Find all posts by portrower8View user's profileSend private message
MGCJerry
Elite Nuker
Elite Nuker


Joined: Jun 16, 2003
Posts: 220


PostPosted: Tue Oct 12, 2004 3:08 pm Reply with quoteBack to top

You would use the variable "$userinfo[nickname]" to display info from the "nuke_users.nickname table.

_________________
Original creator of
* Fetch Mod
* RPG Races Module
* 2 The Xtreme Theme
Find all posts by MGCJerryView user's profileSend private message
portrower8
Lieutenant
Lieutenant


Joined: Mar 25, 2004
Posts: 202


PostPosted: Tue Oct 12, 2004 5:11 pm Reply with quoteBack to top

but how do I word that in the youraccount module?

like this?:

function userinfo($username, $nickname, $bypass=0, $hid=0, $url=0) {
global $user, $cookie, $sitename, $prefix, $user_prefix, $db, $admin, $broadcast_msg, $my_headlines, $module_name, $subscription_url;
$sql = "SELECT * FROM ".$prefix."_bbconfig";
$result = $db->sql_query($sql);
while ( $row = $db->sql_fetchrow($result) )
{
$board_config[$row['config_name']] = $row['config_value'];
}
$sql2 = "SELECT * FROM ".$user_prefix."_users WHERE username='$username'";
$result2 = $db->sql_query($sql2);
$num = $db->sql_numrows($result2);
$userinfo = $db->sql_fetchrow($result2);
if(!$bypass) cookiedecode($user);
include("header.php");
OpenTable();
echo "
";
if(($username == $cookie[1]) AND ($userinfo[user_password] == $cookie[2])) {

I think I understand what I need to do -- I just don't know how to put it in there so it works. Like, where should I put that...and how??
Find all posts by portrower8View user's profileSend private message
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by TOGETHER TEAM srl ITALY http://www.togetherteam.it - DONDELEO E-COMMERCE http://www.DonDeLeo.com - TUTTISU E-COMMERCE http://www.tuttisu.it
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.041 Seconds - 187 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::