Jamroom Logo
User Support Forum
Jamroom Help:
Setting up jr_downloads viewable log HELP
tulsabobt



Joined: 07 Jan 2005
Posts: 64

Posted: 05/09/12 12:10 
I've posted this as a job at earner.net but no one has applied (i.e. I am willing to pay for help).

http://www.jamroom.net/Jamroom4_jr_downloads

First, I just need help setting up a template/file to view downloads of songs. My system is a little different in that it is used by a record promoter to send out new singles. So the admin wants to see what users are downloading what files.

In the end, I need a page that will show a list of songs, username who downloaded the song and and another field such as "company" to tell us which company the user is from.

So the log (I imagine) would look like this:

Raindrops Keep Falling on My Head by Elvis download by JOE BLOW from WZYZ Radio.

The log could show all songs or just one song at a time (depending on Jamroom abilities- would prefer all)

Can anyone help me with this? Even a sample of a template file and function call would be helpful if you have download logs enabled on your site...

Thanks in advance.

If you want to get paid to help, look for my job listing on earner.net

Back to top
Brian
Jamroom Team


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

Posted: 05/10/12 10:41 
I got your Support Center ticket on this and am checking out if it's an easy add or not - I'll followup with you there.

Hope this helps!

- Brian


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


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

Posted: 05/10/12 10:49 
I'll go ahead and followup here for anyone else that might be interested as well:

Unfortunately this is not an easy addition to make, since that information is not present at the location in the download.php script where the log is actually created. It would require the download.php script be updated to get that information from the database, it would also require the log structure to be moved to a template (otherwise any time you want to add/remove an item from the log it would require a change) and then it would require an updated template function.

The best bet for doing this would be to actually use the "download" action (make sure actions are on in your quotas) and then do a custom ranking call in "action" mode - that will bring in the user/artist info into the template - i.e.

{jr_ranking mode="action" media_type="download" band_id=$_USER.user_band_id row_template="action_row.tpl"}

Customize action_row.tpl to suit your needs - the user and profile info in the row template will contain any custom fields you have created.

Hope this helps!

- Brian


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



Joined: 07 Jan 2005
Posts: 64

Posted: 05/10/12 11:09 
I'm still a little unclear. Where could I put this action call?

Would I create a new page, or a new template?

Back to top
tulsabobt



Joined: 07 Jan 2005
Posts: 64

Posted: 05/10/12 11:24 
I am probably doing this wrong, but this may help you point me in the write direction. I created a template file called downloads.tpl in my SKIN directory. The contents are:

{assign var="title" value="Action Page"}
{include file="`$JAMROOM_DIR`/skins/ProJam2/index_header.tpl"}
{include file="`$JAMROOM_DIR`/skins/ProJam2/index_menu.tpl"}




<!-- BEGIN MAIN CONTAINER -->
<div id="container">
{include file="`$JAMROOM_DIR`/skins/ProJam2/actions_header.tpl"}

{jr_ranking mode="action" media_type="download" band_id=$_USER.user_band_id row_template="action_row.tpl"}
{include file="`$JAMROOM_DIR`/skins/ProJam2/actions_footer.tpl"}

<!-- END CONTAINER -->

{include file="`$JAMROOM_DIR`/skins/ProJam2/index_footer.tpl"}

and then I call it like so: http://hitradiopromo.info/studio2/?t=downloads

but, I get blank output from action_row.tpl, which contains this:
<tr>
<td width="01%" valign="top"><a href="{$ARTIST_URL}"><img src="{$USER_IMAGE_URL}&width=48" width="48" border="0" alt="" title=""></a></td>
<td width="99%" valign="top">
<span class="highlight-txt">{$USER_NICKNAME}</span> has <span class="highlight-txt-3">{$ACTION_TEXT}</span> ...
</td>
</tr>


So- that is where I am off track.

Back to top
Brian
Jamroom Team


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

Posted: 05/10/12 11:39 
Have you enabled actions? It looks like you need to also set the "jr_log_action_downloads" advanced key to "yes":

http://www.jamroom.net/Jamroom4_Advanced_Settings#jr_log_action_download

and then download a file for a band_id, then set the "band_id" value in the ranking call to the same band_id to see if it works for you.

Hope this helps!

- Brian


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



Joined: 07 Jan 2005
Posts: 64

Posted: 05/10/12 12:20 
Yes, I had already done both of those things. For example, under media/305/download.txt I have this:
a:4:{s:4:"time";i:1327030340;s:4:"user";s:7:"unknown";s:7:"song_id";s:3:"148";s:9:"song_name";s:40:"Cloverton - The End Is The Beginning.mp3";}
a:4:{s:4:"time";i:1327607768;s:4:"user";s:7:"unknown";s:7:"song_id";s:3:"148";s:9:"song_name";s:40:"Cloverton - The End Is The Beginning.mp3";}
a:4:{s:4:"time";i:1327607786;s:4:"user";s:7:"unknown";s:7:"song_id";s:3:"148";s:9:"song_name";s:40:"Cloverton - The End Is The Beginning.mp3";}
a:4:{s:4:"time";i:1327941383;s:4:"user";s:7:"unknown";s:7:"song_id";s:3:"148";s:9:"song_name";s:40:"Cloverton - The End Is The Beginning.mp3";}
a:4:{s:4:"time";i:1328119934;s:4:"user";s:7:"unknown";s:7:"song_id";s:3:"148";s:9:"song_name";s:40:"Cloverton - The End Is The Beginning.mp3";}
a:4:{s:4:"time";i:1328139737;s:4:"user";s:7:"unknown";s:7:"song_id";s:3:"148";s:9:"song_name";s:40:"Cloverton - The End Is The Beginning.mp3";}
a:4:{s:4:"time";i:1328912765;s:4:"user";s:7:"unknown";s:7:"song_id";s:3:"148";s:9:"song_name";s:40:"Cloverton - The End Is The Beginning.mp3";}
a:4:{s:4:"time";i:1328989890;s:4:"user";s:7:"unknown";s:7:"song_id";s:3:"148";s:9:"song_name";s:40:"Cloverton - The End Is The Beginning.mp3";}
a:4:{s:4:"time";i:1329311059;s:4:"user";s:7:"unknown";s:7:"song_id";s:3:"148";s:9:"song_name";s:40:"Cloverton - The End Is The Beginning.mp3";}
a:4:{s:4:"time";i:1329594922;s:4:"user";s:7:"unknown";s:7:"song_id";s:3:"148";s:9:"song_name";s:40:"Cloverton - The End Is The Beginning.mp3";}
a:4:{s:4:"time";i:1329674150;s:4:"user";s:7:"unknown";s:7:"song_id";s:3:"148";s:9:"song_name";s:40:"Cloverton - The End Is The Beginning.mp3";}
a:4:{s:4:"time";i:1330181503;s:4:"user";s:7:"unknown";s:7:"song_id";s:3:"148";s:9:"song_name";s:40:"Cloverton - The End Is The Beginning.mp3";}
a:4:{s:4:"time";i:1332597218;s:4:"user";s:7:"unknown";s:7:"song_id";s:3:"148";s:9:"song_name";s:40:"Cloverton - The End Is The Beginning.mp3";}
a:4:{s:4:"time";i:1332597227;s:4:"user";s:7:"unknown";s:7:"song_id";s:3:"148";s:9:"song_name";s:40:"Cloverton - The End Is The Beginning.mp3";}
a:4:{s:4:"time";i:1332597242;s:4:"user";s:7:"unknown";s:7:"song_id";s:3:"148";s:9:"song_name";s:40:"Cloverton - The End Is The Beginning.mp3";}
a:4:{s:4:"time";i:1332597370;s:4:"user";s:7:"unknown";s:7:"song_id";s:3:"148";s:9:"song_name";s:40:"Cloverton - The End Is The Beginning.mp3";}
a:4:{s:4:"time";i:1333166362;s:4:"user";s:7:"unknown";s:7:"song_id";s:3:"148";s:9:"song_name";s:40:"Cloverton - The End Is The Beginning.mp3";}


So when I change the call in downloads.tpl to this:
{jr_ranking mode="action" media_type="download" band_id=305 row_template="action_row.tpl"}

I still get nothing here:
http://hitradiopromo.info/studio2/?t=downloads

Bob

Back to top
tulsabobt



Joined: 07 Jan 2005
Posts: 64

Posted: 05/10/12 12:24 
Oops! Had a typo in a template. Ok now we are getting closer!
http://hitradiopromo.info/studio2/?t=downloads

Questions:
1) Can I make this page viewable by admins only?
2) Can I have it list ALL downloads for all bands without having to edit the tpl file?
3) Can it list any other USER variables, such as Location or Real Name, etc?

Thanks,
Bob

Back to top
tulsabobt



Joined: 07 Jan 2005
Posts: 64

Posted: 05/10/12 12:29 
I figured out #3, just need #1 and #2

Back to top
Brian
Jamroom Team


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

Posted: 05/10/12 15:35 

tulsabobt:
Oops! Had a typo in a template. Ok now we are getting closer!
http://hitradiopromo.info/studio2/?t=downloads

Questions:
1) Can I make this page viewable by admins only?


Add this to the top of the template:


Code

{if $_USER.user_id != '0'}
{php}exit;{/php}
{/if}



Quote:

2) Can I have it list ALL downloads for all bands without having to edit the tpl file?


Remove the band_id parameter.

Hope this helps!

- Brian


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



Joined: 07 Jan 2005
Posts: 64

Posted: 05/10/12 18:48 
Awesome!

Last question- can {action_text} be modified in any way? It shows SONG TITLE... now and I would like to be more verbose, such as SONG TITLE BY ARTIST NAME and maybe even the file name (with WAV or MP3 extension).

Possible?

Back to top
Display posts from previous:   
User Support Forum
Jamroom Help

 
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.