MyBB Community Forums

Full Version: VAR wanted ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is there a var already in use to parse the url in a post to another function that uses "added" MyCode wrappers.. ?

Example: I'd like to parse a "full" posted url (http: etc/etc/.wmv) between [video] here [/video]

This is where it needs to go....

<param name="filename" value="{url}">

So is there a var that will replace the {url} with the full url from the post.... at the moment ?
You mean like

<param name="filename" value="$1">

And have the reg expression something like this:
\[video\](.*?)\[/video\]

?
Smile

Thanks FW,

It took a while for the penny to drop as it was a little more complicated than that. The wrappers already parse a huge string of html code; and it was getting that variable to parse the url within the string.. was the problem.

It also didn't help with the way I added extras to the post video-url... Sad

But it's all working now thanks to you.... and this is what it does.

http://waloc.com/mybb120/showthread.php?...pid=1#pid1

http://waloc.com/mybb120/showthread.php?...pid=2#pid2

Have a look at it in firefox for me as I don't use it, and I do know that it handles things differently.

Then I'll work out how to add buttons to the editor to automate the wrappers.