• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: [SOLVED} Player Module and splitting the template code
PostPosted: Sun Apr 22, 2012 7:55 pm 
Offline
Power Poster
Power Poster
User avatar

Joined: Sun Sep 16, 2007 3:07 am
Posts: 341
Location: Houston, Texas USA
Hi, all. I am revamping a client's site. The original site, using the Multimedia Player, has a page where he's displaying a gallery of his videos. This works fine out of the box with a second player template I created. No issue since there's just one division where this is housed.

However ... (you knew that was coming, right?), he's revamping his site and we have a place for images or videos in a division in the top, and content a few "rows" down below. I've finally convinced him not to put autoloaded videos on each page, thankfully. But here's my new issue with this redesign:

There is some other page content between the video player template code and the video thumbnail template code. I've tried to put basically everything into the video template, but that trips me up because the
Code:
{content}
tag necessarily has to go in there as well.

But I can't have just video and thumbnail code in the player template because I lose the rest of my content/divisions/formatting.

Is there some way I can maybe use custom content or content alias to trick the player into loading the video code, the rest of the page, then the video thumbnails and finally the rest of the page?

I hope this question makes sense. What is happening is that the current/original player template code is this:

Code:
<!--  PLAY MODULE TEMPLATE HONFISH VIDEO LIBRARY -->
<div class="graybox-video-library">
{if ($files|@count) > 1}<script type="text/javascript">// <![CDATA[
function {$moduleid}changervideo(id,flv,titre) {literal}{
var player=document.getElementById(id);
player.SetVariable("player:jsStop", "");player.SetVariable("player:jsUrl", flv);player.SetVariable("player:jsPlay", "");
}{/literal}
// ]]></script>
{foreach from=$files key=title item=tmpfile}
<a href="" onclick="{$moduleid}changervideo('{$moduleid}videoplayer','{$tmpfile}','{$title}');return false;">
   <img class="item-image" src="{$tmpfile|regex_replace:"~\/([^\/]+).flv$~i":"/thumb_\\1.jpg"}" alt="{$title}" title="{$title}" longdesc="{$tmpfile}" />
</a>{/foreach}
{/if}
</div><!-- /graybox-video-library -->
<div class="divider"></div>
<center>
<object id="{$moduleid}videoplayer" type="application/x-shockwave-flash" data="{$location}" width="{$width}" height="{$height}">
   <param name="movie" value="{$location}" />
   <param name="FlashVars" value="flv={$file}{foreach from=$player_params key=n item=v}&amp;{$n}={$v}{/foreach}" />
   <param name="wmode" value="transparent" />
</object>
</center>
<!--  /PLAY MODULE TEMPLATE HONFISH VIDEO GALLERY -->


But I need to split it up like this:

Code:
<!--  THESE VIDEO THUMBS WILL BE IN THE BOTTOM CONTENT SECTION -->
<div class="graybox-video-library">
{if ($files|@count) > 1}<script type="text/javascript">// <![CDATA[
function {$moduleid}changervideo(id,flv,titre) {literal}{
var player=document.getElementById(id);
player.SetVariable("player:jsStop", "");player.SetVariable("player:jsUrl", flv);player.SetVariable("player:jsPlay", "");
}{/literal}
// ]]></script>
{foreach from=$files key=title item=tmpfile}
<a href="" onclick="{$moduleid}changervideo('{$moduleid}videoplayer','{$tmpfile}','{$title}');return false;">
   <img class="item-image" src="{$tmpfile|regex_replace:"~\/([^\/]+).flv$~i":"/thumb_\\1.jpg"}" alt="{$title}" title="{$title}" longdesc="{$tmpfile}" />
</a>{/foreach}
{/if}
</div><!-- /graybox-video-library -->
<div class="divider"></div>


Code:
<!-- THIS VIDEO PLAYER PART NEEDS TO BE ON THE TOP -->
<center>
<object id="{$moduleid}videoplayer" type="application/x-shockwave-flash" data="{$location}" width="{$width}" height="{$height}">
   <param name="movie" value="{$location}" />
   <param name="FlashVars" value="flv={$file}{foreach from=$player_params key=n item=v}&amp;{$n}={$v}{/foreach}" />
   <param name="wmode" value="transparent" />
</object>
</center>


If you need to see either the original site or the testbed site to get an idea of the layout, go here:

Original site (turn speakers down!):
http://www.honolulufish.com/video-library/

Testbed site (need credentials to view):
http://honfish.mytestbed.com
Login credentials: client/letmein

Thanks!

_________________
Visit our web design studio, Pixelita Designs
Submit your site to the We Love CMSMS showcase


Last edited by pixelita on Sun Apr 22, 2012 8:27 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Player Module and splitting the template code
PostPosted: Sun Apr 22, 2012 8:26 pm 
Offline
Power Poster
Power Poster
User avatar

Joined: Sun Sep 16, 2007 3:07 am
Posts: 341
Location: Houston, Texas USA
Naturally, after I posted this, I figured it out.

As long as the code that calls the PLAYER is in the player template, you can put the thumbnail code wherever you want it. Problem solved!

_________________
Visit our web design studio, Pixelita Designs
Submit your site to the We Love CMSMS showcase


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
A2 Hosting