Emoticon Search
2 posters
Page 1 of 1
Emoticon Search
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 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 !
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 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 !
Mihai- Admin
- Posts : 1
Join date : 2024-03-08
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|
Sun Mar 10, 2024 12:41 am by Admin
» tutorial test
Thu Mar 07, 2024 9:44 am by Admin
» Test for new topics plugin
Tue Feb 27, 2024 9:29 am by Admin
» Your first subject
Fri Feb 23, 2024 10:41 pm by Admin