Fix My Computer, Mark! - replace "com_jomres" with "com_butter" in the link - Questions & Answers Forum 
× Ask General Questions in this forum.
You must Login to Post a Question, or Answer one.

replace "com_jomres" with "com_butter" in the link

  • Anonymous
  • Anonymous's Avatar Topic Author
  • Visitor
  • Visitor
8 years 3 months ago - 6 years 6 months ago #3 by Anonymous
I'll show you how to replace "com_jomres" with "com_butter" in the links!
You can use any other name "butter" but it must be the same name, as I show you below.

When we are all done your URL will look like this:
http://yourdomain.com/index.php?option=com_butter

Instead of this:
http://yourdomain.com/index.php?option=com_jomres


>> !! THIS IS FOR JOOMLA ONLY !! <<


TIME IT TAKES:
30 MINUTES OR LESS, if you are all alone!
ADD 1 HOUR, for each question your spouse, partner, etc., ask you! LOL! :laugh:

<-><-><-><->
>> STEP 1:
<-><-><-><->

BACKUP YOUR SITE!
Use Akeeba Backup for Joomla (free)
www.akeebabackup.com/

<-><-><-><->
>> STEP 2:
<-><-><-><->

PUT YOUR SITE "OFFLINE"

<-><-><-><->
>> STEP 3:
<-><-><-><->

WE ARE NOW GOING TO SEARCH AND RENAME "com_jomres" DIR

Add a file called "searchjomres.php" in the ROOT folder "public_html" or "www":

Copy and Paste the code below into the "searchjomres.php" file, and save it:
<?php
echo shell_exec('
#!/bin/bash
find / -type d -name "com_jomres" > Results-Jomres-Dirs.txt
echo "  end"
');
?>
Now run it!

It will make a file called: Results-Jomres-Dirs.txt
Open it up and see where the "com_jomres" dir(s) are located.
Now manually rename all the directories in the file from "com_jomres" to "com_butter".

Example:
Change this:
/home/username/public_html/administrator/components/com_jomres

To This:
/home/username/public_html/administrator/components/com_butter

<-><-><-><->
>> STEP 4:
<-><-><-><->

RENAME JOMRES.PHP TO BUTTER.PHP FILES

Manually Change this:
public_html/administrator/components/com_jomres/jomres.php

To This:
public_html/administrator/components/com_butter/butter.php

<-><-><-><->

Manually Change this:
public_html/components/com_jomres/jomres.php

To This:
public_html/components/com_butter/butter.php

<-><-><-><->
>> STEP 5:
<-><-><-><->

RENAME "COM_JOMRES" TO "COM_BUTTER" INSIDE ALL THE FILES

Copy and Paste the code below into a file called "renamecomp.php", and save it in the ROOT dir:
<?php
echo shell_exec('
#!/bin/bash
find ./ -type f -exec sed -i \'s/com_jomres/com_butter/\' {} \;
');
?>

If the above code does not work, try this one. This worked for me (Jan 2018).
<?php
echo shell_exec('
#!/bin/bash
perl -pi -w -e \'s/com_jomres/com_butter/g;\' $( grep -rl \'com_jomres\' )
');
?>

In case the code does not show correctly, I added this image of the code so you can double check that the code is correct. VERY IMPORTANT!

If everything looks good, Run it! Let it run until your browser stops. It should take about 3 to 5 minutes. SO DON'T TOUCH ANYTHING WHILE THIS IS SEARCHING THROUGH ALL YOUR FILES AND REPLACING "com_jomres" with "com_butter" OR YOU WILL HAVE PROBLEMS LATER!

[What is happening right now with the script running above. It is searching inside EVERY file to see if "com_jomres" is there. If so, it will replace it with "com_butter"]

<-><-><-><->
>> STEP 6:
<-><-><-><->

RENAME COM_JOMRES TO COM_BUTTER IN THE MySQL DATABASE

Open cPanel, or the place where "phpMyAdmin" is located.
Open "phpMyAdmin"
Select the Main Site Database where Jomres is located.
Select "Export", and save this SQL file on to your computer.
Open this SQL file with a text editor like UltraEdit. Maybe Note Pad will work but I always use UltraEdit.
Search and replace this "com_jomres" to this "com_butter" in the SQL file, when all done, save it.

The reason why we are doing this here is because everytime Jomres is installed or updated it writes this "com_jomres" in the database. This info is related to the Admin of Jomres, and other files in the system.

After you replace "com_jomres" to "com_butter" in the SQL file that you just downloaded, delete (Drop) "ALL" the tables, and data, in the database, on your server where this database came from.

Now we are going to Add the updated database back.
With "phpMyAdmin" still open, Select the database, then select "Import".
Now upload your SQL file, after a few seconds you should see all green, okay!

<-><-><-><->
>> STEP 7:
<-><-><-><->

Open this file:
/libraries/jomres/classes/minicomponent_registry.class.php

Go to line: 206

You should see something like this:
        $jrePath = JOMRESCONFIG_ABSOLUTE_PATH.'templates'.JRDS.$templateName.JRDS.'html'.JRDS.'com_jomres'.JRDS;
        } elseif (this_cms_is_wordpress()) {
            $jrePath = get_stylesheet_directory().JRDS.'html'.JRDS.'com_jomres'.JRDS;
        } else {
            return;
        }

From above Change: com_jomres to com_butter



That's It!

If this didn't work for you, then you did something wrong. Lucky you had that backup, RIGHT?
REMEMBER: Every time you update Jomres you will have to do this all over again.


Here are my websites:
nwbnb.com/index.php?option=com_nwbnb
nwbnbdemo.com/index.php?option=com_nwbnbdemo
If you are not able to access my websites above then your IP is being blocked.
Last edit: 6 years 6 months ago by mark.

Please Log in to join the conversation.

  • Anonymous
  • Anonymous's Avatar Topic Author
  • Visitor
  • Visitor
7 years 10 months ago - 6 years 9 months ago #5 by Anonymous
How to Upgrade Jomres and keep your "com_butter".

<-><-><-><->
>> STEP 1:
<-><-><-><->

BACKUP YOUR SITE!
Use Akeeba Backup for Joomla (free)
www.akeebabackup.com/

<-><-><-><->
>> STEP 2:
<-><-><-><->

Download Jomres update below:
updates.jomres4.net/getlatest.php

<-><-><-><->
>> STEP 3:
<-><-><-><->

Now upload this file "jomres.zip" to an empty directory on your server (website) and extract it.

Make a file called "search.php" and add this to the file:
<?php
echo shell_exec('
#!/bin/bash
find ./ -type f -exec sed -i \'s/com_jomres/com_butter/\' {} \;
');
?>
Replace "com_butter" with your name.

If the above code does not work, try this one. This worked for me (Jan 2018).
<?php
echo shell_exec('
#!/bin/bash
perl -pi -w -e \'s/com_jomres/com_butter/g;\' $( grep -rl \'com_jomres\' )
');
?>

Run the file "search.php"

<-><-><-><->
>> STEP 4:
<-><-><-><->

Now Zip up ALL the files and directories and download it.

After you download this file, extract it to its own directory.

After extracting it, open an FTP program and upload ALL these files to the Jomres directory over riding ALL the files in All the folders (directoeies).

This WILL NOT work if you upload the ZIP file using cPanel and extract it.

After ALL the new files are uploaded and overwritten

Run "jomres/install_jomres.php"


That's All!
Last edit: 6 years 9 months ago by mark. Reason: added updated search code

Please Log in to join the conversation.

  • Anonymous
  • Anonymous's Avatar Topic Author
  • Visitor
  • Visitor
7 years 8 months ago - 6 years 9 months ago #7 by Anonymous
Create a file named "search.php" in the core-plugins folder.

Add this below, save it, and then run it:
<?php
echo shell_exec('
#!/bin/bash
find ./ -type f -exec sed -i \'s/com_jomres/com_butter/\' {} \;
');
?>

If the above code does not work, try this one. This worked for me (Jan 2018).
<?php
echo shell_exec('
#!/bin/bash
perl -pi -w -e \'s/com_jomres/com_butter/g;\' $( grep -rl \'com_jomres\' )
');
?>

Why did we do this? Because a lot of the core-plugins files have "com_jomres" in them, so we need to change this to our "com_butter".
Last edit: 6 years 9 months ago by mark. Reason: added updated search code

Please Log in to join the conversation.

Time to create page: 0.200 seconds
Click to listen highlighted text!