Niko
  • Administrator

      Reputation : 319
      Registered on : 2012-02-22
      Posts : 2366
      School of codes courses: coming soon
    Change text for mailbox

    Description


    Change the text of the mailbox for old and new messages...

    Set up


    It is simple... Go inside of your Javascript panel and add this code:
    Code:
    $(function(){
     
     var messagerie= "mail",
      new_mp= "1 new mail",
      new_mps= "$1 new mail";
     
     var t;if(!(t=$("#i_icon_mini_message")).length)if((t=$("#i_icon_mini_new_message")).length){var u=t.attr("title");messagerie=u.indexOf("1 ")?u.replace(/^([1-9][0-9]*).*$/,new_mps):new_mp}else return;var p=t.attr({alt:messagerie,title:messagerie}).parent();t.detach();p.children().andSelf().last().text(messagerie);p.prepend(t);

    });

    Customize the tutorial


    You can change the word  var messagerie= "mail", with what you want... If you type "banana" you will see... You have 5 new banana

    You can change  new_mp= "1 new mail", with the message if you have new messages...

    Technical problems


    The tutorial was tested on this forum and with the browser Google Chrome; If you notice that the tutorial doesn't work for a browser or for a version of forum (PhpBB2, PhpBB3, PunBB, Invision) contact an administrator and we will fill this field with your reporting.

    Thanks, the staff
    For every problem or question please, contact us in the section Support for the tutorials,  The staff will answer you as soon as it is possible...

    Friendly,
    The team of the Forum of Codes.



    Niko wants you in the team Guest

    Community manager and Administrator at Forumattivo.com

    Nathan
    • Veteran staff member

        Reputation : 7
        Registered on : 2012-06-26
        Posts : 108
      ow too silly