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)

wolf32 02-02-2007 02:35 AM

Quote:

Originally Posted by Mr Chad (Post 1172681)
javascript errer

hhmmm
Pretty new to the vB world,

That's in clientscript/vbulletin_texteditor.js? or the templates?

Eclipsed830 02-02-2007 02:42 AM

Is their anyway to get this to work with Vidiac video services?

Mr Chad 02-02-2007 04:01 AM

Quote:

Originally Posted by wolf32 (Post 1172698)
hhmmm
Pretty new to the vB world,

That's in clientscript/vbulletin_texteditor.js? or the templates?

in the .js file

Rover416 02-02-2007 11:47 AM

Thanks, works great.

http://www.vectra-sri.co.uk/forum/te...code-t330.html

I used this icon for the video though

http://vectra-sri.co.uk/images/video.jpg

wolf32 02-03-2007 04:08 AM

When you insert the new code above-
/**
* insert link
*/

There are 3 different places in the .js folder that has the "insert link" coding, do you place the new code above all three different places or just a particular section? Also, when I "copy &paste" the new code into the .js folder, the format of the coding changes, could this have negative effects? Thanks in advance.

CrashfAB 02-03-2007 04:28 AM

Ok I am totoaly new to this---but how do I edit the vbulletin_texteditor.js ?

Thanks--like I say I new to alot of this.

CrashfAB 02-03-2007 05:49 AM

Ok---took a bit of reading--some cuss words but it now works perfect

Thanks!!!!

Mr Chad 02-03-2007 07:08 AM

Quote:

Originally Posted by CrashfAB (Post 1173490)
Ok---took a bit of reading--some cuss words but it now works perfect

Thanks!!!!

:D glad to hear

Sweet Evil 02-03-2007 09:34 AM

Quote:

Originally Posted by dtdesign (Post 1151270)
I found this worked on my site, anyone that couldn't use the button I got them to change their options to use WYSIWG Editor and they can post videos...

http://www.driver.ie/forum/gallery2/...4851a8a5c2afcf

The button doesn't work using the Enhanced editor, is there a fix? whats wrong? Tnx

KipLarson 02-03-2007 03:28 PM

Screen shots?

Mr Chad 02-03-2007 04:34 PM

Quote:

Originally Posted by KipLarson (Post 1173718)
Screen shots?

did you make all of the Javascript replacements?

CrashfAB 02-03-2007 06:10 PM

Quote:

Originally Posted by Mr Chad (Post 1173513)
:D glad to hear



The one thing I would add to the instructions chad and its one thing I had to figure out(now granted somebody more used to these things might have had an easier time) was the fact you had to add the code in 3 places above. But like I say I am totoaly new to anything with javascript ;)


/**
* Insert Link
*/

Kungfu 02-04-2007 05:13 AM

Ok i modified this to a better way of doing this. Adding this code 3 or 4 times is not efficient enough for me and can get complicated. For those of you who want an easy way to do this follow this step.

in clientscript/vbulletin_textedit.js find
Code:

                        case 'PHP':
                        {
                                this.apply_format('removeformat');
                        }

Add right below that
Code:

                        case 'VIDEO':
                        {
                        var        video = this.get_selection();

                        if((video=="") || (video==null)){
                                var video=prompt("MySpace, YouTube, Google video, eBaum's World or Metacafe URL","");
      }
          if (video.match("youtube.com"))
                {
                    var col_array=video.split("?v=");
                    var part_num=1;
                    if(col_array[part_num] == null || col_array[part_num] == ""){
                            alert("Please Highlight the Full URL!");
                            return false;
                    }
                    return this.insert_text("[youtube]" + col_array[part_num] + "[/youtube]");
                }
          else if (video.match("myspace.com"))
                {
                    if (video.match("videoID="))
                    {
                        var col_array=video.split("videoID=");
                    }
                    else
                    {
                        var col_array=video.split("videoid=");
                    }
                    var part_num=1;
                    if(col_array[part_num] == null || col_array[part_num] == ""){
                            alert("Please Highlight the Full URL!");
                            return false;
                    }
                    return this.insert_text("[myspace]" + col_array[part_num] + "[/myspace]");
                }
          else if (video.match("video.google."))
                {
                    var col_array=video.split("docid=");
                    var part_num=1;
                    if(col_array[part_num] == null || col_array[part_num] == ""){
                            alert("Please Highlight the Full URL!");
                            return false;
                    }
                    return this.insert_text("[googlevideo]" + col_array[part_num] + "[/googlevideo]");
                }
                                        else if (video.match("ebaumsworld.com")) {
                                                                    var video = video.replace(".html","");
                    var col_array = video.split("ebaumsworld.com/");
                    if(col_array[part_num] == null || col_array[part_num] == ""){
                            alert("Please Highlight the Full URL!");
                            return false;
                    }
                    return this.insert_text("[ebaumsvideo]" + col_array[1] + "[/ebaumsvideo]");
                }
          else if (video.match("metacafe.com"))
                {
                                                                    var video = video.replace(new RegExp(/\/$/),"");
                    var col_array = video.split(new RegExp(/\/watch\//g));
                    if(col_array[part_num] == null || col_array[part_num] == ""){
                            alert("Please Highlight the Full URL!");
                            return false;
                    }
                    return this.insert_text("[metacafe]" + col_array[1] + "[/metacafe]");
                }
          else{
                  alert("Please Enter The Full URL!");
            return false;
          }


                        return false;
                }


now in the templates editor_toolbar_on and postbit_quickedit and showthread_quickreply
find:
Code:

            <if condition="$show['img_bbcode']">
                <td><div class="imagebutton" id="{$editorid}_cmd_insertimage"><img src="$stylevar[imgdir_editor]/insertimage.gif" width="21" height="20" alt="$vbphrase[insert_image]" /></div></td>
            </if>

and add below

Code:

<td><div class="imagebutton" id="{$editorid}_cmd_wrap0_VIDEO"><img src="http://wwwstagemc.nhmccd.edu/resources/images/live/locations/mc/general/MC_video_icon.gif" width="21" height="20" alt="$vbphrase[insert_link]" /></div></td>

Install the product file and thats it. Also if they highlight the URL it will add tags, if they highlight it but it doesnt have any type of video url it will tell them to select the entire url. if they dont highlight anything it will prompt them for something.

Mr Chad 02-04-2007 05:46 AM

does it work on all editors kungfu?

Kungfu 02-04-2007 07:02 AM

Quote:

Originally Posted by Mr Chad (Post 1174150)
does it work on all editors kungfu?

Yea it should work on all editors. I had to make a custom function for a button like this. And this works.

I just updated the code too so it will detect if they highlighted the code right. Should be good to go now. So if they have google.com/blahblah it wont try to make a bbcode.

This is basically what you had in all 3-5 spots but its just one spot now. Should work on all browsers as well.

Just tested it again on different browsers and editors. Seems to work fine. I only tested a few video formats so if anyone tests it out and finds something wrong let me know or post im sure chad would be able to figure it out as well.

taydu 02-04-2007 05:10 PM

I'm a little confuse with the instruction. I found four "insert link" and 1 "insert image." Do I insert the code above four "insert link" and the "insert image"

Mr Chad 02-04-2007 05:29 PM

just do all 4

taydu 02-04-2007 05:47 PM

thanks chad,

Now there is a "insert link button on the text editor but when I click on it it doesn't do anything.

Mr Chad 02-05-2007 08:26 PM

your having a javascript error then.

taydu 02-06-2007 02:11 AM

how do i fix it? Doesn't "Inser Image" "Hyper Link" using the same java script? Those still working fine. :(

redwinger 02-06-2007 03:25 AM

Sweet mod! Got it working in the advanced template, however the quickreply it will not work in. When you click in the quickreply it does not allow you to enter the link. Here is the code

Code:

        </if>
        <if condition="$show['img_bbcode']">
                <td><div class="imagebutton" id="{$editorid}_cmd_insertimage"><img src="$stylevar[imgdir_editor]/insertimage.gif" width="21" height="20" alt="$vbphrase[insert_image]" /></div></td>
        </if>
<td><div class="imagebutton" id="{$editorid}_cmd_createvideolink"><img src="http://wwwstagemc.nhmccd.edu/resources/images/live/locations/mc/general/MC_video_icon.gif" width="21" height="20" alt="$vbphrase[insert_link]" /></div></td>

It appears to be correct but I am sure I am missing something. Thanks in advance

redwinger 02-06-2007 03:31 AM

Nevermind found it in the js file forgot to find all three "insert link":o

Mr Chad 02-06-2007 05:32 AM

Quote:

Originally Posted by taydu (Post 1175696)
how do i fix it? Doesn't "Inser Image" "Hyper Link" using the same java script? Those still working fine. :(

make the JS edits again... (start over)

make sure u follow instructions.

fringehead 02-09-2007 01:36 AM

Hi there, my video button is broken now... I guess the server that had the video button removed it..

http://wwwstagemc.nhmccd.edu/resourc...video_icon.gif

This is the broken link to the original... Where is the button and how to I fix it to work on my local site?

Thanks,

Sean

Kungfu 02-09-2007 01:42 AM

Quote:

Originally Posted by fringehead (Post 1178009)
Hi there, my video button is broken now... I guess the server that had the video button removed it..

http://wwwstagemc.nhmccd.edu/resourc...video_icon.gif

This is the broken link to the original... Where is the button and how to I fix it to work on my local site?

Thanks,

Sean

in the editor_toolbar_on and postbit_quickedit and showthread_quickreply templates
youll need to find that image and replace it with your own.

fringehead 02-09-2007 02:15 AM

Got it working! Thanks for the help and the very cool mod Mr_Chad!!

Sean

MTVSlick 02-09-2007 10:59 AM

I must be really new to this cuase I can not seem to find the location of that code I need to add to, can someone kick my a** in the right direction please?

Mark, Thank You!

Kungfu 02-09-2007 03:30 PM

Quote:

Originally Posted by MTVSlick (Post 1178275)
I must be really new to this cuase I can not seem to find the location of that code I need to add to, can someone kick my a** in the right direction please?


Mark, Thank You!

try my method instead

https://vborg.vbsupport.ru/showpost....&postcount=215
Its only one place and easier to find.

MTVSlick 02-09-2007 08:53 PM

"clientscript/vbulletin_textedit.js" this is what i cant seem to find, lol ofcoarse now that i am telling u this its probably right in front of me. lol

Mark,

Kungfu 02-10-2007 02:13 AM

Quote:

Originally Posted by MTVSlick (Post 1178690)
"clientscript/vbulletin_textedit.js" this is what i cant seem to find, lol ofcoarse now that i am telling u this its probably right in front of me. lol

Mark,

you have to ftp it. Its a file uploaded to the server in the forum folder.

Mr Chad 02-11-2007 12:42 AM

Quote:

Originally Posted by Kungfu (Post 1178454)
try my method instead

https://vborg.vbsupport.ru/showpost....&postcount=215
Its only one place and easier to find.

i looked at your method and doesn't it only work if you select the link?

where mine gives you an input box to enter it in there.

Nathan2006 02-11-2007 04:50 AM

Hi Mr Chad,

I have now found it better with the install info on the 1st post :)

The only problem I'm having is that there is no Google video bbcode

Do you know anywhere I can get it cos its not added it :(

Thanks :)

Mr Chad 02-11-2007 06:57 AM

the XML should install it for you. Just remember to edit all of the bbcodes and re-save them.

Mutt 02-11-2007 08:18 PM

can someone please post the video button. the original link is broken. I search in the graphics section and couldn't find any custom BBCode buttons.

as for the BBCodes. is there an autostart option? I don't know much about youtube or google videos

MortysTW 02-11-2007 08:39 PM

I installed the product, and the only things that work or were installed as bbcode were metacafe, google video, and myspace.

The "product" is missing some things I guess. Chad, please upload your latest product please.

MortysTW 02-11-2007 08:54 PM

FYI, I just re-imported the product hoping it would help. And no luck. :(

Derty Eric B. 02-11-2007 10:44 PM

Quote:

Originally Posted by MortysTW (Post 1180179)
FYI, I just re-imported the product hoping it would help. And no luck. :(

This the YouTube Code that Works for me

Code:

<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/{param}"></param><embed src="http://www.youtube.com/v/{param}" type="application/x-shockwave-flash" width="425" height="350"></embed></object>

Kungfu 02-11-2007 11:47 PM

Quote:

Originally Posted by Mr Chad (Post 1179545)
i looked at your method and doesn't it only work if you select the link?

where mine gives you an input box to enter it in there.

nope it does both. If you dont highlight anything it will bring up a popup box. If you highlight but its not right it will say to highlight full url. If you highlight the full url it will be fine and make into a bbcode.

rjmjr69 02-13-2007 07:50 AM

OK I lost the image for this somehow. Wasnt there a button to click. I now have text that says input link?

Nathan2006 02-13-2007 08:04 AM

Quote:

Originally Posted by Mr Chad (Post 1179731)
the XML should install it for you. Just remember to edit all of the bbcodes and re-save them.

Nope its not added the Google bbcode but added all the rest.

I have already pressed edit and save on them all apart from the Google one cos its not there lol

Quote:

Originally Posted by rjmjr69 (Post 1181330)
OK I lost the image for this somehow. Wasnt there a button to click. I now have text that says input link?

You need to upload the image to your server. /images/editor/


All times are GMT. The time now is 08:56 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.01622 seconds
  • Memory Usage 1,855KB
  • 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
  • (16)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