Latest topics
» Forumactif Edge - Releases
by Ange Tuteur Tue 03 Sep 2019, 11:49
» GIFActif - Giphy Button for the Editor
by Ange Tuteur Wed 08 May 2019, 17:21
» Forum Closure
by Ange Tuteur Mon 01 Jan 2018, 01:28
» Chit Chat Thread
by Valoish Sun 31 Dec 2017, 19:15
» Font/Text background color.
by Valoish Sun 31 Dec 2017, 19:11
» Forumactif Messenger - Instant Message Application for Forumotion
by Wolfuryo Sun 31 Dec 2017, 18:24
» [GAME] Count to One Million!
by brandon_g Fri 29 Dec 2017, 18:58
» Post Cards
by manikbiradar Wed 20 Dec 2017, 07:50
» [GAME] Countdown from 200,000
by Valoish Wed 13 Dec 2017, 23:22
» GeekPolice Tech Support Forums - GeekPolice.net
by Dr Jay Mon 11 Dec 2017, 19:12
» Asking about some plugin for Forumotion
by Dr Jay Mon 11 Dec 2017, 19:10
» [GAME] What are you thinking right now?
by Van-Helsing Sat 09 Dec 2017, 14:51
» Widget : Similar topics
by ranbac Wed 06 Dec 2017, 18:11
» Change the Background of the Forum and put an image and how to make prefixs?
by Clement Wed 06 Dec 2017, 15:19
» Hello from Western Australia
by SarkZKalie Wed 06 Dec 2017, 05:34
by Ange Tuteur Tue 03 Sep 2019, 11:49
» GIFActif - Giphy Button for the Editor
by Ange Tuteur Wed 08 May 2019, 17:21
» Forum Closure
by Ange Tuteur Mon 01 Jan 2018, 01:28
» Chit Chat Thread
by Valoish Sun 31 Dec 2017, 19:15
» Font/Text background color.
by Valoish Sun 31 Dec 2017, 19:11
» Forumactif Messenger - Instant Message Application for Forumotion
by Wolfuryo Sun 31 Dec 2017, 18:24
» [GAME] Count to One Million!
by brandon_g Fri 29 Dec 2017, 18:58
» Post Cards
by manikbiradar Wed 20 Dec 2017, 07:50
» [GAME] Countdown from 200,000
by Valoish Wed 13 Dec 2017, 23:22
» GeekPolice Tech Support Forums - GeekPolice.net
by Dr Jay Mon 11 Dec 2017, 19:12
» Asking about some plugin for Forumotion
by Dr Jay Mon 11 Dec 2017, 19:10
» [GAME] What are you thinking right now?
by Van-Helsing Sat 09 Dec 2017, 14:51
» Widget : Similar topics
by ranbac Wed 06 Dec 2017, 18:11
» Change the Background of the Forum and put an image and how to make prefixs?
by Clement Wed 06 Dec 2017, 15:19
» Hello from Western Australia
by SarkZKalie Wed 06 Dec 2017, 05:34
Recent Tutorials
Top posting users this month
Top Achievers
Who is online?
In total there are 3 users online :: 0 Registered, 0 Hidden and 3 Guests :: 1 Bot
None
Most users ever online was 515 on Tue 14 Sep 2021, 15:24
None
Most users ever online was 515 on Tue 14 Sep 2021, 15:24
Emoticon Search
Page 1 of 1 • Share
This plugin adds a search bar to the emoticons list to help make finding a specific emoticon easier. It's an ideal plugin to have if your forum has a large list of emoticons !

Note : When looking for emoticons, the plugin searches the emoticon code and title, so make sure to use descriptive words for your emoticons to make finding them easier !
Title : Emoticon Search
Placement : In all the pages
Paste the following script as the JavaScript code. (If you want support for Forumactif Messenger use this script instead.)
If you want to change the search bar placeholder, edit the texts "Search..." here :
. When you're finished, save the script and the emoticon search will be installed !
If you have any questions, comments, or have a problem with this plugin, feel free to leave a reply below. Hopefully you'll have a much easier time finding emoticons from now on !

Click to view demo |
Note : When looking for emoticons, the plugin searches the emoticon code and title, so make sure to use descriptive words for your emoticons to make finding them easier !
Installing
To install this plugin go to Admin Panel > Modules > JavaScript codes management and create a new script with the following settings.Title : Emoticon Search
Placement : In all the pages
Paste the following script as the JavaScript code. (If you want support for Forumactif Messenger use this script instead.)
- Code:
$(function() {
// load handler for iframes
function fa_emoji_search () {
var search = $('<input/>').attr({
placeholder : 'Search...',
class : 'fa_emoji_search inputbox',
name : 'emoji_search',
type : 'text'
}).keyup(function() {
var emoji = $(this).closest('body').find('img'),
val = this.value.toLowerCase(),
i = 0,
j = emoji.length;
// loop through each emoji to see if any match the input
for (; i < j; i++) {
if (val) {
if (emoji[i].title.toLowerCase().indexOf(val) != -1 || emoji[i].alt.toLowerCase().indexOf(val) != -1) {
emoji[i].style.display = '';
} else if (emoji[i].style.display != 'none') {
emoji[i].style.display = 'none';
}
} else {
emoji[i].style.display = '';
}
}
})[0],
style = $('<style type="text/css">.fa_emoji_search { width:80% !important; margin:6px 0 !important; } .smiley-element, .row1 { font-size:0; } .smiley-element img, .row1 img { margin:3px; } #sceditor_smilies #smilies_header { height:auto; } form[name="smilies_categ"] { text-align:center; }</style>')[0],
frag = document.createDocumentFragment(),
body = $(this).contents().find('body')[0];
if (body) {
frag.appendChild(style);
frag.appendChild(search);
body.querySelector('form[name="smilies_categ"]').appendChild(frag);
}
};
// add load handlers for each iframe
$(function() {
var button = $('.sceditor-button-emoticon')[0];
if (button) {
button.onclick = function() {
document.getElementById('quickEmojInternal').onload = fa_emoji_search;
this.onclick = null;
};
}
$('iframe[src^="/smilies"]').load(fa_emoji_search);
});
});
If you want to change the search bar placeholder, edit the texts "Search..." here :
|

If you have any questions, comments, or have a problem with this plugin, feel free to leave a reply below. Hopefully you'll have a much easier time finding emoticons from now on !

Notice |
Tutorial written by @Ange Tuteur. Reproduction not permitted without consent from the author. |
Last edited by Ange Tuteur on Wed 26 Jul 2017, 10:21; edited 1 time in total
Indeed ! I can't tell you how many times I've spent minutes searching for a specific emoticon.SLGray wrote:This would be very helpful for forums that use a large number of smilies.

- Bigtuber
- Gender :
Posts : 125
Points : 3001
Reputation : 52
Location : Germany
Language : German, English
Browser :Forum Version :
That doesn't work on FAM? There is no searchbar - is this intended?

Correct, the plugin is programmed to search only in the active category.skouliki wrote:that's a smart plugin
a question ..
If you have many categories the search bar searches only in the category you have selected not in all categories, right?
Yes, that's intended. The base plugin is meant for standard Forumotion forums. It wouldn't be beneficial to include extra code in the script for FAM when the administrator may not be using that plugin. If you want to enable support for it in FAM, try using this script :Bigtuber wrote:That doesn't work on FAM? There is no searchbar - is this intended?![]()
- Code:
$(function() {
'DEVELOPED BY ANGE TUTEUR';
'NO DISTRIBUTION WITHOUT CONSENT OF THE AUTHOR';
'ORIGIN : http://fmdesign.forumotion.com/';
// load handler for iframes
function fa_emoji_search () {
var search = $('<input/>').attr({
placeholder : 'Search...',
class : 'fa_emoji_search inputbox',
name : 'emoji_search',
type : 'text'
}).keyup(function() {
var emoji = $(this).closest('body').find('img'),
val = this.value.toLowerCase(),
i = 0,
j = emoji.length;
// loop through each emoji to see if any match the input
for (; i < j; i++) {
if (val) {
if (emoji[i].title.toLowerCase().indexOf(val) != -1 || emoji[i].alt.toLowerCase().indexOf(val) != -1) {
emoji[i].style.display = '';
} else if (emoji[i].style.display != 'none') {
emoji[i].style.display = 'none';
}
} else {
emoji[i].style.display = '';
}
}
})[0],
style = $('<style type="text/css">.fa_emoji_search { width:80% !important; margin:6px 0 !important; } .smiley-element, .row1 { font-size:0; } #simple-wrap a { margin:0 !important; } .smiley-element img, .row1 img, #simple-wrap img { margin:3px !important; } #sceditor_smilies #smilies_header { height:auto; } form[name="smilies_categ"] { text-align:center; }</style>')[0],
frag = document.createDocumentFragment(),
body = $(this).contents().find('body')[0];
if (body) {
frag.appendChild(style);
frag.appendChild(search);
body.querySelector('#smilies_categ, form[name="smilies_categ"]').appendChild(frag);
}
};
// add load handlers for each iframe
$(function() {
var button = $('.sceditor-button-emoticon')[0];
if (button) {
button.onclick = function() {
document.getElementById('quickEmojInternal').onload = fa_emoji_search;
this.onclick = null;
};
}
$('iframe[src^="/smilies"]').load(fa_emoji_search);
if (window.FAM) {
$(document).on('click', function (ev) {
var that = ev.target;
if (that.parentNode.id == 'FAM-emoji') {
that = that.parentNode
}
if (that.id == 'FAM-emoji' && !that.dataset.emojiHandlerSet) {
document.getElementById('FAM-emoji-list').addEventListener('load', fa_emoji_search);
that.dataset.emojiHandlerSet = true;
}
});
}
});
});
- Sponsored content
Similar topics
Create an account or log in to leave a reply
You need to be a member in order to leave a reply.
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|