The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

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

View previous topic View next topic Go down

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

Post by Ange Tuteur on 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 :


This modification is applicable to any forum version. Smile


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 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 :

Once posted :


Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2684
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum