Topic: New Firefox Extension - Easy to create and works in FF 4

http://i.godlike.cl/img/extdemo.png


As you may notice (http://chevereto.com/foro/topic47-firef … nsion.html) the current Firefox extension doesn't work on Firefox 3. So, after a little research I rewrite the code and I'm here to sharew with you the new Firefox extension that works with Firefox 3.X and the earlier Firefox 4 betas. So... Lets start, it takes around 5 minutes to do it and no hard modifications, just follow the steps.


First Step: The files

Download here Chevereto_right-click_2.0.xpi and rename it to Chevereto_right-click_2.0.zip then unzip it. You should get this:

  • chrome (folder) It contains the folders "content" and "locale"

  • chrome.manifest (file) This is where you add/remove lang support currently have English and Spanish

  • install.rdf (file) This contains information about the extension like extension url, author, etc.



Second Step: Edit install.rdf

In the root where you unzip the package, you get the file intall.rdf which contains general info about the extension... You should edit only between lines 6 to 9. Example, this lines are editable:

<em:name>Example right-click</em:name>
<em:version>1.0</em:version>
<em:creator>Mr. Example</em:creator>
<em:homepageURL>http://www.example.com</em:homepageURL>

Btw, you can also edit line 4 and put your own e-mail... Example:

<em:id>me@example.com</em:id>

So compare this examples with what you get on the original install.rdf and you will be on your way.



Third Step: chrome.manifest

If you want your extension in English or Spanish then skip this step. The rest of the people please read.

In this step we will add lang suport to the extension. To do that simply open chrome.manifest and add your language, one per line. Example:

content   godlikea                 chrome/content/
locale    godlikea   en-US         chrome/locale/en-US/
locale    godlikea   es-ES         chrome/locale/es-ES/
locale    godlikea   ru-RU         chrome/locale/ru-RU/

overlay   chrome://browser/content/browser.xul   chrome://godlikea/content/overlay.xul

In blue I have added Russian language.... So go to chrome/locale/ and you will see the folders "en-US" y "es-ES". Copy one of then an rename to "ru-RU".


Four Step: Contex menu text

Go to  chrome/locale/ and for each language edit the contains of overlay.dtd that is inside of "en-US" or in this example "ru-RU":

<!ENTITY godlikeaUp.label "????????? ? EXAMPLE">
<!ENTITY godlikeaRup.label "????????? ? ???????? ?????? ?? EXAMPLE">

PS: Google translate... Sorry Russian friends if is a wrong translation.
This two lines contains the text that the user will see when he righ-click on an image.



Five Step: Point the Chevereto's URL

Go to chrome/content and open Overlay.js then just edit the line 3 pointing your chevereto's url:

Chevereto: "http://www.example.com", /* NO ENDING SLASH! - SIN SLASH AL FINAL */

Notice: No ending slash...



Six Step: Icons

if you want your own icons to be shown in the extensions menu and in the context menu... Then go to: chrome/content and replace favicon.png with a 16x16 png image and icon.png with a 32x32 png image.



Final Step: "Compile" the .xpi

So, save all the changes and then go to the root where you have chrome folder, chrome.manifest file and install.rdf Select them all and then zip it. Once you get something like myfile.zip rename it to myfile.xpi or some. And yes.. It must be ZIP, no rar, ace or some other formats. JUST ZIP!


Then you have it, open the xpi file with Firefox and test!

rodolfoberrios.com | PLEASE use Tech Support forums to ask for support!

Re: New Firefox Extension - Easy to create and works in FF 4

FF 3.6.8 - dont work, nothing in right-click menu

http://bonappetit.com.ua
http://mirpodarkov.in.ua

Re: New Firefox Extension - Easy to create and works in FF 4

wcp wrote:

FF 3.6.8 - dont work, nothing in right-click menu

I have FF 3.6.8 and it works... Try to do Right click over IMAGES.

rodolfoberrios.com | PLEASE use Tech Support forums to ask for support!

Re: New Firefox Extension - Easy to create and works in FF 4

Nothing... http://img.lds.net.ua/?v=2010/08/31/ffxpi.png

http://bonappetit.com.ua
http://mirpodarkov.in.ua

Re: New Firefox Extension - Easy to create and works in FF 4

Amigo Yo lo aplique es facil y sencillo,

si nesecitas ayuda te puedo ayudar

Thumbs up

Re: New Firefox Extension - Easy to create and works in FF 4

Try to install the xpi without modification and you see that works, so... You are missing some in the editing part.

rodolfoberrios.com | PLEASE use Tech Support forums to ask for support!

Re: New Firefox Extension - Easy to create and works in FF 4

Rodolfo wrote:

Try to install the xpi without modification and you see that works, so... You are missing some in the editing part.

I agree, this is true. I somewhere made a mistake

http://bonappetit.com.ua
http://mirpodarkov.in.ua

Re: New Firefox Extension - Easy to create and works in FF 4

Well I already coded this for my image hosting long back guyz..! Check it out here... As the admin posted her it is soooo simple to do...

http://www.imgspot.org

Thumbs up

Re: New Firefox Extension - Easy to create and works in FF 4

2 fdls4all
your plugin dont work )

http://bonappetit.com.ua
http://mirpodarkov.in.ua

10

Re: New Firefox Extension - Easy to create and works in FF 4

I dont understand, but it doesnt work: http://img.lds.net.ua/img.lds_quick_uploader_2.0.xpi  ((((((((((((((((((

http://bonappetit.com.ua
http://mirpodarkov.in.ua

Re: New Firefox Extension - Easy to create and works in FF 4

wcp wrote:

2 fdls4all
your plugin dont work )

Just installed and works.

rodolfoberrios.com | PLEASE use Tech Support forums to ask for support!

Re: New Firefox Extension - Easy to create and works in FF 4

fdls4all wrote:

Well I already coded this for my image hosting long back guyz..! Check it out here... As the admin posted her it is soooo simple to do...

http://www.imgspot.org

You have and error in your overlay.js The "resize and upload" shows everywhere... You must create a function to show this only on a image.

rodolfoberrios.com | PLEASE use Tech Support forums to ask for support!

Re: New Firefox Extension - Easy to create and works in FF 4

wcp wrote:

I dont understand, but it doesnt work: http://img.lds.net.ua/img.lds_quick_uploader_2.0.xpi  ((((((((((((((((((

Also it works for me... Perhaps you have another plugin that make conflicts with this one.

rodolfoberrios.com | PLEASE use Tech Support forums to ask for support!

14

Re: New Firefox Extension - Easy to create and works in FF 4

hmm... On the second computer does not work either - no menu items... (((

http://bonappetit.com.ua
http://mirpodarkov.in.ua

Re: New Firefox Extension - Easy to create and works in FF 4

Rodolfo wrote:
fdls4all wrote:

Well I already coded this for my image hosting long back guyz..! Check it out here... As the admin posted her it is soooo simple to do...

http://www.imgspot.org

You have and error in your overlay.js The "resize and upload" shows everywhere... You must create a function to show this only on a image.

Oops.. yea I neva noticed it...!! Thanks for letting me knw.. but how to do that??? Kidnly help me out with the code!!

Thumbs up