vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Mini Mods - [YouTube] Integration with Links & Downloads Manager (LDM 2.2.6) (https://vborg.vbsupport.ru/showthread.php?t=132702)

|oR|Greg 11-27-2006 10:00 PM

[YouTube] Integration with Links & Downloads Manager (LDM 2.2.6)
 
Intro/About:
If you're not familiar with Links and Downloads Manager you should be! It's one of the most robust hacks for vBulletin out there and allows you the Administrator to add vast amounts of content to your board on your own, or via your board members. This hack, for LDM 2.2.6 and vB 3.6.X will allow your links to YouTube videos to play inline within LDM.

This hack requires:
  • 1 template edit (AdminCP ==> Styles & Templates ==> Styles Manager ==> (your style) ==> Links and Downloads Manager ==> links_playbit)
  • 1 file edit (./includes/local_links_include.php)
  • 1 new plugin
  • 1 new gif file
So, let's get started, this whole process should take no more then 5 minutes, and please make sure you backup before you start, I am not responsible if you somehow hose your site. (Although this is such a small mod I can't imagine you could, but I've been wrong before)

In your links_playbit template find:
HTML Code:

<td align="center">
Add AFTER:
HTML Code:

<if condition="$player=='youtube'">

                        <object width="425" height="340" type="application/x-shockwave-flash" data="http://www.youtube.com/v/$url">
                                <param name="movie" value="http://www.youtube.com/v/$url" />
                                <param name="wmode" value="transparent" />
                                <em><strong>ERROR:</strong> If you can see this, then <a href="http://www.youtube.com/">YouTube</a> is down or you don't have Flash installed.</em>
                        </object>

</if>

The above width and height can of course be altered to suit your needs.

In your ./includes/local_links_include.php file find (around line 2590):
PHP Code:

            $musicbox_template    '<a href="'.$LINKS_SCRIPT.'.php?action=play&amp;linkid='.$linkid.'&amp;catid='.$linkcatid.'&amp;page='.$pagenumber.'" '.$musicbox_window.' title="'.$vbphrase['ll_playme'].'">%s</a>'

Add AFTER:
PHP Code:

            if(stristr($linkurl'youtube.com/watch?v=')) {
            
$lc_urlType "youtube";
            
$is_musicbox 1;
            } 

Great! The hard part is over! Now, add the included Plugin, and upload the gif image to your Links and Downloads Icon Cache, for me, my Icon Cache is located at http://www.amacny.com/vb/images/ldm it's the directory where all your extension gifs are located. Make sure that the Plugin is turned ON. You should now be able to add entries to LDM for YouTube, and have them play within your own website!

Live Demo/Example: http://www.amacny.com/vb/local_links...=53&linkid=506

If you're getting an error stating that it's an Invalid Filetype. Go into your LDM settings, and edit 1 of these options, either: musicbox_filetypes, or musicbox_filetypes_divx, or musicbox_filetypes_quicktime, or musicbox_filetypes_realplayer. Remove ALL entries in the setting you choose.

Until I can make this mini-mod work WITH all those settings intact, this is the quick-fix. Chances are you're not using ONE of those players.

Don't forget to click https://vborg.vbsupport.ru/

Rich 11-28-2006 02:19 PM

Hello,

I just went and checked out your example only to find that there is a syntax error at line 42, char 24. This of course prevented whatever you tube video from loading or even beginning to load.

If you follow the link directly, it opens the video on the next page. Id there suppose to be a "mini" version on the example page itself?

|oR|Greg 11-28-2006 02:29 PM

That page error is actually a part of my code with the left navbar I created. It has nothing to do with the YouTube LDM integration. As for the link not working... what browser are you using? I've tested this in IE 6&7, and it works great.

Slave 11-28-2006 03:18 PM

Nice hack |oR|Greg .. well done :)

hotwheels 11-28-2006 07:23 PM

awesome..........

Zowners 11-28-2006 11:16 PM

Im getting invalid file type specified error when user clicks on the link. Any help?

What link do you use when adding a youtube video? ive tried the url but that gives me an error as stated above when clicked on.

|oR|Greg 11-29-2006 12:12 AM

What's the link you're using?

phill2003 11-29-2006 04:19 AM

Nothing showing using firefox :)

Zowners 11-29-2006 04:28 AM

Im using normal links given from youtube. The URL not the embed code.

|oR|Greg 11-29-2006 10:21 AM

Quote:

Originally Posted by phill2003 (Post 1127831)
Nothing showing using firefox :)

I never did test this with FireFox, I'll download it and see what I can do.
Quote:

Originally Posted by Zowners (Post 1127835)
Im using normal links given from youtube. The URL not the embed code.

What's the link you're using please?

Zowners 11-29-2006 04:57 PM

Im using this: http://www.youtube.com/watch?v=Nxn6PRCEGu8

Again gives me error: invalid filetype specified.

|oR|Greg 11-29-2006 05:12 PM

<a href="http://www.amacny.com/vb/local_links.php?catid=53" target="_blank">http://www.amacny.com/vb/local_links.php?catid=53</a>

Try the link I made for you, seems to work for me. Which means you missed a file edit, I'm thinking the edit for the in your ./includes/local_links_include.php file.

Go thru the steps again.

|oR|Greg 11-29-2006 05:31 PM

Quote:

Originally Posted by phill2003 (Post 1127831)
Nothing showing using firefox :)

Tried the latest version of FireFox with the latest flash download... works fine.

chorton 11-29-2006 07:21 PM

I get this error
invalid filetype specified.

|oR|Greg 11-29-2006 08:27 PM

Make sure you edited the files as well as the template.

Zowners 11-29-2006 09:16 PM

Ok I reedited everything still getting the same problem :(

|oR|Greg 11-29-2006 09:41 PM

Can you PM me please with a link to your site, and an admin account that I can use to look into things. Also, attach your local_links_include.php file to this thread. You did UPLOAD the modified file after you altered it yes?

Zowners 11-29-2006 09:54 PM

Heres my php file im using and ive pmed you :)

Edit: updated file im using

Zowners 11-30-2006 05:41 AM

Hey greg just wondering can you do the same thing to google videos?

Heres a link to one I wanted to add: http://video.google.com/googleplayer...99&hl=en&quot;

|oR|Greg 11-30-2006 09:42 AM

I tried them as well, and for whatever reason it wouldn't work. I'll keep working at it.

Alfa1 11-30-2006 10:12 AM

Can this be used as a vbadvanced module? If so, how?
I want to show my latest video on my CMPS pages. Not just the title. I already have that. I want to show the player with the latest video on my CMPS pages.

chorton 11-30-2006 11:44 AM

I rechecked my work and it all looks fine to me..still getting invalid file type.

|oR|Greg 11-30-2006 01:37 PM

I have updated the hack with the following:

If you're getting an error stating that it's an Invalid Filetype. Go into your LDM settings, and edit (musicbox_filetypes). Remove ALL entries in this setting. Until I can make this mini-mod work WITH all those settings, this is the quick-fix.

Alfa, if you figure out how, let us know. That's not something I'm interested in exploring at this time.

chorton 11-30-2006 06:07 PM

If your using mp3 etc you can also just remove the mov extension from
musicbox_filetypes_quicktime
Filetypes that can be played through QuickTime.

That will still play both formats using the jukebox.
check www.versionist.com

|oR|Greg 11-30-2006 08:42 PM

Cool, so basically, if you just disable 1 of them it still works? What about DIVX?

chorton 11-30-2006 08:55 PM

Yea thats better yet. Know one use that anyways. Remove divx and put mov back in and it works

|oR|Greg 12-01-2006 10:46 AM

Updated the instructions with:

If you're getting an error stating that it's an Invalid Filetype. Go into your LDM settings, and edit 1 of these options, either: musicbox_filetypes, or musicbox_filetypes_divx, or musicbox_filetypes_quicktime, or musicbox_filetypes_realplayer. Remove ALL entries in the setting you choose.

Until I can make this mini-mod work WITH all those settings intact, this is the quick-fix. Chances are you're not using ONE of those players.

chorton 12-02-2006 07:13 PM

works great on www.versionist.com

Any ideas on the google code? I can help if you need me too :)

Alfa1 12-28-2006 11:09 PM

Any news on this hack? It's mighty interesting to have with google video...

|oR|Greg 01-03-2007 08:26 PM

Quote:

Originally Posted by Alfa1 (Post 1146626)
Any news on this hack? It's mighty interesting to have with google video...

This is now working as you can see on my forum.

http://www.amacny.com/vb/local_links.php?catid=7

HOWEVER... I am not releasing the GOOGLE version because Andrew is going to include both the Google and YouTube versions in the next release of LDM which is coming soon. He may or may not also release additional sites which I suggested. We'll see.

Alfa1 01-03-2007 08:49 PM

Extremely nice! Many thanks for your work.
I think I have a pretty good idea on which sites you suggested. It would be awesome if more video sites where implemented.

|oR|Greg 01-03-2007 11:22 PM

I got StreetFire.net working!!!!! :P Only slight drawback is that you have to tell your members not the post the URL with the .htm otherwise LDM will treat it as an invalid filetype, or as a regular link, and not play inline. I'm sure Andrew can make it work properly though... :)

AndrewD 01-08-2007 04:26 AM

Quote:

Originally Posted by Alfa1 (Post 1150144)
Extremely nice! Many thanks for your work.
I think I have a pretty good idea on which sites you suggested. It would be awesome if more video sites where implemented.

So far I've done DailyMotion, Google, IFilm, MetaCafe, VSocial and YouTube.

Which others are the priorities?

Alfa1 01-08-2007 10:57 AM

CurrentTV (http://www.current.tv/studio/)
Vimeo (http://www.vimeo.com/)
Sharkle (http://www.sharkle.com/video/)
FreeVideoBlog (http://video.freevideoblog.com/)
MyVideoDe (http://www.myvideo.de/)
Yahoo video (http://video.yahoo.com )

|oR|Greg 01-08-2007 01:17 PM

StreetFire.Net
https://vborg.vbsupport.ru/showthread.php?t=135464

I would love to get www.ThatVideoSite.com the problem is that you'd have to parse the page in order to extract the .WMV name, then port it into LDM. I personally am not up to it.

|oR|Greg 01-08-2007 01:18 PM

Oh, MySpace.

AndrewD 01-08-2007 05:09 PM

Quote:

Originally Posted by |oR|Greg (Post 1153592)
Oh, MySpace.

Ok, I've done

- DailyMotion (url's of the form http://www.dailymotion.com/swf/XXXXX )
- Google video (url's of the form http://video.google.com/videoplay?docid=NNNNN )
- IFilm (url's of the form http://www.ifilm.com/video/NNNNN )
- MetaCafe (url's of the form http://www.metacafe.com/watch/NNNNN )
- MySpace (url's of the form http://vids.myspace.com/index.cfm?fu...videoid=NNNNNN )
- StreetFire (url's of the form http://videos.streetfire.net/video/X...XXXXXXXXXX.htm )
- Videac (url's of the form http://www.vidiac.com/.../XXXXXXXX-X...XXXXXXXXXX.htm )
- VSocial (url's of the form http://www.vsocial.com/video/?d=NNNNN )
- YouTube (url's of the form http://www.youtube.com/watch?v=NNNNN )

That's enough for now...

Some of the others require a double processing of the webpage to pull out the details. It's doable, but it wait.

|oR|Greg 01-09-2007 03:20 AM

You're a King among men sir. A KING among men.

rolandogomez 01-09-2007 06:50 AM

So do we wait for version LDM 2.2.7 or do we apply this hack for youtube? Thanks, rg.

AndrewD 01-09-2007 08:02 AM

Quote:

Originally Posted by rolandogomez (Post 1154372)
So do we wait for version LDM 2.2.7 or do we apply this hack for youtube? Thanks, rg.

2.2.7 will be uploaded in alpha stage within one or two days. I think it's stable.


All times are GMT. The time now is 07:54 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.02286 seconds
  • Memory Usage 1,830KB
  • 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
  • (2)bbcode_html_printable
  • (2)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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