Avatar dans la toolbar
Sur toutes les pages
// Par Tech
// https://forum.forumactif.com/t355862-afficher-l-avatar-du-membre-dans-la-toolbar
$(function() {
$(function() {
$('#fa_welcome').prepend('<span class="fa_avatar">' + _userdata.avatar + '</span>')
})
});
Simplification des balises
Sur toutes les pages
//Script par Milouze14
//https://www.milouze14.com/t27816-phpbb3-personnaliser-les-balises-hide-code-quote-et-spoiler
$(function(){
$('cite').closest('blockquote').attr('id','blank_quote');
$('code').closest('.codebox').attr('id','blank_code');
$('.codebox.spoiler').attr('id','blank_spoiler');
$('.codebox.hidecode').attr('id','blank_hide');
});
Avatar du dernier inscrit
Sur l'index
// Tutorial par Lyxiae
// https://ohanart.forumactif.com/t1821-avatar-du-dernier-inscrit-sur-l-index-facile-lyxiae
$(function(){
$.get($("#newest_user a[href^='/u']")[0].href,function(d){
(a=$("#user_avatar img",$(d))).length&&$("#lastuser_avatar").html(a);})
});
Icône des messages
Sur les sous-forums
// Solution par Milouze14
// https://forum.forumactif.com/t400216-afficher-les-icones-de-sujets-dans-la-colonne-derniers-messages#3340636
$(function(){
$('.topicslist_row').find('.topicslist_infos[style*="background-image"]').each(function(){
var a= $(this).css('background-image');
a= a.replace('url(','').replace(')','').replace(/\"/gi, "");if(a){
$(this).css('background-image','url(https://2img.net/i/fa/empty.gif)');
$(this).find('.topic_msgicon').append('<img src="'+a+'"/>');
}});});
Sélectionner le code
Sur toutes les pages
// Par Ea
// https://forum.forumactif.com/t309759-bouton-selectionner-le-contenu-pour-les-balises-de-code
function selectCode(e) {
var s = $(e).closest("dl").find(".cont_code,code").get(0), range, selection;
var a = s, z = s;
while(a.nodeType == 1 && a.childNodes.length) a=a.firstChild;
while(z.nodeType == 1 && z.childNodes.length) z=z.lastChild;
if (!$(a).is('.fixff')) {
var fix = $('<span class="fixff"/>').insertBefore(a);
} else {
a = a.nextSibling;
}
if (document.body.createTextRange) {
range = document.body.createTextRange();
range.moveToElementText(s);
range.select();
} else if (window.getSelection) {
selection = window.getSelection();
range = document.createRange();
range.setStart(a, 0);
range.setEnd(z, z.nodeValue ? z.nodeValue.length : 0);
selection.removeAllRanges();
selection.addRange(range);
}
};
$(function(){$("dl.codebox:not(.spoiler,.hidecode) > dd.code, dl.codebox:not(.spoiler,.hidecode) > dd > code").closest("dl").find('dt').append('<span onClick="selectCode(this)" class="selectCode">Sélectionner</span>')});
Mention facile dans le profil
Sur toutes les pages
// Par Shadow
// https://forum.forumactif.com/t378492-rendre-le-systeme-de-mentions-plus-facile-a-utiliser
$(function() {
var version = 0;
if (/mode=reply/.test(window.location.search) && my_getcookie('fa_mention')) {
document.post.message.value += '@"' + my_getcookie('fa_mention') + '" ';
my_setcookie('fa_mention','');
} if (!/\/t\d+/.test(window.location.pathname)) return;
for (var a = $(['.post_pseudo a'][version]), b, i = 0, j = a.length, t = document.getElementById('text_editor_textarea'); i<j; i++) {
b = document.createElement('A');
b.title = 'Mentionner ' + $(a[i]).text();
b.style.marginRight = '3px';
b.className = 'fa-mention';
b.innerHTML = '@';
b.href = '#';
b.onclick = function() {
var n = this.title.replace(/^.*?\s/,'');
if ($.sceditor) t.insertText('@"' + n + '" ');
else {
my_setcookie('fa_mention', n);
window.location.href = '/post?t=' + window.location.pathname.replace(/\/t(\d+)-.*/,'$1') + '&mode=reply';
}
return false;
};
a[i].parentNode.insertBefore(b, a[i]);
}
$(function(){
if (!$.sceditor) return;
t=$(t).sceditor('instance');
});
});