Page 1 of 1

SOLVED regexp plugin problem

Posted: Wed Sep 20, 2006 11:22 am
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.

Posted: Wed Sep 20, 2006 1:02 pm
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