[/tab]I'm almost finished with coding an extension for Firefox that'll enable Astahost Hosted Members (and later on Trap17 too) to view their current hosting credits count right off the status bar of their favourite browser - even if you're NOT visiting astahost.
[tab]This will always keep you upto date with your credits count - and alert you whenever your credits count dips below the safe zone. The extension comes with 4 different coloured icons - BLUE, GREEN, AMBER and RED - which gets displayed along with your credits. It is meant to provide a visual indication of the safety region you're in.
[/tab]Some sneak previews can be seen at: javascript: Help With Fetching Data From Webpages
[tab]Here I present you with the extension that's been developed so far. This is ONLY an initial ALPHA TEST RELEASE - and meant ONLY for the Experienced Users. The intention is to have feedback about the functionality and/or any BUGs. Proceed with caution. If you don't know what you're doing, you might cause Firefox to stop working altogether, and depending on the severity of the problem, you may have to reinstall it.
Tested Platform(s):
- Windows 2000/XP
- Linux
Software needed for testing:
- Firefox 1.5 minimum - this won't work with any versions below 1.5. The extension packaging format follows the new standard set for extensions for FF 1.5 and above.
- A working installation of Apache and PHP
Extension Files Attached:
- astahostcredits.zip - this file contains all the required files for the extension. The files here are written in XUL and JavaScript.
Click to view attachment - XML Server.zip - this file contains all required files for a XML RPC Server that will respond to the extension's request for credits count and supply the data in XML format. This script is intended to finally run on the Astahost Server. The files in here are written in PHP.
Click to view attachment - {0820C32E-7947-495d-ACEC-3AA7ADBF608A}.txt - this is actually a plaintext file without any file extension. This file is named after the GUID (Globally Unique ID) of the Credits Reporting extension and simply contains the path to the extension folder.
Click to view attachment
=====================================================
[/tab][tab] [/tab][tab]Installation
=====================================================
Step 1
[/tab]First of all take the file astahostcredits.zip and unzip it into any folder of your choice. Make sure you maintain the folder structure under this file, or else the extension won't work. Lets take for example, you unzipped the content into a folder called creditssystem/.
Step 2
[tab]Take the file XML Server.zip and unzip it into any separate folder under your webserver's document root. Say you placed it under a folder called credits/.
Step 3
[/tab]Take the file {0820C32E-7947-495d-ACEC-3AA7ADBF608A} and place it in the extensions folder found in your Firefox Profiles directory.
Generally your Profiles folder can be found by following this route:
Documents and Settings > Your_Windows_Username > Application Data > Mozilla > Firefox > Profiles > some_random_numbers.default > extensions.
Once you've placed the file here, you should open it in a plain text editor. You'll find a single line in this file, which points to a folder that contains the credits extension. Change this one to wherever you unzipped the extension files in STEP 1.
Next, you should remove the .txt extension from the end of this file. THIS IS ABSOLUTLEY NECESSARY, or else the credits extension won't load at all. After removing the file extension, this file should look like: {0820C32E-7947-495d-ACEC-3AA7ADBF608A}
Step 4
[tab]Open the folder you created in Step 1. Under it, find the file, \chrome\chromeFiles\content\credits.js.
In this file, 15th line from the top, you'll find:
CODE
var creditsURL = " http://10.19.168.5/credits/credits-xml.php
Change this URL to point to your webserver folder you created in STEP 2. For example, in your case if you'd created a folder called credits/ in STEP 2 AND your webserver is on the same computer, i.e. localhost, this url might look like http://localhost/credits/credits-xml.php
Step 5
[tab][/tab]That's all - if you did all the steps mentioned above correctly, when you launch firefox next, the extension should show up in your status-bar, with a RANDOM Credit Count.
=====================================================
[/tab][tab] [/tab][tab]End of Installation
=====================================================
Post-Installation Step:
[tab][/tab]Once you've successfully installed it, you need to set an username and password into this extension. Simple Right-Click it and select Configure Credits System. Enter the following:
Username: micro
Password: mpass
[/tab]The refresh duration can be set to anything you like - but it won't affect the work of the extension in any way at this point. The auto-refresh at a given time interval hasn't been coded yet.
[tab]Right now - for testing purposes, everytime you left-click this status-bar panel, it should contact your web-server, get a random credit count and show it to you. The associated ICON should change it's colour depending on the fetched credits count.
[/tab]Any feedbacks/bug reports will be much appreciated. Also if you get any sudden bright sparks about new features that can be added to this OR any design changes you'd like, don't forget to post back.
[tab]Awaiting your early response to help me further along the development roadmap
Best Regards,
miCRoSCoPiC^eaRthLinG

