Showing userpoints in arcadegames

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Showing userpoints in arcadegames
NiceM
CZ Newbie
NiceM has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jul 17, 2004
0.00 posts per day
Posts: 4
Points: 598
   
Is it posible to show userpints under avatar when you are plaing games?

And how am i doing it?

Thanks



Back to top Reply with quote
#2   re: Showing userpoints in arcadegames
dkwds
CZ Active Member
dkwds has been a member for over 20 year's 20 Year Member
uk.gif
Occupation: Student
Age: 38
Gender: Male
Website:
Status: Offline
Joined: Jul 29, 2004
0.04 posts per day
Posts: 282
Points: 12,713
   
Answer is below




_________________
Back to top Reply with quote
#3   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
It should work if you just enter:


$user_points = 'Points: '.$userdata['user_points'];


Then define it into your tpl file.



_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#4   re: Showing userpoints in arcadegames
NiceM
CZ Newbie
NiceM has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jul 17, 2004
0.00 posts per day
Posts: 4
Points: 598
   
Thank's alot telli it works fine icon_smile.gif



Back to top Reply with quote
#5   Showing Points in the forum
pcnuke
CZ Newbie
pcnuke has been a member for over 19 year's 19 Year Member
usa.gif florida.gif
Occupation: Raving Maniac
Gender: Male
Website:
Status: Offline
Joined: Jun 06, 2005
0.00 posts per day
Posts: 17
Points: 3,848
   
Could someone correct me where I'm wrong here. Im showing nothing in the forum for points.

Its not showing either the word Point: or the points number amount either

========================================================

Ok I.ve got this in the: viewtopic_body.tpl file: {postrow.POSTER_POINTS}

and I've got this below in the: forum/viewtopic.php


//User Points Hack for forum
global $bgcolor2, $prefix, $db, $sitename, $admin, $user;

getusrinfo($user);
cookiedecode($user);
$uname = $cookie[1];
if (is_user($user)) {
$userdata = $db->sql_fetchrow($db->sql_query("SELECT points FROM ".$prefix."_users WHERE username='$uname'"));
$user_points = 'Points: '.$userdata['user_points'];
}

$template->assign_block_vars('postrow', array(
'POSTER_POINTS' => $user_points,

);
}

=======================

Now if I use this one it works, but everyone shows the same amount of points.


//User Points Hack for forum
global $bgcolor2, $prefix, $db, $sitename, $admin, $user;


getusrinfo($user);
cookiedecode($user);
$uname = $cookie[1];
if (is_user($user)) {
$userdata = $db->sql_fetchrow($db->sql_query("SELECT points FROM ".$prefix."_users WHERE username='$uname'"));
$user_points = 'Points: '.$userdata['points'];

}



thanks for your help



Back to top Reply with quote
#6   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
You dont need to do a query unless your pulling someone else's points total. If you just want them to see how many points they have then above is fine. The global $userdata already contains that information. For the viewtopic there is a query in there that goes to the users table to get all the other information for the post add the points in that and just define it into the same tpl setting for the other info.




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#7   re: Showing userpoints in arcadegames
pcnuke
CZ Newbie
pcnuke has been a member for over 19 year's 19 Year Member
usa.gif florida.gif
Occupation: Raving Maniac
Gender: Male
Website:
Status: Offline
Joined: Jun 06, 2005
0.00 posts per day
Posts: 17
Points: 3,848
   
Ok well then maybe its something else, because when I use these codes below they show this...
===================================
Show no numbers where points should be: $user_points = 'Points: '.$userdata['user_points'];

Shows points but everyones is the same totals: $user_points = 'Points: '.$userdata['points'];


Im using v7.6, forum 2.0.14, CNB 442 YA, and OurScripts Points system(because i never found yours system until recently), does any of this matter

U can see it here: [ Register or login to view links on this board. ]

thanks for they help Telli



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
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
You cannot attach files in this forum
You cannot download files in this forum