vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Mini Mods - MySpace/YouTube/Google Video Addon (best yet) (https://vborg.vbsupport.ru/showthread.php?t=133235)

Mr Chad 12-04-2006 10:00 PM

MySpace/YouTube/Google Video Addon (best yet)
 
...

Mr Chad 12-04-2006 10:35 PM

Reserved (not really done with this mod, just made it. works great on my board)

dodgeboard.com 12-04-2006 11:20 PM

what about Google Videos?

Stavs16 12-04-2006 11:36 PM

i agree what about google videos they are important too

Mr Chad 12-04-2006 11:45 PM

added google.

dodgeboard.com 12-05-2006 12:14 AM

Thanks Chad!!

Mr Chad 12-05-2006 01:01 AM

tell me how well it works on your board, also don't forget to click install :P

BigJimTheLug 12-05-2006 01:22 AM

Any demos for this?

Can u make it work for Metacafe as well?

Mr Chad 12-05-2006 01:55 AM

added meta cafe, also no demos because you need to be logged in to post a topic on my site.

tell me if metacafe works.

magmf 12-05-2006 02:50 AM

i click on insert link on editor and nothing happens

can anyone help me ?

Mr Chad 12-05-2006 03:16 AM

did you make all the edits?

dot forget the postbit_quickedit and showthread_quickreply templates

lazytown 12-05-2006 03:29 AM

Quote:

Originally Posted by magmf (Post 1132162)
i click on insert link on editor and nothing happens

can anyone help me ?

Same problem here.. Plus when I use the youtube code manually, it doesn't work properly (creates a box, but no video plays)

-vissa

lazytown 12-05-2006 03:31 AM

I only made the edit mentioned on "editor_toolbar_on" but not on postbit_quickedit and showthread_quickreply. Why would that matter if I only want the link in the advanced editor?

-vissa

Mr Chad 12-05-2006 03:35 AM

when you click the button what happens?

lazytown 12-05-2006 03:41 AM

Nevermind I'm being lame today. Forgot to save the javascript editor file (had it open in pico).

However, in IE7 it does popup with a yellow warning box at the top of broswer saying you can only temporarily activate this control (which has to be clicked and enabled for it to work). I believe I've seen this for other buttons in VB. Testing now.....

youtube seems to work!! Good job, but I'll have to see what's going on with IE7. Probably the controls are too strict, but they default to medium-high I believe.

thanks
-vissa

Mr Chad 12-05-2006 03:58 AM

lol, ok that makes more sense :P

make sure to save file edits.

abramelin 12-05-2006 04:45 AM

any demo?

Mr Chad 12-05-2006 04:55 AM

Quote:

Originally Posted by abramelin (Post 1132211)
any demo?

cant give a demo because you need to login as a user not a guest.

but if you wana signup to see it go for it.

http://beasttoast.com/forum/register.php

no email verification enabled

magmf 12-05-2006 08:40 AM

I made all changes but i continue with the problema...


i use vbulletin 3.6.4 and my browser is Firefox 2 with linux...

But i access in other machine with ie 7 and nothing happens...

can you look for me ?? http://under-linux.org/forums

magmf 12-05-2006 09:01 AM

Sorry .... i found the problem

Now it's working...

Please put in your install instructions to put the javascript before all

/**
* Insert Link
*/

i only put in first :)

SORRYY!!

Arjan 12-05-2006 03:11 PM

I simply added all of them to my BBcode section.
I don't see why I should hack the vbulletin_textedit.js file in version 3.6.x


I got metcafe to work.
But I added .swf after the {param} tag in the HTML code
And a little note to my users who copy and paste the video code from the URL bar to remove the trailing slash.
See here:
http://www.simmerspaintshop.com/foru....html#post4152

Stangsta 12-05-2006 08:13 PM

Can this be used for standard videos hosted on the web? WMV, AVI, etc. If not, can you add that functionality?

Mr Chad 12-05-2006 09:24 PM

not sure but i think its possible if i make the java script search for the format endings.

i just dont know how compatable the code would be:

Code:

<embed name="RAOCXplayer" src="{param}" width="352" height="300" autostart="true">
like i dont know how many extensions work with that code above. If i did then i could make an if statement checking for the valid file extensions.

popmyzit 12-05-2006 09:28 PM

Thanks but The bb code instructions aren't complete.

popmyzit 12-05-2006 09:48 PM

Googlevideo doesn't work on this for me. Youtube is fine...

Mr Chad 12-05-2006 10:47 PM

what happens?

lazytown 12-05-2006 11:17 PM

Everything works except metacafe. And of course the annoying script warning every time in IE7. I don't think that's your fault though -- VB has to do something about working properly with IE7 defaults.

The way the template edits were listed was VERY confusing so I could see people not getting it to work right. I was able to figure it out.

-vissa

perfphysio 12-06-2006 12:30 PM

Yeah the BB instructions are not complete. We need to know what to put in the example in each case.

I have done this and by and large it works. The issue is though that since my upgrade to 3.6.4 none of my bb codes are working correctly. I get a message to install a plugin but when I do so the thing says it cannot find any.

You can see an example of what the page does at: http://www.physiobob.com/forum/showt...=9361#post9361

I am now not sure if this is a code issue or a server issue? Any ideas

e.g. you the youtube example be: [youtube]http://www.youtube.com/watch?v=40k78zzAFj8[/youtube]

or [youtube]40k78zzAFj8[/youtube]

Mr Chad 12-06-2006 12:58 PM

the thing is you are supposed to enter [youtube]40k78zzAFj8[/youtube]

but when you use the little button on the tool bar it strips the link http://www.youtube.com/watch?v=40k78zzAFj8 and turns it into [youtube]40k78zzAFj8[/youtube]

Arjan 12-06-2006 01:58 PM

Quote:

Originally Posted by vissa (Post 1132862)
Everything works except metacafe. And of course the annoying script warning every time in IE7. I don't think that's your fault though -- VB has to do something about working properly with IE7 defaults.

The way the template edits were listed was VERY confusing so I could see people not getting it to work right. I was able to figure it out.

-vissa


From the code that is returned by the Javascript the trailing slash must be removed. (No idea how to do that in JS)

Change the metacafe BB HTML code to
Code:

<embed src="http://www.metacafe.com/fplayer/{param}.swf" width="400" height="345" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>

Arjan 12-06-2006 02:37 PM

Quote:

Originally Posted by popmyzit (Post 1132803)
Googlevideo doesn't work on this for me. Youtube is fine...

Probably because you do not use video.google.com

Change
Code:

if (my_colors.match("video.google.com"))
to
Code:

if (my_colors.match("video.google"))
So that URL from other countries are also supported.

Arjan 12-06-2006 03:29 PM

Got it working

Fixes:
- Google aVideo from other domains then google.com (i.e. google.uk google.nl) are supported
- MetaCafe is working.

Here is the new Javascript code:
Code:

                * Insert Video Link
                */
                this.createvideolink = function(e, url)
                {
                        var my_colors=prompt("Please enter MySpace, Metacafe, YouTube or Google video URL","");
                        if ((my_colors=="") || (my_colors==null))
                        {
                                alert("Please Enter The Full URL!");
                        }
                        else
                        {
                                if (my_colors.match("www.youtube.com"))
                                {
                                        var col_array=my_colors.split("?v=");
                                        var part_num=1;
                                        return this.insert_text("[youtube]" + col_array[part_num] + "[/youtube]");
                                }
                                else
                                if (my_colors.match("myspace.com"))
                                {
                                        if (my_colors.match("videoID="))
                                        {
                                                var col_array=my_colors.split("videoID=");
                                        }
                                        else
                                        {
                                                var col_array=my_colors.split("videoid=");
                                        }
                                        var part_num=1;
                                        return this.insert_text("[myspace]" + col_array[part_num] + "[/myspace]");
                                }
                                else
                                if (my_colors.match("video.google"))
                                {
                                        var col_array=my_colors.split("docid=");
                                        var part_num=1;
                                        return this.insert_text("[googlevideo]" + col_array[part_num] + "[/googlevideo]");
                                }
                                else
                                if (my_colors.match("metacafe.com"))
                                {
                                        var col_array=my_colors.split("/watch/");
                                        var part_num=1;
                                        var cafeStr=col_array[part_num];
                                    if (cafeStr.lastIndexOf('/') == cafeStr.length-1)
                                        {
                                                return this.insert_text("[metacafe]" + cafeStr.substring(0,cafeStr.length-1) + "[/metacafe]");       
                                        }
                                        else
                                        {
                                                return this.insert_text("[metacafe]" + cafeStr + "[/metacafe]");       
                                        }
                                }
                                else
                                {
                                        alert("No valid Google, YouTube, MetaCafe or Myspace URL");
                                }
                        }
                };

Here is the changed BB code:

Title: metacafe
Tag: metacafe
Replacement:
Code:

<embed src="http://www.metacafe.com/fplayer/{param}.swf" width="400" height="345" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>

Mr Chad 12-06-2006 09:00 PM

thanks, updated it.

rolandogomez 12-06-2006 10:10 PM

A few things, in your instructions, please add that there are about four or five places (lost count) to add the code after

/**
* Insert Link
*/

In addition, each time you add a BB code it asks you for an example, that would be beneficial for us noncoder types.

On the image that shows up in the reply boxes, it's this link: http://wwwstagemc.nhmccd.edu/resourc...video_icon.gif is that smart to do? I look at that as bandwith theft. You might tell people to download that image and where to change the code with your own server URL of the image.

Now, with that said, did everything, but it doesn't work for me, does nothing other than display the image. Something doesn't make the javascript work I'm guessing, perhaps VBSEO? Let me know, seems like a nice hack, thanks rg.

Mr Chad 12-06-2006 11:00 PM

hmm it seems it doesn't work when you change it into normal text edit from WYSIWYG. So it only works in WYSIWYG, i'm sure theres a second place to put the JS edit for it to work in both, i just don't know it yet.

TCattitude 12-07-2006 08:02 PM

Quote:

Originally Posted by Mr Chad (Post 1133536)
hmm it seems it doesn't work when you change it into normal text edit from WYSIWYG. So it only works in WYSIWYG, i'm sure theres a second place to put the JS edit for it to work in both, i just don't know it yet.

In the same javascript file, but before this (actually, works in many places around that part of the JS):

Quote:

/**
* Insert Image
*
* @param event Event object
* @param string (Optional) Image URL
*
* @return boolean
*/
That's all. In that way works in the normal editor.

Mr Chad 12-07-2006 09:20 PM

if i put it there will it work in both normal and WYSIWYG mode? or does it need to be in both places?

paypal 12-08-2006 03:17 AM

getting error on page display when i post new thread, non of the editing buttons work along with the media buttons?

did i miss something here.

AWJunkies 12-08-2006 04:37 AM

So if this mod good to go now? Works for normal edit mode not wys*. Quick edit and full etc and so on and quick post and full post?

BigJimTheLug 12-08-2006 06:29 AM

Hey, I tried it just like you said and it does not embed the videos.

the button doesn't work either.....lol..

something is wrong.......


All times are GMT. The time now is 01:01 PM.

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.01563 seconds
  • Memory Usage 1,836KB
  • 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
  • (6)bbcode_code_printable
  • (6)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