Jamroom Logo Jamroom 5 Core
is now Open Source!
User Support Forum Archive (Read Only)
Jamroom Help:
JR4 VIDEO CHARTS BY GENRE
johnchansa



Joined: 24 Mar 2013
Posts: 103

Posted: 09/11/13 21:10 
How do I set up a video chart for one genre only,say Music Videos?

The documents say:

Quote:
If a genre (or array of genres) is given, then the resulting Chart will only consist of songs or videos in the specified genre(s). Note that the genres MUST be urlencoded to function properly (use the jr_urlencode variable modifier)


What is the correct code?

{jr_chart type="video" genre="Music Video" chart_days="7". .........}???

Back to top
b360



Joined: 02 Feb 2011
Posts: 264

Posted: 09/11/13 22:14 
I asked a similar question earlier for audio charts this post might help

http://www.jamroom.net/phpBB2/viewtopic.php?t=42874

Back to top
johnchansa



Joined: 24 Mar 2013
Posts: 103

Posted: 09/12/13 03:40 
That posting relates to JR5.I guess it's different from the JR4 set up

Back to top
Douglas
Jamroom Team


Joined: 08 Oct 2004
Posts: 6639
Location: Tornado Alley!

Posted: 09/12/13 03:44 

johnchansa:


{jr_chart type="video" genre="Music Video" chart_days="7". .........}???


That is the correct way to do it in JR4.

Hope this helps,
Douglas


_________________
Douglas Hackney
Jamroom Network Team Member: http://www.jamroom.net
Priority Support: http://www.jamroom.net/Support_Center
Back to top
johnchansa



Joined: 24 Mar 2013
Posts: 103

Posted: 09/12/13 04:18 
I tried but it did not work.
Below is the exact JR4 code(Nova Skin-chart_video_row)
<a onclick="jrLoad('#rank','{$JAMROOM_URL}/chart.php?type=video&amp;chart_days={$CHART_DAYS}&amp;showall=1&amp;pagebreak={$smarty.config.default_pagebreak}&amp;header_template=chart_header.tpl&amp;row_template=chart_video_row.tpl&amp;footer_template=chart_footer.tpl&amp;genre={$VIDEO_GENRE_URL');" class="img_a">{$VIDEO_GENRE}</a></td>

How can I modify that part so that my video chart only shows genre="Music Videos"?

Back to top
johnchansa



Joined: 24 Mar 2013
Posts: 103

Posted: 09/12/13 21:46 
I need some help modifying this code so that I can get a video chart based on one genre.
I want my video chart to show videos with the genre "Music Video" only

I tried this but it did not work

{***** paYTSeamless Section *****}
{if $VIDEO_YOUTUBE_ID != '' && strlen($VIDEO_YOUTUBE_ID) == 11 && $VIDEO_GENRE !='Music+Video'}
.................................
..................................

Below is the full code for video_chart_row(Nova Skin).Any suggestions



Code
{***** paYTSeamless Section *****}
{if $VIDEO_YOUTUBE_ID != '' && strlen($VIDEO_YOUTUBE_ID) == 11}

<tr>
  <td width="5%" class="rank">{$VIDEO_RANK}</td>
  <td width="5%" class="item_c">
    <img src="{$JAMROOM_URL}/skins/Nova/images/chart_{$VIDEO_DIRECTION}.png" alt="{$VIDEO_DIRECTION}" title="{$VIDEO_DIRECTION}" class="n_outline"><br>
    {if $VIDEO_PREV_RANK > 0}
      {$VIDEO_PREV_RANK|jr_number_format}
    {else}
      -
    {/if}
  </td>
  <td width="5%" class="item" style="height:80px;">
    <a href="{$ARTIST_URL}?video={$VIDEO_ID}"><img src="{$paYTSeamless_image_url}{$VIDEO_YOUTUBE_ID}/0.jpg" width="96" height="96" alt="{$VIDEO_NAME}" class="i_outline"></a>
  </td>

  <td width="60%" class="item" style="padding:0px">

    <a href="{$ARTIST_URL}?video={$VIDEO_ID}"><span class="media_title">{$VIDEO_NAME|jr_safe_truncate:50}</span></a>
    <br><a href="{$ARTIST_URL}" class="img_a">{$BAND_NAME|jr_safe_truncate:20}</a><br>
    <a href="{$ARTIST_URL}" class="img_a">({$VIDEO_CREDITS|jr_safe_truncate:20})</a><br>

    <a href="{$JAMROOM_URL}/index.php?t=player_video_youtube&amp;video_i{$VIDEO_ID}&amp;video_youtube_id={$VIDEO_YOUTUBE_ID}&amp;band_id={$BAND_ID}&amp;width=590&amp;height=510" onclick="popwin(this.href,'video_player',568,570,'yes');return false"><img src="{$SKIN_URL}/images/hifi_stream.png" alt="{$VIDEO_NAME}" title="{$VIDEO_NAME}" class="m_outline" /></a>

  </td>

  <td width="20%" nowrap="nowrap" class="item"><a onclick="jrLoad('#rank','{$JAMROOM_URL}/chart.php?type=video&amp;chart_days={$CHART_DAYS}&amp;showall=1&amp;pagebreak={$smarty.config.default_pagebreak}&amp;header_template=chart_header.tpl&amp;row_template=chart_video_row.tpl&amp;footer_template=chart_footer.tpl&amp;genre={$VIDEO_GENRE_URL}')" class="img_a">{$VIDEO_GENRE}</a></td>
  <td width="5%" class="item_r">
    {if $QUOTA_COMMENTS == 'yes'}
      <input type="button" value="{jr_lang id="19" default="comments"}: {$VIDEO_COMMENT_COUNT|default:"0"}" class="s_button" onclick="window.location='{$ARTIST_URL}?video={$VIDEO_ID}'"><br>
    {/if}
    {if $QUOTA_VIDEO_RATING != 'no' && $QUOTA_RATE != 'no'}
    <div class="rank_pad" title="{$VIDEO_RATING_AVERAGE}">{jr_rating_form mode="image" image="`$JAMROOM_URL`/skins/Nova/images/rating_back.png" type="video" band_id=$BAND_ID media_id=$VIDEO_ID no_rate="1" current_rating=$VIDEO_RATING_AVERAGE}</div>
    {/if}
  </td>
</tr>


Back to top
Michael
Jamroom Team


Joined: 22 Apr 2008
Posts: 3423
Location: Tokyo

Posted: 09/13/13 00:06 
Looking at the docs here:
"Jamroom 4 jr_chart Template Function"
http://www.jamroom.net/Jamroom4_jr_chart

I would try this and see what it produces:

Code
{jr_chart genre="Music+Video" show="10" chart_days="7"}


and see what comes out.

--edit--
this genre limitation works on the demo system:
http://demo.jamroom.net/chart.php?type=video&chart_days=30&showall=1&header_template=chart_header.tpl&row_template=chart_video_row.tpl&footer_template=chart_footer.tpl&genre=Music+Video


_________________
Michael Ussher
Jamroom Network Team Member: http://www.jamroom.net
Priority Support: http://www.jamroom.net/Support_Center
Back to top
johnchansa



Joined: 24 Mar 2013
Posts: 103

Posted: 09/13/13 03:52 
I followed your demo example and I get the right results(...the skin background seems to disappear....).What changes should I make in the existing video_chart_row.tpl to get the same result.

http://www.zmusicportal.com/chart.php?type=video&chart_days=7&showall=1&header_template=chart_header.tpl&row_template=chart_video_row.tpl&footer_template=chart_footer.tpl&genre=Music+Video

Or do I have to create a new template?

Back to top
Michael
Jamroom Team


Joined: 22 Apr 2008
Posts: 3423
Location: Tokyo

Posted: 09/13/13 21:57 
What is the code your using now to get the results your getting?

{jr_chart type="video" genre="Music+Video" chart_days="7". .........} should work fine.

Music(space)Video wont work because the instructions (http://www.jamroom.net/Jamroom4_jr_chart) read

Quote:
Note that the genres MUST be urlencoded to function properly


URL endcoded "Music Videos" is "Music+Videos".


_________________
Michael Ussher
Jamroom Network Team Member: http://www.jamroom.net
Priority Support: http://www.jamroom.net/Support_Center
Back to top
johnchansa



Joined: 24 Mar 2013
Posts: 103

Posted: 09/14/13 04:17 
I tried that code below

Code
{jr_chart genre="Music+Video" show="10" chart_days="7"}


It did not yield anything.

I only use Youtube videos on my site(......paYTSeamless module).If I click on charts > video chart > Music Video .....I get the exact chart that I want....

You can see this on my test site.........http://www.zmusicportal.com/charts/weekly

I'm trying to find a way of making the Video chart(by genre=Music+Video) the default chart.I basically want to exclude all other video genres(instructional,concerts,documentary...) from the Video Charts.

How can this be done?

Back to top
Michael
Jamroom Team


Joined: 22 Apr 2008
Posts: 3423
Location: Tokyo

Posted: 09/15/13 01:00 
Go into the template that provides the /music/charts/weekly and look at the code in there. copy+paste.

The full URL for the page on your site is:
http://www.zmusicportal.com/chart.php?type=video&chart_days=7&showall=1&pagebreak=5&require_image=1&header_template=chart_header.tpl&row_template=chart_video_row.tpl&footer_template=chart_footer.tpl&genre=Music+Video

Its being loaded by javascript into a div.

If you want to load it via javascript into a div you can use:
$('#the_div').load('that url above.')


_________________
Michael Ussher
Jamroom Network Team Member: http://www.jamroom.net
Priority Support: http://www.jamroom.net/Support_Center
Back to top
johnchansa



Joined: 24 Mar 2013
Posts: 103

Posted: 09/15/13 07:18 
Thanks.I will give it try...

At the moment,I modified the code below and included .....&& $VIDEO_GENRE_URL == 'Music+Video'


Code
{if $VIDEO_YOUTUBE_ID != '' && strlen($VIDEO_YOUTUBE_ID) == 11 && $VIDEO_GENRE_URL == 'Music+Video'}


It excludes all the other genres from the charts.However it also excludes the chart rank.So if a video with genre=Live Concert is ranked #1,the charts will only show chart position #2,#3,#4.........etc

Back to top
Brian
Jamroom Team


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

Posted: 09/16/13 11:30 

johnchansa:
Thanks.I will give it try...

At the moment,I modified the code below and included .....&& $VIDEO_GENRE_URL == 'Music+Video'


Code
{if $VIDEO_YOUTUBE_ID != '' && strlen($VIDEO_YOUTUBE_ID) == 11 && $VIDEO_GENRE_URL == 'Music+Video'}


It excludes all the other genres from the charts.However it also excludes the chart rank.So if a video with genre=Live Concert is ranked #1,the charts will only show chart position #2,#3,#4.........etc


This is correct - if you skip it at the template level then that is what you will see. You need to add the genre in where the {jrRanking} call is placed in the template - not the "row" template.

- Brian


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



Joined: 24 Mar 2013
Posts: 103

Posted: 09/16/13 13:12 
Thanks
Any suggestions on the correct code or template to alter.
Is there a feature in jamroom (in the control panel or settings) which can make you exclude a genre from charting,rankings or search?
I believe this is possible with a quota....

Back to top
Brian
Jamroom Team


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

Posted: 09/16/13 14:08 

johnchansa:
Thanks
Any suggestions on the correct code or template to alter.
Is there a feature in jamroom (in the control panel or settings) which can make you exclude a genre from charting,rankings or search?
I believe this is possible with a quota....


Ahh - are you trying to exclude a single genre? Unfortunately there's no ability to simply exclude a specific genre - sorry about that!

- Brian


_________________
Make sure and check out:
* The Jamroom FAQ
* The Jamroom Documentation
Back to top
Display posts from previous:   
User Support Forum Archive (Read Only)
Jamroom Help

12Next >
 
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.