is that possible simple menu with quick reply`s
5 posters
Page 1 of 1
is that possible simple menu with quick reply`s
is that possible simple menu with quick reply`s
ill try Explain more
before the quick replay box i want a little menu with templates reply`s
like
so when i chose one of them its added to the Editor area instead of typing it
is my idea clear or there is something still not Understandable
it dose not matter how it will be the Script templates or Java Script wont be any case
thanks again
ill try Explain more
before the quick replay box i want a little menu with templates reply`s
like
ETCthank you very much - this great topic - keep it up
so when i chose one of them its added to the Editor area instead of typing it
is my idea clear or there is something still not Understandable
it dose not matter how it will be the Script templates or Java Script wont be any case
thanks again
Michael_vx- Forumember
- Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt
Re: is that possible simple menu with quick reply`s
I can help you explain this better, I have been looking for something like this as well.
What the op is asking is, for there to be a button that when the user presses it it opens a menu. In that menu their are prewritten replies, that the user can choose from by clicking them. Once the user clicks then it addes them to the reply box, so the user does not have to type them.
What the op is asking is, for there to be a button that when the user presses it it opens a menu. In that menu their are prewritten replies, that the user can choose from by clicking them. Once the user clicks then it addes them to the reply box, so the user does not have to type them.
Re: is that possible simple menu with quick reply`s
Sir. Mayo wrote:I can help you explain this better, I have been looking for something like this as well.
What the op is asking is, for there to be a button that when the user presses it it opens a menu. In that menu their are prewritten replies, that the user can choose from by clicking them. Once the user clicks then it addes them to the reply box, so the user does not have to type them.
yes you Explained things way way better then me
that is what i meant
Michael_vx- Forumember
- Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt
Michael_vx- Forumember
- Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt
Re: is that possible simple menu with quick reply`s
should i give up on this or ???
Michael_vx- Forumember
- Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt
Re: is that possible simple menu with quick reply`s
im waiting but still dont know if this will be possible or not
Michael_vx- Forumember
- Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt
Re: is that possible simple menu with quick reply`s
@Michael_vx and @Sir. Mayo,
This is absolutely possible by setting a new command for the editor. Here's an example I'll give you which will do just that :
Administration Panel > Modules > JavaScript codes management > Create a new script
Placement : In all the pages
Paste the following script :
To change the messages you will need to modify the messages object, which is shown below :
These are set in TITLE : MESSAGE pairs. To add more message presets, simply add a comma after the last pair and create a new pair. ( title : message )
Once done, you'll have a new button to insert preset messages.
Par default the button image is the youtube icon. That can be changed by using the following CSS rule, and replacing IMAGE by the image of your button.
Have a good day, and see you.
This is absolutely possible by setting a new command for the editor. Here's an example I'll give you which will do just that :
Administration Panel > Modules > JavaScript codes management > Create a new script
Placement : In all the pages
Paste the following script :
- Code:
$(function() {
if (!$.sceditor) return;
$.sceditor.command.set('messages', {
dropDown : function(editor, caller, callback) {
var messages = {
'Title' : 'Message content',
'Hello' : 'Good day !',
'Goodbye' : 'See you !'
},
a, d = document.createElement('DIV'), i;
for (i in messages) {
a = document.createElement('A');
a.className = 'sceditor-font-option';
a.title = messages[i];
a.innerHTML = i;
a.onclick = function() {
callback(this.title);
editor.closeDropDown(true);
return false;
};
d.appendChild(a);
}
editor.createDropDown(caller, 'messages', d);
},
exec : function(c) {
var e = this;
$.sceditor.command.get('messages').dropDown(e, c, function(content) {
e.insertText(content);
});
},
txtExec : function(c) {
var e = this;
$.sceditor.command.get('messages').dropDown(e, c, function(content) {
e.insertText(content);
});
},
tooltip : 'Preset messages'
});
toolbar += '|messages'
});
To change the messages you will need to modify the messages object, which is shown below :
- Code:
var messages = {
'Title' : 'Message content',
'Hello' : 'Good day !',
'Goodbye' : 'See you !'
},
These are set in TITLE : MESSAGE pairs. To add more message presets, simply add a comma after the last pair and create a new pair. ( title : message )
Once done, you'll have a new button to insert preset messages.
Par default the button image is the youtube icon. That can be changed by using the following CSS rule, and replacing IMAGE by the image of your button.
- Code:
.sceditor-button-messages div {
background-image:url('IMAGE') !important;
}
Have a good day, and see you.
Last edited by Ange Tuteur on July 10th 2015, 11:39; edited 1 time in total
Re: is that possible simple menu with quick reply`s
no way
i thought my idea was stupid and impossible
im glad its came true
working 100% even with Arabic letters thank thanks thanks a lot
the words of thanks is not Enough
ــــــــــــــــــــــــــــــــــــ
Wait
the button gone while i was testing i re add it still wont show
__________________
i see
this is gonna be a little problem
if there more then 3 messages Script Break and wont work
any way to solve this too ?
Michael_vx- Forumember
- Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt
Re: is that possible simple menu with quick reply`s
Post here the modified script so I can see what's preventing it from working.
Re: is that possible simple menu with quick reply`s
now i`m real confused
so confused that my head is going up in smoke the same while it was not working its working now
- Code:
$(function() {
if (!$.sceditor) return;
$.sceditor.command.set('messages', {
dropDown : function(editor, caller, callback) {
var messages = {
'مايكل سوفت' : '[url=http://micsoft.ga]مايكل سوفت[/url]',
'بداية موضوع' : 'نبدا الموضوع على بركة الله',
'شكر' : 'شكرا جزيلا على الموضوع الرائع جدا',
'انهاء موضوع' : 'وبكده يكون الموضوع انتهى',
'بداية موضوع2' : 'نبدا الموضوع على بركة الله',
'شكر2' : 'شكرا جزيلا على الموضوع الرائع جدا',
'انهاء موضوع2' : 'وبكده يكون الموضوع انتهى',
},
a, d = document.createElement('DIV'), i;
for (i in messages) {
a = document.createElement('A');
a.className = 'sceditor-font-option';
a.title = messages[i];
a.innerHTML = i;
a.onclick = function() {
callback(this.title);
editor.closeDropDown(true);
return false;
};
d.appendChild(a);
}
editor.createDropDown(caller, 'messages', d);
},
exec : function(c) {
var e = this;
$.sceditor.command.get('messages').dropDown(e, c, function(content) {
e.insertText(content);
});
},
txtExec : function(c) {
var e = this;
$.sceditor.command.get('messages').dropDown(e, c, function(content) {
e.insertText(content);
});
},
tooltip : 'Preset messages'
});
toolbar += '|messages'
});
some page loading problems so its may be from the test forum not in code
i like to ask for one little more thing
is to max the box with max like 200 high so if many messages used it wont be a bad looking thing
Michael_vx- Forumember
- Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt
Re: is that possible simple menu with quick reply`s
It looks good, however, the last preset had a comma on the end. This can cause a minor error in today's browsers which is corrected, but it will cause a major error in older browsers. I corrected it for you :
Add this to your CSS it should add a scroll bar when 200px is exceeded :
P.S.
The page loading problems and things not appear are due to a current incident.
- Code:
$(function() {
if (!$.sceditor) return;
$.sceditor.command.set('messages', {
dropDown : function(editor, caller, callback) {
var messages = {
'مايكل سوفت' : '[url=http://micsoft.ga]مايكل سوفت[/url]',
'بداية موضوع' : 'نبدا الموضوع على بركة الله',
'شكر' : 'شكرا جزيلا على الموضوع الرائع جدا',
'انهاء موضوع' : 'وبكده يكون الموضوع انتهى',
'بداية موضوع2' : 'نبدا الموضوع على بركة الله',
'شكر2' : 'شكرا جزيلا على الموضوع الرائع جدا',
'انهاء موضوع2' : 'وبكده يكون الموضوع انتهى'
},
a, d = document.createElement('DIV'), i;
for (i in messages) {
a = document.createElement('A');
a.className = 'sceditor-font-option';
a.title = messages[i];
a.innerHTML = i;
a.onclick = function() {
callback(this.title);
editor.closeDropDown(true);
return false;
};
d.appendChild(a);
}
editor.createDropDown(caller, 'messages', d);
},
exec : function(c) {
var e = this;
$.sceditor.command.get('messages').dropDown(e, c, function(content) {
e.insertText(content);
});
},
txtExec : function(c) {
var e = this;
$.sceditor.command.get('messages').dropDown(e, c, function(content) {
e.insertText(content);
});
},
tooltip : 'Preset messages'
});
toolbar += '|messages'
});
Add this to your CSS it should add a scroll bar when 200px is exceeded :
- Code:
.sceditor-dropdown.sceditor-messages {
height:200px;
overflow-y:auto;
}
P.S.
The page loading problems and things not appear are due to a current incident.
Re: is that possible simple menu with quick reply`s
i do not think there is a people who use old browsers
thanks a lot for correcting what i didnt understand of what you said
i guess nothing else needed words of thanks is not Enough i wish some day i get even a little of your exprince im some one who only learn by try things not just read about things
thank you again
topic is solved
also about loading pages problem
even on this forum i had a slow respond
thanks a lot for correcting what i didnt understand of what you said
i guess nothing else needed words of thanks is not Enough i wish some day i get even a little of your exprince im some one who only learn by try things not just read about things
thank you again
topic is solved
also about loading pages problem
even on this forum i had a slow respond
Michael_vx- Forumember
- Posts : 659
Reputation : 29
Language : Arabic and some English
Location : Egypt
Re: is that possible simple menu with quick reply`s
Topic solved and archived
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Similar topics
» adding a quick menu
» Quick side menu
» Quick Simple Signature Bar
» Simple theme picker makes mobile menu disappear
» Menu help.
» Quick side menu
» Quick Simple Signature Bar
» Simple theme picker makes mobile menu disappear
» Menu help.
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum