SOLVED - Spotlight - Random Artists

MAD
MAD
@madc
11 years ago
600 posts
We have put up 8 Artists so far using a cloned version of Nova Skin
In the skin global config we have left the Spoltlight field blank
Re:-

Quote: Enter the 4 artist ID's you want to show in top spotlight section.

Note: Separate multiple ID's with a comma, ie. 1,2,3,4. If left blank the spotlight will show random artists.

The order never changes.
Is this right or should they reload different artists. Or do we still not have enough up to see the change?


--
~ https://punkbandpromotions.com ~
Check us out for all your Punk/Alternative Music!
Check us out on Facebook:- https://facebook.com/PunkBandPromotion

updated by @madc: 01/13/14 10:06:06AM
douglas
@douglas
11 years ago
2,791 posts
Do you have a link we can check out?

Also, if you have caching turned on in your Core > Global Config, the spotlight will not change until the cache time has expired. Try turning the cache off and see if it shows random artists.


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
douglas
@douglas
11 years ago
2,791 posts
Actually, there is an issue with the spotlight function which I'll have a fix pushed to the team a little later today.

In your skins/jrNova/header.tpl file, find this:

    {* HEADER SPOTLIGHT *}
    {if isset($spotlight) && $spotlight == 'yes'}
        <div class="outer mb8">
            <div class="inner" style="padding-left:0;">
                {if isset($_conf.jrNova_spotlight_ids) && strlen($_conf.jrNova_spotlight_ids) > 0}
                    {jrCore_list module="jrProfile" order_by="_profile_id asc" limit="4" search1="_profile_id in `$_conf.jrNova_spotlight_ids`" search2="profile_active = 1" template="index_spotlight_artist.tpl"}
                {else}
                    {if isset($_conf.jrNova_require_images) && $_conf.jrNova_require_images == 'on'}
                        {jrCore_list module="jrProfile" order_by="_profile_id numerical_desc random" search1="profile_active = 1" quota_id=$_conf.jrNova_artist_quota limit="4" template="index_spotlight_artist.tpl" require_image="profile_image"}
                    {else}
                        {jrCore_list module="jrProfile" order_by="_profile_id numerical_desc random" search1="profile_active = 1" quota_id=$_conf.jrNova_artist_quota limit="4" template="index_spotlight_artist.tpl"}
                    {/if}
                 {/if}
            </div>
        </div>
    {/if}

and change it to this:

    {* HEADER SPOTLIGHT *}
    {if isset($spotlight) && $spotlight == 'yes'}
        <div class="outer mb8">
            <div class="inner" style="padding-left:0;">
                {if isset($_conf.jrNova_spotlight_ids) && strlen($_conf.jrNova_spotlight_ids) > 0}
                    {jrCore_list module="jrProfile" order_by="_profile_id asc" limit="4" search1="_profile_id in `$_conf.jrNova_spotlight_ids`" search2="profile_active = 1" template="index_spotlight_artist.tpl"}
                {else}
                    {if isset($_conf.jrNova_require_images) && $_conf.jrNova_require_images == 'on'}
                        {jrCore_list module="jrProfile" order_by="_profile_id random" search1="profile_active = 1" quota_id=$_conf.jrNova_artist_quota limit="4" template="index_spotlight_artist.tpl" require_image="profile_image"}
                    {else}
                        {jrCore_list module="jrProfile" order_by="_profile_id random" search1="profile_active = 1" quota_id=$_conf.jrNova_artist_quota limit="4" template="index_spotlight_artist.tpl"}
                    {/if}
                 {/if}
            </div>
        </div>
    {/if}

Hope this helps,
Douglas


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
MAD
MAD
@madc
11 years ago
600 posts
Cache was manually removed.
I am running Developer mode with cache set to 0
I have cleared all caches and run the integrity check removing all caches.
Site is at http://final.punkbp.com
It's in the middle of the home page under site news


--
~ https://punkbandpromotions.com ~
Check us out for all your Punk/Alternative Music!
Check us out on Facebook:- https://facebook.com/PunkBandPromotion

updated by @madc: 12/11/13 05:05:11AM
douglas
@douglas
11 years ago
2,791 posts
Are you referring to the featured tabs?

I'm not seeing the spotlight on your index page is why I ask?


--

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

updated by @douglas: 12/11/13 05:07:19AM
douglas
@douglas
11 years ago
2,791 posts
Ah, I see it now... the order on the jrCore_list functions is what you'll want to change...

So change this:

order_by="_profile_id numerical_desc random"

to this:

order_by="_profile_id random"

and make sure to change both instances in the spotlight code section.

Hope this helps,
Douglas


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
paul
@paul
11 years ago
4,326 posts
I think that as 'random' mysql queries are inherently slow, JR5 treats random calls in a faster 'pseudo random' way that needs more items to work with.
I've just tried {jrCore_list module="jrProfile" order_by="_profile_id random"} on a site with just three profiles and get the same order every time, but {jrCore_list module="jrAction" order_by="_profile_id random"} yields randomness.
So, get a few more profiles loaded up and it should be ok.
hth
Pa


--
Paul Asher - JR Developer and System Import Specialist
MAD
MAD
@madc
11 years ago
600 posts
Ok That did the trick although it's a slimmed down version of what I had???
{if isset($spotlight) && $spotlight == 'yes'}
        <div class="outer mb8">
            <div class="pbpinner" style="padding-left:0;">
<h3 class="pbp12">Random Artists</h3>
                {if isset($_conf.PunkBP_spotlight_ids) && strlen($_conf.PunkBP_spotlight_ids) > 0}
                    {if isset($_conf.PunkBP_require_images) && $_conf.PunkBP_require_images == 'on'}
                        {if isset($_conf.PunkBP_artist_quota) && $_conf.PunkBP_artist_quota > 0}
                            {jrCore_list module="jrProfile" order_by="_profile_id asc" limit="4" search1="_profile_id in `$_conf.PunkBP_spotlight_ids`" search2="profile_active = 1" search3="profile_quota_id in `$_conf.PunkBP_artist_quota`" template="index_spotlight_artist.tpl" require_image="profile_image"}
                        {else}
                            {jrCore_list module="jrProfile" order_by="_profile_id asc" limit="4" search1="_profile_id in `$_conf.PunkBP_spotlight_ids`" search2="profile_active = 1" template="index_spotlight_artist.tpl" require_image="profile_image"}
                        {/if}
                    {else}
                        {if isset($_conf.PunkBP_artist_quota) && $_conf.PunkBP_artist_quota > 0}
                            {jrCore_list module="jrProfile" order_by="_profile_id asc" limit="4" search1="_profile_id in `$_conf.PunkBP_spotlight_ids`" search2="profile_active = 1" search3="profile_quota_id in `$_conf.PunkBP_artist_quota`" template="index_spotlight_artist.tpl"}
                        {else}
                            {jrCore_list module="jrProfile" order_by="_profile_id asc" limit="4" search1="_profile_id in `$_conf.PunkBP_spotlight_ids`" search2="profile_active = 1" template="index_spotlight_artist.tpl"}
                        {/if}
                    {/if}
                {else}
                    {if isset($_conf.PunkBP_require_images) && $_conf.PunkBP_require_images == 'on'}
                        {if isset($_conf.PunkBP_artist_quota) && $_conf.PunkBP_artist_quota > 0}
                            {jrCore_list module="jrProfile" order_by="_profile_id numerical_desc random" search1="profile_quota_id in `$_conf.PunkBP_artist_quota`" limit="4" template="index_spotlight_artist.tpl" require_image="profile_image"}
                        {else}
                            {jrCore_list module="jrProfile" order_by="_profile_id numerical_desc random" limit="4" template="index_spotlight_artist.tpl" require_image="profile_image"}
                        {/if}
                    {else}
                        {if isset($_conf.PunkBP_artist_quota) && $_conf.PunkBP_artist_quota > 0}
                            {jrCore_list module="jrProfile" order_by="_profile_id numerical_desc random" search1="profile_quota_id in `$_conf.PunkBP_artist_quota`" limit="4" template="index_spotlight_artist.tpl"}
                        {else}
                            {jrCore_list module="jrProfile" order_by="_profile_id numerical_desc random" limit="4" template="index_spotlight_artist.tpl"}
                        {/if}
                    {/if}
                 {/if}
            </div>
        </div>
    {/if}



--
~ https://punkbandpromotions.com ~
Check us out for all your Punk/Alternative Music!
Check us out on Facebook:- https://facebook.com/PunkBandPromotion

updated by @madc: 12/11/13 05:22:34AM
douglas
@douglas
11 years ago
2,791 posts
I would change that to this:

	{if isset($spotlight) && $spotlight == 'yes'}
        <div class="outer mb8">
            <div class="pbpinner" style="padding-left:0;">
				<h3 class="pbp12">Random Artists</h3>
                {if isset($_conf.PunkBP_spotlight_ids) && strlen($_conf.PunkBP_spotlight_ids) > 0}
                   {jrCore_list module="jrProfile" order_by="_profile_id asc" limit="4" search1="_profile_id in `$_conf.PunkBP_spotlight_ids`" search2="profile_active = 1" search3="profile_quota_id in `$_conf.PunkBP_artist_quota`" template="index_spotlight_artist.tpl"}
                {elseif isset($_conf.PunkBP_require_images) && $_conf.PunkBP_require_images == 'on'}
                    {jrCore_list module="jrProfile" order_by="_profile_id numerical_desc random" limit="4" quota_id=$_conf.PunkBP_artist_quota template="index_spotlight_artist.tpl" require_image="profile_image"}
                {else}
                    {jrCore_list module="jrProfile" order_by="_profile_id numerical_desc random" quota_id=$_conf.PunkBP_artist_quota limit="4" template="index_spotlight_artist.tpl"}
                 {/if}
            </div>
        </div>
    {/if}

There is no need for all of that code, that looks like the code from the beginning of the creation of the Nova skin.

Hope this helps,
Douglas


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
MAD
MAD
@madc
11 years ago
600 posts
That code didn't work
This is what worked
{* HEADER SPOTLIGHT *}
    {if isset($spotlight) && $spotlight == 'yes'}
        <div class="outer mb8">
            <div class="pbpinner" style="padding-left:0;">
<h3 class="pbp12">Random Artists</h3>
                {if isset($_conf.PunkBP_spotlight_ids) && strlen($_conf.PunkBP_spotlight_ids) > 0}
                    {jrCore_list module="jrProfile" order_by="_profile_id asc" limit="4" search1="_profile_id in `$_conf.PunkBP_spotlight_ids`" search2="profile_active = 1" template="index_spotlight_artist.tpl"}
                {else}
                    {if isset($_conf.PunkBP_require_images) && $_conf.PunkBP_require_images == 'on'}
                        {jrCore_list module="jrProfile" order_by="_profile_id random" search1="profile_active = 1" quota_id=$_conf.PunkBP_artist_quota limit="4" template="index_spotlight_artist.tpl" require_image="profile_image"}
                    {else}
                        {jrCore_list module="jrProfile" order_by="_profile_id random" search1="profile_active = 1" quota_id=$_conf.PunkBP_artist_quota limit="4" template="index_spotlight_artist.tpl"}
                    {/if}
                 {/if}
            </div>
        </div>
    {/if}



--
~ https://punkbandpromotions.com ~
Check us out for all your Punk/Alternative Music!
Check us out on Facebook:- https://facebook.com/PunkBandPromotion
douglas
@douglas
11 years ago
2,791 posts
Oops, sorry about that... got ahead of myself on that, but you understand what I was getting at. ;)


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
MAD
MAD
@madc
11 years ago
600 posts
Was it the elseif?


--
~ https://punkbandpromotions.com ~
Check us out for all your Punk/Alternative Music!
Check us out on Facebook:- https://facebook.com/PunkBandPromotion
douglas
@douglas
11 years ago
2,791 posts
Yeah, you got it right.


--

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

Tags