Hi everybody
I'm trying to modify the bot to allow to embed Monflux movies.
However, if it works nice with only one parameter (the movie id), I'm a bit stuck with the addition of a second parameter (a folder) as the pattern of the Monflux movies is built as the following:
www.monflux.org/flvplayer-3.12.swf?file=uploads/***remdir***/videos/***code***.flv
I first thought that it was simple by adding the movie to the content as this:
{monflux}thedir_themovieid{/monflux}
My problem is here: how to decode ***remdir***?
For example, for this
I tried this:{monflux}24_0123456{/monflux} from I except to get :
www.monflux.org/flvplayer-3.12.swf?file=uploads/24/videos/0123456.flv foreach ($regex as $key => $value) { // searching for marks
if (preg_match_all($regex[$key][1], $row->text, $matches, PREG_PATTERN_ORDER) > 0) {
foreach ($matches[0] as $match) {
$match = preg_replace("/{.+?}/", "", $match);
$remotedir = str_replace("***remdir***", $match, $regex[$key][0] );
$code = str_replace("***code***", $match, $regex[$key][0] );
$row->text = preg_replace("#{".preg_quote($key)."}".preg_quote($match)."{/".preg_quote($key)."}#s", $startcode.$remotedir.'_'.$code.$endcode , $row->text );
}
}
}
but the final html code gives:
www.monflux.org/flvplayer-3.12.swf?file=uploads/24_13869741954730598a0d0f2/videos/***code***.flv
I guess the issue is my modification of the regex portion code but my knowledge is a bit poor with regular expressions.
Any clue will be appreciated.
Thanks a lot
Fred