Welcome to Geeklog, Anonymous Sunday, November 24 2024 @ 02:18 pm EST
Geeklog Forums
What is the down side?
Status: Banned
gtgillis
Forum User
Full Member
Registered: 11/05/03
Posts: 121
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.
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.
<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>
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>
13
16
Quote
Status: offline
beewee
Forum User
Full Member
Registered: 08/05/03
Posts: 969
Location:The Netherlands, where else?
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.
Dutch Geeklog sites about camping/hiking:
www.kampeerzaken.nl | www.campersite.nl | www.caravans.nl | www.caravans.net
Otherwise, you'll have to edit core files each time you upgrade Geeklog.
Dutch Geeklog sites about camping/hiking:
www.kampeerzaken.nl | www.campersite.nl | www.caravans.nl | www.caravans.net
10
13
Quote
Status: Banned
gtgillis
Forum User
Full Member
Registered: 11/05/03
Posts: 121
Quote 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.
Thanks, I'll check it out.
11
8
Quote
Status: Banned
gtgillis
Forum User
Full Member
Registered: 11/05/03
Posts: 121
Quote 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
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
10
8
Quote
Status: offline
::Ben
Forum User
Full Member
Registered: 01/14/05
Posts: 1569
Location:la rochelle, France
Status: Banned
gtgillis
Forum User
Full Member
Registered: 11/05/03
Posts: 121
Quote by: gtgillis
Thanks, I'll check it out.
Quote 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.
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 for the single video.
See http://www.rudebastard.com/article.php?story=20081024082155548 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.
7
13
Quote
All times are EST. The time is now 02:18 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content