Posted on: 10/23/08 02:29pm
By: gtgillis
In order to add a flash video player to a story I made the following edit in story.class.php so that I can run the script.
Text Formatted Code
function _displayEscape($in)
{
$return = str_replace('$', '$', $in);
// $return = str_replace('{', '{', $return);
// $return = str_replace('}', '}', $return);
return $return;
}
I am the only person entering stories so no one else can insert a script.
Are there any down sides to this edit?
Is there a better way to allow scripts in stories?
Below is the script I inserted into the story.
Text Formatted Code
<script type="text/javascript" src="/flowplayer/examples/js/flashembed.min.js"></script><script>window.onload = function() {
flashembed("example", {src:'/flowplayer/FlowPlayerDark.swf',width: 400, height: 290},{config: {
autoPlay:false,
controlBarBackgroundColor:'0x2e8860',
initialScale: 'scale',
videoFile: 'http://www.sillig.com/Photographs/2008-07-12/023.flv'
}}
);
}
</script>
Re: What is the down side?
Posted on: 10/23/08 03:59pm
By: beewee
You might have a look at the Autoptags plugin, and how it handles a Youtube video. If you upload a videoplayer to your site, you can make an autotag to embed the movie in a story.
Otherwise, you'll have to edit core files each time you upgrade Geeklog.
Re: What is the down side?
Posted on: 10/23/08 04:01pm
By: gtgillis
Quote by: beeweeYou might have a look at the Autoptags plugin, and how it handles a Youtube video. If you upload a videoplayer to your site, you can make an autotag to embed the movie in a story.
Thanks, I'll check it out.
Re: What is the down side?
Posted on: 10/23/08 04:07pm
By: Dirk
Maybe I'm missing something, but have you tried adding the script tag and all the required attributes to the list of allowed HTML (for Admins)?
bye, Dirk
Re: What is the down side?
Posted on: 10/23/08 04:36pm
By: gtgillis
Quote by: DirkMaybe I'm missing something, but have you tried adding the script tag and all the required attributes to the list of allowed HTML (for Admins)?
bye, Dirk
I added the script tag and required elements.
The error message that I get is ERROR: Expected '{'.
I even tried to add { and } as attributes but I think the string replace is happening prior to the tag qualification.
Regards,
Greg
Re: What is the down side?
Posted on: 10/24/08 08:03am
By: ::Ben
Hi gtgillis,
With Media Gallery you can embed your flv video in a story or a comment with autotag [video:XXXXXXXXXXXXXX] where XXXXXXXXX is your media ID.
See an exemple
here[*1] .
::Ben
Re: What is the down side?
Posted on: 10/24/08 10:45am
By: gtgillis
Quote by: gtgillisQuote by: beeweeYou might have a look at the Autoptags plugin, and how it handles a Youtube video. If you upload a videoplayer to your site, you can make an autotag to embed the movie in a story.
Thanks, I'll check it out.
I installed the Autotags plugin on my test site and it works well without the need to edit any core Geeklog files.
I created autotags for both single video and multiple videos in a story.
See
http://www.rudebastard.com/article.php?story=20081024092605622[*2] for the single video.
See
http://www.rudebastard.com/article.php?story=20081024082155548[*3] for multiple videos.
MediaGallery is a nice plugin but I wanted something a little smaller to deal with the videos.
Flowplayer and Autotag is a great solution.
Thanks for the suggestion beewee.