Page 1 of 1

Play Module not working in the News Module.

Posted: Mon Jun 23, 2008 5:15 am
by augustash
Has anyone else come across the issue where you add a new FLV in the "Multimedia Player", and the preview, and displaying it on pages works fine, but the video will not play in the News Section (specifically on the details page).  I'm running CMSMS 1.3 (Cuba), and have pretty_urls enabled.  All of my upload paths are correct, it just seems that the News > Details Page is messing up my path to the FLV file.

Any thoughts?

Thank you,
Ben

Re: Play Module not working in the News Module.

Posted: Wed Jun 25, 2008 2:00 am
by augustash
I figured it out.  In order to fix my image paths from TinyMCE (so they display correctly) I use this code below in Site Admin > Global Settings > Global Metadata:

Code: Select all

 <base href="{root_url}/">
When you're on a News Details page that  "<base href..." tag messes up the path to the FLV file.  In my case it was not including the "uploads/" portion of the FLV filepath.  I just created a template for the news section that doesn't contain that "<base href..." tag.  Now the videos play again.  Hopefully this saves even just one person a headache!

Re: Play Module not working in the News Module.

Posted: Mon Nov 17, 2008 2:49 pm
by andymask
I am having the same problem, that Play videos do not work in News details. I am running Play 0.5.2, News 2.8.2 and CMSMS 1.4.1. The solution offered by augustash did not work. You can see the example here:

Video on the news details page: http://www.impressum-club.eu/andrei/ind ... eturnid=66

Same video on the regular page: http://www.impressum-club.eu/andrei/ind ... video-test

Please help!

Andy

Re: Play Module not working in the News Module.

Posted: Mon Nov 24, 2008 12:07 am
by sugna
Hey Andy,

I see you may have gotten the News Detail and Play mod working could you let us know how?


Shane

Re: Play Module not working in the News Module.

Posted: Mon Nov 24, 2008 9:01 am
by andymask
Solution that I used is quite simple. I've added the html-code from Play module template into the News details module template. And the correct path to the video file is set inside News details template.

1. First I have added several fields to the news: "Video" and "Summary image". Fields Video and Summary Image are of type File. They are used to upload video file and image. Summary image is used in summary and also as a video preview image in news details page.

2. Second, I have modified the template of news details. Here is the template that I use:

Code: Select all

<div id="NewsPostDetailTitle">
{$entry->title}</div>
<div id="NewsDetails">
{if !$entry->video AND $entry->summary_image}
	<img src="{root_url}/uploads/news/id{$entry->id}/{$entry->summary_image}" alt="{$entry->title}"/>
{/if}

<hr id="NewsPostDetailHorizRule" />

 {if $entry->author}
	<div id="NewsPostDetailAuthor" style="text-align:right">{$entry->author} 
</div>
  {/if}
{if $entry->formatpostdate}
	<div id="NewsPostDetailDate">
		{$entry->formatpostdate}
	</div>
{/if}

{if $entry->summary}
	<div id="NewsPostDetailSummary">
		<strong>		 
			{eval var=$entry->summary}
		</strong>
	</div>
{/if}

<div id="NewsPostDetailContent">
	{eval var=$entry->content}
</div>

{if $entry->video}

<object type="application/x-shockwave-flash" data="modules/Play/bin/player_flv_maxi.swf" width="480" height="360">
	<param name="movie" value="modules/Play/bin/player_flv_maxi.swf" />
	<param name="FlashVars" value="flv={root_url}/uploads/news/id{$entry->id}/{$entry->video}&showplayer=autohide&showstop=1&showvolume=1&showtime=2&showfullscreen=0&showloading=autohide&loadingcolor=ff0000&autoload=0&buttonovercolor=ff0000&{if $entry->summary_image}startimage=uploads/news/id{$entry->id}/{$entry->summary_image}{/if}" />
	<param name="wmode" value="transparent" />
</object>

{/if}
</div>
This block is probably most important:

Code: Select all

<object type="application/x-shockwave-flash" data="modules/Play/bin/player_flv_maxi.swf" width="480" height="360">
	<param name="movie" value="modules/Play/bin/player_flv_maxi.swf" />
	<param name="FlashVars" value="flv={root_url}/uploads/news/id{$entry->id}/{$entry->video}&showplayer=autohide&showstop=1&showvolume=1&showtime=2&showfullscreen=0&showloading=autohide&loadingcolor=ff0000&autoload=0&buttonovercolor=ff0000&{if $entry->summary_image}startimage=uploads/news/id{$entry->id}/{$entry->summary_image}{/if}" />
	<param name="wmode" value="transparent" />
</object>
So as you can see the correct path to the flv file and startimage is set based on the variables $entry->video and $entry->summary_image received from the news object. That's all!

Re: Play Module not working in the News Module.

Posted: Mon Nov 24, 2008 8:21 pm
by sugna
Thanks for the code Andy.

My only issue is I'd rather have the ability to use the file browser to choose videos. Any idea on how I would make that happen?

Shane

Re: Play Module not working in the News Module.

Posted: Wed Dec 03, 2008 10:53 am
by Zoorlat
sugna,

I'm facing the same problem as you. Will try if there is any difference in CMSMS 1.5, and then I'll file a bug report in the forge so the developer can look at this.

/Z

Re: Play Module not working in the News Module.

Posted: Sun Dec 07, 2008 2:27 pm
by andymask
In my example you choose a video with a file browser on your local computer and upload it to server with html form. Then you can use it in your template. Isn't it solving your problem?

Or did you want to have ability to select one of the files from the server? If so, then I don't know of such option in the news module.

Re: Play Module not working in the News Module.

Posted: Mon Dec 08, 2008 12:55 am
by Zoorlat
andymask,

Your tweak is nice, and I can see that it will work alright. It is a smart solution. But it would be nice to also have a solution "within" the module, so that the play module can be used the way it is supposed. I am trying to find out why the module isn't working, and see if there is an easy way to fix.