How to install a MODX modification
- January 26, 2008
Installing a MOD for the first time can be quite a daunting task. At some point, we all had to take the plunge, and chances are most of us at some point made a mistake. Installing MOD's soon becomes second nature though, and this simple tutorial should hopefully help guide you through the process.
Before proceeding through this tutorial, it is best that you acquaint yourself with the MOD actions. There is a detailed document explaining this at http://www.phpbb.com/mods/installing/
and a knowledge base explaining each action in detail at http://www.phpbb.com/kb/article/how-to-install-mods/INSTALLING MODX MODIFICATIONS
Here, I hope to explain the basics of installing a MODX modification in a very easy-to-understand manner. The screenshots shown are from a typical Windows XP system, although it will be a similar process to Vista.OPENING A MODX FILE
After you have downloaded and unzipped (using Winzip, Winrar or the inbuilt uncompressor in Windows) the MOD you wish to install, you will see several files and folders - to get an understanding of each one please view the packaging documentation
. The file which contains the installation instructions will be called something like "install.xml". To read an xml (extensible markup language) file, you must open it in your web browser.
Firstly, right click the file, select "open with" and left click your internet browser (such as Internet Explorer or Firefox. If you are using Mac, it may be Safari). COPYING FILES
Copying files to your webserver, as I said above, is a very easy process and something you should have done when installing phpBB3. The COPY action in MODX looks like this:
It asks you to move the local file (ie. the one on your computer from the package you just downloaded) root/ajax.php to ajax.php on the server. As it specifies no particular path (for instance, it does not say admin/ajax.php or includes/ajax.php) it means you must upload it to the root folder for phpBB3 on the server. phpBB3's root folder is the one that stores viewtopic.php, viewforum.php, etc, etc.
To drag the file, simply open a folder in Windows Explorer to show the local ajax.php, and open your FTP client in the background. In the FTP client - in this case it's SmartFTP - navigate to your forum root folder, and then drag ajax.php from your computer into the phpBB3 root folder on the server. Repeat this for every file it asks you to copy.EXECUTING SQL
An SQL action will look something like this:
To execute these database queries, you will need to run them through a program such as phpMyAdmin. This step I have explained in great detail within this topic - [Tutorial] How to use phpMyAdmin
In a nutshell, first navigate to the database your forum is located in, and then paste the query within the SQL tab of phpMyAdmin and execute it. Occasionally, a database file may be included with the MOD that you can simply run through your browser. It is important to read the DIY INSTRUCTIONS with the MOD to see whether or not this is the case.OPENING A FILE
The action looks like this:
You must open this file using a strict text editor. I use Notepad++ for these examples, as it is a popular open source editor among developers. Microsoft Frontpage and Dreamweaver are not text editors
. It is recommended that users don't open any phpBB files in programs such as Frontpage and Dreamweaver as it could potentially destroy parts of the code, rendering it useless.
To open the file, generally it is a matter of opening the text editor, navigating to File -> Open, and browsing to the file you wish to open, and then double left clicking it.
Below the OPEN line are the actions you must perform (FIND, ADD AFTER, etc, etc).FINDING CODE
Finding code is an easy process. Firstly, in the MODX file, click Select All. This will highlight the code you must find. Then, right click the code and select "Copy" to copy it to the clipboard on your computer. Example shown below:
Once in your text editor, use the find function (usually Ctrl+F) to track down the code you were asked to FIND.
Step 1: paste the code you copied into the find field.
Step 2: click Find Next.
Step 3: the code will be highlighted, and you can close the find box.HOW TO APPLY AN ACTION
There are many different actions, but as they are much the same, I will only go through ADD BEFORE in detail. The MODX file may ask you to do this:
Step 1: click Select All.
Step 2: right click and select "Copy" to copy the code to your clipboard.
Now you must apply the action. Go back to your text editor. As this is an ADD BEFORE action, you must add the code directly before the code you just found - ie. on the line directly above it.
Step 1: before the code you found, right click once and select Paste.
Step 2: after doing this, the code will have been added.
That is it! It is extremely simple, after having done this you move on to your next action. Continue to apply the actions until you reach the end of the MOD file. You will know when you reach this point because you will see the following line:
I hope this helped clear up any confusion you were having installing a MODX modification. If you have any questions, or would like me to go into greater detail on any part of this, please post a reply within this topic.
Support Team MemberEdited/Updated RmcGirr83 03/11/2011