Page 1 of 1

How to ad media player in contents

Posted: Sat Dec 17, 2005 6:20 pm
by Way
Like this picture in my Serendipity :? like this

http://a10a10.com/ta7meel/up/1134839204.jpg

Posted: Sun Dec 18, 2005 8:05 am
by MySchizoBuddy
i have already mentioned how to do it
search the forum

Posted: Sat Dec 24, 2005 4:07 pm
by Way
Thanks MySchizoBuddy
I read some topic you made
But I'm asking if their are easy way to do so

Posted: Sun Dec 25, 2005 3:30 am
by MySchizoBuddy
it is really easy
which part you don't understand. let me know and i'll explain

Posted: Fri Jan 06, 2006 6:53 am
by MySchizoBuddy
u can always uplaod it to google and link it from there

Posted: Tue Apr 25, 2006 12:23 pm
by .g@sp.
I put it in this way (with the MS media player) that works in forefox and IE:
might it be possible to add a button in the wysiwig editor to insert this code...
a way where you just have to add the file source...
beause my users don't know any html, and i don't want tu explain them what's this code...

or there is some plugin that's doin'it ?

or another wysiwyg plugin... i saw there is 3 others... does someone knows if one allows integrating a video ??

thanx

Posted: Tue Apr 25, 2006 2:01 pm
by garvinhicking
Hi!

(Your rotating avatar makes me nervous :-D)

One thing you could try is to use the xtended entry properties plugin and enter a custom field for "video file". Call it "VideoFile" or something like that.

Then your people can just insert the link to the video into that custom field, and then you can edit your entries.tpl template file to place a code like this in the entry loop:

Code: Select all

Video:

<OBJECT ID="MediaPlayer" WIDTH="320" HEIGHT="285" CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject">
<PARAM NAME="FileName" VALUE="{$entry.properties.ep_VideoFile}">
<PARAM name="ShowControls" VALUE="true">
<param name="ShowStatusBar" value="false">
<PARAM name="ShowDisplay" VALUE="false">
<PARAM name="autostart" VALUE="false">
<EMBED TYPE="application/x-mplayer2" SRC="{$entry.properties.ep_VideoFile}" NAME="MediaPlayer"
WIDTH="320" HEIGHT="285" ShowControls="1" ShowStatusBar="0" ShowDisplay="0" autostart="0"> </EMBED>
</OBJECT> 
To show the media selector popup in that place, you will need this patch (I also committed that right now):

http://svn.berlios.de/viewcvs/serendipi ... erties.php

Regards,
Garvin

Posted: Tue Apr 25, 2006 2:17 pm
by .g@sp.
it looks great... :D

but... i'm a newbie in s9y... :? i really don't understand where i could paste this code in entries.tpl

somewhere here ? :

Code: Select all

            <div class="serendipity_entry_body">
                {$entry.body}
            </div>

            {if $entry.is_extended}
            <div class="serendipity_entry_extended"><a id="extended"></a>{$entry.extended}</div>
            {/if}


thanks anyway ;)

and the "prettybutton" addimage is well added... nice patch

and so sorry about my manonegra avatar :roll:

Posted: Tue Apr 25, 2006 3:08 pm
by garvinhicking
Hi!

Yes, exactly, you can add the code I give you right here:

Code: Select all

            <div class="serendipity_entry_body">
                {$entry.body}
            </div>

            {if $entry.is_extended}
            <div class="serendipity_entry_extended"><a id="extended"></a>{$entry.extended}</div>
            {/if}
            {if $entry.properties.ep_VideoFile}
Video:

<OBJECT ID="MediaPlayer" WIDTH="320" HEIGHT="285" CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject">
<PARAM NAME="FileName" VALUE="{$entry.properties.ep_VideoFile}">
<PARAM name="ShowControls" VALUE="true">
<param name="ShowStatusBar" value="false">
<PARAM name="ShowDisplay" VALUE="false">
<PARAM name="autostart" VALUE="false">
<EMBED TYPE="application/x-mplayer2" SRC="{$entry.properties.ep_VideoFile}" NAME="MediaPlayer"
WIDTH="320" HEIGHT="285" ShowControls="1" ShowStatusBar="0" ShowDisplay="0" autostart="0"> </EMBED>
</OBJECT> 
{/if}


HTH,
Garvin

Posted: Tue Apr 25, 2006 4:00 pm
by .g@sp.
that's perfect

thank you very much