RevCMS show stats from user_stats?
Hello everyone,
I am editing my REvCMS and would like toshow the amount of respect on the /me page.
For the details of the users table in the phoenix database irs easy to add. And after adding it to the class file you are able to add {shells} and it will show your Vippoints.
But now I want to show Respects and Gifts given. I tried it the same way but didnt work. I also took a look at the revcms homes addon but that didnt work either.
Does anyone know how to implement this?
Hope to hear from you guys.
-Maestrom
Re: RevCMS show stats from user_stats?
Stats are saved in user_stats
so you have to load that seperately.
Re: RevCMS show stats from user_stats?
I know that, so I tried to make the same function used in the .class and try to load into the me. But when I added this it wouldnt load my .me again?
-Maestrom
Re: RevCMS show stats from user_stats?
Is anyone able to help please?
Adding this:
$this->setParams('respect', $user_stats->getInfo($_SESSION['user']['id'], 'respect'));
Doesnt help also I tried to use the script from the revCMS Homes thread but that doesnt load either.
-Maestrom
Re: RevCMS show stats from user_stats?
did you also add the field with above value in the query it self
Re: RevCMS show stats from user_stats?
function get_info() takes values from the users table. So copy the function and rename it to something like get_user_stats() and set the correct query as the data is stored in user_stats table.
Quote:
Originally Posted by
Superfun
did you also add the field with above value in the query it self
Seems like you dont know how RevCMS works.
Re: RevCMS show stats from user_stats?
Quote:
Originally Posted by
HillBilly
function get_info() takes values from the users table. So copy the function and rename it to something like get_user_stats() and set the correct query as the data is stored in user_stats table.
Seems like you dont know how RevCMS works.
When I try to add stuff like this: $this->setParams('respect', $user_stats->get_user_stats($_SESSION['user']['id'], 'respect'));
My /me page turns blank?
Re: RevCMS show stats from user_stats?
becuase the function get_user_stats() doesnt exist. You have to add that manually.
Re: RevCMS show stats from user_stats?
Quote:
Originally Posted by
HillBilly
becuase the function get_user_stats() doesnt exist. You have to add that manually.
Thanks for the quick answer, are you able to provide me some details about how I can add such requests?
-Maestrom
Re: RevCMS show stats from user_stats?
Quote:
Originally Posted by
HillBilly
function get_info() takes values from the users table. So copy the function and rename it to something like get_user_stats() and set the correct query as the data is stored in user_stats table.
Seems like you dont know how RevCMS works.
No i dont, but in any languange you have to set the parameter indentifier in the query before you can even set the variable. Logic.