Jump to content
Sign in to follow this  
Someone

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

http://www.nw-engine.com/index.php?c=modules&m=120

 

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

[ATTACH=CONFIG]842[/ATTACH]

yt-sample.png.174b917415a1345d18197b7c48a8b819.png

Edited by Someone
added link

Share this post


Link to post
Share on other sites

Im not too familiar with NWE but is there any kind of bbcode parser that comes with the engine? I did something similar but I used bbcode. Now enough about me but excellent contribution.

Share this post


Link to post
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.

http://www.nw-engine.com/wiki/index.php/Module

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

Edited by Someone
added link

Share this post


Link to post
Share on other sites

Module accepted. It could well be that some hooks are missing in the wiki page. I simply have an hard time to fill it, too much to do, to little time.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Thanks, made the changes and sent update to marketplace. Middle of the night in Switzerland, so new version might not be approved for a while.

Share this post


Link to post
Share on other sites

You need to click the "Set on sale" button, once you have the module on the screen. This is like a "pre-publish" state to allow you to edit the details.

Share this post


Link to post
Share on other sites

Aha, glad I asked then :)

Should be available for all now.

Its named Yt Embed on the marketplace

 

(I am not gonna ask why, to early in the morning config.xml <module name="Embed Youtube Videos")

Share this post


Link to post
Share on other sites

i did add a BBOCDE parser for NWE on an older version will sift it out and make it available accepted youtube aswell as dailymotion, google and other bbcode entries...

Share this post


Link to post
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.

Guest
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.

Sign in to follow this  

×
×
  • Create New...