Welcome to Geeklog Friday, October 20 2017 @ 05:22 pm EDT


Status: offline

gtgillis

Forum User
Full Member
Registered: 05/11/2003
Posts: 121
Location:Spring, TX
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.

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

Status: offline

beewee

Forum User
Full Member
Registered: 05/08/2003
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

Status: offline

gtgillis

Forum User
Full Member
Registered: 05/11/2003
Posts: 121
Location:Spring, TX
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.

Status: offline

Dirk

Site Admin
Admin
Registered: 12/01/2002
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

Status: offline

gtgillis

Forum User
Full Member
Registered: 05/11/2003
Posts: 121
Location:Spring, TX
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

Status: offline

::Ben

Forum User
Full Member
Registered: 14/01/2005
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

Status: offline

gtgillis

Forum User
Full Member
Registered: 05/11/2003
Posts: 121
Location:Spring, TX
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.

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