Jump to content

Acronyms for old posts?


Tennman

Recommended Posts

Posted

I have started using acronyms on my forum and I really like this feature.  It works as expected for new posts. It is possible to have old posts use the acronyms too? 

Sorry if this has already been covered and I just didn't find the answer.

Posted

I don't think there is a built-in way to apply Acronyms to older posts, however you could do this via the database.

UPDATE forums_posts 
SET post = REPLACE( post, 'SKU', '<abbr title=\"Stock Keeping Unit\">SKU</abbr>') WHERE post LIKE '%SKU%' AND post_date < 1576891227;

1576891227 would be the date/time in unix time just before you started using acronyms.

This is a handy tool for figuring the exact value out:  https://www.epochconverter.com/

This SQL script may be "dangerous" to use unless you are absolutely certain there are no OTHER instances of the acronym you're trying to replace, so I would carefully consider its implementation, and definitely make a backup of the forums_posts tables before experimenting with it.

e.g. as part of a URL, or part of another word.

 

Posted

Thanks for your reply.  I know how to view information in databases and back them up but making changes is a little above my knowledge of databases.  I'm afraid I would crash my live site.  Thank you for explaining what needs to be done. I appreciate it.  I was hoping there might an easy way to do it.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...