The forum of the forums

Would you like to react to this message? Create an account in a few clicks or log in to continue.
The forum of the forums

    Hide the sentence "Last edited by..." on specific or all messages

    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    Tutorial Hide the sentence "Last edited by..." on specific or all messages

    Post by Ange Tuteur October 30th 2015, 11:35 am

    Hide the sentence "Last edited by..." on specific or all messages


    This trick allows your to hide the sentence "Last edited by..." when you edit your messages :

    Hide the sentence "Last edited by..." on specific or all messages 04-08-10

    This modification is applicable to any forum version. Smile


    Hide the sentence "Last edited by..." on specific or all messages 09615110 Hide all edits on messages


     Admin panel >> Display >> Templates >> General

    Open the viewtopic_body template and search for the
    Code:
    {postrow.displayed.EDITED_MESSAGE}
    variable. Edit

    Delete this variable from your template and don't forget to save and publish the template when you're finished. Add


    Hide the sentence "Last edited by..." on specific or all messages 09615110 Hide edits only on specific messages


     Admin panel >> Display >> Templates >> General

    Open the viewtopic_body template and search for the
    Code:
    {postrow.displayed.EDITED_MESSAGE}
    variable. Edit

    Wrap the variable with a
    Code:
    <span>
    tag that has the "edit" class :
    Code:
    <span class="edit">{postrow.displayed.EDITED_MESSAGE}</span>


    Now, create a new javascript and select "in the topics" for the placement :
     Admin panel >> Modules >> JavaScript codes management >> Create a new script

    Paste the following code :
    Code:
    $(function(){
     Â $(".postbody").filter(function(){
     Â   return-1!=$(this).html().indexOf("[hideedit]")&&$(this).html($(this).html().replace(/\[hideedit\]/g,""))
     Â }).parent().find("span.edit").remove()
    });

    Don't forget to submit!

    Right now, to not have the sentence "Last edited by..." on a specific message, you have to add the following tag onto your message : [hideedit] !

    For example :
    Hide the sentence "Last edited by..." on specific or all messages 04-08-11
    Once posted :
    Hide the sentence "Last edited by..." on specific or all messages 04-08-12


      Current date/time is November 11th 2024, 7:36 pm