Jamroom Logo Jamroom 5 Core
is now Open Source!
User Support Forum Archive (Read Only)
User Site Design, Integration and Customization:
total favorites count in CP
Bloodcrave



Joined: 05 Jan 2008
Posts: 748

Posted: 04/22/12 14:26 
How can I get the total favorites of a user in the cp?

Code
{$_USER.favorites_count}
does not work.

Back to top
Brian
Jamroom Team


Joined: 09 Jul 2003
Posts: 37583
Location: Seattle, WA

Posted: 04/22/12 15:13 
You want to use the {jr_counts} template function along with a user_id - i.e.


Code

{jr_counts type="favorites" user_id=$USER_ID}


http://www.jamroom.net/Jamroom4_jr_counts

Hope this helps!

- Brian


_________________
Make sure and check out:
* The Jamroom FAQ
* The Jamroom Documentation
Back to top
Bloodcrave



Joined: 05 Jan 2008
Posts: 748

Posted: 04/22/12 15:17 
It's tells me that I have 160 favorites, but when i'll go to /favorite.php?mode=view it shows me nothing.

Back to top
Brian
Jamroom Team


Joined: 09 Jul 2003
Posts: 37583
Location: Seattle, WA

Posted: 04/22/12 15:18 

Bloodcrave:
It's tells me that I have 160 favorites, but when i'll go to /favorite.php?mode=view it shows me nothing.


Are you logged in as the admin? Try it as a regular user.

- Brian


_________________
Make sure and check out:
* The Jamroom FAQ
* The Jamroom Documentation
Back to top
Bloodcrave



Joined: 05 Jan 2008
Posts: 748

Posted: 04/22/12 15:22 
Same issue.
I'm logged in as an artist now with 30 site favorites 0 song and 0 video favorites.
If i delete a fav, the 160 becomes 159

Back to top
Brian
Jamroom Team


Joined: 09 Jul 2003
Posts: 37583
Location: Seattle, WA

Posted: 04/22/12 15:24 
Sorry I got the syntax wrong - it should be:


Code

{jr_counts type="favorites" user_id=$_USER.user_id}


Let me know if that works.

Thanks!

- Brian


_________________
Make sure and check out:
* The Jamroom FAQ
* The Jamroom Documentation
Back to top
Bloodcrave



Joined: 05 Jan 2008
Posts: 748

Posted: 04/22/12 15:26 
Now it tells me I have 1 favorite in total instead of the 30 artists I have saved as favorite.

Back to top
Brian
Jamroom Team


Joined: 09 Jul 2003
Posts: 37583
Location: Seattle, WA

Posted: 04/22/12 15:27 

Bloodcrave:
Now it tells me I have 1 favorite in total instead of the 30 artists I have saved as favorite.


I believe it only gives you the total favorites of songs + videos, not artists - I'll check the code but I believe that is the case. We can add that as a todo for the next release though, or see if it will work.

Hope this helps!

- Brian


_________________
Make sure and check out:
* The Jamroom FAQ
* The Jamroom Documentation
Back to top
Bloodcrave



Joined: 05 Jan 2008
Posts: 748

Posted: 04/22/12 15:29 
In that case it should give me 0 fav's because i dont have any songs or videos added to my favs.
got an another feature request btw, but I will post it in the suggestions.

Back to top
Display posts from previous:   
User Support Forum Archive (Read Only)
User Site Design, Integration and Customization

 
Solutions
• Social Media Platform
• Social Networking Software
• Musician Website Manager
• Community Builder
Products
• Jamroom Core
• Jamroom Addons
• Jamroom Modules
• Jamroom Marketplace
Support
• Support Forum
• Documentation
• Support Center
• Contact Support
Community
• Community Forum
• Member Sites
• Developers
Company
• About Us
• Contact Us
• Privacy Policy
©2003 - 2010 Talldude Networks, LLC.