RevCMS Help

Status
Not open for further replies.

DiverseLulz

Learning C# :D
Sep 26, 2011
90
9
As I am teh n00b, I would like to know how to make a function like {username} but for {respect}.
Thanks in advance!
Kgo!
 

Kaz

BooYah
Staff member
Nov 16, 2010
3,064
1,025
Ok. open up class.template.php

Search for:
PHP:
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'));

After:
PHP:
$this->setParams('ip_last', $users->getInfo($_SESSION['user']['id'], 'ip_last'));

Add this:
PHP:
$this->setParams('respect', $users->getInfo($_SESSION['user']['id'], 'respect'));

This creates the function.

Can i ask where you want this to be placed and which skin are you using?
 

DiverseLulz

Learning C# :D
Sep 26, 2011
90
9
Thank you for the quick reply. I'm using the Mango theme for the time being until I finish my own (hopefully Unique) Theme. I'll be using it for a stats page for the users to view their own stats etc.
 

DiverseLulz

Learning C# :D
Sep 26, 2011
90
9
It is half of what I wanted, But I just realised the database also says I have 0 Respect. Yet I just got a user to respect me.
 

Kaz

BooYah
Staff member
Nov 16, 2010
3,064
1,025
It may take a few mins for the MUS to kick in and update it (as spent credits ingame dont auto update on the cms [theres like a few mins for it update]).

Try manually editing your respect via the database and refresh the cms page :)
 
Status
Not open for further replies.

Users who are viewing this thread

Top