L'astuce a été traduite par mes soins et j'ai aussi apporté des modifications car le script agissait aussi sur les liens dans la boite de réception donc impossible à lire .
Des infobulles ont été aussi ajoutées pour indiquer les différentes fonctions.
-Astuce des Forums Milouze14&Compagnie-
Astuce postée par: Réponse automatique:
Merci de cliquer ici pour voir le message
Pour toute information,merci de contacter un Membre du Staff
Modules/HTML JAVASCRIPT/Gestion des codes Javascript/Créer un nouveau Javascript Mettre un titre explicite. Cocher sur toutes les pages.
Déposez ceci:
Code:
/*** * Application: Private Message list. * Description: This application can displays the list of PM in related menus. * Version: 1.03102014-jq1.9.1 - Hermes Kriophoros * Made and Optimizations by JScript - 2014/03/10 * Copyright (c) 2014 JScript <jscriptbrasil at live dot com> * This work is free. You can redistribute it and/or modify it * under the terms of the WTFPL, Version 2 */ jQuery(function () { /*** * User Definition Variables ***/ /* NOMBRE DE MPS AFFICHES!!! */ var iAmount =10; /*** * Variables - Ne modifiez pas si vous ne savez pas! ***/ var oConfig = { sInfo: '<!--' + '* Application: Private Message List.' + '* Description: This application can displays the list of PM in related menus.' + '* Version: 1.03102014-jq1.9.1 - Hermes Kriophoros' + '* Made and Optimizations by JScript - 2014/03/10' + '* View more in: http://codeforum.besaba.com/forum/index.php' + '* Copyright (c) 2014 JScript <jscriptbrasil at live dot com>' + '* This work is free. You can redistribute it and/or modify it' + '* under the terms of the WTFPL, Version 2' + '-->', sContent: '<div class="ipsHeaderMenu boxShadow" id="user_inbox_link_menucontent" style="display: none; width: 300px; position: absolute; z-index: 9999;">' +
/* Forum versions! */ var phpBB2 = jQuery('.bodyline'); var phpBB3 = jQuery('#wrap'); var punbb = jQuery('#pun-intro'); var invision = jQuery('#ipbwrapper');
jQuery('a.mainmenu[href*="/privmsg?folder=inbox"]').click(function () { var oClicked = jQuery(this); var oTarget = jQuery('#user_inbox_link_menucontent'); if (oTarget[0].style.display == 'none') { oClicked.addClass('menu_active'); if ( !oTarget.find('ul.ipsList_withminiphoto > li').length ) { var memDiv = jQuery('<div>'); memDiv.load('/privmsg?folder=inbox ' + oConfig.sSearch + ':lt(' + iAmount + ')', function() { if (punbb.length) { memDiv .html( memDiv.html() .replace(/\<\/a\> por/g, '</a></br><span class="ipsType_smaller desc lighter">') .replace(/\<\/td\>/g, '</span></div></li>') .replace(/\<td class="tcl tdtopics"\>/g, '<li class="ipsType_small clearfix"><img class="ipsUserPhoto ipsUserPhoto_mini left" alt="User image" src="https://i58.servimg.com/u/f58/11/26/21/37/defaul10.png"><div class="list_content">') ) .find('span.status').remove(); } else { if (oConfig.sExpression0) { eval( oConfig.sExpression0 ); } var sHtml = ''; oConfig.sTarget = memDiv.find(oConfig.sTarget); jQuery.each(oConfig.sTarget, function( index, value ) { sHtml += '<li class="ipsType_small clearfix"title="Ce message ne peut être lu que dans la boite de réception">' + '<img class="ipsUserPhoto ipsUserPhoto_mini left" alt="User image" src="https://i58.servimg.com/u/f58/11/26/21/37/defaul10.png">' + '<div class="list_content">' + eval( oConfig.sExpression1 ) + '<br>' + '<span class="ipsType_smaller desc lighter">' + eval( oConfig.sExpression2 ) + '</span>' + '</div>' + '</li>'; }); memDiv.html(sHtml); } oTarget.find('ul.ipsList_withminiphoto').html(memDiv.html());
var oImgTarget = oTarget.find('.ipsType_small.clearfix'); oImgTarget.each(function( index ) { var UserURL = jQuery(this).find('.ipsType_smaller a, .list_content a:last');
if (UserURL.length) { UserURL = UserURL.attr('href'); var oImgTag = jQuery(this).find('.ipsUserPhoto'); var UserIMG = sessionStorage.getItem(UserURL); /* Gets the avatar saved in local storage */
/* If avatar alread saved, then no request member profile! */ if(UserIMG) { jQuery(this).find('img').attr('src', UserIMG); } else { /* if not, then only request per session!!! */ jQuery.get(UserURL, function(data){ var profile_img = jQuery(oConfig.sGetIMG, data).attr('src');
/*** * Application: Private Message list. * Description: This application can displays the list of PM in related menus. * Version: 1.03102014-jq1.9.1 - Hermes Kriophoros * Made and Optimizations by JScript - 2014/03/10 * Copyright (c) 2014 JScript <jscriptbrasil at live dot com> * This work is free. You can redistribute it and/or modify it * under the terms of the WTFPL, Version 2 */ jQuery(function () { /*** * User Definition Variables ***/ /* NOMBRE DE MPS AFFICHES!!! */ var iAmount =10; /*** * Variables - Ne modifiez pas si vous ne savez pas! ***/ var oConfig = { sInfo: '<!--' + '* Application: Private Message List.' + '* Description: This application can displays the list of PM in related menus.' + '* Version: 1.03102014-jq1.9.1 - Hermes Kriophoros' + '* Made and Optimizations by JScript - 2014/03/10' + '* View more in: http://codeforum.besaba.com/forum/index.php' + '* Copyright (c) 2014 JScript <jscriptbrasil at live dot com>' + '* This work is free. You can redistribute it and/or modify it' + '* under the terms of the WTFPL, Version 2' + '-->', sContent: '<div class="ipsHeaderMenu boxShadow" id="user_inbox_link_menucontent" style="display: none; width: 300px; position: absolute; z-index: 9999;">' +
/* Forum versions! */ var phpBB2 = jQuery('.bodyline'); var phpBB3 = jQuery('#fa_edge'); var punbb = jQuery('#pun-intro'); var invision = jQuery('#ipbwrapper');
jQuery('a.mainmenu[href*="/privmsg?folder=inbox"]').click(function () { var oClicked = jQuery(this); var oTarget = jQuery('#user_inbox_link_menucontent'); if (oTarget[0].style.display == 'none') { oClicked.addClass('menu_active'); if ( !oTarget.find('ul.ipsList_withminiphoto > li').length ) { var memDiv = jQuery('<div>'); memDiv.load('/privmsg?folder=inbox ' + oConfig.sSearch + ':lt(' + iAmount + ')', function() { if (punbb.length) { memDiv .html( memDiv.html() .replace(/\<\/a\> por/g, '</a></br><span class="ipsType_smaller desc lighter">') .replace(/\<\/td\>/g, '</span></div></li>') .replace(/\<td class="tcl tdtopics"\>/g, '<li class="ipsType_small clearfix"><img class="ipsUserPhoto ipsUserPhoto_mini left" alt="User image" src="https://i58.servimg.com/u/f58/11/26/21/37/defaul10.png"><div class="list_content">') ) .find('span.status').remove(); } else { if (oConfig.sExpression0) { eval( oConfig.sExpression0 ); } var sHtml = ''; oConfig.sTarget = memDiv.find(oConfig.sTarget); jQuery.each(oConfig.sTarget, function( index, value ) { sHtml += '<li class="ipsType_small clearfix"title="Ce message ne peut être lu que dans la boite de réception">' + '<img class="ipsUserPhoto ipsUserPhoto_mini left" alt="User image" src="https://i58.servimg.com/u/f58/11/26/21/37/defaul10.png">' + '<div class="list_content">' + eval( oConfig.sExpression1 ) + '<br>' + '<span class="ipsType_smaller desc lighter">' + eval( oConfig.sExpression2 ) + '</span>' + '</div>' + '</li>'; }); memDiv.html(sHtml); } oTarget.find('ul.ipsList_withminiphoto').html(memDiv.html());
var oImgTarget = oTarget.find('.ipsType_small.clearfix'); oImgTarget.each(function( index ) { var UserURL = jQuery(this).find('.ipsType_smaller a, .list_content a:last');
if (UserURL.length) { UserURL = UserURL.attr('href'); var oImgTag = jQuery(this).find('.ipsUserPhoto'); var UserIMG = sessionStorage.getItem(UserURL); /* Gets the avatar saved in local storage */
/* If avatar alread saved, then no request member profile! */ if(UserIMG) { jQuery(this).find('img').attr('src', UserIMG); } else { /* if not, then only request per session!!! */ jQuery.get(UserURL, function(data){ var profile_img = jQuery(oConfig.sGetIMG, data).attr('src');