vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=242)
-   -   [HOW-TO - vB4] Create a Custom Button for CK Editor (no file edits) (https://vborg.vbsupport.ru/showthread.php?t=278828)

DaSpirit 02-03-2014 09:32 PM

Hello!

Great Plugin!

I want to just attach a link to my file that opens in new window. Would someone possiblly help me with that one?

Thanks a lot!

cellarius 02-03-2014 09:37 PM

No idea what you want to do, but this article is not about attaching anything to a file, but adding a button to the editor. Please open your own thread in the appropriate forums.

DaSpirit 02-03-2014 11:05 PM

Quote:

Originally Posted by cellarius (Post 2478866)
No idea what you want to do, but this article is not about attaching anything to a file, but adding a button to the editor. Please open your own thread in the appropriate forums.

Thanks for the answer!

I want to make the button link to a file in a new window. I have no idea about php and I am new to the vbulletin as well, thats why I am a bit disoriented, sorry about that. I think that what I want is simple, but I do not how to do it :(

cellarius 02-04-2014 06:21 AM

OK. As I wrote in the article, this is not normally the place to ask for things that you want the button to do - this is for the addition of the button, not more.

Anyway: This has nothing to do with PHP - all of this is Javascript. And to open a page in a new window, you would add something like
Code:

window.open("http://www.your-page.com/goes/here.html");
to the exec part of my code. Like so:
Code:

exec: function(editor){
        window.open("http://www.your-page.com/goes/here.html");
}

For the additional syntax of window.open just google that command. There's plenty of sites explaining that.

DaSpirit 02-05-2014 01:56 AM

Thanks a lot!

Easy5s.net 03-20-2014 09:04 AM

How to move custom button to End Toolbar

cellarius 03-20-2014 09:37 AM

By inserting it after the last button using the method described in the article.

tini_lam 08-18-2014 10:06 AM

vbb 4.2.3 not work. member can't click button... but admin can

cellarius 08-18-2014 10:49 AM

And? The article describes how you can restrict the button per usergroup. If you don't want that, don't implement it.

tini_lam 08-18-2014 11:25 AM

i use code
Code:

foreach ($toolbar AS &$row)
{
    if (is_array($row))
    {
        foreach ($row AS $id => $cmd)
        {
            if ($cmd == 'Quote')
            {
                $row = array_merge(array_slice($row, 0, $id+1),  array('celButtonDemo'), array_slice($row, $id+1));
                break;
            }
        }
    }
}

course members see this button but can't click it, just administrator can click it to use


All times are GMT. The time now is 03:27 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.01088 seconds
  • Memory Usage 1,735KB
  • 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
  • (3)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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