How to add YouTube to the VideoPro skin?

nduguseliphaz
nduguseliphaz
@ecodeahpro
7 years ago
206 posts
I am using Video Pro skin
I want to add youtube videos on the homepage Instead.
What should I do?
updated by @ecodeahpro: 09/14/17 01:23:04PM
paul
@paul
7 years ago
4,331 posts
First of all, make sure you understand Jamroom's templating system and how to edit templates - checkoutour documention here - https://www.jamroom.net/the-jamroom-network/documentation/contents - the 'Admin Handbook' docs are a good place to start. Then, its likely just a case of editing the VideoPro index.tpl template changing the {jrCore_list...} calls from 'jrVideo' tp 'jrYouTube', along with any parameters the calls may have.
hth


--
Paul Asher - JR Developer and System Import Specialist
nduguseliphaz
nduguseliphaz
@ecodeahpro
7 years ago
206 posts
I have tried that and nothing seems to work

{* /////////// DO NOT REMOVE ////////// *}
{assign var="page_template" value="index"}
{* /////////// DO NOT REMOVE ////////// *}

{jrCore_include template="header.tpl"}

{jrCore_include template="index_slides.tpl"}
{jrCore_module_url module="jrYouTube" assign="murl"}




{jrCore_lang skin="jrVideoPro" id=50 default="New Releases"}






{jrCore_list
module="jrYouTube"
order_by="_item_id numerical_desc"
limit="18"
template="index_item_1.tpl"
require_image="video_image"
}








{jrCore_lang skin="jrVideoPro" id=49 default="Staff Picks"}






{if strlen($_conf.jrVideoPro_staff_picks) > 0}
{jrCore_list
module="jrYouTube"
limit="27"
search="_item_id in `$_conf.jrVideoPro_staff_picks`"
template="index_item_2.tpl"
require_image="video_image"
}
{else}
{jrCore_list
module="jrYouTube"
limit="27"
order_by="video_file_stream_count numerical_desc"
template="index_item_2.tpl"
require_image="video_image"
}
{/if}








{jrCore_lang skin="jrVideoPro" id=51 default="Top Rated"}





{jrCore_list
module="jrYouTube"
limit="18"
order_by="video_rating_overall_average_count numerical_desc"
template="index_item_4.tpl"
require_image="video_image"
}








{jrCore_lang skin="jrVideoPro" id=52 default="Most Watched"}





{jrCore_list
module="jrYouTube"
chart_days=$_conf.jrVideoPro_watched_days
chart_field="video_file_stream_count"
limit="21"
template="index_item_3.tpl"
require_image="video_image"
}








{jrCore_lang skin="jrVideoPro" id=53 default="New Series"}




{if $_conf.jrVideoPro_list_1_active != 'off'}

{jrCore_list
module="jrYouTube"
order_by="_item_id numerical_desc"
limit="27"
group_by="video_album"
template="index_item_2.tpl"
require_image="video_image"
}


{/if}






{jrCore_lang skin="jrVideoPro" id=48 default="Comedy"}





{jrCore_list
module="jrYouTube"
order_by="_item_id numerical_desc"
limit="18"
search="video_category = comedy"
template="index_item_4.tpl"
require_image="video_image"
}








{jrCore_lang skin="jrVideoPro" id=54 default="Drama"}





{jrCore_list
module="jrYouTube"
order_by="_item_id numerical_desc"
limit="18"
search="video_category = drama"
template="index_item_4.tpl"
require_image="video_image"
}









{jrCore_include template="footer.tpl"}
douglas
@douglas
7 years ago
2,793 posts
My guess would be that the templates used for the jrCore_list functions are not setup for YouTube but rather uploaded Videos.

You'll want to modify the templates used by the jrCore_list functions to work with the YouTube module. ie. index_item_1.tpl etc.

Hope this helps!


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
SteveX
SteveX
@ultrajam
7 years ago
2,584 posts
Start with something simple, and use the youtube_ prefix, not the video_ prefix:
{jrCore_list
module="jrYouTube"
order_by="_item_id numerical_desc"
require_image="youtube_image"
}



--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
nduguseliphaz
nduguseliphaz
@ecodeahpro
7 years ago
206 posts
SteveX:
Start with something simple, and use the youtube_ prefix, not the video_ prefix:
{jrCore_list
module="jrYouTube"
order_by="_item_id numerical_desc"
require_image="youtube_image"
}

Its not working neither
SteveX
SteveX
@ultrajam
7 years ago
2,584 posts
Then make it simpler :)


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
nduguseliphaz
nduguseliphaz
@ecodeahpro
7 years ago
206 posts
SteveX:
Then make it simpler :)

what am i doing wrong


{jrCore_include template="header.tpl"}

{jrCore_include template="index_slides.tpl"}
{jrCore_module_url module="jrYoutube" assign="murl"}




{jrCore_lang skin="jrVideoPro" id=50 default="New Releases"}






{jrCore_list
module="jrYoutube"
order_by="_item_id numerical_desc"
limit="18"
template="index_item_1.tpl"
require_image="youtube_image"
}




SteveX
SteveX
@ultrajam
7 years ago
2,584 posts
nduguseliphaz:
SteveX:
Then make it simpler :)

what am i doing wrong

From what you just posted you are spelling it wrong.

jrYouTube


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
nduguseliphaz
nduguseliphaz
@ecodeahpro
7 years ago
206 posts
SteveX:
nduguseliphaz:
SteveX:
Then make it simpler :)

what am i doing wrong

From what you just posted you are spelling it wrong.

jrYouTube

I have corrected the spelling but on the page i now see>> No items found

{if isset($_items)}
{jrCore_module_url module="jrYouTube" assign="murl"}
{$page = 0}
{foreach from=$_items item="item"}
{if $item.list_rank%6 == 1}
{$page = $page+1}

{/if}




{jrCore_module_function
function="jrImage_display"
module="jrYouTube"
type="youtube_image"
item_id=$item._item_id
size="xxlarge"
crop="16:9"
class="img_scale"
alt=$item.video_title
width=false
height=false
}


{$item.video_album|truncate:40}
{$item.video_title|truncate:30}




{if $item.list_rank%6 == 0 || $item.list_rank == $info.total_items}

{/if}
{/foreach}
{else}
{jrCore_include template="no_items.tpl"}
{/if}
SteveX
SteveX
@ultrajam
7 years ago
2,584 posts
nduguseliphaz:
SteveX:
nduguseliphaz:
SteveX:
Then make it simpler :)

what am i doing wrong

From what you just posted you are spelling it wrong.

jrYouTube

I have corrected the spelling but on the page i now see>> No items found
Then there are no items which match your search.

You are searching for YouTube items with images and there are none on your system.

You could try making it simpler by removing the require_image part?


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
nduguseliphaz
nduguseliphaz
@ecodeahpro
7 years ago
206 posts
Then there are no items which match your search.

You are searching for YouTube items with images and there are none on your system.

You could try making it simpler by removing the require_image part?
[/quote]

Thanks alot..its working fine now but no thumbnails. How do i sort that?
SteveX
SteveX
@ultrajam
7 years ago
2,584 posts
Not sure, put {debug} into the template to see which variables are available.


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
nduguseliphaz
nduguseliphaz
@ecodeahpro
7 years ago
206 posts
I have no idea of what you are talking about. This part is a total headache
SteveX
SteveX
@ultrajam
7 years ago
2,584 posts
https://www.jamroom.net/the-jamroom-network/documentation/module-developer-guide/1477/debug


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
nduguseliphaz
nduguseliphaz
@ecodeahpro
7 years ago
206 posts
{jrCore_include template="header.tpl"}
<div class="index">
    {jrCore_include template="index_slides.tpl"}
    {jrCore_module_url module="jrYouTube" assign="murl"}
    <div class="pad">
        <br>
        <div class="row">
            <div class="head">
                <span><a href="{$jamroom_url}/{$murl}/new-releases">{jrCore_lang skin="jrVideoPro" id=50 default="New Releases"}</a> </span>
            </div>
        </div>
        <section>
            <div class="row">
                <div class="index_list clearfix page_1">
                    <div>
                        {jrCore_list
                         module="jrYouTube"
                         order_by="_item_id numerical_desc"
                         template="index_item_1.tpl"

                         }
                    </div>
                </div>
            </div>
            <a class="list_nav previous"></a>
            <a class="list_nav next"></a>

This one is working but i am unable to pull YouTube thumbnail images.
I have attached a screenshot of how YouTube videos are appearing now on the homepage

Please assist me in pulling YouTube Thumbnails. Its currently displaying this image (youtube/image/youtube_image/8/xxlarge/crop=16:9)
1.jpg
1.jpg  •  53KB

paul
@paul
7 years ago
4,331 posts
YouTube thumbnail images are not store locally, as they are with videos, but the YT item data provides a URL to them.
Take a look at the YouTube module item_list.tpl template to see how its done, then edit your index_item_1.tpl accordingly.
The code to show a YT thumbnail will be something like this -
<img src="{$item.youtube_artwork_url}" alt="{$item.youtube_title|jrCore_entity_string}" class="iloutline img_scale">
hth


--
Paul Asher - JR Developer and System Import Specialist

Tags