To jest tylko wersja do druku, aby zobaczyć pełną wersję tematu, kliknij TUTAJ
phpBB2 by Przemo
Support forów phpBB2 modified by Przemo

F.A.Q. - Read it first! - How to install modifications?

Matteo - 09-09-2010, 22:33
Temat postu: How to install modifications?
Almost every modification requires changes in the files of our forums.
For Mods are attached new files which should upload to indicated place on server.

Remember - first create backup of database and files, which you will be edit!

Mod contains detailed installation instructions - usually this is a file install.txt or another with .txt or .mod enlargement.

Every file contain headline:
Kod:
##############################################################
## MOD Title:        Name of modification
## MOD Author:       Author < author@email > (Author name) www.authorwebpage.com
## MOD Description:  Short description of mod
## MOD Version:      x.y.z
##               
## Installation Level:  Level of installation (Easy/Intermediate/Advanced)
## Installation Time:   Installation time
## Files To Edit:       quantity and name of files, which need be modify
## Included Files:      Included files
## License:             Link to text and name of license, which mod will be (most GPL2)
##############################################################
## Author Notes:
## There are additional infos
##############################################################
## MOD History:
##
##   DATE - Version x.x.x
##      - info about version
##
##############################################################



Below the header is description of installation. It has a simple structure and it looks something like this:

Kod:
#
#-----[ COMMAND 1 ]------------------------------------------
#
CODE 1

#
#-----[ COMMAND 2 ]------------------------------------------
#
CODE 2

etc.



Command 1 refers to code 1 etc.

Possible commands:

1. <a href="#action_sql" class="postlink">SQL</a> - execute SQL query ex. by phpMyAdmin
2. <a href="#action_copy" class="postlink">COPY</a> - copy files
3. <a href="#action_diy" class="postlink">DIY INSTRUCTIONS</a> - description of actions to perform the manual (Do It Yourself)
4. <a href="#action_open" class="postlink">OPEN</a> (nazwa pliku) - open (file)
5. <a href="#action_find" class="postlink">FIND</a> - find
6. <a href="#action_replace" class="postlink">REPLACE WITH</a> - replace with
7. <a href="#action_aadd" class="postlink">AFTER, ADD</a> - after add
8. <a href="#action_badd" class="postlink">BEFORE, ADD</a> - before add
9. <a href="#action_increment" class="postlink">INCREMENT</a>, <a href="#action_increment" class="postlink">IN-LINE INCREMENT</a> - increase/decrease the number
10. <a href="#action_ifind" class="postlink">IN-LINE FIND</a> - in line find
11. <a href="#action_iaadd" class="postlink">IN-LINE AFTER, ADD</a> - in line after add
12. <a href="#action_ibadd" class="postlink">IN-LINE BEFORE, ADD</a> - in line before add
13. <a href="#action_ireplace" class="postlink">IN-LINE REPLACE WITH</a> - in line replace with
14. <a href="#action_eom" class="postlink">SAVE/CLOSE ALL FILES</a> - end of desc, save and close all files

<a id="action_sql"><h3>1. SQL</h3></a>
Kod:
#
#-----[ SQL ]------------------------------------------
#
CREATE TABLE `phpbb_config` (
  `config_name` varchar(255) NOT NULL default '',
  `config_value` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`config_name`)
) TYPE=MyISAM;


You can execute query by phpMyAdmin (support to phpMyAdmin you can find here) or by Administration Panel.

<a id="action_copy"><h3>2. COPY</h3></a>
Kod:
#
#-----[ COPY ]------------------------------------------
#
copy file to destination_directory/file
ex.
copy foo_body.tpl to templates/subSilver/foo_body.tpl


There probably is everything clear.

<a id="action_diy"><h3>3. DIY INSTRUCTIONS</h3></a>
Kod:
#
#-----[ DIY INSTRUCTIONS ]------------------------------------------
#
content of instruction
ex.
set file mod.php chmod to 666


Here's all clear, this action may be used in any way modified by the author to inform the additional operations that are required.

<a id="action_open"><h3>4. OPEN</h3></a>
Kod:
#
#-----[ OPEN ]------------------------------------------
#
catalog/name_of_file
ex.
includes/constants.php


Open file by ex. Notepad++.

<a id="action_finc"><h3>5. FIND</h3></a>
Kod:
#
#-----[ FIND ]------------------------------------------
#
Code 1

ex.
{L_NEW_POSTS}



Find in opened file Code 1.

After FIND command can be following commands:

<a id="action_replace"><h3>6. REPLACE WITH</h3></a>
Kod:
#
#-----[ REPLACE WITH ]------------------------------------------
#
Code 2

ex.

{L_YOUR_VARIABLE}


So change Code 1 to Code 2.
In this example change {L_NEW_POSTS} to {L_YOUR_VARIABLE}.

<a id="action_aadd"><h3>7. AFTER, ADD</h3></a>
Kod:
#
#-----[ AFTER, ADD ]------------------------------------------
#
Code 3

ex.
{L_NEW}


So add this AFTER what you find, so after Code 1, add Code 3
In this example after {L_NEW_POSTS} add {L_NEW}.

<a id="action_badd"><h3>8. BEFORE, ADD</h3></a>
Kod:
#
#-----[ BEFORE, ADD ]------------------------------------------
#
Code 4

ex.
{L_INFO}


So add BEFORE what you find so before Code 1 add Code 4.
In this example before {L_NEW_POSTS} add {L_INFO}.

<a id="action_increment"><h3>9. INCREMENT, IN-LINE INCREMENT</h3></a>
Kod:
#
#-----[ FIND ]------------------------------------------
#
Powered by <a href="http://www.phpbb.com/" target="_phpb" class="copyright">phpBB</a> &#169; 2001, {%:1} phpBB Group<br />{TRANSLATION_INFO}</span></div>
#
#-----[ INCREMENT ]-------------------------------------
#
%:1 +10


This action used to increase and decrease numbers. INCREMENT is always after the FIND or IN-LINE FIND in which number to change was replace by {%:1}. If there are more numbers, next are replacy by {%:2}, {%:3} etc.

In this example to number replaced by {%:1} should add 10.

Sometimes instead of INCREMENT you can meet with the action IN-LINE INCREMENT. Both work the same way.

<a id="action_ifind"><h3>10. IN-LINE FIND</h3></a>
Kod:
#
#-----[ IN-LINE FIND ]------------------------------------------
#
Code 5

ex.
{L_ANY_THING}


If after FIND is this command, that in command FIND (<a href="#action_find">pkt. 5</a>) should find a line. In this line (Code 1) should find Code 5.

After the IN-LINE FIND is IN-LINE INCREMENT or one of this commands:

<a id="action_iaadd"><h3>11. IN-LINE AFTER, ADD</h3></a>
Kod:
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
Code 6

ex.
{TEXT}


So AFTER the Code 5 in this line, should add Code 6, in this example after {L_ANY_THING} add (in line) {TEXT}.

<a id="action_ibadd"><h3>12. IN-LINE BEFORE, ADD</h3></a>
Kod:
#
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------
#
Code 7

ex.
{TEXT2}


So BEFORE the Code 5 in this line, should add Code 7, in this example after {L_ANY_THING} add (in line) {TEXT2}.

<a id="action_ireplace"><h3>13. IN-LINE REPLACE WITH</h3></a>
Kod:
#
#-----[ IN-LINE REPLACE WITH ]------------------------------------------
#
Code 8

ex.
{TEXT3}


So Code 5 should replace with Code 8, in this example {L_ANY_THING} replace with {TEXT3}.

<a id="action_eom"><h3>14. SAVE/CLOSE ALL FILES</h3></a>
Kod:
#
#-----[ SAVE/CLOSE ALL FILES ]----------------------------------
#
# EoM


Save and close all files.

(original content)



Powered by phpBB modified by Przemo © 2003 phpBB Group