Make Sitewide Replacements With ReReplacer

rereplacerDo you have a misspelled word, a change of address, or just about anything that needs to be modified throughout a Joomla site?

It can be a tedious job, especially in large sites, and you always seem to miss some places when you need to do it manually.

ReReplacer is a plugin that lets you make global replacements throughout the site, Including meta tags. Automating the task makes it fast, accurate and complete.

With ReReplacer, you have the ability to use powerful regular expressions to search and replace. This opens up endless possibilities. With this much power, you need to be extremely careful. Be sure you have backups, and work offline or on a development site before you try going live with your changes.

The changes are made using regular expressions (regex or regexp). You don't need to know anything about them to make most changes, but if you are an expert you will have total control. If you want to learn about regex visit this website https://www.regular-expressions.info.

Step 1: Download and Install

tutuploadstutuploadstutuploadstutuploadstutuploadstutuploadstutuploadstutuploadsStep_1.png
You can find complete directions on installing modules and plugins by clicking here - or try clicking on the context sensitive help icon and the extension manager page.
If all goes well you will get a "Success" message, and a notice to clear your browsers cache (here's a link with some cache clearing instructions if you need them). Clearing the cache will allow the changes made by the plugin to be viewed immediately.

Step 2 - Check Configuration Options

tutuploadstutuploadstutuploadstutuploadstutuploadstutuploadstutuploadstutuploadsStep_2_-_Check_Configuration_Options.png

Click the Paramaters Button. To find the options you need to deal with first,

tutuploadstutuploadstutuploadstutuploadstutuploadstutuploadstutuploadstutuploadsmedia_1308347968751.png

You will see the Global Configuration dialogue box pop up. The defaults are will work fine, UNLESS you are using a third party solution to manage your user id's in data base tables. In which case you will definitely need to change the Contact Database Table name.

  • View. Most users and site managers will be able to use the Simple or Normal view. The Advanced view is great if you are an expert at regular expressions and know what you are doing. During the editing process, you can switch views at any time without needing to come back to global configuration. You won't need advanced unless you are a regex expert.
  • Show unpublished items lets you view the changes to both published and unpublished items in the list view.
  • Show search and replace shows these in the list by default.
  • Contact Database Table refers to the table in the data base which manages user ids. If you are using a third party solution like CB or K2 that does not use the default user database tables you will have a problem.

When you're satisfied with these settings, you're ready to start using ReReplacer.

Step 3 - Create a ReReplacer Item

tutuploadstutuploadstutuploadstutuploadstutuploadstutuploadstutuploadstutuploadsCreate_a_ReReplace_Item.png

 

Click the "New" Button (it's orange,not the normal green that you find everywhere else in J15)

 

At the top of the page you will see that you can select the view. If you left the default selected when you checked the parameters, the Normal view will be highlighted. You can change views just by clicking on the tab.

 

tutuploadstutuploadstutuploadstutuploadstutuploadstutuploadstutuploadstutuploadsmedia_1308350740387.png

Review Options: Next you need to check the search options. On the right side of the screen you will see the search option box. There are two sections. Clicking the green triangle will open and close the sections to expose the appropriate choices.

tutuploadstutuploadstutuploadstutuploadstutuploadstutuploadstutuploadstutuploadsmedia_1308351072698.png

Set the Search Options and Areas: These filters will allow you to refine the search so you get exactly what you want. Not as detailed as the control of theadvanced view, but perfect most of the time.

tutuploadstutuploadstutuploadstutuploadstutuploadstutuploadstutuploadstutuploadsmedia_1308351086757.png

Select the Search Areas: You don't always want to include every section of the entire site. Global search and replace is very powerful, and can have unexpected results

  • Example 1: Pay attention to where you make the replacements. Suppose you wanted to replace the word "search" with "find" and you enabled the admin area, the titles of the boxes in the illustration above would be changed to "find Options" and "find Areas" when you are in the admin section.
  • Example 2: Be careful of partial word searchs.  You want to change "its" to "it's". Doing this will also change all incidents of the word "deposits" to "deposit's" so watch out for the effects of letter combinations within longer words.

Enter the details: The name and description only show up on the item list. Nothing you put here will show up anywere in the site.

Choose to Publish - or not: If you choose publish, the changes will be made immediately. If you choose "No" the task will be saved and you will be able to see it in the item list. Then the changes will be made when you publish the item.

tutuploadstutuploadstutuploadstutuploadstutuploadstutuploadstutuploadstutuploadsmedia_1308353065161.png

Fill in text boxes to Create the Search and Replace. Put the word or expression you want to replace in the top window, and what you want to replace it with in the bottom window. Below we are going to replace the word Joomla! (with the !) with the words "The Content Management System".

tutuploadstutuploadstutuploadstutuploadstutuploadstutuploadstutuploadstutuploadsmedia_1308353246118.png

 Go back up to the icon bar and choose a save option. As soon as you click save it will make the replacements, unless you made the right decision in the details box, so be sure this is what you want to do.

tutuploadstutuploadstutuploadstutuploadstutuploadstutuploadstutuploadstutuploadsmedia_1308353352529.png

Caution: If you chose "Everywhere" in the search areas the word will be replaced in text, modules, headings, meta tags, in the administration section - everywhere. Before you do any replacements it would be wise to get very familiar with the Search Options and Areas.

Manage Replacement Items

If you chose to publish you will see the green check in the "Published" column, otherwise you'll see the red x, which means the change wasn't made. Clicking on the name of the item will reopen it for editing and publishing.. Enableing it will start the replacement process.

tutuploadstutuploadstutuploadstutuploadstutuploadstutuploadstutuploadstutuploadsmedia_1308354509681.png