Jump to content

Embed Youtube Links

Recommended Posts

1.1.2 Update

*Set sizes of embedded links through the module manager.

*Set max amount of embedded videos in each posting, this counts both links and [yt] tags.

*Added [yt] BB code. [yt=small|medium|large]videoid[/yt] Pixel sizes for each size can be set in module manager

Module available fro free here



Credit for the "all known youtube links" regex goes to ridgerunner @ http://stackoverflow.com/questions/5830387/php-regex-find-all-youtube-video-ids-in-string



Edited by Someone
added link
Link to comment
Share on other sites

Yes, there is.

To define your own BB code , just mak a new module, make a file called pretty_message.php then do what you want todo with the variable $sourceText

If you want to implement this in your own system, the regex used is available in the link I posted.

I tried to find the hook pretty_message.php in the documentation, but it is missing in the list of hooks.


EDIT: It has now been added at http://www.nw-engine.com/wiki/index.php/Pretty_message.php

Edited by Someone
added link
Link to comment
Share on other sites

Understandable regarding the time limit. Just wanted to point out.

I will improve the module to also allow for [yt]videoid[/yt] BB code, That way user can also set the size he wishes for the video.

And a setting for default embedded size when parsing yt links.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...