Jump to content
xisto Community
miCRoSCoPiC^eaRthLinG

Alpha Release Astahost Credits Reporting Extension for Firefox, of course

Recommended Posts

Hi guys,

????[/tab]I'm almost finished with coding an extension for Firefox that'll enable Xisto Hosted Members (and later on Xisto too) to view their current hosting credits count right off the status bar of their favourite browser - even if you're NOT visiting Xisto.

 

????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.

 

????Some sneak previews can be seen at: javascript: Help With Fetching Data From Webpages

 

????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.

 

 

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 Xisto Server. The files in here are written in PHP.

 

 

{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.

 

=====================================================

????????????????Installation

=====================================================

Step 1

????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

????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

????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

????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:

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 LOCALHOST/credits/credits-xml.php

 

 

Step 5

????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.

=====================================================

????????????????End of Installation

=====================================================

 

 

Post-Installation Step:

????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

 

????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.

 

????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.

 

 

????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

Share this post


Link to post
Share on other sites

I'm going to triple check to mkae sure I have everything installed correctly but here's an error report:System: PIII based Celeron OC 715MHz 384 MB RAMFirefox: Version 1.5 Stable ReleaseExtension: Alpha VersionErrors: Upon single left clicking, the extension changes from the Xisto logo and a listing of 0 credits to "Credits (days): Refrehing Cre" with the rest cut off, no picture.Upon Single right clicking nothing happens~Viz

Share this post


Link to post
Share on other sites

Addition to above error report:

OS: Windows XP Pro

Upon using the extension manager to enter the username an password data:

Upon selecting the extension and clicking options, the following error report:

[Exception..."Component returned failure code: 0x80004005 (NS_ERROR_FAILURE)[nsPasswordManagerInternal.findPasswordEntry]" nsresult: "0x80004005 (NS_ERROR_FAILURE)"
location: "JS frame :: chrome://astahostcredits/content/options.js :: credits_OnInit :: line 28" data:
no]


Upon entering the information and clicking okay or apply or whatever the button to set the informtion is, this error:

[Exception..."Component returned failure code: 0x80004005 (NS_ERROR_FAILURE)[nsIPasswordManager.removeUser]" nsresult: "0x80004005 (NS_ERROR_FAILURE)"location: "JS
frame :: chrome://astahostcredits/content/options.js :: credits_OptionSave :: line 62" data: no]


~Viz

Share this post


Link to post
Share on other sites

Viz: Will post the bugfixes tonight - in fact stupid me - I'd fixed those things already - but I mailed you the old files.. Urggh.. Anyway, got a flight to catch. So see you all at night :)I think you're using the files that I mailed you - so try once with the files posted here.. Make sure you uninstall the old extension first.

Share this post


Link to post
Share on other sites

Woow , seems like we have a head start on this one. No doubt m^e , this is one of the most useful things asta members could use. Since i m in the n00b group .. is it necessary to have Apache & PHP installed on my PC ? are those 2 somehow related to the working of the credits ? or are they just needed to respont to the server with queries you specify as a developer.Awaiting a reply, and again .. words cant be enough but .. this is an awsome piece of work, good luck man.RegardsDhanesh

Share this post


Link to post
Share on other sites

In the final version first of all ou won't need to do all these - the extension will come in the standard .xpi format. You simply need to install it in Firefox and enter your forum username/pass. For now you need the PHP files, since they're the one's that'll fetch your credits and send them to the extension. Keep in mind, this is only a test release with the intention of bug and overall functionality testing. I'll post the fixes tomorrow morning - too tired today after whole day of journey.. Am back in India now for 15-20 days. Just arrived :) Over and out for today..G'nite all

Share this post


Link to post
Share on other sites

Alpha Release 2 of this extension in a pre-packed format is now available.

 

See => http://forums.xisto.com/topic/87866-topic/?findpost=

 

 

This topic is closed. If anyone wishes to discuss further on it, please PM me and I'll open it again. For any discussions regarding the new release of the extension, follow the above mentioned thread.

 

Regards,

m^e

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.