Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

RevCMS - Template help (Skin - Habbo)

Newbie Spellweaver
Joined
Jun 1, 2012
Messages
11
Reaction score
0
Hey! I work with RevCMS, and need some help.​

I can easly show like pixels {activitypoints}, coins {coins}, email {email}, motto {motto} on my website. These come from the table 'users' in the database. I can already find these on the template ready to use in my website.

But if I want to show like respect/onlinetime/roomvisit from the table 'user_stats', which code can I use to make these (stats) show on my website? Or even make it as a template, like example coins {coins}?

Thannks in advance! /GHBK

*Sorry for my bad english.
 
I don't even know
Loyal Member
Joined
Apr 7, 2010
Messages
1,699
Reaction score
420
class.template.php

find:

if($users->isLogged())
{
$this->setParams('username', $users->getInfo($_SESSION['user']['id'], 'username'));
$this->setParams('rank', $users->getInfo($_SESSION['user']['id'], 'rank'));
$this->setParams('motto', $users->getInfo($_SESSION['user']['id'], 'motto'));
$this->setParams('email', $users->getInfo($_SESSION['user']['id'], 'mail'));
$this->setParams('coins', $users->getInfo($_SESSION['user']['id'] ,'credits'));
$this->setParams('activitypoints', $users->getInfo($_SESSION['user']['id'], 'activity_points'));
$this->setParams('figure', $users->getInfo($_SESSION['user']['id'], 'look'));
$this->setParams('ip_last', $users->getInfo($_SESSION['user']['id'], 'ip_last'));

I'm not gonna code it for you, just give instructions what to code.

Store the result of the mysql query to get the respects etc in a variable
$result = mysql_fetch_assoc(mysql_query("SELECT respect, onlinetime, roomvisit FROM user_stats WHERE user_id = '".$your id var."' LIMIT 1"));

Don't copy paste this code, it won't work.

Then add the params:

$this->setParams('respects', $result['respects']);
$this->setParams('roomvisits', $result['roomvisits']);
 
Upvote 0
Newbie Spellweaver
Joined
Jun 1, 2012
Messages
11
Reaction score
0
Thanks for your help azaidi!
But were should i put this code?

$result = mysql_fetch_assoc(mysql_query("SELECT respect, onlinetime, roomvisit FROM user_stats WHERE user_id = '".$your id var."' LIMIT 1"));

I tried in different class but I got an error with all.
Thanks in advance! /GHBK
 
Last edited:
Upvote 0
I don't even know
Loyal Member
Joined
Apr 7, 2010
Messages
1,699
Reaction score
420
Listen, it's not the actual code. You have to put something like it in class.template.php under $this->setParams('ip_last', $users->getInfo($_SESSION['user']['id'], 'ip_last'));

I don't know the table and column names so I can't really make it for you and you'll have to learn how to do it yourself.
 
Upvote 0
Newbie Spellweaver
Joined
Jun 1, 2012
Messages
11
Reaction score
0
But thanks for the support azaidi! I just need more help..
If someone got some tips, i would be glad!

The thing is that $this->setParams('rank', $users->getInfo($_SESSION['user']['id'], 'rank')); (this for example) comes from the table (users) in the database, and i can't just write:

$this->setParams('respect', $user_stats->getInfo($_SESSION['user']['id'], 'respect')); because i got an error.
I wont that it comes from the table user_stats.

Thanks in advance! /GHBK
 
Upvote 0
Back
Top