[ABD] Auto Video Embed v.0.0.3

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] Auto Video Embed v.0.0.2

Post by 4_seven »

0.0.3 preview
  • [url=http://www.4seven.de/forum/media/viewtopic.php?t=283&p=1043#p1043]youtube_lnk[/url] option with hd default, spoiler and additional link
  • youtu.be option by request
  • some new providers, like facebook
  • flv and mp3 works with local and remote url
  • all codes work with or without www
  • some corrected providers
Last edited by 4_seven on Fri Feb 10, 2012 11:50 pm, edited 8 times in total.
Current Mods | Mod Base | php(BB) programming | No help via PM
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] Auto Video Embed v.0.0.2

Post by 4_seven »

designer2 wrote:Well, I guess it wasn't me...still not working for some reason. hmmph!
Any other ideas?
open

includes/auto_video_embed_post.php

find

Code: Select all

if (($vimeo) && (strpos($preview_message, 'www.vimeo.com/') !== false)){
$preview_message = preg_replace('#<a class="postlink" href="http:\/\/www.vimeo.com\/(.*?)">(.*?)<\/a>#U', '<object type="application/x-shockwave-flash" style="width:400px;height:230px;" data="http://vimeo.com/moogaloop.swf?clip_id=$2&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=$1&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1" /></object>', $preview_message);}
replace with

Code: Select all

if (($vimeo) && (strpos($preview_message, 'vimeo.com/') !== false)){
$preview_message = preg_replace('#<a class="postlink" href="http:\/\/(.*?)vimeo.com\/(.*?)">(.*?)<\/a>#U', '<object type="application/x-shockwave-flash" style="width:400px;height:230px;" data="http://vimeo.com/moogaloop.swf?clip_id=$2&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=$2&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1" /></object>', $preview_message);}
open

includes/auto_video_embed_view.php

find

Code: Select all

if (($vimeo) && (strpos($message, 'www.vimeo.com/') !== false)){
$message = preg_replace('#<a class="postlink" href="http:\/\/www.vimeo.com\/(.*?)">(.*?)<\/a>#U', '<object type="application/x-shockwave-flash" style="width:400px;height:230px;" data="http://vimeo.com/moogaloop.swf?clip_id=$2&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=$1&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1" /></object>', $message);}
replace with

Code: Select all

if (($vimeo) && (strpos($message, 'vimeo.com/') !== false)){
$message = preg_replace('#<a class="postlink" href="http:\/\/(.*?)vimeo.com\/(.*?)">(.*?)<\/a>#U', '<object type="application/x-shockwave-flash" style="width:400px;height:230px;" data="http://vimeo.com/moogaloop.swf?clip_id=$2&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=$2&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=&fullscreen=1" /></object>', $message);}
demo: http://www.4seven.de/forum/media/viewto ... 1063#p1063

new: links can be posted with or without www
Current Mods | Mod Base | php(BB) programming | No help via PM
future74
Registered User
Posts: 135
Joined: Mon Nov 16, 2009 2:08 am
Contact:

Re: [DEV] Auto Video Embed v.0.0.2

Post by future74 »

Thanks alot for the mixcloud addon 4_seven... im looking forward to the next release :D

Have a happy new year everyone.
designer2
Registered User
Posts: 3
Joined: Thu Dec 29, 2011 7:04 pm

Re: [DEV] Auto Video Embed v.0.0.2

Post by designer2 »

The fix for VIMEO you posted works now!
Thanks very much!
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] Auto Video Embed v.0.0.2

Post by 4_seven »

I re-correct the gametrailers replace code in this post
http://www.phpbb.com/community/viewtopi ... #p13089746
So correct the replace with named in this post.

I must put conditional comments for IE, bcs. the xhtml 1.0 strict object code toses an error window on site-change (click on link) after starting a gametrailers video in IE. IE object issue on gametrailers are named here (read the Edit: Part of this post) http://www.n-europeforums.com/showpost. ... stcount=23

Note:
With this new condition this code is only xhtml 1.0 strict in non-IE-browsers, bcs. of <embed> for IE.
Seems, that no other workaround exists these days.

v.0.0.3 with features named here is currently on ~70%:
http://www.phpbb.com/community/viewtopi ... #p13092080
Current Mods | Mod Base | php(BB) programming | No help via PM
mctoms
Registered User
Posts: 35
Joined: Mon Nov 16, 2009 9:29 am
Location: Poland
Name: Thomas
Contact:

Re: [DEV] Auto Video Embed v.0.0.2

Post by mctoms »

can you add videozer and videobb.com ? its very important for me.
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] Auto Video Embed v.0.0.2

Post by 4_seven »

4_seven in first post wrote: Example to modify and transform a existing BBCode to Auto Video Embed
http://www.4seven.de/forum/6test/viewto ... p=147#p147
Current Mods | Mod Base | php(BB) programming | No help via PM
future74
Registered User
Posts: 135
Joined: Mon Nov 16, 2009 2:08 am
Contact:

Re: [DEV] Auto Video Embed v.0.0.2

Post by future74 »

Question for you 4_seven,

Would it be possible to also use this mod inside Mchat ?

Alot of our members use links in mchat and it would be great if they auto converted into videos/audio players
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] Auto Video Embed v.0.0.2

Post by 4_seven »

future74 wrote:Would it be possible to also use this mod inside Mchat ?
(near) all is possible, so the question is, should i make it?
Current Mods | Mod Base | php(BB) programming | No help via PM
future74
Registered User
Posts: 135
Joined: Mon Nov 16, 2009 2:08 am
Contact:

Re: [DEV] Auto Video Embed v.0.0.2

Post by future74 »

I would appreciate the mchat addon so much. atm i have to load so many bbcodes and members have to choose from the list for their file type.

It would be awesome to be able to just type the url and auto load the player :)

im quite sure it wont be much work for you, all thats needed is for some of your mods code to be transfered into the mchat.php file

Thanks if you decide to add this 4_seven
mykkal
Registered User
Posts: 38
Joined: Wed Aug 31, 2005 12:06 am

Re: [DEV] Auto Video Embed v.0.0.2

Post by mykkal »

Will more video sites ever be added?
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] Auto Video Embed v.0.0.2

Post by 4_seven »

you can add as many video sites to this mod, as you want
http://www.phpbb.com/community/viewtopi ... #p13096797
Current Mods | Mod Base | php(BB) programming | No help via PM
Sinno
Registered User
Posts: 40
Joined: Sat Sep 24, 2011 9:31 am

Re: [DEV] Auto Video Embed v.0.0.2

Post by Sinno »

Is this safe to use on a live forum (3.0.9)
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: [DEV] Auto Video Embed v.0.0.2

Post by 4_seven »

the mod is well tested, so i think, it's save to use.
Current Mods | Mod Base | php(BB) programming | No help via PM
Bash
Registered User
Posts: 337
Joined: Wed Mar 11, 2009 3:36 pm
Location: London, England
Name: Glenn

Re: [DEV] Auto Video Embed v.0.0.2

Post by Bash »

Waiting for it to be compatible with new (and stupid) youtube links:

http://youtu.be/ZGmiyCY9vn8
http://youtu.be/ZGmiyCY9vn8?t=3m
http://youtu.be/ZGmiyCY9vn8?t=3m11s

:P
Locked

Return to “[3.0.x] Abandoned MODs”