Hello Forum,
I'm using currently Wordpress and I'm planning to migrate to serendipity if it fits my needs.
Currently I'm testing serendipity an there is something I need.
In worpress there is a plugin that uses the FLASH VIDEO PLAYER to display previously uploaded flv Files.
The Difference to the Posts concerning Media Players I found via the Forum search is this: I don't want to include flashfiles directly, I want to post bbcode which is used by s9y to generate the code needed to include the flv-player and play a movie.
I'm not a php newbie, so possibly I could write some plugin myself, unfortunately there is not enough time at the moment to read in the s9y plugin system.
I didn't find anything concerning this at google or the Forums, so could you please tell me if there is a plugin that does exactly what I need or even something similar and would need just some small adjustmenst?
Any help would be appreciated, thanks in advance!
Peter
FLV Player Plugin based on FLASH VIDEO PLAYER 2.4
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: FLV Player Plugin based on FLASH VIDEO PLAYER 2.4
Hi!
Actually our current "podcast" plugin serves some kind of that purpose. It could be easy to adapt to your needs, I think.
Inside the serendipity_event_podcast.php line that'S a var $playerHTML you could enhance with a:
line that points to your FLV video player. Embedding such a video should then be as easy as just putting an <a href="....avi"> link into your entries, even straigth with videos uploadde to the s9y media database.
Since I personally have never really dealt with such video files, I don't know if that is all you need. Maybe you'd need specific options which would need to be added as preg/regexp patterns within the strings. But I'm sure we could work them out together?
The other straight forward way for you would be to use the "serendipity_event_regexpmarkup" plugin file. There just create a "FLV.php" file in its regexps subdirectory, with something like this code:
Then you could just insert "<flv:http://host/yourvideo.avi />" into your entries and it would get rewritten.
Please tell me if that helps, or how we could enhance the plugins to make them better.
Best regards,
Garvin
Actually our current "podcast" plugin serves some kind of that purpose. It could be easy to adapt to your needs, I think.
Inside the serendipity_event_podcast.php line that'S a var $playerHTML you could enhance with a:
Code: Select all
'avi' => '<object ...>'
Since I personally have never really dealt with such video files, I don't know if that is all you need. Maybe you'd need specific options which would need to be added as preg/regexp patterns within the strings. But I'm sure we could work them out together?
The other straight forward way for you would be to use the "serendipity_event_regexpmarkup" plugin file. There just create a "FLV.php" file in its regexps subdirectory, with something like this code:
Code: Select all
<?php
// Flash Player.
//
$regexpArray = array(
'SearchArray'=>array(
"/<flv:([^>]+)/>/U"
),
'ReplaceArray'=>array(
'object type="application/x-shockwave-flash" width="320" height="240" data="http://yourdomain/flv.swf?file=%s"><param name="movie" value="http://yourdomain/flv.swf?file=%s" /></object>'
)
);
Please tell me if that helps, or how we could enhance the plugins to make them better.
Best 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/
# 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/
Hi again!
Garvinhicking, thank you so much! Your second idea is exactly what I need.
I'll test it as soon as possible and post the result.
As today is my companys summer party I'll have to wait until tomorrow.
My english is too bad to express how enthused I am because of this quick and .. well, professional answer.
Thanks!
Garvinhicking, thank you so much! Your second idea is exactly what I need.
I'll test it as soon as possible and post the result.
As today is my companys summer party I'll have to wait until tomorrow.
My english is too bad to express how enthused I am because of this quick and .. well, professional answer.
Thanks!
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
No problem! Go ahead and have fun, tell us if you have suggestions or might create some cool patches
Best regards,
Garvin
No problem! Go ahead and have fun, tell us if you have suggestions or might create some cool patches
Best 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/
# 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/
Hello again! 
Since I'm not experienced in using regex, I'm stuck.
I'm trying to get this:
transformed into this:
using the regex plugin.
This is what I've got so far:
Plugin is activated and works as it should do, but not in this case.
Could anybody give me a hint?
Thanks in advance, Peter
Since I'm not experienced in using regex, I'm stuck.
I'm trying to get this:
Code: Select all
<flv href="/wp-videos/uploads/sample.flv" width="512" height="384" autostart="false" />< br/>Code: Select all
<object type="application/x-shockwave-flash" width="512" height="384" data="http://yourdomain/flv.swf?file=/wp-videos/uploads/sample.flv&autostart=false">
<param name="movie" value="http://yourdomain/flv.swf?file=/wp-videos/uploads/sample.flv&autostart=false" />
</object>This is what I've got so far:
Code: Select all
<?php
// Flash Player.
//
$regexpArray = array(
'SearchArray'=>array(
"/<flv href=\"([^>]+)\" width=\"([^>]+)\" height=\"([^>]+)\" autostart=\"([^>]+)\"/>/U"
),
'ReplaceArray'=>array(
'<object type="application/x-shockwave-flash" width="\\2" height="\\3" data="http://yourdomain/flv.swf?file=\\1&autostart=\\4"><param name="movie" value="http://yourdomain/flv.swf?file=\\1&autostart=\\4" /></object>'
)
);
Could anybody give me a hint?
Thanks in advance, Peter
And I used to think I was good at this.
I think it's grabbing a lot more than you want. Try this instead:
Tell me what that actually outputs.
I think it's grabbing a lot more than you want. Try this instead:
Code: Select all
$regexpArray = array(
'SearchArray'=>array(
'/<flv href="([^"]+)" width="([^"]+)" height="([^"]+)" autostart="([^"]+)">/U'
),
'ReplaceArray'=>array(
'<object type="application/x-shockwave-flash" width="$2" height="$3" data="http://yourdomain/flv.swf?file=$1&autostart=$4"><param name="movie" value="http://yourdomain/flv.swf?file=$1&autostart=$4" /></object>'
)
);
It works. The funny thing is: the script I've posted works, too!judebert wrote:Tell me what that actually outputs.
Don't ask me why. I've changed the filename from FlashVideoPlayer.php to flv.php and it worked!!
The sad thing is, it doesn't take changes. When I change some code nothing happen, I think there is some sort of cache besides templates_c. *sigh*
But hey.. Thanks a lot, I'm using your code.
Oh, one thing, regarding the flashplayer itself.
The correct variable is "autoStart", "autostart" won't work!
The hole thing:
Code: Select all
<?php
// Flash Player.
//
$regexpArray = array(
'SearchArray'=>array(
'/<flv href="([^"]+)" width="([^"]+)" height="([^"]+)" autostart="([^"]+)>"/U'
),
'ReplaceArray'=>array(
'<object type="application/x-shockwave-flash" width="$2" height="$3" data="YOURDOMAIN/flvplayer.swf?file=$1&autoStart=$4"><param name="movie" value="YOURDOMAIN/flvplayer.swf?file=$1&autoStart=$4" />"'
)
);Thanks!
Fixed... Just pressed "Cachen aller Artikel" (don't know in English, should be sth like "cache all articles") once in the admin area and it worked.wp_user wrote:The sad thing is, it doesn't take changes. When I change some code nothing happen, I think there is some sort of cache besides templates_c. *sigh*