[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.
Locked
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 »

fix #2 v.0.0.2 (see first post for details) / reported by Mr Brainz

- broken preview, if more than one video-link is added (fixed)
- broken preview, if a html-link is added after a video-link (fixed)

hint: add a html-link (without [url] tags) always after the video-link(s), not between (unfixed)

(package will updated soon)
Last edited by 4_seven on Sat Mar 27, 2010 3:06 pm, edited 1 time in total.
Current Mods | Mod Base | php(BB) programming | No help via PM
User avatar
keith10456
Registered User
Posts: 2315
Joined: Thu Feb 24, 2005 6:55 pm
Contact:

Re: [DEV] Auto Video Embed v.0.0.2

Post by keith10456 »

Thanks for the update 8-)
Mr Brainz
Registered User
Posts: 9
Joined: Tue Nov 10, 2009 8:49 pm

Re: [DEV] Auto Video Embed v.0.0.2

Post by Mr Brainz »

So I wasn't being a retard? Yay! Thanks for updating the package. I'll check it out asap.
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 package is not updated yet, so u must do the fix#2 manually
Current Mods | Mod Base | php(BB) programming | No help via PM
Mr Brainz
Registered User
Posts: 9
Joined: Tue Nov 10, 2009 8:49 pm

Re: [DEV] Auto Video Embed v.0.0.2

Post by Mr Brainz »

I did notice. I applied the fix. It works for a link after a video but I still had problems with multiple videos in a post.

Not to worry. I'm happy with it right now.
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 »

cant be, i had the same issue and this fix have fix it...

note that all videos must have a new line eg:
video-link

video-link

video-link

video-link

html-link
that works 100%

here is a proof-pic from your board (videos are black bcs. videos don't displaying on screenshot)
http://www.loaditup.de/files/478019.jpg

also note that..
first post wrote:hint: add a html-link (without [url] tags) always after the video-link(s), not between (unfixed)
Current Mods | Mod Base | php(BB) programming | No help via PM
lovelysummer
Registered User
Posts: 437
Joined: Fri Mar 20, 2009 1:49 pm

Re: [DEV] Auto Video Embed v.0.0.2

Post by lovelysummer »

I have read your instruction in your site to add more video, still I cannot figure it out how.

I have a local yahoo video and do not understand how to make.

url :

Code: Select all

http://hk.video.yahoo.com/video/video.html?id=1882992
embed code:

Code: Select all

<object width="420" height="370" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"><param name="movie" value="http://w.video.hk.yahoo.net/video/dplayer.html?vid=1882992"></param><param name="wmode" value="transparent"></param><embed src="http://w.video.hk.yahoo.net/video/dplayer.html?vid=1882992" type="application/x-shockwave-flash" wmode="transparent" width="420" height="370"></embed></object>
Please help ! :(
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 »

which of these steps are unclear 4 u?

http://4seven.kilu.de/forum/phpbb3/view ... 1348#p1348

step 1: find a (better xhtml 1.0 strict) functional bbcode*
*without a functional bbcode+replacement i can nothing do for u
Instruction - collecting informations

The very important thing is to find the unique usable syntax of this bbcode
that means, just find out, what is the significant/relevant part of bbcode and replacement
(eg. the information behind {SIMPLETEXT} etc.)

step 2:
Instruction - name the portal-variable
etc.
etc.
that step is easy

step 3:
Instruction - the main code-transform
this is the only lite complex(!) step, but follows ever the same syntax
Last edited by 4_seven on Thu Apr 01, 2010 6:43 pm, edited 1 time in total.
Current Mods | Mod Base | php(BB) programming | No help via PM
lovelysummer
Registered User
Posts: 437
Joined: Fri Mar 20, 2009 1:49 pm

Re: [DEV] Auto Video Embed v.0.0.2

Post by lovelysummer »

The problem is I don't know how to make the bbcode ;) :cry: .....

Let me try to make the bbcode first.

Thanks again.
lovelysummer
Registered User
Posts: 437
Joined: Fri Mar 20, 2009 1:49 pm

Re: [DEV] Auto Video Embed v.0.0.2

Post by lovelysummer »

HI 4_seven,

I have made the bbcode and spend hours trying to transform into auto embed but I failed. Would you please help me?

bbcode usage

Code: Select all

[hkyahoo]http://hk.video.yahoo.com/video/video.html?id={SIMPLETEXT}[/hkyahoo]
html replacement

Code: Select all

<object width="420" height="350" data="http://w.video.hk.yahoo.net/video/dplayer.html?vid={SIMPLETEXT}" type="application/x-shockwave-flash">
<param name="movie" value="http://w.video.hk.yahoo.net/video/dplayer.html?vid={SIMPLETEXT}"/>
<param name="wmode" value="transparent" />
</<embed src="http://w.video.hk.yahoo.net/video/dplayer.html?vid={SIMPLETEXT}" type="application/x-shockwave-flash" wmode="transparent" width="420" height="350"></embed></object>
example

Code: Select all

[hkyahoo]http://hk.video.yahoo.com/video/video.html?id=1882992[/hkyahoo]
This is the code in the auto_video_embed_post.php and auto_video_embed_view.php

Code: Select all

$hkyahoo	  = true;

Code: Select all

if (($hkyahoo) && (strpos($preview_message, .w.video.hk.yahoo.net/video/dplayer.html?vid=') !== false)){
$preview_message = preg_replace('#<a class="postlink" href="http:\/\/(.*?).(.*?).(.*?).yahoo.net\/video\/dplayer.html\?vid=(.*?)">(.*?)<\/a>#is', '<object width="420" height="350"><param name="movie" value="http://w.video.hk.yahoo.net/video/dplayer.html?vid=$1"/><param name="wmode" value="transparent" /><embed src="http://w.video.hk.yahoo.net/video/dplayer.html?vid=$1" type="application/x-shockwave-flash" width="420" height="350" ></embed></object>', $preview_message);}
Thank you.
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 think u did not read the last part (transform) mindfully. but anyway..

view version

Code: Select all

if (($hkyahoo) && (strpos($message, 'hk.video.yahoo.com') !== false)){
$message = preg_replace('#<a class="postlink" href="http:\/\/hk.video.yahoo.com\/video\/video.html\?id=(.*?)">(.*?)<\/a>#is', '<object width="420" height="370" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"><param name="movie" value="http://w.video.hk.yahoo.net/video/dplayer.html?vid=$1"></param><param name="wmode" value="transparent"></param><embed src="http://w.video.hk.yahoo.net/video/dplayer.html?vid=$1" type="application/x-shockwave-flash" wmode="transparent" width="420" height="370"></embed></object>', $message);}
post version

Code: Select all

if (($hkyahoo) && (strpos($preview_message, 'hk.video.yahoo.com') !== false)){
$preview_message = preg_replace('#<a class="postlink" href="http:\/\/hk.video.yahoo.com\/video\/video.html\?id=(.*?)">(.*?)<\/a>#is', '<object width="420" height="370" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"><param name="movie" value="http://w.video.hk.yahoo.net/video/dplayer.html?vid=$1"></param><param name="wmode" value="transparent"></param><embed src="http://w.video.hk.yahoo.net/video/dplayer.html?vid=$1" type="application/x-shockwave-flash" wmode="transparent" width="420" height="370"></embed></object>', $preview_message);}
may u compare your version with this and find the difference, if u transform another code
Current Mods | Mod Base | php(BB) programming | No help via PM
lovelysummer
Registered User
Posts: 437
Joined: Fri Mar 20, 2009 1:49 pm

Re: [DEV] Auto Video Embed v.0.0.2

Post by lovelysummer »

Thankyou very much 4_seven for your code, it works like a charm. With your code I am much more clear to know which code should be used in this part

Code: Select all

($message, 'hk.video.yahoo.com')
and this part

Code: Select all

href="http:\/\/hk.video.yahoo.com\/video\/video.html\?id=(.*?)">(.*?)<\/a>
now.
:D
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 »

thx 4 feedback..
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 »

If it's not too late, would it be possible to implement auto-embed stream links too?

example links

http://www.ustream.tv/channel/italian-seria-a-hd
http://www.justin.tv/twit#r=6avi2OU~
User avatar
Mess
Registered User
Posts: 985
Joined: Wed Jul 01, 2009 6:37 am
Name: Kim

Re: [DEV] Auto Video Embed v.0.0.2

Post by Mess »

Bash wrote:If it's not too late, would it be possible to implement auto-embed stream links too?

example links

http://www.ustream.tv/channel/italian-seria-a-hd
http://www.justin.tv/twit#r=6avi2OU~

Oh yea that would be very nice indeed. Maybe add http://www.livestream.com to the list also?
In any case, keep up the good work 4_seven, you're mods are always thought through. :)
Locked

Return to “[3.0.x] Abandoned MODs”