vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Show Thread Enhancements - Automatic Embedded Video (youtube, plus many more) (https://vborg.vbsupport.ru/showthread.php?t=150472)

mfyvie 06-22-2007 10:00 PM

Automatic Embedded Video (youtube, plus many more)
 
This hack has been withdrawn. Read on for an explanation. Shortly after the initial release I was contacted by another developer who had some ideas for the mod. This developer basically rewrote a new mod based on my original concept. Unfortunately we couldn't come to an agreement on a way to develop and support the future of this mod. Since he has released his mod separately, and it does pretty much everything my original mod did and is more efficient for those running large systems, I have decided to discontinue the further development of my mod. I took this decision because I don't believe that it makes sense to have two mods out there doing the same thing. I recommend to all users, both present and future, that you switch over to his mod instead (here). I've taken a look at it and I think it's a great mod and you'll all be very happy with it. I understand that he will also provide routines to import and convert tags used by my mod, this should also make your life easier.

Since I will not develop this mod further, I am also withdrawing support for it. Since I don't believe there is such a thing as an unsupported mod (since people will ALWAYS ask for and expect support regardless) I have therefore withdrawn the file from download. I hope some of you can understand my decision.

This mod has had a short but happy life, and I wish you all the best with the replacement mod. Thank you to everyone who has offered encouragement so far, and I hope to see you on my next mod.

I've left the original text below for historical reasons:


What does this mod do?


If a user copies and pastes a URL that links to a video streaming service (such as youtube) the mod will automatically take the URL and convert it into an embedded form directly in the post itself. Users can now play the videos directly from the thread! In other words:
  • No template or file edits
  • Nothing to configure
  • Initial version supports sixteen different video sharing sites
  • Pasted URLs are automatically converted to versions that display embedded video - in thread
  • Option to include original URL in additional to providing embedded version.
  • Forum, group and user permissions allow you to include or exclude who/what is affected by this mod.
How many services will it support?

The initial version contains support for sixteen different video services. If others contribute the required information for other services, this is likely to grow. The initial version (1.0) contains support for the following services:

Youtube, Metacafe, iFilm, Putfile, Bolt, Google Video, Guba, Grouper, Revver, Atom Films, Veoh, Myspace Video, Vimeo, Vmix, Eyespot, Liveleak, Sapo

Which services does it not support?

Many video sites don't provide enough information in the URLs to make automatic embedding possible. The following services were checked and found to be impossible to use with this mod:

Photobucket, Daily Motion, vidiLife, Yahoo Video, AOL Uncut, Yikers, vSocial, ManiaTV, Phanfare, CastPost, Jumpcut, Sharkle, Clipshack, Filecow, Break

Please don't request that these services be included in this mod - it's not possible. If you'd like to try and figure out how to do it yourself - please do!

Why is this different to other mods?


Other mods require you to enter BB Code yourself, but more importantly they require the user to have to add the tags themselves. Users are notoriously lazy and often won't even bother to use BB Code. This mod suits lazy users - it handles everything automatically without the user having to do anything - they just copy and paste the URL!

How do I install it?

Download the enclosed .xml file. In your AdminCP -> Plugins and Products -> Manage Products -> Add/Import Product use the browse button to upload the .xml file you just downloaded and make sure "Allow Overwrite" is set to yes if you are upgrading from a previous version. Click "Import". Installation time - 30 seconds.

How do I configure it?

Go to AdminCP -> vBulletin Options -> Automatic Embedded Video. All settings are pretty much self explanatory and there is nothing that needs to be changed for most forums.

Are there any limitations?

The hack will only work with properly formatted URLs. If the user mangles them, it may not work. Only new messages posted will be affected and this mod will not have any effect on any URLs you may paste in while editing. It will only take effect when you preview or submit new posts!

Is there a downside to this mod?

None that I can think of!

Will new services be added in future?

Possibly. Make sure you click "Installed" so that you'll be notified about new versions.

How can I expand it myself?

See the first post on this thread for details.

User Testimonials

What have people been saying about this mod?

"Anyway, this is be far the best mod of the year! something so simple, yet so effective! My members and myself love it. Thanks again." - hornstar1337

"No way! This Hack is simply a Must!!" - Silvio

"simply the best mod ever." - kushal

"You are my hero. My users are always F'n up the BBcode that should be so simple and now its idiot proof." - MortysTW

"Thanks very much for the mod - very simple to install yet useful as anything." - p0ng0

"Sorry I had to come and re-post how excited this mod has made me lol." - Fleabag

"Working great with vbSEO" - mtlcore

"I have only tested a few videos so far but works like a charm!!! What an awesome mod!!!" - RichieBoy67


Version History

1.0 - Initial release (23.06.2007) (updated a couple of hours after release with some minor fixes 01:31 24.06.2007 GMT)
1.1 - Feature upgrade (26.06.2007). Added ability to include/exclude users, groups or forums. Added feature to replace even when BB Code permissions don't allow it. Added feature to both embed the video AND display the original URL above the video. Loosened logic to include variations in URLs for certain services (different countries, domains, etc). Should cover a wider range of URLs now. More video services coming soon...

27.06.2007 - Mod withdrawn. Details above and here.

mfyvie 06-23-2007 07:05 PM

Would you like to expand the range of services this mod can handle automatically?

Before asking for support please read this handy guide to how this works.

Known Issues


This list will be updated with information as and when it is known to me. Please check here first before reporting a problem, and check back later to see if there are any updates to this list.
  • Conflicts with Hide Hack. Status: one of the BB Codes used in this mod may conflict with the hide hack. No further information available from any users of the hide hack at this stage - therefore this will not be investigated yet.
  • Conflict with Viper's youtube hack. Status: Not possible for me to resolve this due to aggressive behaviour in this hack. See here for details. Possible solution here.
Before Asking for Support

Assuming your issue isn't solved by anything above, or other comments on the thread (yes, please actually read the thread before reporting a problem), please supply the following information when you report a problem:
  • Mysql version
  • Php version
  • Vbulletin version
  • Do you have VBSEO installed?
  • Do you have any other mods that rewrite URLs installed?
  • Have you checked that BB Code is installed in the forum you are testing it in?
  • Have you tested more than one service (i.e. not just youtube)?
  • Do your URLs appear naked (unchanged from the way you pasted them)?
  • Please post any URLs which are not working for you so I can see them!
  • If possible, include a link to the test post on your forum so I can see it.
Also - do not ask for support if you have not clicked "Install".

raiderlax 06-23-2007 07:10 PM

Wow this looks sweet, im going to install it now!

mtlcore 06-23-2007 07:12 PM

Good job man! Been waiting for this for a long time!!!

mtlcore 06-23-2007 07:17 PM

It would be great if it would automatically edit the old posts..

raiderlax 06-23-2007 07:18 PM

This isn't really working for me, I input the url into a new post and it just shows up with the url? I tried a youtube url.

mfyvie 06-23-2007 07:19 PM

Quote:

Originally Posted by mtlcore (Post 1274812)
Good job man! Been waiting for this for a long time!!!

So was I - I was surprised how lame some of the other mods were, and many of my users just weren't bothering to use the BB Code I provided for them.

When I checked to see how this could be done, it was surprisingly easy - I'm really surprised that nobody has done a decent mod along these lines up until now! Hopefully others will pitch in and help to expand it.

da420 06-23-2007 07:19 PM

I marked as installed. Will look into tonight.

Here's the Break BBCode I have created for my site which I would love to see included. Thank you.

Code:

Title: Break Embed Code
 
Tag: break
 
Replacement: <object type="application/x-shockwave-flash" width="425" height="350" data="http://embed.break.com/{param}">
<param name="movie" value="http://embed.break.com/{param}" />
<param name="wmode" value="transparent" />
</object>
 
Example: [break]MjU3ODkx[/break]


mtlcore 06-23-2007 07:21 PM

Quote:

Originally Posted by raiderlax (Post 1274816)
This isn't really working for me, I input the url into a new post and it just shows up with the url? I tried a youtube url.

It worked for me in less than 10 seconds!! :D

All I did was import the product > create new post. Bam!

mfyvie 06-23-2007 07:31 PM

Quote:

Originally Posted by raiderlax (Post 1274816)
This isn't really working for me, I input the url into a new post and it just shows up with the url? I tried a youtube url.

I've sent you a PM so we can figure that out without cluttering up this thread.

Quote:

Originally Posted by mtlcore (Post 1274815)
It would be great if it would automatically edit the old posts..

In theory this could be possible. If there's enough interest shown and someone willing to test it I'll whip up something to do the existing posts.

Quote:

Originally Posted by da420 (Post 1274819)
I marked as installed. Will look into tonight.

Here's the Break BBCode I have created for my site which I would love to see included. Thank you.

Thanks for that - I'll put it into the next version. But please see the first post on this thread I've made instructions for people to add things themselves. You could use pretty much the same regular expression as for the youtube entry.

Quote:

Originally Posted by mtlcore (Post 1274821)
It worked for me in less than 10 seconds!! :D

All I did was import the product > create new post. Bam!

Ok, I'm glad it works - sometimes it's hard to know what will happen when you release something. It works fine on my system :D

mtlcore 06-23-2007 07:33 PM

Hey man, I am willing to test it out if figure something out.

SMO 06-23-2007 07:41 PM

i couldnt get it to work either with youtube. I tried both links given on youtube

mfyvie 06-23-2007 07:51 PM

Quote:

Originally Posted by SMO (Post 1274833)
i couldnt get it to work either with youtube. I tried both links given on youtube

I'd ask anyone reporting problems with this mod to give the following information:
  • VBulletin version
  • Mysql version
  • PHP version
  • Whether you have any mods which involve the rewriting of URLs installed.
  • Post the exact URLs which didn't work
  • Confirm that BB Code is enabled and working in the forum you are testing it on
If youtube isn't working, then try some of the other services, just to be sure that there isn't some issue going on.

Also - if people would like support for this mod - please click on installed before requesting support.

Silvio 06-23-2007 08:00 PM

gorgeous! :up:is what I was looking 4.
Ty so much for work *installed* I do try it now! :P

Is there the way to keep working the old bbcoded url '[media]' ? theywere used by VbMediaPlayer that I've uninstalled.

pls accept my apologises for my bad itanglish

take care

ciao

mfyvie 06-23-2007 08:03 PM

Silvio - if you have other bbcodes like [media] then these will not be affected. This mod simply converts certain URLs to certain BBCode, and installs that BBCode. You'll see when you have a look.

theFAILURE 06-23-2007 08:06 PM

Quote:

Originally Posted by SMO (Post 1274833)
i couldnt get it to work either with youtube. I tried both links given on youtube

I guessing if you have BB code turned off it will not work.

That is what happened to me.

mfyvie 06-23-2007 08:09 PM

Quote:

Originally Posted by theFAILURE (Post 1274847)
I guessing if you have BB code turned off it will not work.

That is what happened to me.

Most certainly!! Useful question to ask those that report problems I guess :D

mfyvie 06-23-2007 08:34 PM

I just followed up with someone else who had reported a problem to me. When they sent me a link to their post I noticed that the URL was no longer "naked" but had had the URL text automatically changed to the title of the target page (VBSeo does this by default, but mine is turned off).

This mod expects a "naked" URL. If you see something else appear in the post after you submit it other than exactly what you posted - this is not a naked URL.

If someone can help me out here and tell me what the other thing is that is screwing with the URL then I can try to work around it, or at least detect the settings and give an error message.

Silvio 06-23-2007 08:37 PM

Gorgeous! it is working perfectly on a vb3.6.7pl1 ty Installed.

Now I will try to understand how to replace in *forum posts the [media] & the [/media] nulling them.

any idea?:rolleyes:

ty so much in anycase for this good work shared with all us!

mfyvie 06-23-2007 08:41 PM

Quote:

Originally Posted by Silvio (Post 1274865)
Gorgeous! it is working perfectly on a vb3.6.7pl1 ty Installed.

Now I will try to understand how to replace in *forum posts the [media] & the [/media] nulling them.

any idea?:rolleyes:

ty so much in anycase for this good work shared with all us!

You should probably post a request for that question somewhere else, since it has nothing to do with this mod. Ask "How do I remove old BB Code tags from existing posts?"

Alibass 06-23-2007 08:49 PM

Damn nice hack and thanks *installed*

Now if I could just figure out why I have always had problems with the audio from youtube when playing from embedded code. Audio plays fine from their website. :confused:

ayoko555 06-23-2007 08:50 PM

I'm using 3.6.7, but it's not embedding to youtube video automatiaclly, it's still showing the link???

Alibass 06-23-2007 08:51 PM

Works great for me and I am using 3.6.7PL1

mfyvie 06-23-2007 08:55 PM

Quote:

Originally Posted by ayoko555 (Post 1274874)
I'm using 3.6.7, but it's not embedding to youtube video automatiaclly, it's still showing the link???

Did you see post #13?

mfyvie 06-23-2007 09:04 PM

Ok - the first post in this thread has now been updated with a list of known issues and a list of things to give me if you are asking for support. Please read this and check back periodically, I'll be updating this first post as soon as I have more information.

vampireus 06-23-2007 09:14 PM

I saw an instruction on a site

http://www.mautam.org/forum/viewtopic.php?t=9253

They use a BB code quite different, one tag for movies from several sites and they are able to include Daily Motion, which is impossible to use with your code.

I'm not complaining for anything. Just thought I should post the instruction here for a reference.

Thx for your great mod.

mfyvie 06-23-2007 09:21 PM

Quote:

Originally Posted by vampireus (Post 1274886)
I saw an instruction on a site

http://www.mautam.org/forum/viewtopic.php?t=9253

They use a BB code quite different, one tag for movies from several sites and they are able to include Daily Motion, which is impossible to use with your code.

I'm not complaining for anything. Just thought I should post the instruction here for a reference.

Thx for your great mod.

If they can do daily motion with BB Code, then it could also be incorporated into this mod. Whoever has done that mod may know something I don't. If you could contact them for me and get the technical details (or point me to the mod that does it). Are you a user of that forum?

FleaBag 06-23-2007 09:42 PM

This is amazing! Thanks so much. :)

Edit: Working flawlessly! Editing old posts now. :)

Edit 2: I seem to have some issues with this mod fighting it out with vBSEO. New posts convert fine - editing posts results in vBSEO replacing the URL with the title of the page the link points to (an enabled feature). I'm guessing this has something to do with execution order of plugins. Maybe this one needs to be prioritised to resolve this?

Edit 3: Just read the first post lol. A big shame to lose original videos, but I can live with that. Thanks!

mfyvie 06-23-2007 10:00 PM

Fleabag - correct. I'm working on that now. Change execution order to 4 and I believe it will win over VBSEO. Don't bother updating your existing threads - I'm going to make some code that will do it for you. Keep an eye on this thread (it will be within a couple of days)

Everybody else - I've found a few things that I am ironing out. Youtube has a few different characters that I didn't expect, so I'm going to update all the search strings. This may have caused some of the issues from people who reported issues.

However, since only one person actually gave me the URLs that didn't work, I wasn't able to spot this until now.

I'll replace the download file and note that on this thread when I'm done. Watch this space.

nfn 06-23-2007 10:04 PM

Here is the first contribution.

http://videos.sapo.pt


Find AdminCP -> Plugins and Products -> Plugin Manager select the plugin "Parse/Replace New Post" under "Product: Automatic Embedded Video" and add:

Regular Expression:

Code:

// videos.sapo.pt
array_push($replace, '[sapovid]$1[/sapovid]');
array_push($patterns, '^\[URL\]http://videos\.sapo\.pt/(\w*)\[/URL\]^i');


Find AdminCP -> Custom BB Codes -> BB Code Manager and add:


Add BB Code:

Code:

Title: Sapo Embedded Video
Tag: sapovid
Replacement:
<embed src="http://imgs.sapo.pt/sapovideo/swf/flvplayer-sapo.swf?file=http://rd3.videos.sapo.pt/{param}/mov/1" type="application/x-shockwave-flash" width="400" height="325" wmode="transparent"></embed>
Example: [sapovid2]GnR4iyISmcKjJnRAj6cY[/sapovid2]
Description: Allows users to embed video from videos.sapo.pt



That's it
Now you may play videos from the Portuguese portal Sapo.pt.

FleaBag 06-23-2007 10:10 PM

It is awesome having them done with such simplicity. Not that I am saying this was simple to do!

mfyvie - Good news on the convertor for old posts, I'll keep my eyes peeled. One problem I have though is that I run a custom module through GARS, containing the video URL which was previously parsed by Anymedia. Your updater would alas miss out that info, so I am unable to move the data to show an actual video. Any thoughts?

And thanks again! I mean wow!

Edit: I applied the change to the execution order but it seems vBSEO is still winning over. I managed to post an initial video but it seems each once since gets URL'ised before it can be video'ised.

dizzy100 06-23-2007 10:35 PM

VBSEO isn't the only module that forms titles from links, check out

https://vborg.vbsupport.ru/showthread.php?t=146679

I have this installed and assume it would interfere with this module ?

popowich 06-23-2007 10:36 PM

Great! This will be nice for "video threads" where the members often paste links.

It seems to miss them if you have a youtube.com link instead of www.youtube.com

-Raymond

mfyvie 06-23-2007 10:43 PM

Quote:

Originally Posted by FleaBag (Post 1274917)
It is awesome having them done with such simplicity. Not that I am saying this was simple to do!

mfyvie - Good news on the convertor for old posts, I'll keep my eyes peeled. One problem I have though is that I run a custom module through GARS, containing the video URL which was previously parsed by Anymedia. Your updater would alas miss out that info, so I am unable to move the data to show an actual video. Any thoughts?

And thanks again! I mean wow!

Edit: I applied the change to the execution order but it seems vBSEO is still winning over. I managed to post an initial video but it seems each once since gets URL'ised before it can be video'ised.

Ok, I'll have to look more closely at that vbseo issue in that case.... Regarding your old posts issues - please post exactly what you need (or better, send me a PM) with the exact text that you want to convert.

Quote:

Originally Posted by dizzy100 (Post 1274928)
VBSEO isn't the only module that forms titles from links, check out

https://vborg.vbsupport.ru/showthread.php?t=146679

I have this installed and assume it would interfere with this module ?

I checked it - it's running at execution order 5, so in theory if this mod was lower, it should get there first.

Quote:

Originally Posted by popowich (Post 1274929)
Great! This will be nice for "video threads" where the members often paste links.

It seems to miss them if you have a youtube.com link instead of www.youtube.com

-Raymond

Please see Post #1 and the giant text which says "Known Issues"

mfyvie 06-23-2007 10:50 PM

Quote:

Originally Posted by da420 (Post 1274819)
I marked as installed. Will look into tonight.

Here's the Break BBCode I have created for my site which I would love to see included. Thank you.

da420 - I've looked at this embed code. The problem is that the identifier you are using between your tags is NOT contained in the original URL. This makes it impossible to automatically include (please read the notes I provided as an attachment in post #1 which explains what is needed to include something extra with this mod)

Lizard King 06-23-2007 10:57 PM

This is weird as hell. I tried this hack both on my live server and my test server. No way i can get this working. On my test server i don't have vBSEO installed at all. BB Codes are on. Both of my servers use Php 5.1.6 MySql 5.0.22 . Live server has Apache , test server has lighttpd on it.
http://www.ayyas.com/misc.php?do=bbcode live server
http://88.229.230.13/misc.php?do=bbcode test server

Example Urls :
http://88.229.230.13/showthread.php?p=7&posted=1#post7 test server
http://www.ayyas.com/road-trip/18229...ur/#post313522 light server

mfyvie 06-23-2007 11:01 PM

Lizard King, please see post #1 with a list of things I require in a bug report. At the VERY LEAST I need the URLs that you are trying run through this mod! So far only a single person has ever provided this to me, and it makes it DAMN hard when trying to figure out if my regular expressions need to be improved or not. I take it also that you've tried different services with different video, and haven't just been testing the same URL each time?

Hornstar 06-23-2007 11:02 PM

This looks truly awesome, but it is a shame that a feature in vbseo will need to be turned off first, hopefully there can be another solution for this.

FleaBag 06-23-2007 11:06 PM

I changed the execution order of this hack, to 1, and it all works just fine now. Working with vBSEO. I'm guessing this technically should deal with the URL before anything else - as long as vB gets there first I'm happy. Will changing execution order to 1 have any detremental effects?

Lizard King 06-23-2007 11:09 PM

Quote:

Originally Posted by mfyvie (Post 1274944)
Lizard King, please see post #1 with a list of things I require in a bug report. At the VERY LEAST I need the URLs that you are trying run through this mod! So far only a single person has ever provided this to me, and it makes it DAMN hard when trying to figure out if my regular expressions need to be improved or not. I take it also that you've tried different services with different video, and haven't just been testing the same URL each time?

I think you missed that i edited my post and included the links.


All times are GMT. The time now is 05:05 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01613 seconds
  • Memory Usage 1,891KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (17)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete