Page 1 of 6

[Tutorial] How to install a MODX modification

Posted: Sat Jan 26, 2008 3:36 am
by battye
How to install a MODX modification
By battye - 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).

Image




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:

Image

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.

Image




EXECUTING SQL

An SQL action will look something like this:

Image

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:

Image

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:

Image

Once in your text editor, use the find function (usually Ctrl+F) to track down the code you were asked to FIND.

Image

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:

Image

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.

Image

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:

Image


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.

battye
Support Team Member

Edited/Updated RmcGirr83 03/11/2011

Re: [Tutorial] How to install a MODX modification

Posted: Thu Oct 30, 2008 5:02 pm
by Dugi
thanks for the info :)

Re: [Tutorial] How to install a MODX modification

Posted: Sun Nov 02, 2008 7:00 pm
by xsimulator.net
Thanks for sharing this it will be helpful

Re: [Tutorial] How to install a MODX modification

Posted: Wed Nov 05, 2008 9:27 am
by coolor
EXECUTING SQL

An SQL action will look something like this:

Image

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.
Hey how to execute the sql query? exlpain me clearly. take example ;)

Re: [Tutorial] How to install a MODX modification

Posted: Wed Nov 05, 2008 9:29 am
by Erik Frèrejean

Re: [Tutorial] How to install a MODX modification

Posted: Thu Nov 06, 2008 3:35 pm
by battye
Or read the link where I said it was explained in great detail
http://www.phpbb.com/community/viewtopi ... 0&t=588697 ;)

Re: [Tutorial] How to install a MODX modification

Posted: Wed Nov 12, 2008 5:50 pm
by jabhawk
:o HELP! Newb in trouble! v3.0.2

I just setup my first board and tried to install my first MOD. I wanted the "update attachment" mod for my site and read all the guides and help on installing mods. This is a simple update of 5 files with no SQL or new files listed.

I edited the files in Notepad, uploaded them to the server, verified that they were in place and then went to the affected module to view the result. I do not see that any of the changes were applied!!

I double checked all the changes and the source files show that they are updated and should be showing something. I even added some random text to the template but that does not even show. The view that should be showing a visible change is the posting editor "styles/prosilver/template/posting_editor.html".

Is there another step to push the updated template files into production? I am getting a headache from bashing my head into my desk.

There are no other updates to the source files and it is a normal 3.0.2 installation on an internal fully patched Win2003 server; IIS, mySQL, PHP.

Jon Black

Re: [Tutorial] How to install a MODX modification

Posted: Wed Nov 12, 2008 6:39 pm
by RMcGirr83
You have to go into the ACP->styles->template and refresh the style whose html file you edited.

Re: [Tutorial] How to install a MODX modification

Posted: Wed Nov 12, 2008 6:55 pm
by A_O_C
jabhawk wrote:I edited the files in Notepad
also, dont use notepad. use a free text editor. ;)

Re: [Tutorial] How to install a MODX modification

Posted: Fri Nov 28, 2008 2:55 pm
by coendeurloo
I'm kind of shocked to see that there is no plugin manager incorporated in the phpbb forum software. This basically makes everything extremely more difficult for people like me who have almost no knowledge on PHP...Even SMF has a plugin manager!

Re: [Tutorial] How to install a MODX modification

Posted: Tue Dec 23, 2008 2:05 pm
by igorw
We have just released the beta of our automated MOD installer "AutoMOD". Check this topic: http://www.phpbb.com/community/viewtopi ... &t=1370895

Re: [Tutorial] How to install a MODX modification

Posted: Thu Jan 01, 2009 8:43 pm
by alhitary
I wonder How to make MODX file rtl ??
How to change it from ltr to rtl ??

Re: [Tutorial] How to install a MODX modification

Posted: Fri Jan 02, 2009 7:16 pm
by igorw
I believe it works when you select a RTL language.

Re: [Tutorial] How to install a MODX modification

Posted: Sat Jan 03, 2009 8:42 pm
by alhitary
eviL<3 wrote:I believe it works when you select a RTL language.
When i change to RTL , the style changes in bad look. and not all writing goes to right
Can you send me latest file of MODX ??

Re: [Tutorial] How to install a MODX modification

Posted: Thu Jan 08, 2009 2:08 am
by userkiller
when there 2 file with the same name do you add both of them