I've used the Attachment MOD install file and the topic description MOD install file to do this tutorial, but it's the same thing for all the MOD's.
Let's go
The first thing to do before all, is to backup your files and your database.
Then, open the install file of the MOD and see what is written (it's depend of the MOD you are trying to install) :
1) The "COPY" action :
If in a MOD, you see something like that :
Code: Select all
#
#-----[ COPY ]------------------------------------------
#
file.php -> phpBB/
file.tpl -> phpBB/templates/subSilver/
2) The "OPEN" action :
This is the first basic action to do :
Code: Select all
#
#-----[ OPEN ]------------------------------------------
#
common.php
3) The "FIND" action :
After the "OPEN" action, it's the most used
Code: Select all
#
#-----[ FIND ]------------------------------------------
# around line 184
//
// Show 'Board is disabled' message if needed.
//
4) The "BEFORE ADD" action :
In the install file, you should see :
Code: Select all
#
#-----[ BEFORE, ADD ]--------------------------------------
#
include($phpbb_root_path . 'attach_mod/attachment_mod.'.$phpEx);
Code: Select all
include($phpbb_root_path . 'attach_mod/attachment_mod.'.$phpEx); // -> Test to add before
//
// Show 'Board is disabled' message if needed. -> Text to search
//
5) The "AFTER ADD" action :
Code: Select all
#
#-----[ AFTER, ADD ]------------------------------------------
#
include($phpbb_root_path . 'attach_mod/attachment_mod.'.$phpEx);
Example :
Code: Select all
include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/' . $lang_file . '.' . $phpEx); // -> Text to search
include($phpbb_root_path . 'attach_mod/attachment_mod.'.$phpEx); // -> Test to add after
6) The "REMPLACE WITH" action :
Code: Select all
#
#-----[ REPLACE WITH ]------------------------------------------
#
<form action="{S_POST_ACTION}" method="post" name="post" onsubmit="return checkForm(this)" {S_FORM_ENCTYPE}>
But you have to be careful with this action if you have others MOD's installed on your forum.
Example :
Code: Select all
#
#-----[ FIND ]---------------------------------------------
# around line 225
<form action="{S_POST_ACTION}" method="post" name="post" onsubmit="return checkForm(this)">
#
#-----[ REPLACE WITH ]---------------------------------------
#
<form action="{S_POST_ACTION}" method="post" name="post" onsubmit="return checkForm(this)" {S_FORM_ENCTYPE}>
In this example, i have to search for (This is in my original file) :
Code: Select all
<form action="{S_POST_ACTION}" method="post" name="post" onsubmit="return checkForm(this)">
and to remplace by (This will be in my modded file) :
Code: Select all
<form action="{S_POST_ACTION}" method="post" name="post" onsubmit="return checkForm(this)" {S_FORM_ENCTYPE}>
Code: Select all
<form action="{S_POST_ACTION}" method="post" name="post" onsubmit="return checkForm(this)" {S_FORM_ENCTYPE}>
7) The "IN-LINE FIND" action :
This is, with the "IN-LINE AFTER, ADD" and "IN-LINE BEFORE, ADD" actions (see the next actions), the best action to use by the MOD's authors (i think that but it's just my opinion ).
This action is, again, always used with the "FIND" action
Code: Select all
#
#-----[ IN LINE FIND ]------------------------------------------
#
t.topic_title,
Example :
Code: Select all
#
#-----[ FIND ]------------------------------------------
#
$select_sql = ( !$submit ) ? ", t.topic_title, p.enable_bbcode, p.enable_html, p.enable_smilies, p.enable_sig, p.post_username, pt.post_subject, pt.post_text, pt.bbcode_uid, u.username, u.user_id, u.user_sig" : '';
#
#-----[ IN LINE FIND ]------------------------------------------
#
t.topic_title,
8 ) The "IN LINE AFTER ADD" action :
Looks like this :
Code: Select all
#
#-----[ IN LINE AFTER ADD ]------------------------------------------
#
t.topic_desc,
This action is used with the "FIND" action and the "IN LINE FIND" action.
Example :
Code: Select all
#
#-----[ FIND ]------------------------------------------
#
$select_sql = ( !$submit ) ? ", t.topic_title, p.enable_bbcode, p.enable_html, p.enable_smilies, p.enable_sig, p.post_username, pt.post_subject, pt.post_text, pt.bbcode_uid, u.username, u.user_id, u.user_sig" : '';
#
#-----[ IN LINE FIND ]------------------------------------------
#
t.topic_title,
#
#-----[ IN LINE AFTER ADD ]------------------------------------------
#
t.topic_desc,
Code: Select all
$select_sql = ( !$submit ) ? ", t.topic_title, p.enable_bbcode, p.enable_html, p.enable_smilies, p.enable_sig, p.post_username, pt.post_subject, pt.post_text, pt.bbcode_uid, u.username, u.user_id, u.user_sig" : '';
Code: Select all
t.topic_title,
Code: Select all
t.topic_desc,
Code: Select all
$select_sql = ( !$submit ) ? ", t.topic_title, t.topic_desc, p.enable_bbcode, p.enable_html, p.enable_smilies, p.enable_sig, p.post_username, pt.post_subject, pt.post_text, pt.bbcode_uid, u.username, u.user_id, u.user_sig" : '';
9) The "IN LINE BEFORE ADD" action :
It's the same thing that the "IN LINE AFTER ADD" action but you have just to add the code before what you have to search instead of after.
Code: Select all
#
#-----[ IN LINE BEFORE, ADD ]------------------------------------------
#
, $topic_desc
Code: Select all
#
#-----[ FIND ]------------------------------------------
#
prepare_post($mode, $post_data, $bbcode_on, $html_on, $smilies_on, $error_msg, $username, $bbcode_uid, $subject, $message, $poll_title, $poll_options, $poll_length);
#
#-----[ IN LINE FIND ]------------------------------------------
#
$poll_length)
#
#-----[ IN LINE BEFORE, ADD ]------------------------------------------
#
$topic_desc,
Code: Select all
prepare_post($mode, $post_data, $bbcode_on, $html_on, $smilies_on, $error_msg, $username, $bbcode_uid, $subject, $message, $poll_title, $poll_options, $poll_length);
Code: Select all
$poll_length)
Code: Select all
$topic_desc,
Code: Select all
prepare_post($mode, $post_data, $bbcode_on, $html_on, $smilies_on, $error_msg, $username, $bbcode_uid, $subject, $message, $poll_title, $poll_options, $topic_desc, $poll_length);
10 ) The "SQL" action :
This is the action to do for altering the database(adding a fiels, a table,...).
Code: Select all
#
#-----[ SQL ]------------------------------------------
#
ALTER TABLE phpbb_topics ADD topic_desc varchar(255) DEFAULT '' AFTER topic_title
Once you have installed phpMyadmin, it's simple :
go into it, clic on the name of your database on the left. On the right, you will see a blank textarea : copy and paste the SQL query to do into this area, then clic on "Execute" and see the result
11) The "SAVE/CLOSE ALL FILES" action :
This is the last action . Once you have done all your modifications, save and close your files, thn upload tem onto your ftp server and go in your forum : see the result of your job
But don't forget : before all, backup your files and your database.
I hope this tutorial will help you
If you have any suggestions/request/problems with this tutorial, this topic is for you.
Bye.
ps : maybe someone can stick this tutorial