The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

How do I add two buttons to the window transmission

View previous topic View next topic Go down

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

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

How do I add two buttons to the window transmission ?







As the picture








As in this forum

ـــــــــــــــــــــــــــــــــــــــــــــــــــــــــ

ane taa
New Member

Female Posts : 2
Reputation : 1
Language : english

http://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 on 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
Forumaster

Male Posts : 13021
Reputation : 2683
Language : EN10, FR5
Location : Pennsylvania

http://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 on 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 



As in this forum

ane taa
New Member

Female Posts : 2
Reputation : 1
Language : english

http://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 on 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
Forumaster

Male Posts : 13021
Reputation : 2683
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

View previous topic View next topic Back to top


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