Enabling / Disabling boxes on the Home page

pch
@pch
12 years ago
328 posts
Hi,

Is there any switch ON/OFF (1/0) in the ACP to enable/diseable boxes on the Home page (Latest Blogs And News, Reviews And Articles, Events Calendar etc) or should one just comment them out or manually remove them from the template?

Also how to add a "Newest Audio" box to the home page?

Thanks
updated by @pch: 12/21/13 09:35:21PM
douglas
@douglas
12 years ago
2,806 posts
You'll want to either comment out the code or just remove the code. There isn't a skin setting that will turn them off.

As for "Newest Audio", that would depend on where you want to add it on the home page?


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
pch
@pch
12 years ago
328 posts
@Brain

Thanks for moving my post here. I wasn't aware of this "Design and Skin Customization" Forum. Sorry for dplicating my post.

Thanks
pch
@pch
12 years ago
328 posts
douglas:
You'll want to either comment out the code or just remove the code. There isn't a skin setting that will turn them off.

As for "Newest Audio", that would depend on where you want to add it on the home page?

Thanks Douglas. I would like to place it just above the "Newest videos" box.

Thanks
brian
@brian
12 years ago
10,149 posts
pch:
@Brain

Thanks for moving my post here. I wasn't aware of this "Design and Skin Customization" Forum. Sorry for dplicating my post.

Thanks

No worries - just trying to keep things organized if we can :)


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
pch
@pch
12 years ago
328 posts
Thanks Boss. :)
douglas
@douglas
12 years ago
2,806 posts
Your going to have to modify two templates and create another.

First, create a new template named index_new_music.tpl and put this code in it.

{capture name="row_template" assign="new_music_template"}
    {literal}
        {jrCore_module_url module="jrAudio" assign="murl"}
        {if isset($_items)}
        <div class="container">
            <div class="row">
                {foreach from=$_items item="row"}
                <div class="col4{if $row@last} last{/if}">
                    <div class="center">
                        <a href="{$jamroom_url}/{$row.profile_url}/{$murl}/{$row._item_id}/{$row.audio_title_url}">{jrCore_module_function function="jrImage_display" module="jrAudio" type="audio_image" item_id=$row._item_id size="medium" crop="auto" width="175" height="175" alt=$row.audio_title title=$row.audio_title class="iloutline img_shadow"}</a><br>
                        <h4><a href="{$jamroom_url}/{$row.profile_url}" title="{$row.profile_name}">{if strlen($row.audio_title) > 20}{$row.audio_title|truncate:20:"...":false}{else}{$row.audio_title}{/if}</a></h4>
                    </div>
                </div>
                {/foreach}
            </div>
        </div>
        {if $info.total_pages > 1}
        <div style="float:left; padding-top:12px;">
            {if $info.prev_page > 0}
            <span class="button-arrow-previous" onclick="jrLoad('#newest_music','{$info.page_base_url}/p={$info.prev_page}');">&nbsp;</span>
            {else}
            <span class="button-arrow-previous-off">&nbsp;</span>
            {/if}
            {if $info.next_page > 1}
            <span class="button-arrow-next" onclick="jrLoad('#newest_music','{$info.page_base_url}/p={$info.next_page}');">&nbsp;</span>
            {else}
            <span class="button-arrow-next-off">&nbsp;</span>
            {/if}
        </div>
        {/if}
        <div style="float:right; padding-top:9px;">
            <a href="{$jamroom_url}/music" title="More Music"><div class="button-more">&nbsp;</div></a>
        </div>

        <div class="clear"> </div>
        {/if}
    {/literal}
{/capture}



{if isset($_conf.jrProJamLight_require_images) && $_conf.jrProJamLight_require_images == 'on'}
    {jrCore_list module="jrAudio" order_by="_created desc" template=$new_music_template require_image="audio_image" pagebreak="3" page=$_post.p}
{else}
    {jrCore_list module="jrAudio" order_by="_created desc" template=$new_music_template pagebreak="3" page=$_post.p}
{/if}

Then in your skins/jrProJamLight/index.tpl file, find this:

{* NEWEST VIDEOS *}

and above that add this:

{* NEWEST AUDIO *}
    <div class="col12 last">
        <h3>{jrCore_lang skin=$_conf.jrCore_active_skin id="11" default="Newest"} {jrCore_lang skin=$_conf.jrCore_active_skin id="56" default="Music"}</h3><br>
        <br>
        <div class="newest_body_3 mb30 pt20">
            <div id="newest_music">
            </div>
        </div>
    </div>

then open your skins/jrProJamLight/js/jrProJamLight.js file and find this:

    jrLoad('#newest_videos',core_system_url + '/index_new_videos');

right above it add this:

    jrLoad('#newest_music',core_system_url + '/index_new_music');

That should show a row of Newest Music right above the Newest Videos section on the home page.

Be sure to clear your cache via the Core Tools.

Hope this helps,
Douglas


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
pch
@pch
12 years ago
328 posts
Wow, no words. Just awesome! Thanks a lot Douglas. I wouldn't have managed to do it by myself. Great Support.

This modification should be included in JR Skins, out of the box. :)

Many Thanks
updated by @pch: 11/20/13 05:38:57PM
douglas
@douglas
12 years ago
2,806 posts
Your welcome, glad it worked for you.

I'm not sure that this will make it into the skin or not. But at least this post is here in case anyone else wants to do the same.


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
pch
@pch
12 years ago
328 posts
Thanks Douglas. Great support.

Tags