solved jrElastic should include adding a simple ranking for SoundCloud and Youtube

iLoveHouseMusic
iLoveHouseMusic
@ilovehousemusic
10 years ago
517 posts
Just wondering if you could include a simple ranking for SoundCloud and Youtube on jrElastic?
updated by @ilovehousemusic: 04/19/14 10:02:55AM
brian
@brian
10 years ago
10,148 posts
We really want Elastic to be as simple as possible - this includes limiting the number of additional templates that are included with it. Our hope is that a site owner will learn a little bit about how JR templates work by adding in their first "custom" template as well. We want to avoid having to provide templates for every possible module that might be added to a skin, as that makes the skins become overly complicated for users that are not using those additional features.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
iLoveHouseMusic
iLoveHouseMusic
@ilovehousemusic
10 years ago
517 posts
Makes sense. OK i can build that off other skins I have I suppose. Thanks!
paul
@paul
10 years ago
4,326 posts
Have a go - It really is a five minute job if you just copy and edit what's there already :-)


--
Paul Asher - JR Developer and System Import Specialist
iLoveHouseMusic
iLoveHouseMusic
@ilovehousemusic
10 years ago
517 posts
@paul, @brian - can you assist if I show you what I have so far?

So, Elastic > index.tpl looks like this for the SoundCloud div:
            <div class="block">
                <div class="title"><h2>{jrCore_lang skin=$_conf.jrCore_active_skin id="11" default="newest"}&nbsp;{jrCore_lang skin=$_conf.jrCore_active_skin id="13" default="audio"}</h2></div>
                <div class="block_content">
                    <div class="item">
                        {jrCore_list module="jrSoundCloud" order_by="_created desc" template="index_list_soundcloud.tpl" limit="5" require_image="soundcloud_image"}
                    </div>{jrCore_module_url module="jrSoundCloud" assign="audio_murl"}
                    <div class="normal right"><a href="{$jamroom_url}/{$audio_murl}">{jrCore_lang skin=$_conf.jrCore_active_skin id="23" default="see all"}&nbsp;&raquo;</a></div>
                </div>
            </div>

Then the index_list_soundcloud.tpl looks like this:

{jrCore_module_url module="jrSoundCloud" assign="murl"}
{if isset($_items)}
  {foreach from=$_items item="item"}
  <div style="display:table">
      <div style="display:table-cell">
          <a href="{$jamroom_url}/{$item.profile_url}/{$murl}/{$item._item_id}/{$item.soundcloud_title_url}"><img src="{$item.soundcloud_artwork_url}" class="iloutline img_scale"></a>
      </div>
      <div class="p5" style="display:table-cell;vertical-align:middle">
          <a href="{$jamroom_url}/{$item.profile_url}/{$murl}/{$item._item_id}/{$item.soundcloud_title_url}">{$item.soundcloud_title}</a>
      </div>
  </div>
  {/foreach}
{/if}

But on the index page, I'm not seeing any results.
iLoveHouseMusic
iLoveHouseMusic
@ilovehousemusic
10 years ago
517 posts
I think I have this wrong: require_image="soundcloud_image"

I also tried "jrSoundCloud_image"
iLoveHouseMusic
iLoveHouseMusic
@ilovehousemusic
10 years ago
517 posts
AH! Ran a debug, and didn't see soundcloud_image. Removed it. It works.

"I see" said the blind man as he picked up his hammer and saw.
updated by @ilovehousemusic: 03/18/14 06:41:25PM

Tags