|
|
|
|
![]() ![]() |
Dec 7 2005, 07:51 PM
Post
#1
|
|
|
PsYcheDeLiC dR3aMeR Group: Admin Posts: 2,242 Joined: 29-January 05 From: Nakorn Chaisri, Thailand Member No.: 2,411 |
Hi guys,
Am back with a bunch of bugfixes and a pre-packed extension this time. All those crazy error have been taken care of (of course to be surpassed by another batch of reports from you all Requirements: 1. Firefox 1.5 and above - this WONT WORK with any versions below 1.5 because extension packaging format is quite different. 2. The Astahost Credits Reporting Extension attached below: You need to download this file first. Step 1: Installation: It's a two step process - start up Firefox and open the Tools > Extensions window. Next you just drag this extension from Windows Explorer and drop it onto the Extensions window. You might receive a warning saying UNSIGNED Extension. Simply ignore it and press INSTALL. Once the installation is finished, you've to CLOSE AND RESTART Firefox - otherwise the extension won't show up in your status bar. A screenshot is given below: ![]() When you restart Firefox you might get a warning that says: Authentication details not entered. Cannot fetch credit information. Not to worry. Simply proceed to step 2. Step 2: Configuration You need to set an username and password (which will eventually be your own forum username+password). Without setting these, the extension won't be able to fetch credts. To enter these details, you can Right-Click on the extension in the statusbar and choose Configure Credits Extension from the menu. See snapshot below: ![]() Once you select the configure option you'll get a dialog box like this: ![]() This is where you enter your forum username and password. Notice from miCRoSCoPiC^eaRthLinG:
As of now the following details has to be entered to make it work: Username: micro Password: mpass You can try out other combinations too - but you'll get respective error messages in each case (invalid username and/or password). Step 3: Testing Left-Click on the extension as many times as you want - it should report you with a random credits count everytime you click and the icon should change color along with the various credit counts. SO what are you waiting for ? DOWNLOAD IT NOW - and flood me in with bug reports again Regards, m^e
Attached File(s)
|
|
|
|
Dec 7 2005, 07:55 PM
Post
#2
|
|
|
'Prentice de-Zighner Group: Members Posts: 368 Joined: 23-January 05 From: USA Member No.: 2,290 |
What would you recommend really as a person who as experience in this type of coding because I've never exactly messed around with these stuff but I'd like to try it out. Probably later when Viz gives the all-clear sign eh?
|
|
|
|
Dec 7 2005, 08:26 PM
Post
#3
|
|
|
Binary Geek Group: Members Posts: 444 Joined: 4-November 05 From: The Digital Arena Member No.: 9,440 |
Works like a charm for me
For a few newbz like me who can/cannot figure out how to start .. 1) Download 2) Install ( As m^e mentioned in the first post ) 3) AFTER you restart, you will get an error saying "Failed to load authentication details. quiet possibly username/password hasent been set" , not to worry, go to Tools > Extensions > and right click on the Hosting Credits Extension > Options ... and enter user: micro , Pass: mpass > HIT OK > close the extensions window. 4) At the bottom right, u'll see asta icon with the Credits: XX days .. Left click to refresh. If you dont see the Credits, just try restarting the browser again. Btw, just a thought, cant there be like a 30 Mins option ? 1 hr seems long .. thats just my view .. how about the rest. All said and done, it works just fine with me, A real helpful tool for all asta members .. Keep those "works of art" comming .. Good Job m8 Regards Dhanesh. |
|
|
|
Dec 7 2005, 09:06 PM
Post
#4
|
|
|
PsYcheDeLiC dR3aMeR Group: Admin Posts: 2,242 Joined: 29-January 05 From: Nakorn Chaisri, Thailand Member No.: 2,411 |
Question here - why are you going through such a wanderous route (Tools > Extensions > and right click on the Hosting Credits Extension > Options) to get to the configuration menu ?
It should be available even when you right-click on the extension in the status bar. It should pop-up a menu with three items: 1. Configure Credits Extension 2. Visit Astahost 3. About Let me know if you guys can't see this menu - coz wherever I tried it earlier on (3 different computers) - it always worked for me. |
|
|
|
Dec 7 2005, 09:56 PM
Post
#5
|
|
|
Techno-Necromancer Group: Members Posts: 1,018 Joined: 13-January 05 From: The Net Member No.: 2,127 |
right click menu = no go, the password works, and all, with seemingly random refreshes of credits (I'm assumiong it's supposed to do that) but right clicking does nothing.
~Viz P.S. Is there anyway to see the code to the extension? |
|
|
|
Dec 7 2005, 10:05 PM
Post
#6
|
|
|
Techno-Necromancer Group: Members Posts: 1,018 Joined: 13-January 05 From: The Net Member No.: 2,127 |
O looked at the code in credits.js and found the following function: creditsClicked(event). THis function had a handler for if the credits were clicked with left mouse button, but no right mouse button handler.
CODE // Function to handle mouse-click on Statusbar Item function creditsClicked(event) { // Left button click if ( event.button == 0 ) { // Refresh the stats refreshCredits(); return true; } } // end function Also, in options.js there did not seem to be any code for a menu, nor was there in credits.js So either, a) you don't have them in this version, or ~Viz |
|
|
|
Dec 8 2005, 03:21 AM
Post
#7
|
|
|
Geek in-training Group: Members Posts: 301 Joined: 2-July 05 From: Washington State, USA, 3rd Rock from the Star Sol Member No.: 6,772 |
ok think it is a great extention but I can't get it to work...I enter my username and password then refresh it and I get an Invalid username error...I'll try again
|
|
|
|
Dec 8 2005, 04:20 PM
Post
#8
|
|
|
Binary Geek Group: Members Posts: 444 Joined: 4-November 05 From: The Digital Arena Member No.: 9,440 |
QUOTE(miCRoSCoPiC^eaRthLinG @ Dec 7 2005, 11:51 PM) Step 2: Configuration You need to set an username and password (which will eventually be your own forum username+password). Without setting these, the extension won't be able to fetch credts. To enter these details, you can Right-Click on the extension in the statusbar and choose Configure Credits Extension from the menu. See snapshot below: ![]() Once you select the configure option you'll get a dialog box like this: ![]() This is where you enter your forum username and password. As of now the following details has to be entered to make it work: Username: micro Password: mpass You can try out other combinations too - but you'll get respective error messages in each case (invalid username and/or password). Heya logan .. m^e has stated that this plugin is ONLY for testing as of now .. the username and passwords feature of individual posters would be added to the final release Regards Dhanesh. |
|
|
|
Dec 8 2005, 05:29 PM
Post
#9
|
|
|
PsYcheDeLiC dR3aMeR Group: Admin Posts: 2,242 Joined: 29-January 05 From: Nakorn Chaisri, Thailand Member No.: 2,411 |
QUOTE(vizskywalker @ Dec 8 2005, 05:05 AM) O looked at the code in credits.js and found the following function: creditsClicked(event). THis function had a handler for if the credits were clicked with left mouse button, but no right mouse button handler. CODE // Function to handle mouse-click on Statusbar Item function creditsClicked(event) { // Left button click if ( event.button == 0 ) { // Refresh the stats refreshCredits(); return true; } } // end function That's not where the menu's specified. Infact XUL provides you with a very efficient mechanism of linking pop-up menu's with right-click. You do not need to define the right-click event. What you see here is for the left-click, since if calls a DISTINCT funtion - so the button has to be checked for and the required routine called. But first - a short word about the structure of extensions. Firefox extensions are typically built by using a combination of XUL and Javascript files. XUL files are the ones which define and give shape to your extension - or in other words, are responsible for the VISUAL MANIFESTATION (UI) of your extension - and also links the appropriate Javascript routines with these VISUAL ELEMENTS. The actual Javascript routines are usually placed in another file with a matching filename - as in this case, credits.xul and credits.js. They carry out whatever-is-to-be-done when a UI element receives a particular EVENT - such as a Key-Click or Mouse-Click. As for the right-click menu, think of it as the same kind that you get in almost all applications in Windows - it's commonly known as the CONTEXT MENU. Take a look into the credits.xul file. Around line 12, you'll find a section like the following: CODE <popupset> <popup id="configMenu" position="after_start"> <menuitem label="&crs.config;" accesskey="&crs.config.accesskey;" oncommand="creditsOptions();" /> <menuitem label="&crs.visit;" accesskey="&crs.visit.accesskey;" oncommand="visitHostingForum();" /> <menuseparator/> <menuitem label="&crs.about;" accesskey="&crs.about.accesskey;" oncommand="aboutDialog();" /> </popup> </popupset> This is what defines a popup menu with the name/id configMenu, and associates three menuitems with it - each of which call a particular function upon being clicked. Notice how the popupset - which stands for a pop-up control encloses the menu items individually define by the menuitem tags. Also notice each item is linked with a corresponding routine using the oncommand attribute. These routines, as I mentioned earlier, can be found in the credits.js file. Next look a little down - same file around line 25. CODE <statusbar id="status-bar"> <statusbarpanel id="hostingCreditsStatus" style="width: 150px;" context="configMenu" onclick="return creditsClicked(event);"> <hbox> <image id="creditsIcon" src="chrome://creditsreporter/skin/alert_blue.gif" /> <!-- <label id="creditsTitle" value="&crs.credits;" style="width: 65px;" align="left" /> --> <label id="creditsLabel" value="0" align="left" /> </hbox> </statusbarpanel> </statusbar> The first element defined is the statusbar - which tells FF to add whatever is enclosed in between into the statusbar. The immediately next tag defines a statusbarpanel - a panel, which encases further controls - itself being a distinct segment in the statusbar. This is where we define the context menu - which by default comes up using the right-click. See how this statusbarpanel defines an attribute called context - which directly points to the pop-up element. This is a very clever trick I must say .. instead of trying to define a context menu using javascript and what not, you simply define a separate pop-up and link that to the context of some other element.... This entirely eliminates the need to write separate event handlers for the right-click. QUOTE Also, in options.js there did not seem to be any code for a menu, nor was there in credits.js So either, a) you don't have them in this version, or ~Viz Check out your files and see if you can spot the abovementioned portions. I've checked and rec-checked many times over and it ALWAYS comes up for me.. the code is also there in the files I'd uploaded.. So let me know - this is a very baffling problem.. might be I'll have to head for the mozdev forums. Regards, m^e |
|
|
|
Dec 8 2005, 05:50 PM
Post
#10
|
|
|
Binary Geek Group: Members Posts: 444 Joined: 4-November 05 From: The Digital Arena Member No.: 9,440 |
Ok, I went through the posts again but i dont know if this is a bug , but
Left-Click = Refresh : WORKING Right-Click = NOT WORKING .. It doesnt show any menu Is this correct ? Regards Dhanesh. |
|
|
|
![]() ![]() |
Similar Topics
| Topics | Topics | |
|---|---|---|
|
|
|
|
Lo-Fi Version | Time is now: 30th August 2008 - 03:53 PM |