solved Changing from newest videos to newest youtube videos

Eddy
Eddy
@eddy
10 years ago
479 posts
I'm using the elastic skin, and wanted to know how I could change the feature in the front page, from newest videos to newest youtube videos?

Thanks
updated by @eddy: 09/01/14 11:48:02AM
paul
@paul
10 years ago
4,326 posts
In the jrElastic index.tpl file, find this bit of code -
            {* Newest Videos Block *}
            {if jrCore_module_is_active('jrVideo')}
            <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="14" default="videos"}</h2>
                    {jrCore_module_url module="jrVideo" assign="video_murl"}
                    <div class="title-more"><a href="{$jamroom_url}/{$video_murl}">{jrCore_lang skin=$_conf.jrCore_active_skin id="22" default="all"}</a></div>
                </div>
                <div class="block_content">
                    <div class="item">
                        {jrCore_list module="jrVideo" order_by="_created desc" template="index_list_videos.tpl" limit="5" require_image="video_image"}
                    </div>
                </div>
            </div>
            {/if}
and change it to -
            {* Newest Youtube Videos Block *}
            {if jrCore_module_is_active('jrYouTube')}
            <div class="block">
                <div class="title">
                    <h2>{jrCore_lang skin=$_conf.jrCore_active_skin id="11" default="newest"}&nbsp;{jrCore_lang module="jrYouTube" id="40" default="YouTube"}&nbsp;{jrCore_lang skin=$_conf.jrCore_active_skin id="14" default="videos"}</h2>
                    {jrCore_module_url module="jrYouTube" assign="youtube_murl"}
                    <div class="title-more"><a href="{$jamroom_url}/{$youtube_murl}">{jrCore_lang skin=$_conf.jrCore_active_skin id="22" default="all"}</a></div>
                </div>
                <div class="block_content">
                    <div class="item">
                        {jrCore_list module="jrYouTube" order_by="_created desc" template="index_list_youtubes.tpl" limit="5"}
                    </div>
                </div>
            </div>
            {/if}
Then, copy index_list_videos.tpl to index_list_youtubes.tpl, and edit it to -
{if isset($_items)}
    {foreach from=$_items item="item"}
    <div style="display:table">
        <div style="display:table-cell">
            <a href="{$jamroom_url}/{$item.profile_url}/{$_params.module_url}/{$item._item_id}/{$item.youtube_title_url}"><img src="{$item.youtube_artwork_url}" alt="{$item.youtube_title|jrCore_entity_string}" class="iloutline img_scale"></a>
        </div>
        <div class="p5" style="display:table-cell;vertical-align:middle">
            <a href="{$jamroom_url}/{$item.profile_url}/{$_params.module_url}/{$item._item_id}/{$item.youtube_title_url}" class="media_title">{$item.youtube_title}</a>
        </div>
    </div>
    {/foreach}
{/if}
hth
Pa


--
Paul Asher - JR Developer and System Import Specialist
Eddy
Eddy
@eddy
10 years ago
479 posts
How do I make the thumbnails for the youtube videos the same size (smaller) like the ones for local videos, audio, profiles etc? I did everything above, but the youtube thumbnails are to big.

Thanks
paul
@paul
10 years ago
4,326 posts
Put width and height options in the YouTube img tag and adjust their values to suit -
<img src="{$item.youtube_artwork_url}" width="100px" height="100px" alt="{$item.youtube_title|jrCore_entity_string}" class="iloutline img_scale">



--
Paul Asher - JR Developer and System Import Specialist

updated by @paul: 08/01/14 01:01:41PM
Eddy
Eddy
@eddy
10 years ago
479 posts
Tried doing that Paul, but doesn't resize it at all, I reset caches, cleaned history/temp files and nothing.
paul
@paul
10 years ago
4,326 posts
Its pretty basic html. If it doesn't work we're all screwed lol
Maybe CSS is overriding things. Take out the class option and maybe the style in the surrounding div


--
Paul Asher - JR Developer and System Import Specialist
Eddy
Eddy
@eddy
10 years ago
479 posts
LOL, removing the class option did it, thanks a bunch.
paul
@paul
10 years ago
4,326 posts
That's Good !!


--
Paul Asher - JR Developer and System Import Specialist

Tags