Jamroom Logo Jamroom 5 Core
is now Open Source!
User Support Forum Archive (Read Only)
User Site Design, Integration and Customization:
jrBattle Youtube player
Ambassador



Joined: 23 Jul 2012
Posts: 109

Posted: 10/05/12 23:49 
I have YTSeamless installed and I am trying to modify battle_view.tpl get the video player to popup on click with the youtube id.

I have been trying to use featured_video.tpl as a starting point because it uses the youtube popup. Can somebody help point me in the right direction?

Thanks!

Back to top
Michael
Jamroom Team


Joined: 22 Apr 2008
Posts: 3423
Location: Tokyo

Posted: 10/05/12 23:59 
Got a URL of what you want to happen and the page of where you want it to happen.

Its probably just a javascript link that needs to be coded.


_________________
Michael Ussher
Jamroom Network Team Member: http://www.jamroom.net
Priority Support: http://www.jamroom.net/Support_Center
Back to top
Ambassador



Joined: 23 Jul 2012
Posts: 109

Posted: 10/06/12 00:29 

Michael:
Got a URL of what you want to happen and the page of where you want it to happen.

Its probably just a javascript link that needs to be coded.


I just want battle_view.tpl to pop up a separate full screen youtube.com/embed/YOUTUBE ID. I see player_video_youtube.tpl, player_video_vimeo.tpl, and player_video_full.tpl in skins, so I guess I could use that and have the popup coming off the {$JAMROOM_URL}. I just need to connect it to the specific entry/video id.

Here is an excerpt from the original battle_view.tpl in modules/jrBattle/templates

Code
{elseif $battle_type == 'video'}
                    <a href="{$JAMROOM_URL}/{$_entry.band_url}/" target="_blank"><b>{$_entry.band_name}</b></a><br>
                    <a href="{$JAMROOM_URL}/index.php?mode=player&amp;type=video&amp;video_id={$_entry.media_media_id}" onclick="popwin(this.href,'video_player','450','420','yes');return false"><img src="{$JAMROOM_URL}/skins/{$index_template}/images/hifi_stream.png" alt="{$_entry.media_name}" class="m_outline"></a>



This is the excerpt from skins/Nova/cp/favorite_video.tpl that I thought might help me. Still learning and trying to make it with the little that I know. My experiments and combinations haven't worked so far and I am back to square one.


Code
{assign var="onclick" value="popwin(this.href,'video_`$video_id`',450,420,'yes');return false"}
  <a href="{$JAMROOM_URL}/index.php?t=player_video_youtube&video_id={$video}&video_youtube_id={$video_youtube_id}&band_id={$band_id}&width=450&height=420" onclick="{$onclick}">
    <img src="{$jamroom_url}/skins/Nova/cp/images/html_play_media.png" class="cpimage" alt="Play" title="Play">
  </a>
 {$video_name}
{elseif is_numeric($video_vimeo_id)}
  {assign var="onclick" value="popwin(this.href,'video_`$video_id`',450,420,'yes');return false"}
  <a href="{$JAMROOM_URL}/index.php?t=player_video_vimeo&video_id={$video}&video_vimeo_id={$video_vimeo_id}&band_id={$band_id}&width=450&height=420" onclick="{$onclick}">
    <img src="{$jamroom_url}/skins/Nova/cp/images/html_play_media.png" class="cpimage" alt="Play" title="Play">
  </a>
 {$video_name}


Back to top
Paul
Jamroom Team


Joined: 20 Aug 2003
Posts: 5341
Location: Nottingham, UK

Posted: 10/06/12 01:13 
In the original battle_view.tpl is the line -

<a href="{$JAMROOM_URL}/index.php?mode=player&amp;type=video&amp;video_id={$_entry.media_media_id}" onclick="popwin(this.href,'video_player','450','420','yes');return false"><img src="{$JAMROOM_URL}/skins/{$index_template}/images/hifi_stream.png" alt="{$_entry.media_name}" class="m_outline"></a>

The critical bit in that is the {$_entry.media_media_id} parameter. That seems to be part of the $_ROUNDS array that is generated by the module and passed into the template.
You actually need the video {$VIDEO_YOUTUBE_ID} parameter to test so as to call the appropriate Youtube or regular popup player.

I'm not familiar with the jrBattle module but what I'd do is put a {debug} in the code to see if {$VIDEO_YOUTUBE_ID} is available anywhere.


_________________
Paul Asher
Jamroom Network Team Member: http://www.jamroom.net
Priority Support: http://www.jamroom.net/Support_Center
Back to top
Ambassador



Joined: 23 Jul 2012
Posts: 109

Posted: 10/06/12 12:15 

Paul:
I'm not familiar with the jrBattle module but what I'd do is put a {debug} in the code to see if {$VIDEO_YOUTUBE_ID} is available anywhere.


Thanks for the debug tip Paul! If changing in skins, {$VIDEO_YOUTUBE_ID} IS available and I now have them embedding in the current layout nicely using 240x180.

The template battle_view.tpl seems to have some different features like admin "remove winner" and it seems to be using {$_entry.video_youtube_id}. So I will need to try to integrate the Skin battle_view.tpl into the template battle_view.tpl if I want them to look similar. I think this may be the easiest solution.

My other idea was to just activate the admin tools on the skins/battle_view.tpl and have the templates View Battle button deep link directly to the correct battle and do away with the template view all-together.

Back to top
Display posts from previous:   
User Support Forum Archive (Read Only)
User Site Design, Integration and Customization

 
Solutions
• Social Media Platform
• Social Networking Software
• Musician Website Manager
• Community Builder
Products
• Jamroom Core
• Jamroom Addons
• Jamroom Modules
• Jamroom Marketplace
Support
• Support Forum
• Documentation
• Support Center
• Contact Support
Community
• Community Forum
• Member Sites
• Developers
Company
• About Us
• Contact Us
• Privacy Policy
©2003 - 2010 Talldude Networks, LLC.