Page 14 of 19

Re: [DEV] Auto Video Embed v.0.0.2

Posted: Tue Feb 01, 2011 9:43 pm
by 4_seven
Here u find an..

Example to modify and transform a existing BBCode to Auto Video Embed
http://www.4seven.de/forum/6test/viewto ... p=147#p147

Read from here this "living example"
http://www.phpbb.com/community/viewtopi ... #p12488495

Re: [DEV] Auto Video Embed v.0.0.2

Posted: Wed Jun 01, 2011 12:53 pm
by Mess
Did anyone get it working with the new youtu.be format. I tried but had to revert because it wouldnt work.

Re: [DEV] Auto Video Embed v.0.0.2

Posted: Wed Jun 01, 2011 10:17 pm
by 4_seven

Re: [DEV] Auto Video Embed v.0.0.2

Posted: Sat Jul 30, 2011 11:32 pm
by Kamahl19
Good work I really like it. Maybe you could add some more video servers ( http://autoembed.com/demos/ )

Re: [DEV] Auto Video Embed v.0.0.2

Posted: Sun Jul 31, 2011 10:44 am
by 4_seven
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

Re: [DEV] Auto Video Embed v.0.0.2

Posted: Tue Aug 02, 2011 5:24 am
by murdmon
Thanks 4_seven...got everything working now
I have even added an extra video site to start out my expansion

here is what I have for worldstarhiphop.com

$wshh = true;

post

Code: Select all

if (($wshh) && (strpos($preview_message, 'http://www.worldstarhiphop.com/videos/video.php?v=') !== false)){
$preview_message = preg_replace('#<a class="postlink" href="http:\/\/www.worldstarhiphop.com\/videos\/video.php\?v=(.*?)">(.*?)<\/a>#U', '<object width="525" height="350"><param name="movie" value="http://www.worldstarhiphop.com/videos/e/16711680/$1"></param><param name="wmode" value="transparent"></param><embed src="http://www.worldstarhiphop.com/videos/e/16711680/$1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>', $preview_message);}
view

Code: Select all

if (($wshh) && (strpos($message, 'http://www.worldstarhiphop.com/videos/video.php?v=') !== false)){
$message = preg_replace('#<a class="postlink" href="http:\/\/www.worldstarhiphop.com\/videos\/video.php\?v=(.*?)">(.*?)<\/a>#U', '<object width="525" height="350"><param name="movie" value="http://www.worldstarhiphop.com/videos/e/16711680/$1"></param><param name="wmode" value="transparent"></param><embed src="http://www.worldstarhiphop.com/videos/e/16711680/$1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>', $message);}
live leak
$liveleak = true;

post

Code: Select all

if (($liveleak) && (strpos($preview_message, 'http://www.liveleak.com/view?i=') !== false)){
$preview_message = preg_replace('#<a class="postlink" href="http:\/\/www.liveleak.com\/view\?i=(.*?)">(.*?)<\/a>#U', '<object width="450" height="370"><param name="movie" value="http://www.liveleak.com/e/$1"></param><param name="wmode" value="transparent"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.liveleak.com/e/$1" type="application/x-shockwave-flash" wmode="transparent" allowscriptaccess="always" width="450" height="370"></embed></object>', $preview_message);}
view

Code: Select all

if (($liveleak) && (strpos($message, 'http://www.liveleak.com/view?i=') !== false)){
$message = preg_replace('#<a class="postlink" href="http:\/\/www.liveleak.com\/view\?i=(.*?)">(.*?)<\/a>#U', '<object width="450" height="370"><param name="movie" value="http://www.liveleak.com/e/$1"></param><param name="wmode" value="transparent"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.liveleak.com/e/$1" type="application/x-shockwave-flash" wmode="transparent" allowscriptaccess="always" width="450" height="370"></embed></object>', $message);}
youtu.be

$youtube1 = true;
post

Code: Select all

if (($youtube1) && (strpos($preview_message, 'youtu.be/') !== false)){
$preview_message = preg_replace('#<a class="postlink" href="http:\/\/youtu.be\/(.*?)">(.*?)<\/a>#U', '<iframe width="425" height="349" src="http://www.youtube.com/embed/$1" frameborder="0" allowfullscreen></iframe>', $preview_message);}
view

Code: Select all

if (($youtube1) && (strpos($message, 'youtu.be/') !== false)){
$message = preg_replace('#<a class="postlink" href="http:\/\/youtu.be\/(.*?)">(.*?)<\/a>#U', '<iframe width="425" height="349" src="http://www.youtube.com/embed/$1" frameborder="0" allowfullscreen></iframe>', $message);}

Re: [DEV] Auto Video Embed v.0.0.2

Posted: Sun Aug 07, 2011 5:19 pm
by murdmon
For some reason I can't seem to see the videos when I preview. But when I submit, I CAN see the video? What am I doing wrong?

post.php

Re: [DEV] Auto Video Embed v.0.0.2

Posted: Sun Aug 07, 2011 6:14 pm
by 4_seven
you must edit each new video code in both files (view and post).
but take care of the little different syntax in the posting relevant file.
if it works in view it must work in post section, when you use the right code snytax.

Note:
- Each user customization will not be supported by me.
- There for i have linked the transform example.
- Please remove the whole file content in your last post.
- Post the code part, not the whole file. Thank you.

Re: [DEV] Auto Video Embed v.0.0.2

Posted: Sun Oct 02, 2011 1:04 am
by auvergne
=======feature request============

this mod --- or perhaps the settings on the forum i use --- doesn't work with the gnu gnash shockwave player. a maintainer of gnash says:

------------snip-------
Problem is embedded yt videos point to e.g.

http://www.youtube.com/v/DUzHLsh7_aI?version=3

'?version=3' explicitly requires version 3 (AS3) yt player which gnash can't
play, lightspark is supposed to do it.

You might request to site admins to remove version=3 param to make gnash able
to play it.
--------------------------

Re: [DEV] Auto Video Embed v.0.0.2

Posted: Sun Oct 02, 2011 8:58 am
by 4_seven
You can implement each player in this mod. just customize it.

Re: [DEV] Auto Video Embed v.0.0.2

Posted: Sun Oct 02, 2011 9:11 am
by autinhyeu
The domain 4seven.kilu.de was removed. :shock: :shock: :shock:

Re: [DEV] Auto Video Embed v.0.0.2

Posted: Sun Oct 02, 2011 9:31 am
by 4_seven
Unfortunely yes, completely deleted without any current sql dump,
So i have to build it manually from sept. 2010 to current state.

Re: [DEV] Auto Video Embed v.0.0.2

Posted: Sun Oct 02, 2011 10:45 pm
by 4_seven
Mod Links, Download and Demo corrected..

Re: [DEV] Auto Video Embed v.0.0.2

Posted: Mon Oct 17, 2011 3:58 pm
by Treefingers
Great mod. Thank you.

Is there a generalized tutorial for how to add compatibility with other videos? Particularly streaming material from Twitch.tv, Justin.tv, and Own3d.tv.

EDIT: I should add I looked at the tutorial in the original post but was confused. Sort of wondering what varies between your example (tu.tv) and something like Twitch.tv.

I really suck at this.

Re: [DEV] Auto Video Embed v.0.0.2

Posted: Mon Oct 17, 2011 6:18 pm
by 4_seven
As i wrote in Expand Instruction:
  • First you must have an existing, working BBCode.
After that study the instruction again.
With a bit time, patience and may 'try and error' it should work.