vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Mini Mods - Auto Youtube Link-Converter (https://vborg.vbsupport.ru/showthread.php?t=261296)

Disasterpiece 05-10-2011 11:09 PM

Which vbulletin version do you use?

When you click on Addons/Plugins, is the Addon or any of the plugins in the list " [s]disabled[/s] "?

goc-forum.de 05-11-2011 06:21 PM

Is it possible that the code can be edited to display always the best quality (HD version) if the movie has more versions?

Disasterpiece 05-11-2011 08:17 PM

Only if this information can be obtained without an additional query.

And then, the plugin uses the native vbulletin video functions, if they don't support this, the plugin does neither.

bad2dbone 05-11-2011 09:10 PM

i fixed it thanks

deinrapde 05-15-2011 04:56 PM

how can i get this for CMS Theards? If i want a forum theard to CMS Articel?

Disasterpiece 05-15-2011 05:14 PM

Not right now.

I don't own the cms/blog suite, so I can't code for it :/

deinrapde 05-15-2011 08:31 PM

ok, no problem might :)

but can you add, AUTO THUMBNAIL from the Youtube Video for a theard thumbnail?? ^^

Disasterpiece 05-15-2011 09:11 PM

Quote:

Originally Posted by deinrapde (Post 2196104)
ok, no problem might :)

but can you add, AUTO THUMBNAIL from the Youtube Video for a theard thumbnail?? ^^

I'm not quite sure what you mean

crazymilk 05-19-2011 11:08 AM

Thanks works a treat

Angelyco 05-21-2011 10:29 PM

Okay, it's been a really long time since I've made updates to our code. We are currently running version 3.8.2 (the guy who owns the board isn't around much, he hasn't updated in awhile...obviously). Anyway, I imported this as a new "Product" since that's what the Plugin Manager told me to do. I don't know if it's something with the 4+ versions that call it an add-on.

I didn't make any other changes - we don't currently have any video/YouTube tags for the board. When I created a thread with a YouTube link in it, I got this error:

"Fatal error: Call to undefined method vB_BbCodeParser::handle_bbcode_video() in /home/thekryp/public_html/forum/includes/class_postbit.php(294) : eval()'d code on line 14"

I uninstalled it for the time being so nobody else runs into the error. Do I need to do something else to get this to work? Do you have to have other tag info in the code? Or possibly just too old of a version? I didn't want to make too many changes to the code at once, so I figured I'd start here and work backwards if I'm missing something :)

Thank you!

Disasterpiece 05-21-2011 11:21 PM

The Mod is made vor vbulletin 4 as you can see in the details in the first post, so I give no guarantee that it runs on older versions, now you know why :)

Angelyco 05-22-2011 12:02 AM

Yep, I did see that, and didn't see anyone else using anything much older to know if it worked or not, so it didn't hurt to ask! So assuming I had a newer version, I wouldn't need to add anything else to the code?

Disasterpiece 05-22-2011 01:36 PM

in theory, you must check the script files where the according hooks are located and see how video tags are parsed there. Then you replace the function name with the current in the script, which doesn't seem to exist prior to vb4. The rest of the code should be generative enough that it works on vb3 too.

inigo 05-22-2011 05:14 PM

Great mod,

working without problems, v4.1.2

thanks

Disasterpiece 05-23-2011 03:15 PM

Updated with version 1.4:

iPad shows replacement properly http://www.innsys.ca/images/icon_check.png

Gamelobby 05-24-2011 07:54 AM

Possible to do Game Trailers.?
http://www.gametrailers.com/video/de...-dirt-3/702436

Here is the embed code..
Code:

<div style="background-color:#000000;width:520px;"><div style="padding:4px;"><embed src="http://media.mtvnservices.com/mgid:moses:video:gametrailers.com:702436" width="512" height="288" type="application/x-shockwave-flash" allowFullScreen="true" allowScriptAccess="always" base="." flashVars=""></embed><p style="text-align:left;background-color:#FFFFFF;padding:4px;margin-top:4px;margin-bottom:0px;font-family:Arial, Helvetica, sans-serif;font-size:12px;">Tags: <a href="http://www.gametrailers.com">GameTrailers.com</a>, <a href="http://www.gametrailers.com/video/debut-teaser-dirt-3/702436">Debut Teaser</a>, <a href="http://pc.gametrailers.com/">PC Games</a>, <a href="http://ps3.gametrailers.com/">PlayStation 3</a>, <a href="http://xbox360.gametrailers.com/">Xbox 360</a></p></div></div>

>> Or is it possible to even just add Game Trailers to work with the Video BBCode Button.?

Thanks

Disasterpiece 05-24-2011 10:11 AM

Quote:

Originally Posted by Gamelobby (Post 2199382)
Possible to do Game Trailers.?
http://www.gametrailers.com/video/de...-dirt-3/702436

Here is the embed code..
Code:

<div style="background-color:#000000;width:520px;"><div style="padding:4px;"><embed src="http://media.mtvnservices.com/mgid:moses:video:gametrailers.com:702436" width="512" height="288" type="application/x-shockwave-flash" allowFullScreen="true" allowScriptAccess="always" base="." flashVars=""></embed><p style="text-align:left;background-color:#FFFFFF;padding:4px;margin-top:4px;margin-bottom:0px;font-family:Arial, Helvetica, sans-serif;font-size:12px;">Tags: <a href="http://www.gametrailers.com">GameTrailers.com</a>, <a href="http://www.gametrailers.com/video/debut-teaser-dirt-3/702436">Debut Teaser</a>, <a href="http://pc.gametrailers.com/">PC Games</a>, <a href="http://ps3.gametrailers.com/">PlayStation 3</a>, <a href="http://xbox360.gametrailers.com/">Xbox 360</a></p></div></div>

>> Or is it possible to even just add Game Trailers to work with the Video BBCode Button.?

Thanks

Hello,

Possible: yes.
But: This would go way beyond the scope of this mod.
If you'd like to have an individual solution, you can contact me via PM.

rhorman 05-25-2011 10:48 AM

This is awesome! Could you make it so it will center the video? Or where do I change that in the XML?

Thanks!

Disasterpiece 05-25-2011 01:14 PM

Quote:

Originally Posted by rhorman (Post 2199746)
This is awesome! Could you make it so it will center the video? Or where do I change that in the XML?

Thanks!

Open the xml file, search for this code occurence:
PHP Code:

$repl[] = $vbulletin->options['pl_ismobile']
            ? 
sprintf($vbulletin->options['autoyt_membed'], $v)
            : 
$bbcode_parser->handle_bbcode_video("http://www.youtube.com/watch?v=".$v"youtube;".$v); 

Replace with:
PHP Code:

$repl[] = "<center>".($vbulletin->options['pl_ismobile']
            ? 
sprintf($vbulletin->options['autoyt_membed'], $v)
            : 
$bbcode_parser->handle_bbcode_video("http://www.youtube.com/watch?v=".$v"youtube;".$v))."</center>"

3 times.

Not tested but should work.

porschegruven 05-26-2011 11:19 PM

Quote:

Originally Posted by grc (Post 2180484)
Cool - here's a link to a slide show:

PHP Code:

<embed type="application/x-shockwave-flash" src="https://picasaweb.google.com/s/c/bin/slideshow.swf" width="400" height="267" flashvars="host=picasaweb.google.com&hl=en_US&feat=flashalbum&RGB=0x000000&feed=https%3A%2F%2Fpicasaweb.google.com%2Fdata%2Ffeed%2Fapi%2Fuser%2Fnazarenealvin%2Falbumid%2F5440810094021987121%3Falt%3Drss%26kind%3Dphoto%26hl%3Den_US" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed

username: nazarenealvin
albumname: 2010NewCross

Is it do-able?

Is there any chance you can get your plugin to work with Picasaweb slide show? Picasa is Google's photo depository.

Disasterpiece 05-27-2011 12:08 AM

Sry, this is just not what it's made for. I'll think about it as a separate plugin. In the meantime you can post in the mod request section, maybe someone else picks this up before me.

voter 06-04-2011 05:53 PM

After update to 4.1.3 all of our previous links based on Passive Video mode were no more useful.
Mode developer is no more "online" and I was already thinking to go "hard steps" replacing in SQL all that urls.

Thanks man, you are our life-guard, now all is working.

COL NIL SATIS 06-05-2011 08:34 PM

spectacular and so so easy ....superb

CaptCom 06-19-2011 02:59 PM

Excellent stuff, thank you!!!
Works on 4.1.3 #1

slozz 06-22-2011 10:43 PM

awesome works like a charm on 4.1.4

Regards,

MySaltyreef 07-09-2011 11:30 PM

sweet nominated it, very usable hack

DailyAppDream 07-25-2011 10:12 PM

Hey - I was wondering if it would be possible to get a quick port of this to convert iTunes links into a custom iTunes BB Code as follows?

Convert http://itunes.apple.com/app/consume-...es/id404175354

to [itunes]http://itunes.apple.com/app/consume-mobile-isp-packages/id404175354[/itunes]

(Basically replace http://itunes.apple.com with [itunes]http://itunes.apple.com then put [/itunes] at the next available space).

More than happy to ping over a bit of cash/ make a donation if it's possible?

Let me know.

Cheers,
- Adam G

sdavis2702 07-27-2011 05:14 PM

Works great on 4.1.4... thanks buddy

titter 08-14-2011 08:08 AM

Excellent mod.

Any chance to also incorporate some of the other built in video formats? Would be great to see Vimeo especially.

dmandem 08-23-2011 10:53 PM

Works great on 4.1.5

Thank you.

trackpads 09-18-2011 12:49 PM

Very nice Thanks!!!!

hoatran 10-02-2011 12:41 AM

Something going not right here. the first post is OK, but it not work from the second post???

Can anyone help?

420 10-16-2011 02:43 AM

Does this work on VB 3.86?

Juggernaut 10-23-2011 11:45 PM

Quote:

Originally Posted by hoatran (Post 2252182)
Something going not right here. the first post is OK, but it not work from the second post???

Can anyone help?

Same problem here.

Disasterpiece 10-24-2011 01:23 PM

Quote:

Originally Posted by Juggernaut (Post 2260734)
Same problem here.

Can you give me an example link where the problem occurs?

rjmjr69 10-25-2011 06:44 AM

Works great very speedy and seemless on 4.1.7

spencerp 11-02-2011 12:08 PM

Hi, I'm trying to use your code to spit out the video's thumbnail which is linked. Like, making a custom bbcode for "youtubepop"

Quote:

[youtubepop]JFwCCL0Vh6U[/youtubepop]
Code:

<a href="http://www.youtube.com/v/{param}.swf"><img  alt="YouTube" src="http://img.youtube.com/vi/
{param}/0.jpg" /></a>

Quote:

Youtube Popup: [youtubepop]YouTube ID[/youtubepop]
Which of course works, now trying to do your plugin as such for Fall back code:
Code:

<a href="http://www.youtube.com/watch?v=%1$s">
YouTube Video:<br /><img src="http://img.youtube.com/vi/%1$s/0.jpg" width="240" height="180" alt="Click here to view on youtube" /></a>

Doesn't work. Any suggestions? Doing that example for your own code, still puts out an embedded video... Any thoughts? Or maybe just try the bbcode in there instead of yours? LOL

Disasterpiece 11-02-2011 01:46 PM

the fallback code only prints, if the detected browser is a mobile browser.

I'm not sure what you're actually trying to accomplish... do you want only the image to be displayed and no embed code at all?

spencerp 11-02-2011 01:58 PM

Quote:

Originally Posted by Disasterpiece (Post 2263771)
the fallback code only prints, if the detected browser is a mobile browser.

I'm not sure what you're actually trying to accomplish... do you want only the image to be displayed and no embed code at all?

Ohhhh okay... But yeah, rather than not have it embed at all, I'd rather it provide a decent sized thumbnail from the video, and make the thumbnail link to video itself.

fishwestend 11-15-2011 02:00 PM

Like a dream on 4.1.8!


All times are GMT. The time now is 09:32 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.01500 seconds
  • Memory Usage 1,833KB
  • 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
  • (4)bbcode_code_printable
  • (3)bbcode_php_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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