solved Members List Not Invoking on Page Refresh

Dazed
Dazed
@dazed
8 years ago
1,022 posts
I moved the members tpl's over from PJ to Audio Pro and I have a slight issue where I only see entries when I hit Reset. The initial page load just comes up empty.

Any ideas?

updated by @dazed: 03/29/17 01:49:18AM
michael
@michael
8 years ago
7,719 posts
Need to know the code you've copied from one skin to the other in this case. As detailed as possible so we can understand what you've done, then might be able to help with what to do to fix it. :)
Dazed
Dazed
@dazed
8 years ago
1,022 posts
Hey Michael. Sorry since it works when clicking reset I figured it was something that would jump out to you guys since it is just not initializing. I would think some missing js but I could be wrong.

The move was relatively uneventful with mostly language string changes. I pulled out the below, as I have done on other templates, that were throwing errors in the browser. The reset works with it in or out but there are console errors with it in.

I have my site running the new skin now so you can see it here - https://www.mixposure.com/members

<script type="text/javascript">
    $(document).ready(function(){ldelim}
        jrSkinInit();
    {rdelim});
</script>

updated by @dazed: 12/27/16 02:14:36PM
Dazed
Dazed
@dazed
8 years ago
1,022 posts
shameless bump
douglas
@douglas
8 years ago
2,791 posts
Those three areas are loaded by this:

<script type="text/javascript">
    $(document).ready(function(){
        jrSetActive('#default');
        jrLoad('#alpha_members',core_system_url + '/members_list/alpha');
        jrLoad('#new_members',core_system_url + '/members_list/newest');
        jrLoad('#most_viewed_members',core_system_url + '/members_list/most_viewed');
     });
</script>

and the jrLoad function is in the PJ .js file.

function jrLoad(id,url,round_id,round_num) {
    if (typeof url == "undefined") {
        return false;
    }
    if (url == 'blank') {
        $(id).hide();
    }
    else if (id == '#hidden') {
        $(id).hide();
        $(id).load(url);
    }
    else {
        if (id == '#rank') {
            var t = $('#rank').height();
            if (t == null) {
                $('#main').html('<div class="inner"><div id="rank"></div></div>');
            }
        }
        var h = $(id).height();
        if (h > 150) {
            $(id).height(h);
        }
        $(id).fadeTo(100,0.5,function() {
            $(id).html('<div style="text-align:center;padding:20px;margin:0 auto;"><img src="'+ core_system_url +'/skins/jrProJam/img/loading.gif" style="margin:15px;"><br>Loading...</div>');
            $(id).load(url,function() {
                var l = $(id).text();
                if (l.length < 1 && id != '#player') {
                    $(id).html('');
                }
                if (h > 150) {
                    $(id).height('100%');
                }
                if (round_id && round_num > 0) {
                    $(id).fadeTo(100,1.00,function() {
                        if (jQuery.browser.msie) {
                            this.style.removeAttribute('filter');
                        }
                        $(round_id).corner(round_num +'px');
                    });
                }
                else {
                    $(id).fadeTo(100,1,function() {
                        if (jQuery.browser.msie) {
                            this.style.removeAttribute('filter');
                        }
                    });
                }
            })
        });
    }
}

Hope this helps!


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
Dazed
Dazed
@dazed
8 years ago
1,022 posts
Douglas Appreciate the help. I have that js function in. Where is that script from? I do not see it in the templates?
Dazed
Dazed
@dazed
8 years ago
1,022 posts
nvm. I added that to the members page and all is well. Thanks again!
douglas
@douglas
8 years ago
2,791 posts
Dazed:
nvm. I added that to the members page and all is well. Thanks again!

Yep, it is at the top of the members.tpl for ProJam.

Glad you got it figured out.

:)


--

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