Changes

Jump to navigation Jump to search
correct $extspath variable
Line 24: Line 24:     
Each section starts with a "%target:%", which is a file to be modified. There must be at least one target in the file.
 
Each section starts with a "%target:%", which is a file to be modified. There must be at least one target in the file.
{{TNG 11.0.2|and after}}Starting with TNG 11.0.2, if the %target is the extensions folder, you can use the TNG variable for the extensions folder which allows the folder to be renamed to specify the target as '''<pre>%target:$extpath/myscript.php%</pre>'''
+
{{TNG 11.0.2|and after}}Starting with TNG 11.0.2, if the %target is the extensions folder, you can use the TNG variable for the extensions folder which allows the folder to be renamed to specify the target as '''<pre>%target:$extspath/myscript.php%</pre>'''
    
=== The config file heading ===
 
=== The config file heading ===
Line 169: Line 169:  
%end:%
 
%end:%
 
</pre>
 
</pre>
{{TNG 11.0.2|and after}}Starting with TNG 11.0.2, if the %target is the extensions folder, you can use the TNG variable for the extensions folder which allows the folder to be renamed to specify the target so the example would be <pre>%target:$extpath/random_numbers.php
+
{{TNG 11.0.2|and after}}Starting with TNG 11.0.2, if the %target is the extensions folder, you can use the TNG variable for the extensions folder which allows the folder to be renamed to specify the target so the example would be <pre>%target:$extspath/random_numbers.php
 
%location:%
 
%location:%
 
type 1, type 2, type 3
 
type 1, type 2, type 3
Line 236: Line 236:  
For example,  
 
For example,  
 
<pre>%copyfile2:abracadabra/magicwand.gif:gifs/magicwand.gif%</pre>  will copy the file magicwand.gif from the  <code><nowiki>abracadabra</nowiki></code> folder  (within the mods folder)''' to the gifs/ folder in the main TNG  folder.
 
<pre>%copyfile2:abracadabra/magicwand.gif:gifs/magicwand.gif%</pre>  will copy the file magicwand.gif from the  <code><nowiki>abracadabra</nowiki></code> folder  (within the mods folder)''' to the gifs/ folder in the main TNG  folder.
{{TNG 11.0.2|and after}}Starting with TNG 11.0.2, if the destination folder is the extensions folder, you can use the TNG variable for the extensions folder which allows the folder to be renamed to specify the copyfile2 destination as  <pre>%copyfile2:abracadabra/magicwand.php:$extpath/magicwand.php%</pre>
+
{{TNG 11.0.2|and after}}Starting with TNG 11.0.2, if the destination folder is the extensions folder, you can use the TNG variable for the extensions folder which allows the folder to be renamed to specify the copyfile2 destination as  <pre>%copyfile2:abracadabra/magicwand.php:$extspath/magicwand.php%</pre>
    
==== Using %newfile ====
 
==== Using %newfile ====
 
Besides  using %copyfile:% or %copyfile2% to install new TNG files, the Mod  Manager also allows you to specify the contents of a new text file (e.g.  a PHP or CSS file) within the mod config file.  To do, use the  '''%newfile''' directive, which must specify the path and filename of a  new file. The path is relative to your main  TNG folder.  For example,  to create a file named 'myscript.php' in the extensions folder,  specify:'''<pre>%newfile:extensions/myscript.php%</pre>'''
 
Besides  using %copyfile:% or %copyfile2% to install new TNG files, the Mod  Manager also allows you to specify the contents of a new text file (e.g.  a PHP or CSS file) within the mod config file.  To do, use the  '''%newfile''' directive, which must specify the path and filename of a  new file. The path is relative to your main  TNG folder.  For example,  to create a file named 'myscript.php' in the extensions folder,  specify:'''<pre>%newfile:extensions/myscript.php%</pre>'''
{{TNG 11.0.2|and after}}Starting with TNG 11.0.2, you can use the TNG variable for the extensions folder which allows the folder to be renamed to specify the newfile as '''<pre>%newfile:$extpath/myscript.php%</pre>'''
+
{{TNG 11.0.2|and after}}Starting with TNG 11.0.2, you can use the TNG variable for the extensions folder which allows the folder to be renamed to specify the newfile as '''<pre>%newfile:$extspath/myscript.php%</pre>'''
    
A  '''%fileversion:%''' directive MUST come next, to give the created file  a version number that the config file can track.  In practice, you  should use the same version number as the mod version.    For instance,  if your mod was developed and tested for TNGv10.1.0, and it is the mod's  second version, the '''%fileversion:%''' directive should  be set as  follows <pre>%fileversion:v10.1.0.2%</pre>
 
A  '''%fileversion:%''' directive MUST come next, to give the created file  a version number that the config file can track.  In practice, you  should use the same version number as the mod version.    For instance,  if your mod was developed and tested for TNGv10.1.0, and it is the mod's  second version, the '''%fileversion:%''' directive should  be set as  follows <pre>%fileversion:v10.1.0.2%</pre>
Line 265: Line 265:  
?>
 
?>
 
%fileend:%</pre>
 
%fileend:%</pre>
{{TNG 11.0.2|and after}}Starting with TNG 11.0.2, the complete example can be specified as <pre> %newfile:$extpath/myscript.php%
+
{{TNG 11.0.2|and after}}Starting with TNG 11.0.2, the complete example can be specified as <pre> %newfile:$extspath/myscript.php%
 
%fileversion:v10.1.0.2%
 
%fileversion:v10.1.0.2%
 
<?php
 
<?php
17,855

edits

Navigation menu