As seems to be a theme with a majority of my ToO projects (such as the Shadow Paws Story Arc for example) this endeavor was not only for you the public, but it was beneficial for me as well. The end result was providing a service for the community, but the process to achieve that result strengthened my coding knowledge and abilities.
In order to make this work, I had to plunge into a self-taught, hands-on, in-depth crash course in phpBB management. It was quite an experience, going into it completely ignorant, but I’m really proud of what I learned to do and I’m sure it will be valuable knowledge in the future.
Before looking into creating a forum, I first had to figure out if I could even get the stocks working. I didn’t know at the time which mod the old ToO used, but after some searching I found one that sounded right. I almost couldn’t download the files for it because the links were dead since phpBB2 is no longer supported, but fortunately the Wayback Machine had archives of the download pages and the files. With those in hand I then set to finding a forum host.
I started out on this project trying to take the easy route. I knew I needed a forum, but I didn’t want to build it from scratch. For one thing I didn’t know anything about how to do that, and for another it seemed unnecessary. I knew there were numerous phpBB hosts out there that automated everything. The only catch was finding one that still allowed for a phpBB2 forum, most are only phpBB3 these days. I settled on Forumotion and the site was created easily. I began feeling my way through the administration functions and layout templates, customizing the look and features to match the old ToO. I was very happy with the end result, until I went to install the Stock Market mod. I couldn’t do it. Mods require access to the PHP and database files behind the forum so you can modify them. I had known this, but had not actually checked if that was possible before getting the site all set up. It turned out on Forumotion you are not able to access anything in the site file structure, except the style templates, making mod installation impossible. There was no workaround, the project was sunk. Dejected, I abandoned the site I had just perfected in appearance.
I was unwilling to give the project up though, having come so close to success. Now that I knew what functionality I needed, I was determined to find a way to make this work. The trouble was not many free hosting services give you that file structure and database access that was vital. I found a handful that said they did, but due to either registration issues or capability problems none worked. A sensible person would have probably given up at that point, since this wasn’t really an ‘important’ project it was just something I had wanted to do for fun, but I persevered and finally came across one last hope. I registered and reviewed the tools they provided me, and it was exactly what I needed.
It started as an empty file structure that could be built through FTP. This meant I would be building a fresh phpBB site from the ground up. At this point that idea was no longer daunting, I had been reading up on how to do it and come to the realization that this was probably the best way to do it anyway. With a preset installation script you didn’t really know exactly what was or wasn’t included. Building it by hand allowed you to know exactly what was involved. Because of this, I took the opportunity to select and install the exact version of phpBB that the Stock Market mod I had downloaded was built for, to ensure it would function. It called for phpBB 2.0.10, which I was able to obtain through OldApps. I uploaded all the files into the directory and created a database, then installed the forum. Everything worked beautifully and I was quite proud of myself.
Next came reconfiguring the forum, which was a little harder this time around than it was on Forumotion because the process was different. With the negative of the ‘host only’ services being they don’t allow PHP or SQL access, the positive was that they streamlined customization. They present the templates that control site layout in a straightforward and easy to modify way. On this new site, I was on my own in that regard. I now had access to the file structure and could modify any file I wanted in any way I wanted, so instead of going through a clean form on the host I had to dig right into the template files themselves in the directory and edit their actual contents by hand. But there were just enough similarities that my experience from Forumotion allowed me to figure out how to get it done.
With the site customized, and in the end actually looking slightly better than the Forumotion one had because I had full access this time instead of mostly-full, I looked once again to installing the Stock Market mod. I knew it would work this time because I had all the proper functionality, but before I went into it I decided it would be best to make my site exactly the same as the old ToO, just to be absolutely sure everything would work the same way. As I mentioned, my site was version 2.0.10, it turned out the ToO was 2.0.14. This meant I had to upgrade four phpBB versions. That usually wouldn’t be much of a task, you just upload and replace the changed files which were downloadable separately from the full files for doing a new install of the next version, but because phpBB2 is so out of date it was a little more difficult.
I couldn’t find any of the changed files only downloads, but OldApps had the full packages of all the versions I needed to go through. So I took the long way around, and followed the steps for upgrading manually. Put simply, that entailed downloading the full version’s files and uploading only completely new files, then locating the files that had changes made between versions and manually changing the code accordingly. Fortunately there were very good instructions on how to do this for each version. So I did that for 2.0.11 through 2.0.14 and in the end I’m actually glad I had to do it that way because it gave me a lot more experience and confidence in navigating and manipulating the site file structure and a much better understanding of how the directories work.
With my site now at phpBB 2.0.14 and virtually a clone of the old ToO, I finally installed the Stock Market mod, as well as two supplemental mods that were provided with it, a Stock Report and a Stock Ticker, and they all went without a hitch. However upon installation, I discovered that they were not exactly what I wanted. They were for making static stock lists, the admin had to control everything. In other words, if you wanted the value to change you had to manually edit each one. So I went back to scouring the internet, and was eventually able to determine the actual exact mod the old ToO had used. It was actually a part of the Bank Vault mod, the Stock Market was a side feature. Unfortunately this download was also dead, and this time archived files were not as easy to come by. But after much searching and digging I finally found a working link. Before installing I had to have a functioning point system, which was separate, so I also located, downloaded, and installed the cash mod the ToO used. I then installed the Vault mod which got the Stock Market up, and it all went great. After getting oriented to the GUI I figured out how to add and modify stocks and set the fluctuation rate, and that was that.
Since I was now confident in working with the file structure and editing the code of individual files and I had a pretty solid understanding of how mods worked, I took a few extra steps to touch up the site, just because I could. I figured out how to modify the Stock Ticker and Stock Report hacks I installed previously to point to the database for the Vault mod so they would display the information for those stocks instead of the ones for the mod I wasn’t going to use. I impressed myself there and was quite proud. And I also installed a chatbox mod. There was nothing really big about that in itself, it was just following instructions like installing any other mod, but then after it was installed I dug into the code and was able to isolate the message display section and embed it into the index page, something that wasn’t part of the original functionality, so I took pride in that as well.