The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Auto Youtube Link-Converter Details »» | |||||||||||||||||||||||||||||||||
So basically this is a total easy-to-implement plugin, which converts standard youtube links to video-embeds on the fly without urging users to use the video-button because I think it is unnecessary.
On post display, the plugin checks if the post contains at least 1 youtube link in the form of Code:
<a href="http://www.youtube.com/watch?v=somecode&some=params">http://www.youtube.com/watch?v=somecode&some=params</a> Code can be modified to fit your needs, altough there shouldn't be much to add. If you're the special performance-freak, I'm curious if you can enhance data/query-performance. So let me know if you do. INSTALL: - Download attached XML File and import it as an addon. Code:
Changes since 1.3: - Now works properly on iPad Changes since 1.2: - Supports mobile devices with fallback-display if browser doesn't support flash/embed codes - Allows the user to specify the above mentioned replacement code for mobile browsers - Minor improvements & Fixes Changes since 1.1: - Moved regular expression and index position into admincp settings to allow easier changing in the future - supports new youtube link format: "http://youtu.be/*somevideocode*" Changes since 1.0: (or: why should I download that mod again?) - Added Link parsing in post-preview mode and in post reviewbits (the latest posts you see under the new reply form) Now every post containing youtube-links should display the embedded video instead. Works with any number of youtube-links and any kind of text surrounding them. Let me know if you have trouble/questions. Download Now
Show Your Support
|
14 благодарности(ей) от: | ||
beertruck, CuteC@t, davew, donkspurs, Duke49th, GhostHunter2010, GoMaX, iiioroh, L2Insomnia, mapleleaffans, orangecopper, SteveBoogie, Toorak Times |
Comments |
#32
|
||||
|
||||
Quote:
Quote:
Quote:
|
#33
|
|||
|
|||
Quote:
Regards, Doug |
#34
|
|||
|
|||
Quote:
Entered our specific information, backed up and then executed PHP file. All it came back with was the phrase No query result and no [youtube] records weres changed? Am I doing something wrong? Regards, Doug |
#35
|
||||
|
||||
give me a few examples how your youtube tag works and I'll try to sort it out
|
#36
|
|||
|
|||
Quote:
[youtube=QT7kEMxSdZU]British Training Film[/youtube] .. or, like this ... [youtube]QT7kEMxSdZU[/youtube] Now, these videos appear twice (they repeat) in each post with your excellent new YouTube mod installed, except yours presents a wide screen video, where the old ones were 4x3. Yours is better..... Is this what you mean by examples? Regards, Doug |
#37
|
||||
|
||||
Then modify the convyt.php like the following:
Replace the $ytpreg = ... line with each one of those: PHP Code:
That should do the trick then. |
#38
|
|||
|
|||
Quote:
I changed the individual line as above and created two different PHP files. I then ran each one and in both cases, the PHP execution returned No query result..... I'm not sure what else could be wrong because the BBCode it should be locating is exactly as above, but if I emailed you the three files, one of which would be my config.php for vBulletin, perhaps could have a quick look? Appreciate your support .... :up: I did notice that your PHP file refers to: $database = xxxxx .. but then the line that opens the database says: $db = mysql_connect($host, $username, $password); mysql_select_db($database_name); Is that correct? .. or should it be: mysql_select_db($database); Regards, Doug |
#39
|
||||
|
||||
heh, I'm afraid you're right. Must've missed that.
ofc PHP Code:
cheers |
#40
|
|||
|
|||
Would be great if this also worked in blogs and not just forums
|
#41
|
|||
|
|||
Quote:
That got it running, although after passing 150,000 posts and then checking one with a duplicate, the post content using this BBCode syntax still shows a duplicate. Your real-time wide screen conversion, plus the old BBCode using this syntax. [youtube]-QIO_G9gs0A[/youtube] I'm using these (one at a time): Replace the $ytpreg = ... line with each one of those: PHP Code:
Thanks .. Regards, Doug |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|