solved Seamless Module Update

johnchansa
@johnchansa
10 years ago
195 posts
I'm still waiting for an update for the seamless module.
My seamless listings ar not working right(Soundcloud and audio by plays).Some problems with order-by stream_count and file_stream_count......

updated by @johnchansa: 01/28/15 04:51:18AM
paul
@paul
10 years ago
4,326 posts
Sorry - This has slipped off the bottom of my todo list. I'll push it up again. Couple of other things to finish first.


--
Paul Asher - JR Developer and System Import Specialist
brian
@brian
10 years ago
10,148 posts
Just an update that this is in testing now - thanks for your patience as we had to rework this module.

We'll get it released as soon as we can.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
johnchansa
@johnchansa
10 years ago
195 posts
Thanks for the info.
I will wait for the final update.

Thanks
Merry Xmas to the Jamroom crew.......
johnchansa
@johnchansa
10 years ago
195 posts
I gave the update a try and unfortunately, it caused some problems.I had to revert to the previous version.

1.The page bar at the bottom completely disappeared.I could not click to the next page on the following pages:- "Songs by name","Newest Songs","Songs by Ratings" and "Songs by Plays".

2.Other site features using the seamless function also got screwed up such as my modified artist spotlight header.

These were my observations.
paul
@paul
10 years ago
4,326 posts
Can you show us how you are calling the module, and give us a link to the broken pages?
Thanks


--
Paul Asher - JR Developer and System Import Specialist
johnchansa
@johnchansa
10 years ago
195 posts
I just updated the seamless module.Below is the link to the page:

http://www.zmusicportal.com/songs

1.The artist spotlight shows the same two tracks for each artist.
2.Page bar at the bottom disappears.

The stated issues all go away when I revert to the previous version
johnchansa
@johnchansa
10 years ago
195 posts
1.Code for the artist spotlight
 {jrSeamless_list modules="jrAudio,jrSoundCloud"  order_by="_created desc" profile_id=$row._profile_id template="spotlight_row.tpl" limit="2"}

2.For the songs page
 {jrSeamless_list modules="jrAudio,jrSoundCloud"  order_by=$order_by template="songs_row.tpl"  pagebreak=$_conf.ZMusic_default_pagebreak page=$_post.p}
3.Row or listing templates
{if isset($_items)}

    {foreach from=$_items item="item"}
        {if $item.seamless_module_name == 'jrAudio'}
        {jrCore_module_url module="jrAudio" assign="murl"}........
        .......

       {elseif $item.seamless_module_name == 'jrSoundCloud'}
        {jrCore_module_url module="jrSoundCloud" assign="murl"}.....
       ........
        {/if}
michael
@michael
10 years ago
7,715 posts
In 1. make sure $row._profile_id is coming out by either using {debug} or by putting
THE PROFILE ID IS: {$row._profile_id}

It looks like the profile_id is not being respected.

--edit--
If it comes out
THE PROFILE ID IS: 19

then its correct. If it comes out
THE PROFILE ID IS: 
Then the issue is the profile id is not being passed in.


--edit--
for 2. you're missing pager="true" in your call. try
{jrSeamless_list modules="jrAudio,jrSoundCloud"  order_by=$order_by template="songs_row.tpl"  pagebreak=$_conf.ZMusic_default_pagebreak page=$_post.p pager="true"}

updated by @michael: 12/25/14 06:54:01PM
johnchansa
@johnchansa
10 years ago
195 posts
Thanks for the update.
1.I'll revert to the previous version.You can see how things were originally.
http://www.zmusicportal.com/songs
2.I added pager="true" to the code and I now get two page bars.
This could be due to code written in the row template
{if $info.total_pages > 1}
    <div class="block">
        <table style="width:100%;">
            <tr>

                <td style="width:25%;">
                    {if isset($info.prev_page) && $info.prev_page > 0}
                        <input type="button" value="{jrCore_lang module="jrCore" id=26 default="<"}" class="form_button" onclick="window.location='{$info.page_base_url}/p={$info.prev_page}'">
                    {/if}
                </td>

                <td style="width:50%;text-align:center;">
                    {if $info.total_pages <= 5}
                        {$info.page}  / {$info.total_pages}
                        {else}
                        <form name="form" method="post" action="_self">
                            <select name="pagenum" class="form_select" style="width:60px;" onchange="var sel=this.form.pagenum.options[this.form.pagenum.selectedIndex].value;window.location='{$info.page_base_url}/p=' +sel">
                                {for $pages=1 to $info.total_pages}
                                    {if $info.page == $pages}
                                        <option value="{$info.this_page}" selected="selected"> {$info.this_page}</option>
                                        {else}
                                        <option value="{$pages}"> {$pages}</option>
                                    {/if}
                                {/for}
                            </select> / {$info.total_pages}
                        </form>
                    {/if}
                </td>

                <td style="width:25%;text-align:right;">
                    {if isset($info.next_page) && $info.next_page > 1}
                        <input type="button" value="{jrCore_lang module="jrCore" id=27 default=">"}" class="form_button" onclick="window.location='{$info.page_base_url}/p={$info.next_page}'">
                    {/if}
                </td>

            </tr>
        </table>
    </div>
    {/if}

updated by @johnchansa: 12/25/14 07:24:46PM
michael
@michael
10 years ago
7,715 posts
johnchansa:
Thanks for the update.
1.I'll revert to the previous version.You can see how things were originally.
http://www.zmusicportal.com/songs
Why are you showing it to me? Did you try what I suggested?
johnchansa
@johnchansa
10 years ago
195 posts
1.The artist spotlight code works well with the previous version.
I was wondering why I have to make specific modifications to the code after a module update(modules are updated every other day)..that's why I'm showing you how things were..
.
2.I added pager="true" to the code and I now get two page bars(before and after updating the module)
brian
@brian
10 years ago
10,148 posts
Part of the issue here is that the changes in this module are very significant, so there will likely need to be some template changes. I apologize for that , but for the long term "maintainability" of the Seamless module it had to be done.

The "old" version of the module basically duplicated (or attempted to duplicate) everything that the jrCore_list was doing on it's own. The jrCore_list function is a wrapper around the jrCore_db_search_items() function. So the new version of Seamless has been updated to also be a wrapper around jrCore_db_search_items() instead of trying to do it all on it's own. Long term this means that when we add new features to the Core list functionality, it's automatically supported in Seamless without us having to copy the functionality to that module.

So for your double pager issue here you need to either:

- REMOVE the pager=true from the call (this prevents the core from adding the pager)
- REMOVE your pager code and use pager=true (recommended).

I will test your specific jrSeamless_list calls here and see if I can see any issues.

Hope this helps!


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

updated by @brian: 12/26/14 07:05:28AM
brian
@brian
10 years ago
10,148 posts
Have just tested your first jrSeamless call here (I hard coded the profile_id and removed the template so it would use the default template):

{jrSeamless_list modules="jrAudio,jrSoundCloud" order_by="_created desc" profile_id=1 limit="2"}

and I am not seeing any issues. I would suspect that your $row._profile_id is wrong. It also makes me think you are trying to use a jrSeamless_list call INSIDE a row template or a loop - if you are, that is a bad idea (performance killer) and you really want to change how that works.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
johnchansa
@johnchansa
10 years ago
195 posts
Thanks for the advice.
I guess I'll have to change the skin.The idea to have an artists songs displayed in the spotlight header came from the MediaPro skin.Since my artists upload both soundcloud and audio,the only way I could combine both was to use the jrSeamless_list in that manner.However,it's a bad idea.

The update solves the initial problem i had concerning the order-by"*_stream_count" and "*_file_stream_count".Both soundcloud and audio listings now show.That closes the issue.

I have been a huge fan of the seamless module cause it help me recreate a few JR4 Nova Skin features.Too bad combined soundcloud and audio charts is not possible.I'll focus on changing to the newer version of the Nova Skin
brian
@brian
10 years ago
10,148 posts
johnchansa:
Too bad combined soundcloud and audio charts is not possible.

I have no idea how you have come to this conclusion - of course it is possible. Please see my response above.

Thanks!


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

updated by @brian: 12/27/14 08:57:17AM
johnchansa
@johnchansa
10 years ago
195 posts
Just as you suspected I'm using the seamless_list call in the index_spotlight_artist template.
 {jrSeamless_list modules="jrAudio,jrSoundCloud"  order_by="_created desc" profile_id={$row._profile_id} template="spotlight_row.tpl" limit="2"}
.This may have an effect on performance from my understanding.

Secondly,I also understand the datastore concept.That's why I say the seamless charts may not be possible.Unless there is something i'm missing.
updated by @johnchansa: 12/27/14 09:22:08AM
brian
@brian
10 years ago
10,148 posts
Actually I may be misunderstanding you - are you looking to make a combined chart? That's not possible right now, but might be doable - I can check it out.

For now you can order by *_stream_count and create a "chart", it just will be an "all time" chart.

Hope this helps!


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

updated by @brian: 12/27/14 09:26:12AM
johnchansa
@johnchansa
10 years ago
195 posts
Thanks
Case closed.....

Tags