How to ad media player in contents

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
Way
Regular
Posts: 59
Joined: Mon Nov 07, 2005 12:39 am
Location: SA
Contact:

How to ad media player in contents

Post by Way »

Like this picture in my Serendipity :? like this

http://a10a10.com/ta7meel/up/1134839204.jpg
MySchizoBuddy
Regular
Posts: 340
Joined: Sun Jun 12, 2005 5:28 am

Post by MySchizoBuddy »

i have already mentioned how to do it
search the forum
Image
Way
Regular
Posts: 59
Joined: Mon Nov 07, 2005 12:39 am
Location: SA
Contact:

Post by Way »

Thanks MySchizoBuddy
I read some topic you made
But I'm asking if their are easy way to do so
MySchizoBuddy
Regular
Posts: 340
Joined: Sun Jun 12, 2005 5:28 am

Post by MySchizoBuddy »

it is really easy
which part you don't understand. let me know and i'll explain
Image
MySchizoBuddy
Regular
Posts: 340
Joined: Sun Jun 12, 2005 5:28 am

Post by MySchizoBuddy »

u can always uplaod it to google and link it from there
Image
.g@sp.
Regular
Posts: 50
Joined: Thu Apr 20, 2006 2:01 pm
Location: Brussels, Belgium

Post 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
Sorry for my poor english ;)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
.g@sp.
Regular
Posts: 50
Joined: Thu Apr 20, 2006 2:01 pm
Location: Brussels, Belgium

Post 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:
Sorry for my poor english ;)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
.g@sp.
Regular
Posts: 50
Joined: Thu Apr 20, 2006 2:01 pm
Location: Brussels, Belgium

Post by .g@sp. »

that's perfect

thank you very much
Sorry for my poor english ;)
Post Reply