When I attempted to install version 0.01 of the Enhanced About Page package on a Simple Machines Forum (SMF) with SMF 2.0 Gold installed, I had to first configure the SMF Package Manager to emulate SMF 2.0 RC5, since that is the last version for which the installation file,
package-info.xml
,
expects. When you select Browse Packages, you will find an
Advanced link at the bottom of the page. If you click on that link
you can put SMF 2.0 RC5
in the Emulate Version field.
Click on Apply to use the new value. After the package is installed,
you can click on the Revert link underneath Emulate Version
to set the version back to the actual installed version of SMF. Click on
Apply again.
But I also encountered another problem while installing the
Enhanced About Page module. The install process couldn't find the
code it was looking for in the index.php
file for the forum.
Code: (Find)
'who' => array('Who.php', 'Who'),
Code: (Replace)
'who' => array('Who.php', 'Who'),
'about' => array('EnhancedAboutPage.php','EnhancedAboutPage'),
'who' => array('Who.php', 'Who'),
. If it found
that code, it would add the following on a line beneath it:
'about' => array('EnhancedAboutPage.php','EnhancedAboutPage'),
When I looked at the code in index.php
, I found
'who' => array('Who.php', 'Who'),
in the file. I had to examine
index.php
and install2.xml
with a
hexadecimal editor
to discern the cause of the problem, which was due to two tab characters
appearing at the end of the relevant line in the index.php
file
that the installation procedure for Enhanced About Page was not
expecting.
Within a zip file for a package, there is an package-info.xml
file that tells the SMF install process what versions of SMF are supported
by the package and which install files to use for particular versions of
the forum software. In this case package-info.xml
had a line
indicating that install2.xml
is to be used for installing
Enhanced About Page on an SMF 2.0 forum.
When I examined the code in install2.xml
, I found it was
instructing SMF's install process to look for the line above, but
telling the process that immediately after the ),
at the end of the
'who' => array('Who.php', 'Who'),
it should find a linefeed
character, i.e., the
hexadecimal character 0A (see Ascii
Table for a table that shows the hexadecimal codes associated with
ASCII characters).
But when I examined index.php
with a hexadecimal editor, I found
that there were two tab characters (hex 09) after the ),
at the
end of the line. The tab characters were followed by a linefeed (LF) character,
i.e., a hexadecimal 0A character.
index.php
( ' W h o . p h p ' , ' W h o ' ) , tab tab LF
28 27 57 68 6F 2E 70 68 70 27 2C 20 27 57 68 6F 27 29 2c 09 09 0A
In the index.php
file, I deleted everything after the ),
at the end of the line, so that the line terminated immediately after
those characters. When I retried the installation for the Enhanced
About Page, it then completed successfully with no errors reported for
any file.