solved profile audio count and video count?

JamBoy
JamBoy
@ashiksh
10 years ago
13 posts
How can i get the audio and video count of a profile in both php and tpl files
updated by @ashiksh: 05/10/14 09:07:12PM
douglas
@douglas
10 years ago
2,793 posts
You can use the jrCore_get_count function.

https://www.jamroom.net/the-jamroom-network/documentation/development/773/jrcore-get-count

Hope this helps,
Douglas

P.S. That would be for tpl files. I'm not sure what it would be for a custom module.


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos

updated by @douglas: 04/08/14 07:41:46AM
brian
@brian
10 years ago
10,148 posts
JamBoy:
How can i get the audio and video count of a profile in both php and tpl files

For .tpl files it would just be:

{$profile_jrAudio_item_count}
{$profile_jrVideo_item_count}

If you are on a profile page. There is an "item_count" variable for every module that a profile can create items in.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
JamBoy
JamBoy
@ashiksh
10 years ago
13 posts
{$profile_jrAudio_item_count}
{$profile_jrVideo_item_count}

Its working in profile pages, but not in home page. whats the solution
douglas
@douglas
10 years ago
2,793 posts
JamBoy:
{$profile_jrAudio_item_count}
{$profile_jrVideo_item_count}

Its working in profile pages, but not in home page. whats the solution

Se my post above for non profile pages.

Hope this helps,
Douglas


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
brian
@brian
10 years ago
10,148 posts
If you are inside a row template (i.e. inside a jrCore_list foreach loop in your template) you would use:

{$item.profile_jrAudio_item_count}
{$item.profile_jrVideo_item_count}

Jamroom uses Smarty templates - so replace $item with whatever you have defined as the itemvar in your foreach loop:

http://www.smarty.net/docs/en/language.function.foreach.tpl


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
JamBoy
JamBoy
@ashiksh
10 years ago
13 posts
Thanks

Its worked!
brian
@brian
10 years ago
10,148 posts
JamBoy:
Thanks

Its worked!

Glad to hear it - thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

Tags