[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.
daclina
Registered User
Posts: 2
Joined: Tue Aug 07, 2007 6:47 am

Re: [DEV] Auto Video Embed v.0.0.3

Post by daclina »

4_seven, love you work and have been using this for some time now.

One think I meant to point out ages ago, youtube links like these (and my users paste many of them):

http://www.youtube.com/watch?feature=pl ... 3hHcRLQdc8

...are not being embedded.

Instead of the regex looking for '/watch?v=', perhaps change it to look for "v=" instead?
Last edited by daclina on Tue Mar 13, 2012 5:55 am, edited 1 time in total.
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.3

Post by 4_seven »

senseless, bcs. watch?feature=player_embedded already indicates an embedded code
and is in fact not the right syntax for a bbcode. but shure, you can change the files to your, eg. v=
Current Mods | Mod Base | php(BB) programming | No help via PM
swapvn
Registered User
Posts: 72
Joined: Thu Mar 17, 2011 7:33 am

Re: [DEV] Auto Video Embed v.0.0.3

Post by swapvn »

Hello,
I am using Auto Video Embed v.0.0.2. I really like this mod, but I don't like users to see youtube link when they search the video.

http://swapvn.com/trang_cua_ban/viewtop ... f=6&t=6499

http://swapvn.com/trang_cua_ban/search. ... n&fid[0]=6

How can I change it like viewtopic? 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.3

Post by 4_seven »

can you explain it a bit more?
Current Mods | Mod Base | php(BB) programming | No help via PM
_Al
Registered User
Posts: 203
Joined: Mon Oct 20, 2008 9:24 pm
Location: Sweetas - All your friends online
Contact:

Re: [DEV] Auto Video Embed v.0.0.3

Post by _Al »

Thanks Stevo :D
Can you add target="_blank" To the urls?
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.3

Post by 4_seven »

Where should this added? Bcs. i see a video, no link..
Current Mods | Mod Base | php(BB) programming | No help via PM
_Al
Registered User
Posts: 203
Joined: Mon Oct 20, 2008 9:24 pm
Location: Sweetas - All your friends online
Contact:

Re: [DEV] Auto Video Embed v.0.0.3

Post by _Al »

4_seven wrote:Where should this added? Bcs. i see a video, no link..
I think its only for youtube:
Image
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.3

Post by 4_seven »

ah, you mean the new lnk syntax.

open

auto_video_embed_view.php
auto_video_embed_post.php

find

Code: Select all

<a href="http://$1youtube$2/v/$3$4&hl=en&fs=1&rel=0&hd=1">
replace with

Code: Select all

<a href="http://$1youtube$2/v/$3$4&hl=en&fs=1&rel=0&hd=1" onclick="window.open(this.href);return false;">
btw: the little 'tv' right beneath the link opens the video inline
Current Mods | Mod Base | php(BB) programming | No help via PM
_Al
Registered User
Posts: 203
Joined: Mon Oct 20, 2008 9:24 pm
Location: Sweetas - All your friends online
Contact:

Re: [DEV] Auto Video Embed v.0.0.3

Post by _Al »

4_seven wrote:ah, you mean the new lnk syntax.

open

auto_video_embed_view.php
auto_video_embed_post.php

find

Code: Select all

<a href="http://$1youtube$2/v/$3$4&hl=en&fs=1&rel=0&hd=1">
replace with

Code: Select all

<a href="http://$1youtube$2/v/$3$4&hl=en&fs=1&rel=0&hd=1" onclick="window.open(this.href);return false;">
btw: the little 'tv' right beneath the link opens the video inline

Thankz :!:
pro_info
Registered User
Posts: 31
Joined: Mon Jun 11, 2012 7:59 am

Re: [DEV] Auto Video Embed v.0.0.3

Post by pro_info »

Hello,
I have links that are poorly detected how to fix it please
example link:
https://www.youtube.com/watch?v=DJybgIqRUvI
https://www.youtube.com/watch?v=5hi5qn1Or_k

thx
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.3

Post by 4_seven »

no https ;)
Current Mods | Mod Base | php(BB) programming | No help via PM
pro_info
Registered User
Posts: 31
Joined: Mon Jun 11, 2012 7:59 am

Re: [DEV] Auto Video Embed v.0.0.3

Post by pro_info »

ok thx I add :

Code: Select all

// youtube https
if (($youtube) && (strpos($message, '/watch?v=') !== false)){
$message = preg_replace('#<a class="postlink" href="https:\/\/(.*?)youtube(.*?)\/watch\?v=(.*?)">(.*?)<\/a>#U', '<object type="application/x-shockwave-flash" style="width:425px; height:344px" data="https://$1youtube$2/v/$3"><param name="movie" value="https://$1youtube$2/v/$3&hl=de&fs=1&rel=0&hd=1" /><param name="allowfullscreen" value="true" /></object>', $message);}

// youtube_lnk https
if (($youtube_lnk) && (strpos($message, '/watch?v=') !== false)){
$message = preg_replace('#<a class="postlink" href="https:\/\/(.*?)youtube(.*?)\/watch\?v=([A-Za-z0-9]+)(.*?)">(.*?)<\/a>#is', '<a href="https://$1youtube$2/v/$3$4&hl=en&fs=1&rel=0&hd=1" onclick="window.open(this.href);return false;">https://$1youtube$2/watch?v=$3$4&hl=en&fs=1&rel=0&hd=1</a>&nbsp;&nbsp;&nbsp;<span style="cursor:pointer;" onclick="spoile(&apos;yt_'.$row['post_id'].'$3&apos;);"><img src="images/embed.gif" alt="" /></span><div id="yt_'.$row['post_id'].'$3" style="display:none;"><br /><object type="application/x-shockwave-flash" style="width:425px; height:344px" data="https://$1youtube$2/v/$3$4&hl=en&fs=1&rel=0&hd=1"><param name="movie" value="https://$1youtube$2/v/$3$4&hl=en&fs=1&rel=0&hd=1" /><param name="allowfullscreen" value="true" /></object></div>', $message);}

// youtube_new https
if (($youtube_new) && (strpos($message, 'youtu.be/') !== false)){
$message = preg_replace('#<a class="postlink" href="https:\/\/(.*?)youtu.be\/(.*?)">(.*?)<\/a>#U', '<object type="application/x-shockwave-flash" style="width:425px; height:344px" data="https://youtube.com/v/$2&hl=en&fs=1&rel=0&hd=1"><param name="movie" value="https://youtube.com/v/$2&hl=en&fs=1&rel=0&hd=1" /><param name="allowfullscreen" value="true" /></object>', $message);}
User avatar
tumba25
Former Team Member
Posts: 4430
Joined: Wed Jun 06, 2007 6:42 am
Location: Kokkola, Finland.
Name: Jari Kanerva
Contact:

Re: [ABD] Auto Video Embed v.0.0.3

Post by tumba25 »

Since the MOD author has been banned I'll lock this topic as [ABD] - Abandoned. If someone else wants to take over the development, please PM anyone on the MOD Team to request a link to your development topic. You can't reuse this topic, you need to start a new.

Notice!
We do not recommend that a user of the phpBB software install this mod, or any other mod that is marked as “abandoned” or “in development”, on a live forum. Doing so may cause your forum to not perform in the manner it should.


Thank you,
The phpBB Modifications Team
Need a mod/extension created/installed, other custom-coded solution or a server admin? https://tumba25.net
Locked

Return to “[3.0.x] Abandoned MODs”