• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.

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

Rodolfo

⭐ Chevereto Godlike
Chevereto Staff
Administrator
extdemo.png



As you may notice (http://chevereto.com/foro/topic47-firefox-extension.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.


[h]First Step: The files[/h]
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.[/*]



[h]Second Step: Edit install.rdf[/h]
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.



[h]Third Step: chrome.manifest[/h]
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".


[h]Four Step: Contex menu text[/h]
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.



[h]Five Step: Point the Chevereto's URL[/h]
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...



[h]Six Step: Icons[/h]
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.



[h]Final Step: "Compile" the .xpi[/h]
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!
 
wcp said:
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.
 
Rodolfo said:
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
 
fdls4all said:
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.
 
Rodolfo said:
fdls4all said:
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!!
 
wcp said:
How can I make a plugin for Google Chrome?
I don't know. Create a different topic for that, this is for the Firefox Extension.
 
Back
Top