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.

How do I add two buttons to the window transmission

2 posters

Go down

In progress How do I add two buttons to the window transmission

Post by ane taa July 8th 2014, 10:54 pm

How do I add two buttons to the window transmission ?







As the picture

How do I add two buttons to the window transmission  9010






As in this forum

ـــــــــــــــــــــــــــــــــــــــــــــــــــــــــ
ane taa
ane taa
New Member

Female Posts : 2
Reputation : 1
Language : english

https://help.forumotion.com

Back to top Go down

In progress Re: How do I add two buttons to the window transmission

Post by Ange Tuteur July 9th 2014, 9:32 am

Hello ane taa,

You can write new buttons by adding the following script :
Administration Panel > Modules > JavaScript codes management > Create a new script

Title : Your choice
Placement : In all the pages
Paste the code below :
Code:
$(function(){$(function() {
  newButton('Insert colored bold tags','http://i57.servimg.com/u/f57/18/21/41/30/b10.png','[color=blue][b]','[/b][/color]');
  newButton('Insert colored italic tags','http://i57.servimg.com/u/f57/18/21/41/30/i10.png','[color=blue][i]','[/i][/color]');
  newButton('Insert colored underline tags','http://i57.servimg.com/u/f57/18/21/41/30/u10.png','[color=blue][u]','[/u][/color]');
  newButton('Insert colored strike tags','http://i57.servimg.com/u/f57/18/21/41/30/s10.png','[color=blue][strike]','[/strike][/color]');
    
  function newButton(title, image, tagOpen, tagClose) {$('.sceditor-group:has(.sceditor-button-quote)').append('<a title="'+title+'" class="sceditor-button sceditor-button-custom" unselectable="on"><div unselectable="on" style="background-image:url('+image+');"><span id="tagOpen">'+tagOpen+'</span><span id="tagClose">'+tagClose+'</span></div></a>')}
  $('.sceditor-button-custom').click(function() {$('#text_editor_textarea').sceditor('instance').insertText($(this).find('#tagOpen').text(),$(this).find('#tagClose').text())});
})});

To add a new button write newButton(); between the parenthesis you must fill out the following information in order :

Title : the tooltip for the button i.e. a description of what it does
Image : the image URL of the button
Opening Tags : The open bbtags for your button i.e. [b ]
Closing Tags : The closing bbtags for your button i.e. [/b ]

It should look like the default buttons I have in the code for example :
Code:
newButton('Insert colored bold tags','http://i57.servimg.com/u/f57/18/21/41/30/b10.png','[color=blue][b]','[/b][/color]');
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

In progress Re: How do I add two buttons to the window transmission

Post by ane taa July 9th 2014, 11:12 pm

Thank you, but I want these buttons because they are carrying out a bid for the chess board 
I can also review the role of chess 
How do I add two buttons to the window transmission  12310


As in this forum
ane taa
ane taa
New Member

Female Posts : 2
Reputation : 1
Language : english

https://help.forumotion.com

Back to top Go down

In progress Re: How do I add two buttons to the window transmission

Post by Ange Tuteur July 10th 2014, 1:40 am

Please stick to the default font, you're allowed to highlight certain parts however, writing in colored font is reserved for staff moderation.

I would not know the function of the button, perhaps you could ask the owner of that site for permission to use their buttons.
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Back to top

- Similar topics

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