Author Topic: Installing PHPBB3 Mod  (Read 205 times)

0 Members and 1 Guest are viewing this topic.

Offline Corps

  • Sr. Member
  • *
  • Posts: 273
  • Karma: +0/-0
    • View Profile
Installing PHPBB3 Mod
« on: November 12, 2008, 07:57:55 PM »
Once you have opened the installation file you may be faced with some actions that are unfamiliar. The actions you will be required to know to install your desired MOD are explained below.

The SQL action tells the person who is installing the MOD that they need to execute SQL queries (ie. make changes to the database). The SQL queries by default use the table prefix phpbb_, so when manually executing these queries you will need to replace this with your actual table prefix (such as phpbb3_, forum_, etc).

The "do it yourself" instructions contain important information about the MOD. For example, often this could include details about running a particular file to execute SQL queries, rather than doing it manually, or some basic instructions on which settings to alter after the MOD has been installed.

The copy action is used to copy files from the MODs package to the board the MOD is being installed on. Each file to be copied is on its own line. The part after "Copy:" is the filename and location of the file within the MOD package, and the part after "To:" is the place on your webspace that you need to upload the file to.

To upload files, open your favourite FTP client (CuteFTP, SmartFTP, even some internet web browsers have this capability) and log in to your account. Generally your publicly accessible files will be in an area named "public_html" or similar. Navigate to your forum folder. In this example we will look at transferring the quickreply.php file. You would need to navigate to the includes/ directory once in your forum folder.

If it is not already open, open the folder of the MOD you downloaded and navigate to the root/includes/ folder. Maneuvering the windows so you can see both the FTP window and the MOD folder window, drag the file "quickreply.php" from the folder into your FTP client. Normally there will be a small folder icon within the FTP client (this may vary from client to client) followed by the name of the directory - this is where you should be dragging the file to.

The OPEN action is used to open a file for editing. An OPEN action is done before any FIND or other actions that edit a file. The filename needs to have the path from the root of phpBB and is case sensitive. All slashes need to be forward (\'/\' and not \'\') and no slash is to be at the beginning of the file name/path.

This file should be opened in a standard text editor such as Notepad, not an HTML editor like Microsoft Frontpage, Word or Dreamweaver.

The FIND action is used to find certain code within a file so that it can be edited or have more code added around it. FINDs can be partial and don\'t have to be at the beginning of the line, although generally partial finds are carried out using IN LINE FINDs (mentioned below) and do work on whole lines.

Using this example, in your text editor you would search for the line "// Output the posts" using the search function of the editor (normally Ctrl+F on Windows applications). Typically a FIND will only return one result, but if it returns more than one, you would also check for any surrounding lines (which in this case, would be "$first_unread = $post_unread = false;") to get an exact match.

The REPLACE WITH action is used to replace code with different code. This action is always preceded with a FIND action and everything within the initial FIND action will be replaced with this action.

As there is no action to delete code, a delete is defined as replacing with blank code (or sometimes by "commenting out" the code, meaning the code is not recognised).

One technique to replace code is to, after having the code highlighted in the text editor from "FINDing" it earlier (make sure all of the code from the FIND is highlighted), is to switch back to the MOD installation file window, copy the new code (ie. the code which will be replacing the old code) to your clipboard, switching back to the text editor window and hitting Ctrl+V (paste). As the old code was highlighted, pasting over it will instantly replace it.

The ADD AFTER action (formerly known as AFTER, ADD in the old text template) is used to add code to the file. It must be preceded by a FIND action because it adds the code after the line(s) that have been found in the FIND action.

Once you have found the code after "FINDing" it earlier, go to the end of the code by pressing the right arrow key, or clicking with your mouse to the end of the code block. After doing this, the cursor should be directly at the end of the code block you were asked to find. It is a good idea to then press the Enter/Return key to bring the cursor to a new line. This makes the code appear neater. Once you have done this, copy and paste the "ADD AFTER" code from the MOD install file to the text editor where the cursor has been placed.

In this example, you would look for, in the file language/en/acp/common.php, the code:

      \'ACP_REGISTER_SETTINGS\'      => \'User registration settings\',Adding directly after:

      \'ACP_REDBAR\'         => \'RedBar³ Configuration\',So the end result would look like this:

   \'ACP_REGISTER_SETTINGS\'      => \'User registration settings\',
      \'ACP_REDBAR\'         => \'RedBar³ Configuration\',ADD BEFORE
The ADD BEFORE action is nearly identical to the ADD AFTER action, except instead of adding the code after the line or lines found in the FIND action, the new code is added before.

This action is used to add (signified with a plus
  • symbol) or subtract (subtract [-] symbol) numbers in code, such as changing the year in a copyright from say, 2008 to 2009.[/li][/list]

    The action will always be preceded by a FIND or an IN LINE FIND, with {%:1}, {%:2}, {%:3} etc indicating the places where you must increment or decrement a value.

    The increment action will provide information on what to do with each value, for instance if it says:

    %:1 +3
    %:2 -3
    %:3 +6

    This would indicate that you would need to change the value of the area {%:1} is to "that value plus three". If {%:1} represented 2005, you would need to replace it with 2008. Similarly, the area representing {%:2} and {%:3} would need to be altered by "subtracting three" and "adding six" respectively.

    An In-line Find action is preceded by a standard Find action. The purpose is to give the MOD installer the exact location of an area that needs modifying, and then applying certain actions to this area in such a way that it will not affect other MOD\'s that have been installed, or other MOD\'s that may be installed in the future. It is essentially a "find within a find".

    For example, looking at the image below:

    This is a directive to find the line beginning with "function generate_smilies($mode,". This is to get you in the right area, before finding the phrase "$forum_id". As you may have guessed, $forum_id is a very common phrase and may have appeared many times within that file, but it would only have appeared once in the same line as "function generate_smilies($mode,".

    An In-line Find can be in association with the following sub-actions:

    They all work in the same way as their primary actions (Add After, Before Add, etc). In the example from the above image, an In-line Add After was used. Just like the normal Add After, MOD installers should find "$forum_id" and then paste after it ", $acp_announce = false".

Techronnati | where technology never sleeps

Installing PHPBB3 Mod
« on: November 12, 2008, 07:57:55 PM »

Mountain View


Related Topics

  Subject / Started by Replies Last post
0 Replies
Last post July 28, 2008, 09:14:01 AM
by Corps
0 Replies
Last post September 27, 2008, 06:25:23 PM
by rpmolecule
0 Replies
Last post November 08, 2008, 05:27:40 AM
by MrSpecialist

Posting Disclaimer: Any individual may post a message in this forum and may do so anonymously. Therefore, the sole author is exclusively and entirely responsible for all opinions in that message. They do not represent the official opinions of Techronnati, its administrators or moderators or the Techronnati Management. Techronnati is merely acting as an impartial conduit for constitutionally protected free speech and is not responsible and will not be held liable for the content of such messages. All images and service logos are trademarks of their respective owners.