September 09, 2010, 01:11:49 AM
Great New Theme! Thanks, sybil!!! ;)

03 May 2009 How To Manually Install TP - Part 1

If you wish to (or have to) install TinyPortal manually, you'll need to read the "package-info.xml" file. This file is located in the TinyPortal zip files that you have downloaded from TinyPortal.net. So, this is basically, a deconstruction of the package-info.xml file that is included in TinyPortal 1 Beta3. Other versions will be very similar but will most likely included newer SMF versions.

An .xml file is basically a text file, much like a .txt file, but with a different extension. These files can be read by Microsoft Office, Open Office, and many PHP-based internet programs such as SMF. This file will tell you which .mod file to use for your specific forum version.

At first glance, the file may look strange but it is not as hard to understand as you would think. Let's look at the different parts of the package-info.xml file, starting at the top.

The first part, the header, contains information like the name of the mod, its author, mod version number, etc. Nothing to be concerned about here. The header section is shown in the image below.

Header

The next image shows what the file does for TinyPortal installations of SMF 1.1 and SMF 1.1.1 through versions 1.1.99. Let's look at what each command does.

Install

<install for="1.1, 1.1.1-1.1.99">
This line install TinyPortal to SMF 1.1, and SMF 1.1.1 through versions 1.1.99 only.

<redirect url="?action=tpmod;sa=installoptions">Install options</redirect>
"redirect url" will redirect your forum to another url. In this case, it send you to the install options page. All "redirect url" code in the package-info.xml file will redirect you to another page. The part of the code after it, on the same line, will tell you where.

<require-dir name="Themes" destination="$boarddir" />
"require-dir" will show the directories needed for installation. If a directory does not exist it will be created. The "name=" part is the name of the required directory. The "destination=" part is a variable that SMF uses to hold the name of the root directory of your forum. So, if your forum's root directory is "http://www.your_site.com" it will check to see if "http://www.your_site.com/Themes" is there. If it is not, it will create it. The installation program will add new files and/or edit code to existing files to the diretory in that particular line of code later.

"name=" and "destination=" are in other parts of the package-info.xml file and will react the same way when those lines of code are read.

<readme type="inline">Install:TinyPortal1.0 beta 3 for SMF1.1.x</readme>
"readme type="inline"" will display one or more lines of text. This is usually done to display information to you as needed.

<code>tp_install.php</code>
"code" will run the specified file. This file usually holds the main installation code which will start the actual installation process and also install the database tables and fields.

<modification format="boardmod" type="file">tinyportal1075.mod</modification>
"modification" is the most important part of package-info.xml for manualy installations. It usually tells you what file or code to use. In the code above, you would read the "tinyportal1075.mod" file and apply the code in it for installations for the first line in this block of code which is "<install for="1.1, 1.1.1-1.1.99">".

So, to manually install Tinyportal for SMF versions 1.1 and 1.1.1 through 1.1.99, you would use "tinyportal1075.mod". This code would be read in the same manner whether you would be installing, upgrading, or uninstalling TinyPortal. The specified .mod file will hold the code for manual code editing.

</install>
This is just the closing tag for "install" and ends this particular block of code.

There are other lines of code worth noting that you will find in package-info.xml for uninstalling and upgrading TinyPortal. I'll show you images of both and only explain the lines of code we have not covered already.

Next I'll show you the uninstall command. Take a look at the image below.

Uninstall

<uninstall for="1.1 RC3, 1.1, 1.1.1-1.1.99">
This entire block of code is exactly like the "install" command but in reverse and it uninstalls the TinyPortal code. Please note that it does NOT remove any database tables or files.

The only other part of this block of code that is different is "reverse="true"". This means to do everything in reverse and remove the code that was previously installed in the "install" section.

Finally, the last image shows one of the many blocks of upgrade coding. These are used if TinyPortal detects previous versions. It will attempt to upgrade to the version you are trying to install.

Upgrade

<upgrade for="1.1, 1.1.1-1.1.99" from="1.00, 1.01">
This is the only line of code we have not covered yet. The numbers after "upgrade for" tells what SMF versions you could be using. The numbers after "from" tell what TinyPortal version you are upgrading from. Again, the .mod file in the "modification" line of code tells you which .mod file to use to manually install TinyPortal.

A "quick reference" showing which .mod file to use for each situation can be found at:



Enjoy!!!

Courtesy of:
Doc Skillz