The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

help in this code . the effect on code > add button to Put under the colored writing

3 posters

Go down

help in this code . the effect on code > add button to Put under the colored writing Empty help in this code . the effect on code > add button to Put under the colored writing

Post by coolkool Fri 18 Sep 2015 - 14:39

hi 

i get a code in Portuguese help form
the code is working
But there is a problem
It lacks the css code in order to show the activation
 
i am using this code only :
Code:
$(function() {
  if (!$.sceditor) return;

  $.sceditor.command.set('neon', {

  _dropDown : function(editor,caller,callback) {
    var i, x, neon, neons, genneon = {
       r: 255, g: 255, b: 255
    },
    content = $("<div />"),
    neonColumns = editor.opts.neons?editor.opts.neons.split("|"):new Array(6),
    html = [],
    cmd = $.sceditor.command.get('neon');
    if(!cmd._htmlCache) {
       for(i = 0; i < neonColumns.length; ++i) {
            neons = neonColumns[i]?neonColumns[i].split(","):new Array(37);
            html.push('<div class="sceditor-color-column">');
             for(x = 1; x < neons.length; ++x) {
                  neon = neons[x]||"#"+genneon.r.toString(16)+genneon.g.toString(16)+genneon.b.toString(16);
                  html.push('<a href="#" class="sceditor-neon-option" style="background-color: ' + neon + '" data-neon="' + neon + '" title="' + neon + '"></a>');
                  if(x%6 === 0) {
                     genneon.g -= 51;
                     genneon.b = 255;
                     if(genneon.g < 51) {
                        genneon.g = "00";
                     }
                  } else genneon.b -= 51;
                  if(genneon.b < 51) {
                     genneon.b = "00";
                  }
             }
             html.push('</div>');
             if(i%1 === 0) {
                genneon.r -= 51;
                genneon.g = 255;
                genneon.b = 255;
                if(genneon.r < 51) {
                   genneon.r = "00";
                }
             } else {
                   genneon.g = 255;
                   genneon.b = 255;
             }
       }
       cmd._htmlCache = html.join('');
    }
    content.append(cmd._htmlCache).find('a').click(function(e) {
         callback($(this).attr('data-neon'));
         editor.closeDropDown(true);
         e.preventDefault();
    });
    editor.createDropDown(caller, "neon-picker", content);
   },
   // WYSIWYG MODE
   txtExec : function(caller) {
   var editor = this;
       $.sceditor.command.get('neon')._dropDown(editor, caller, function(neon) {
         editor.insertText("[neon="+neon+"]","[/neon]");
   });
   },
   // SOURCE MODE
   exec : function(caller) {
   var editor = this;
       $.sceditor.command.get('neon')._dropDown(editor, caller, function(neon) {
         editor.insertText("[neon="+neon+"]","[/neon]");
       });
   }, tooltip: "Neon"});
  
  toolbar = toolbar.replace(/quote/,'neon,quote');

  $('head').append(
  '<style type="text/css">' +
  '.sceditor-button-neon div {' +
  '  background:url(https://cdn2.iconfinder.com/data/icons/aspneticons_v1.0_Nov2006/color2_16x16.gif) !important}' +
  '  .sceditor-neon {' +
  '  width:auto;' +
  '  height:auto;' +
  '  overflow-y:auto;' +
  '}' +
  '.sceditor-neon-picker {' +
  '  padding: 0 !important;' +
  '}' +
  '.sceditor-neon-option {' +
  'border: 1px solid #fff;' +
  'display: block;' +
  'height: 10px;' +
  'overflow: hidden;' +
  'width: 10px;' +
  '}' +
  '</style>'
  );
});

http://ajuda.forumeiros.com/t100038-addon-bbcode-neon#690705
He adds a button and make it work
But for a preview Topic liters code does not take effect
Because it needs to Code: CSS
Thread, which was published in the support forum Portuguese 
 did not put us to the CSS code

the effect on code > add button to Put under the colored writing
anybody can help me ?


Last edited by coolkool on Fri 18 Sep 2015 - 20:37; edited 2 times in total (Reason for editing : change the titel)
coolkool
coolkool
Forumember

Male Posts : 140
Reputation : 3
Language : Arabic
Location : SA

http://x-gaming.forumakers.com/

Back to top Go down

help in this code . the effect on code > add button to Put under the colored writing Empty Re: help in this code . the effect on code > add button to Put under the colored writing

Post by Niko Fri 18 Sep 2015 - 18:28

Hello,

the css code is included in the javascript code Wink
However, if you want you can add it separately in your css stylesheet:

Code:
.sceditor-button-neon div {
    background:url(https://cdn2.iconfinder.com/data/icons/aspneticons_v1.0_Nov2006/color2_16x16.gif)!important;
}
    .sceditor-neon {
    width:auto;
    height:auto;
    overflow-y:auto;
  }
  .sceditor-neon-picker {
    padding: 0 !important;
  }
  .sceditor-neon-option {
  border: 1px solid #fff;
 display: block;
  height: 10px;
  overflow: hidden;
 width: 10px;
  }
Niko
Niko
Helper
Helper

Male Posts : 3318
Reputation : 255
Language : English, Italian, French
Location : Italy

https://www.fmcodes.net/

Back to top Go down

help in this code . the effect on code > add button to Put under the colored writing Empty Re: help in this code . the effect on code > add button to Put under the colored writing

Post by coolkool Fri 18 Sep 2015 - 18:51

help in this code . the effect on code > add button to Put under the colored writing IixdVDE

It's not work Sad
coolkool
coolkool
Forumember

Male Posts : 140
Reputation : 3
Language : Arabic
Location : SA

http://x-gaming.forumakers.com/

Back to top Go down

help in this code . the effect on code > add button to Put under the colored writing Empty Re: help in this code . the effect on code > add button to Put under the colored writing

Post by Niko Fri 18 Sep 2015 - 19:04

@coolkool did you follow the other tutorial required? (see here)

the tutorial you linked me is just an addOn, this means that a previous tutorial is required to make it work. (see here) will help you
Niko
Niko
Helper
Helper

Male Posts : 3318
Reputation : 255
Language : English, Italian, French
Location : Italy

https://www.fmcodes.net/

Back to top Go down

help in this code . the effect on code > add button to Put under the colored writing Empty Re: help in this code . the effect on code > add button to Put under the colored writing

Post by coolkool Fri 18 Sep 2015 - 19:16

No I didn't follow the other 
[size=30] tutorial[/size]
[size=30]Becuase I can't understand what code I will add [/size]
coolkool
coolkool
Forumember

Male Posts : 140
Reputation : 3
Language : Arabic
Location : SA

http://x-gaming.forumakers.com/

Back to top Go down

help in this code . the effect on code > add button to Put under the colored writing Empty Re: help in this code . the effect on code > add button to Put under the colored writing

Post by SLGray Fri 18 Sep 2015 - 19:34

Please change the title of your topic to something that is related to your question/issue, so that other users will be able to find their question/issue using the search engine.


help in this code . the effect on code > add button to Put under the colored writing Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51576
Reputation : 3525
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

help in this code . the effect on code > add button to Put under the colored writing Empty Re: help in this code . the effect on code > add button to Put under the colored writing

Post by coolkool Fri 18 Sep 2015 - 19:38

I apologize I do not know the title fits Thread if you can help in the development of Title thank brother
coolkool
coolkool
Forumember

Male Posts : 140
Reputation : 3
Language : Arabic
Location : SA

http://x-gaming.forumakers.com/

Back to top Go down

help in this code . the effect on code > add button to Put under the colored writing Empty Re: help in this code . the effect on code > add button to Put under the colored writing

Post by SLGray Fri 18 Sep 2015 - 19:42

Add in the title what the code does.


help in this code . the effect on code > add button to Put under the colored writing Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51576
Reputation : 3525
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

help in this code . the effect on code > add button to Put under the colored writing Empty Re: help in this code . the effect on code > add button to Put under the colored writing

Post by coolkool Fri 18 Sep 2015 - 20:28

anybody can help me ?
coolkool
coolkool
Forumember

Male Posts : 140
Reputation : 3
Language : Arabic
Location : SA

http://x-gaming.forumakers.com/

Back to top Go down

help in this code . the effect on code > add button to Put under the colored writing Empty Re: help in this code . the effect on code > add button to Put under the colored writing

Post by SLGray Fri 18 Sep 2015 - 20:30

I mean the title needs to related to what the code does on your forum.


help in this code . the effect on code > add button to Put under the colored writing Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51576
Reputation : 3525
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

help in this code . the effect on code > add button to Put under the colored writing Empty Re: help in this code . the effect on code > add button to Put under the colored writing

Post by coolkool Fri 18 Sep 2015 - 20:39

add button to Put under the colored writing
coolkool
coolkool
Forumember

Male Posts : 140
Reputation : 3
Language : Arabic
Location : SA

http://x-gaming.forumakers.com/

Back to top Go down

help in this code . the effect on code > add button to Put under the colored writing Empty Re: help in this code . the effect on code > add button to Put under the colored writing

Post by SLGray Fri 18 Sep 2015 - 20:42

Have you translated the other tutorial so you know which codes you needed?


help in this code . the effect on code > add button to Put under the colored writing Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51576
Reputation : 3525
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

help in this code . the effect on code > add button to Put under the colored writing Empty Re: help in this code . the effect on code > add button to Put under the colored writing

Post by coolkool Fri 18 Sep 2015 - 21:36

locked 
finish i find the answer ^.^
coolkool
coolkool
Forumember

Male Posts : 140
Reputation : 3
Language : Arabic
Location : SA

http://x-gaming.forumakers.com/

Back to top Go down

help in this code . the effect on code > add button to Put under the colored writing Empty Re: help in this code . the effect on code > add button to Put under the colored writing

Post by SLGray Fri 18 Sep 2015 - 21:38

Locked as Requested


help in this code . the effect on code > add button to Put under the colored writing Slgray10

When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
SLGray
SLGray
Administrator
Administrator

Male Posts : 51576
Reputation : 3525
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum