Welcome to Geeklog, Anonymous Thursday, March 28 2024 @ 01:54 pm EDT

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.

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>
 
 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
 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.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
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
 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
 Quote

Status: offline

::Ben

Forum User
Full Member
Registered: 01/14/05
Posts: 1569
Location:la rochelle, France
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.

::Ben
I'm available to customise your themes or plugins for your Geeklog CMS
 Quote

Status: Banned

gtgillis

Forum User
Full Member
Registered: 11/05/03
Posts: 121
Quote by: gtgillis

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.
 Quote

All times are EDT. The time is now 01:54 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