The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Youtube RegExp Compatible with preg_match_all
Hello people of vbulletin, I've decided it's time to learn some php and write a vbulletin plugin.
So far so good: But I'm having trouble with getting a rexexp to work with preg_match_all() I'm getting the dreaded Quote:
Code:
if (stripos($string, 'youtu') !== false) { $regex = 'https?:\/\/((.+\.youtube\.com\/watch\?v=)|(youtu\.be\/))([a-zA-Z0-9-_]+)'; preg_match_all($regex, $string, $matches); if (!empty($matches)) { $og_array['og:video'] = $matches[2][0]; } } |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|