SOLVED regexp plugin problem

Creating and modifying plugins.
Post Reply
lordcoffee
Regular
Posts: 308
Joined: Tue Nov 29, 2005 10:22 pm
Location: Munich - Germany
Contact:

SOLVED regexp plugin problem

Post by lordcoffee »

Hi everybody!

I've tried the regexp event_plugin. I'm using this regular expression to insert a Flash Video Player:

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://mydomain.de/player/flvplayer.swf?file=/movies/%s"><param name="movie" value="http://mydomain.de/player/flvplayer.swf?file=/movies%s" /></object>'
    )
);
And when I insert this code in my entry:

Code: Select all

Here is my new Video:
<flv: Video.flv />
the Frontpage shows the Player but without a video. In the sourcecode I've seen this %s and I thought this would insert the filename wich I inserted in the editor. In this case it should be video.flv. But it's only %s. Can somebody help me with this javascript thing?

Thanks, Lordcoffee.
Last edited by lordcoffee on Wed Sep 20, 2006 1:02 pm, edited 1 time in total.
lordcoffee
Regular
Posts: 308
Joined: Tue Nov 29, 2005 10:22 pm
Location: Munich - Germany
Contact:

Post by lordcoffee »

Sorry, I solved the Problem! A bit of searching and reading and the solution was simple:

Just replaced the %s with a $1

Thanks anyway :D
Post Reply