So ya wanna learn how to install a MOD huh? - phpBB 2

phreakwars

Wakka Wakka Wakka
Joined
Sep 26, 2005
Messages
2,504
This article will cover PhPBB2 but will also apply, in some part, to PhPBB3 as well. Hopefully you will learn something out of it that will help you in your forum creating endeavours. I WON'T for all practical purpose, go into the install, setup, or use of all the software involved. There is simply not enough character space to give an extensive rundown. A version for PhPBB3 instructions can be found here: http://phpbbacademy.blogspot.com/2007/05/installing-and-using-phpbb3-on-your.html along with some cool MODS and STYLES and even more tutorials for PhPBB2 and 3.

I will be going on the assumption that you are either new to forum administrating/setup, or you clicked the fantastico button on your host and got an automatic PhPBB2 install job done and you have no idea where to go from there.

OK, first step... back up... yes that's right... back up for a minute and write down what you would like to see on the board for MODS....BUT.... Before we do that. Lets create a TEST board on our own hard drive.

This is an easier way to test out changes you will more then likely have to make to some mod install files.

So we need to gather up the software. My Window$ recommendation is to download first a code editor like CRIMSON EDITOR and a SQL server from APACHEFRIENDS.org, this will also give you access to PhPmyadmin. And then an SQL database viewer from NAVICAT . All of these programs are free...

Now we need our forum software.. get your copy of PhPBB2 from www.phpbb.com and setup a copy of it on your local drive by installing xampp with ALL options, copy the decompressed PhPBB2 folder to C:\xampp\htdocs\phpBB2

Open your web browser and goto http://localhost/phpbb2/ and you should see the default install screen for PhPBB2.

Next, we need to create a database, open up navicat and open up the localhost connection, right click local host and choose "NEW DATABASE"

name the new database whatever you want, but keep it one word and simple for the most part. For this example, we'll call this new database phpbb2.

Nest, install PhPBB using localhost as the server path.. Next, get yourself a copy of EasyMOD from http://sourceforge.net/project/showfiles.php?group_id=136984 and install as instructed. You should now have EasyMOD in your admin control panel on your local drive...

Pheww... all that... NOW CAN WE INSTALL MODS??? :bonk:

Uh... sort of... but lets first learn a bit about HTML and PHP.

What do you need to learn about it? WELLLLLLLL... not a whole lot, but enough to tell the difference between a line that is HTML and PHP, and a line that is an instruction for installing your MOD. This is where that handy dandy crimson editor comes into play. You obviously don't want to try opening that file for the MOD that says install_my_new_mod.txt in notepad. Open it in crimson editor and it all becomes almost clear as daylight.

Why would we want to be able to read the MOD install file and all the other templates and stuff? Well, for some MODS they were written for an older version of PhPBB2, and some might cross the path of other MODS you are installing or have installed. And, if you have different themes on your site, you will PROBABLY have to edit the template file for that theme manually if EasyMOD can't find the same lines in the new template. Not to mention, if you happen to install a new template for your forum later on down the line, chances are you will have to manually edit EVERY TEMPLATE with all the MODS you had already installed.

So the lesson here kids, is INSTALL THE TEMPLATE STYLES YOU WANT BEFORE YOU INSTALL THE MODS. If you plan to install a portal, MAKE SURE your template will also work with the portal. Your gonna have to do a bit of research here as there are thousands of styles out there. But again, I say INSTALL THE TEMPLATE STYLES FIRST. Why? Because when you DO finally go to a LIVE board instead of a huge hack job with tons of templates, you will already have the PRE MODDED files on your local drive, so installing them will be a snap.

But anyways... getting back to the editor, here is an example line of code:

PHP:
# 
#-----[ OPEN ]------------------------------------------ 
# 
language/lang_english/lang_admin.php
# 
#-----[ FIND ]------------------------------------------ 
# 
$lang['Enable_prune'] = 'Enable Forum Pruning';
# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
$lang['Topics_on_index'] = 'How many topics to show in recent active topics';
# 
#-----[ OPEN ]------------------------------------------ 
#
Here is where being able to tell the difference between an HTML/PHP line and an instruction line for installing the code REALLY will help you out.

This, is an example instruction line:
PHP:
# 
#-----[WHATEVER IT SAYS IN THIS BRACKET]--------------------------- 
#
And THIS is a line of actual code for your forum:
PHP:
$lang['Topics_on_index'] = 'How many topics to show in recent active topics';
The KEY here is the
PHP:
# 
#----- 
#
That is the instruction to install line that EasyMOD and YOU should follow to install your new MOD.

When you do install a MOD in your admin panel using EasyMOD, you can choose to preview it, this will give you a run down of what EasyMOD interprets and what errors it encounters... and OH YES, you WILL get errors.. do yourself a favor and count on errors. It helps you learn to adapt to rewriting the MODS yourself for when you want to install them on your actual forum, and makes the rewrite process of seek and replace go much quicker. EasyMOD will tell you which line in the MOD is not found in your files, and tells you which file you will need to look at to correct the error.

Don't EVER unless you can't avoid it, manually rewrite a PHP or .TPL file. Try to work the correction into the MODS instructions instead. That way the uninstall/reinstall process, if you should need to, will go much easier.

However, this doesn't CURRENTLY apply to PhPBB3, as there is no EasyMOD as of yet for it, so for that you WILL have to rewrite the .php and .tpl files manually.

Rewriting/installing MODS is NOT very hard, there is alot of FIND and REPLACE work to it, and a little keyword searching involved to find the correct line that the MOD should see, but PRACTICE PRACTICE PRACTICE on a local board of your own will ensure a smooth transition when you go to a live forum.

QUESTIONS??
.
.
 
Last edited:

jamietje

Participant
Joined
Nov 8, 2007
Messages
78
I really wanna learn, but man this topic is a bit to long to read =/
doesn't look attractive >.<
 

Hangman

Tazmanian
Joined
Dec 19, 2005
Messages
4,124
I really wanna learn, but man this topic is a bit to long to read =/
doesn't look attractive >.<
If you really wanted to learn, you'd have probably read the whole thing and be searching for other resources elsewhere.

Not everything comes in one easy fix, yanno.

I'm also going to pin this, it might be useful for others and can hopefully be added to. Great work Phreakwars!
 

phreakwars

Wakka Wakka Wakka
Joined
Sep 26, 2005
Messages
2,504
I would like to see ANYBODY give a breakdown of how to install a MOD and do it in a shorter post. That isn't gonna happen. I could have given a visual example, but the question is... what do I visualize? Everything? For that I might as well create an entire domain devoted to installing MODS. While it's true that sites like that are hard to find and do not cover everything, I feel at least giving advice about where to start when it comes to messing with a MOD file is better then a tutorial. That question gets asked alot around here, and the short answer, is there is no simple answer when it comes to installing mods. PhPBB is different from SMF, and from MyBB, and alot of other different software. But all of these software have a couple things in common. They each use an SQL database and they each have files that need to be edited when installing mods. PhPBB for the most part, is the EASIEST of all of them to learn. It also has more available MODS then the other, but is sloppy at best when you want to install them. But on the other hand, rewriting the MODS is very simple once you learn a few basics. It will make all the difference when you want to go from a plain looking forum, to something like this with tons of MODS applied to it.:

ai18.photobucket.com_albums_b149_phreakwars_moddedtestsite.jpg


ai18.photobucket.com_albums_b149_phreakwars_repforphpbb2.jpg


ai18.photobucket.com_albums_b149_phreakwars_moddedtestsite2.jpg

ai18.photobucket.com_albums_b149_phreakwars_moddedtestsite3.jpg

ai18.photobucket.com_albums_b149_phreakwars_moddedtestsite4.jpg ai18.photobucket.com_albums_b149_phreakwars_moddedtestsite5.jpg
.
.
.
.
 
Last edited:

phreakwars

Wakka Wakka Wakka
Joined
Sep 26, 2005
Messages
2,504
how does it help
It helps because installing a MOD is NOT as simple as uploading the mod to your server and clicking the install button. As I am sure you may have already found out.

Here's a good example of learning to rewrite the mod, or template file, or php file....

ai18.photobucket.com_albums_b149_phreakwars_smfmod.jpg

This is a full WYSIWYG editor added to an SMF forum, you'll notice it blends in with the rest of the posting form, all the border colors and what have you, match the sites theme colors... in this next picture, is that same type of mod on a PhPBB forum without any extra hacking done to the code:

ai18.photobucket.com_albums_b149_phreakwars_moddedtestsite3.jpg

Notice the BLUE border around it? Something that couldn't be changed unless you manually rewrite the MODS files.

Here's the SMF MOD I used on a PhPBB test forum... notice the off color blue there as well? Learning to edit the files will teach you how to make it all blend in.

http://www.ecardmax.com/phpbb_2022/posting.php?mode=newtopic&f=1
.
.
 
Last edited:

phreakwars

Wakka Wakka Wakka
Joined
Sep 26, 2005
Messages
2,504
i Dont See How You Get A Mod ?
Gotta leave here in a bit, but to go over that quick, Mods can be found at phpbb.com or phpbbhacks.com. The MOD files are either gonna be compressed zip files, or just a standalone text file.

In PhPBB2, Easymod is first installed by placing it under ROOT/admin/mods/easymod.

And in your browser type "www.yourdomain.com/admin/mods/easymod/easymod_install.php"

You'll need to create those folders.

Mods are uploaded to ROOT/admin/mods/"WHATEVERTHEMODSFOLDERNAMEIS"

After this, you should be able to click the INSTALL MODS link in the ACP and see a list of MODS waiting to be installed. (See attached image at the bottom). I'd go into this a bit more, but I need to head to work.
.
.
 

Attachments

scotslass

just another haggis :)
Joined
Dec 16, 2007
Messages
609
you cant just pu a MOD on your site, you have to use either easy mod, or follow the install.txt/read me instructions that come with the mod, to see which files you need to copy/edit.
 

phreakwars

Wakka Wakka Wakka
Joined
Sep 26, 2005
Messages
2,504
OK guys, here we go... watch close... A MOD BEING INSTALLED on only a SubSilver theme:

Lets say I come across a mod on phpbbhack.com that I like. So the first thing I do, is download the file and save it to my hard drive.


After this, I decompress it, and upload it to the mod install folder for my server (root/admin/mods/mods*name)... in this example my server is my own machine..

Each mod you install MUST have it's own folder in the mods directory. In the case of THIS mod, the folder is called phpBB_menu_manager_2_2_12 and contains all the mod files you, and EasyMOD will need.

So next we can navigate to our ACP (ADMIN CONTROL PANEL) and select the install mods link. Log in, and you will see any unprocessed mods you have uploaded. Put a check mark in the preview box below the process button and click process.

We now have a screen showing us which files the mod proposes to alter.


So we click on the preview of each file to see what changes will be made.

If EasyMOD has an accurate MOD file, we should see something like the below image. Red lines show where the code will be added.

HOWEVER, if we get another type of screen, something isn't right.


A CRITICAL ERROR means that this MOD is not going to install the way it is supposed to.. OH NO !!!

Now it's time to actually work !!

Here is where expecting those errors will help you install the mod.

EasyMOD has told us where the error is in the MODS install file, so now, we get to MOD the MOD.

So we open up our editor and load the mods install file:

We go to the line number it says has an error, in this example, the line is 413. The MOD can't find the line in overall_header.tpl that says:
PHP:
      <td align="center" valign="top" nowrap="nowrap"><span class="mainmenu"> &nbsp;<a href="{U_PORTAL}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_message.gif" width="12" height="13" border="0" alt="{L_HOME}" hspace="3" />{L_HOME}</a>&nbsp;&nbsp;<a href="{U_FAQ}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_faq.gif" width="12" height="13" border="0" alt="{L_FAQ}" hspace="3" />{L_FAQ}</a>&nbsp; &nbsp;<a href="{U_SEARCH}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_search.gif" width="12" height="13" border="0" alt="{L_SEARCH}" hspace="3" />{L_SEARCH}</a>&nbsp; &nbsp;<a href="{U_MEMBERLIST}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_members.gif" width="12" height="13" border="0" alt="{L_MEMBERLIST}" hspace="3" />{L_MEMBERLIST}</a>&nbsp; &nbsp;<a href="{U_GROUP_CP}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_groups.gif" width="12" height="13" border="0" alt="{L_USERGROUPS}" hspace="3" />{L_USERGROUPS}</a>&nbsp;
So now were gonna have to open up overall_header.tpl ourselves and figure out where the line is that the mod wants.

KEYWORD, IS THE KEY.

For this MOD, I used the keyword "U_PORTAL" and found 2 instances of it in overall_header.tpl. To figure out which line it is, I simply look for similarities in what the MOD thinks should be there.


Now that I know what the MOD should be looking for, I can select that line of code, copy it, and replace it on 417.

OK, now... save the new mod and lets get this puppy installed !!

Go back to the Easymod panel and click PROCESS on your mod.


Success !! Step 1 looks good, no errors. Time for step 2.

OK, here in step 2, you will be shown a list of SQL changes if any need to be made, you can select which ones to process even, but lets not get too advanced here... Proceed on and lets see how the SQL changes look. ALSO, you will get a list of errors if the mod can't find the lines in your OTHER template styles.

**NOTE: Your options here at that point,are to edit the template files yourself by adding/replacing the lines needed, or adding the instruction for the other theme(s) into the mod itself.



Good, no problems here either, lets complete this installation..
OK, FINISHED !! And here we have a list of which themes were processed..


OK, Our MOD should now be up and running on our forum, lets take a look:
And here it is:


.
.
 
Last edited:

expo

Neophyte
Joined
Feb 5, 2008
Messages
5
Are VB mods easier to install? I like phpbb but this is a bit nuts.
 

phreakwars

Wakka Wakka Wakka
Joined
Sep 26, 2005
Messages
2,504
Are VB mods easier to install? I like phpbb but this is a bit nuts.
Yes and no.

Keep in mind, MODS won't ALWAYS have errors. Sometimes there is some work to it, other times it's as simple as click install... done..

vBulletin is the same... every once in a while, you might need to clean up a bit of code.
.
.
 

david58

Neophyte
Joined
Sep 4, 2009
Messages
1
This doesn't work anymore.

http://localhost/phpbb2/
Error Summary
HTTP Error 404.4 - Not Found
The resource you are looking for does not have a handler associated with it.
Detailed Error Information
Module IIS Web Core
Notification MapRequestHandler
Handler Not yet determined
Error Code 0x80070002
Requested URL http://localhost:80/phpbb2/
Physical Path C:\inetpub\wwwroot\phpbb2\
Logon Method Anonymous
Logon User Anonymous
Most likely causes:

* The file extension for the requested URL does not have a handler configured to process the request on the Web server.

Things you can try:

* If the file extension does not have a handler associated with it, add a handler mapping for the extension.
* Verify that the handler associated with the file extension is properly installed and configured.
* Create a tracing rule to track failed requests for this HTTP status code. For more information about creating a tracing rule for failed requests, click here.


Are there any updates that will let you do this on your harddrive?
 

devilishsaint

Enthusiast
Joined
Aug 22, 2009
Messages
124
The screen shots really made the things easier to understand thanks for sharing valuable information.
 
Top