Jump to content
xisto Community
miCRoSCoPiC^eaRthLinG

Alpha R2 Astahost Credits Reporting Extension

Recommended Posts

Dhanesh, I run the most current verison of Firefox, and have all the dev releases vakced up, and it's not that. I've also looked at m^e's code, and everything loks good, now that he explained the xul thing to me, it's baffling. One other thing m^e. what the heck is "chrome://creditsreporter"? Because that is the folder that all the files seem attached to, but for me they are inside "chrome://chromeFiles" but when I put that in, everything stops. (Oh by the way, I finally convinced Opaque to de ip blok me from gamma, some I can now test the extension once again, the onclickl part works, but not the context).~Viz

Share this post


Link to post
Share on other sites

Dhanesh, I run the most current verison of Firefox, and have all the dev releases vakced up, and it's not that.  I've also looked at m^e's code, and everything loks good, now that he explained the xul thing to me, it's baffling.  One other thing m^e.  what the heck is "chrome://creditsreporter"?  Because that is the folder that all the files seem attached to, but for me they are inside "chrome://chromeFiles" but when I put that in, everything stops.  (Oh by the way, I finally convinced Opaque to de ip blok me from gamma, some I can now test the extension once again, the onclickl part works, but not the context).

 

~Viz

1064332340[/snapback]


OK this brings us to the topic of Chrome Registry - which was there previously too - but not as advanced as it is now. I need to chalk up a tutorial soon enough. Here's how it works:

 

Look OUTSIDE the chrome folder - in the root folder where you unzipped the extension. You'll find a file named: chrome.manifest. Starting from FF1.5 and above this file keeps track of all the folders that you're using to split out the contents of the extension. FF 1.5 onwards, this file is a must-be-present part of your extension.

 

If you open up the chrome.manifest file, you'll find three-four lines in there:

content  creditsreporter  chrome/chromeFiles/content/skin  creditsreporter  classic  chrome/chromeFiles/skin/locale  creditsreporter  en-US  chrome/chromeFiles/locale/en-US/overlay  chrome://browser/content/browser.xul  chrome://creditsreporter/content/credits.xul

The first and last lines are again - MUST BE PRESENT in all extensions. The first line as you can see has three columns. It defines an entity called "content" (1st column) - which is a part of the "creditsreporter" (2nd column) extension - and the core files of this extension can be effectively located at "chrome/chromeFiles/content/" (3rd column).

This line has to be present, and if you wish NOT to follow the standardised folder structure of extensions, you can place your core files elsewhere and change the content folder here - to make FF read it from your customized folder.

For example I can write this line as:

content creditsreporter abcd/efgh/zyx

 

Now NOTE, that in effect what is getting defined is a pointer called content, under creditsreporter.. So we can refer to the contents of the above directory as:

chrome://creditsreporter/content/ . ( chrome://2nd column/1st column ) Advantage of this method is - if you change ur folder structure later on you don't need to go back and change it all over in your extension - it entirely eliminates the need to hardcoding the file paths.. Whenever you need to change the dir structure, you simply come to chrome.manifest and change it here - the change is reflected all over your extension..

 

Similarly - note how I defined a pointer to the graphics folder, using the word skin - which again is nested under creditsreporter.. The 3rd column here simply specifies a name for the skin - you're free to name it whatever or in some cases can have multiple skins with different names. Once again, this points to the folder chrome/chromeFiles/skin/

So in effect, chrome://creditsreporter/skin/ will point to this folder. As I've defined only ONE skin, this is the default one chosen.

 

Next we come to locale - which allows you to setup locale specific strings - so a user is free to switch the extension interface to the language of his choice..

Same STRUCTURE..

first locale, next creditsreporter, next the locale name string (en-US) that uniquely identifies the locale and fourth the folder where you'll find the locale files..

Putting it together - the files for en-US can be found at:

chrome://creditsreporter/locale/en-US/ which is turn will point to the folder mentioned in the chrome registry...

 

All these lines are very similar with just minor variations.. Confused ?? Let me know, i'll try to clear it up a little more. :huh:

Share this post


Link to post
Share on other sites

It doesn't work for me, the FF stop responding when I click Option. Nothing is shown at the status bar.

1064332444[/snapback]


Hey how come - are you receiving any sort of error messages ?? What version of FF are u using ? Is it one of the nightly builds ? Cant you give me sort more details please .. will help me figure out the bugs.

Share this post


Link to post
Share on other sites

Hey how come - are you receiving any sort of error messages ?? What version of FF are u using ? Is it one of the nightly builds ? Cant you give me sort more details please .. will help me figure out the bugs.

1064332451[/snapback]

There's no error message here. I'm using FireFox version 1.0.7 (offical, not a nightly build). And here's the screenshoot.

 

Posted Image

Share this post


Link to post
Share on other sites

That explains - this extension isn't supposed to be used with any version below Firefox 1.5 - that is clearly stated in my first post in this thread.

 

The fact is that the way extensions were packaged has changed a lot starting from Firefox 1.5 - and even this extension is no exception. The mismatch in packaging as well as the new concept of chrome registry - all together makes extensions designed for this version not compatible with the older ones. I don't know how you managed to install it in the first place - coz it should have given you an warning about version mismatch and aborted the installation.

 

Anyway, if you upgrade to the new firefox, it surely will work for you :huh:

Share this post


Link to post
Share on other sites

Works fine for me on Mac. Sad thing I don't use Firefox that much. I'll try making it into a widget though. The right-clicking thing works for me (even though I have to ctrl-click to simulate right-click.It's cool, thanks a lot. When will the personalized version come out?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • 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.