LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 08-25-2009, 01:49 AM   #1
wanas
Member
 
Registered: Aug 2008
Location: Alexandria, Egypt
Distribution: Ubuntu 10.10
Posts: 158

Rep: Reputation: 16
Firefox addons for Prism, is it possible ?


I am using prism for googlereader and facebook but there is some addons that I want to be working with prism like greactions for google reader and boost for facebook.

I found this tutorial http://www.luckydisasters.com/2008/0...prism-two-ish/ to make addons possible for prism, it works for adblockplus ABP but it didnt work for my other addons greactions and boost for firefox

Is there a hack to make this addons work for all addons ?

I am using prism 1.02b
 
Old 11-18-2009, 03:00 PM   #2
virtualx
LQ Newbie
 
Registered: Oct 2005
Posts: 22

Rep: Reputation: 15
You have 3 options

1) Write to the developer of the specific add-on that you want and ask them to start developing / testing for prism

2) check the mozdev website frequently and hope that someone starts developing your the addon you need:
http://www.mozdev.org/projects/applications/Prism.html

3) Think a bit more about apply the instructions on the website you posted. ie: open up the xpi as described on the page and edit the install.rdf file in the places I've surrounded with # marks:

Code:
<em:targetApplication>
<! #FIREFOX# >
<Description>
<em:id>prism@developer.mozilla.org</em:id>
<em:minVersion>#Firefox Version min#</em:minVersion>
<em:maxVersion>#Firefox Version max#</em:maxVersion>
</Description>
</em:targetApplication>
Change the values to match that on the page you linked to:
Code:
<em:targetApplication>
<! Prism >
<Description>
<em:id>prism@developer.mozilla.org</em:id>
<em:minVersion>0.4</em:minVersion>
<em:maxVersion>1.0.0.*</em:maxVersion>
</Description>
</em:targetApplication>
There's no guarantee this will work as I'm not sure exactly what the differences between Prism and Firefox are, but the code change should make the plug-in at least installable.
 
Old 11-18-2009, 06:20 PM   #3
wanas
Member
 
Registered: Aug 2008
Location: Alexandria, Egypt
Distribution: Ubuntu 10.10
Posts: 158

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by virtualx View Post
3) Think a bit more about apply the instructions on the website you posted. ie: open up the xpi as described on the page and edit the install.rdf file in the places I've surrounded with # marks:

Code:
<em:targetApplication>
<! #FIREFOX# >
<Description>
<em:id>prism@developer.mozilla.org</em:id>
<em:minVersion>#Firefox Version min#</em:minVersion>
<em:maxVersion>#Firefox Version max#</em:maxVersion>
</Description>
</em:targetApplication>
Change the values to match that on the page you linked to:
Code:
<em:targetApplication>
<! Prism >
<Description>
<em:id>prism@developer.mozilla.org</em:id>
<em:minVersion>0.4</em:minVersion>
<em:maxVersion>1.0.0.*</em:maxVersion>
</Description>
</em:targetApplication>
There's no guarantee this will work as I'm not sure exactly what the differences between Prism and Firefox are, but the code change should make the plug-in at least installable.
I have tried this one but the problem is that not all the addons works only a little number of them
 
Old 11-18-2009, 07:58 PM   #4
virtualx
LQ Newbie
 
Registered: Oct 2005
Posts: 22

Rep: Reputation: 15
:(

I imagine it's caused by the difference between firefox and prism. Try re-posting your question in a Prism developers forum.

http://groups.google.com/group/mozil...s-prism/topics

Good luck
 
Old 12-03-2009, 05:05 PM   #5
virtualx
LQ Newbie
 
Registered: Oct 2005
Posts: 22

Rep: Reputation: 15
Found some more hints

here's some info on writing an app for Prism that I came across / a mirror of what's at:
http://www.softwareishard.com/blog/p...tending-prism/

I'd recommend following the link as it has syntax highlighting.


Hello Prism!

First of all, it isn't much different than writing an extension for Firefox. Both applications are based on XUL Runner and so, the logic is the same. However there are a few differences that are worth to be mentioned.

Let's start with the directory structure. It's simple and the same as in case of a Firefox extension. See here how it looks for the Hello World! Firefox/Firebug extension.
Code:
helloprism@janodvarko.cz/
    chrome/
        content/
            helloprism/
                helloprism.xul
                helloprism.js
        locale/
            en-US/
                helloprism.dtd
                helloprism.properties
        skin
            classic/
                helloprism.png
    chrome.manifest
    install.rdf
The first difference is in the chrome.manifest file.
Code:
content  helloprism  chrome/content/
skin     helloprism  classic/1.0 chrome/skin/classic/
locale   helloprism  en-US  chrome/locale/en-US/
overlay  chrome://webrunner/content/webrunner.xul chrome://helloprism/content/helloprism.xul
The main window is represented by webrunner.xul and so we have to do our overlay for it. Notice that it was browser.xul in case of Firefox.

Further the install.rdf is different. The target application is Prism and so, we have to specify that.
Code:
<rdf xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#">
    <description about="urn:mozilla:install-manifest">
        <i:id>helloprism@janodvarko.cz</i:id>
        <i:version>0.1</i:version>
        <i:type>2</i:type>

        <!-- Prism -->
        <i:targetapplication>
            <description>
                <i:id>prism@developer.mozilla.org</i:id>
                <i:minversion>0.8</i:minversion>
                <i:maxversion>1.0.0.*</i:maxversion>
            </description>
        </i:targetapplication>

        <i:name>Hello Prism!</i:name>
        <i:description>Example extension for Prism.</i:description>
        <i:creator>Jan Odvarko (odvarko@gmail.com)</i:creator>
        <i:iconurl>chrome://helloprism/skin/helloprism.png</i:iconurl>
        <i:homepageurl>http://www.janodvarko.cz</i:homepageurl>
    </description>
</rdf>
The Hello Prism! overlay is defined in helloprism.xul file. And in order to make it a bit useful for development I have created two new menu items for the Prism's Tools menu (located at the right-bottom corner).

Prism Tools Menu

* Preferences (open a new window with about:config page)
* DOM Inspector (open DOM Inspector window)

Of course, DOM Inspector extension must be installed, if you want to use it. Honestly, it's so useful to have DOM Inspector in Prism, especially when you exploring the Prism UI at the beginning.

See how the helloprism.xul looks like.
Code:
<!--ENTITY % helloprismDTD SYSTEM "chrome://helloprism/locale/helloprism.dtd"-->
%helloprismDTD;
]>

<overlay id="helloPrismOverlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
    <script src="chrome://helloprism/content/helloPrism.js" type="application/x-javascript">
    <script type="application/x-javascript" src="chrome://inspector/content/hooks.js"/>

    <stringbundleset>
        <stringbundle id="strings_helloprism" src="chrome://helloprism/locale/helloprism.properties"/>
    </stringbundleset>

    <!-- List of new commands -->
    <commandset>
        <command id="cmd_hpPreferences"
                 label="&helloprism.preferences;"
                 oncommand="helloPrism.onPreferences()"/>
        <command id="cmd_hpDomInspector"
                 label="&helloprism.inspector;"
                 oncommand="helloPrism.onDomInspector()"/>
    </commandset>

    <!-- Tools menu customization -->
    <menu id="menu_tools">
        <menupopup id="popup_tools">
            <menuseparator/>
            <menuitem command="cmd_hpPreferences"/>
            <menuseparator/>
            <menuitem command="cmd_hpDomInspector"/>
        </menupopup>
    </menu>
</overlay>
The JS implementation for the two commands is in separate helloprism.js file and looks like as follows:
Code:
var helloPrism =
{
    onPreferences: function()
    {
        window.openDialog('about:config');
    },
    onDomInspector: function()
    {
        if (typeof(inspectDOMDocument) == "undefined")
            alert(this.getText("helloprism.DOMInspector.error"));
        else
            inspectDOMDocument(content.document);
    },
    getText: function(name)
    {
        return document.getElementById("strings_helloprism").getString(name);
    }
};
There is also one helper function that loads a string from localized string bundle (helloprism.properties file). It's used to get the error message if DOM Inspector extension isn't installed.

The extension can be downloaded here. In order to install an extension in Prism, open Add-ons dialog (Tools->Add-ons menu) and and use the Install... button.

There are some troubles with Prism 0.9 and so, I am recommending to use Prism 0.9.1 (experimental) version (build available for Mac, Windows and Linux), which works fine for me.

Last edited by virtualx; 12-03-2009 at 05:07 PM. Reason: should have used code instead of quote block
 
  


Reply

Tags
facebook, ff, prism


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SuperTuxKart addons anywhere? roystonlodge Linux - Games 0 12-21-2008 02:25 PM
LXer: Mozilla Expands Prism Desktop EffortMozilla Expands Prism Desktop Effort LXer Syndicated Linux News 0 03-08-2008 12:20 AM
Can't download addons Firefox 2.0.04 Suse 10.2 vladi4az Linux - Newbie 1 06-15-2007 10:27 PM
firefox addons bong.mau Linux - Software 1 06-06-2006 01:17 PM
ipcop addons rtr Linux - Security 1 12-10-2003 10:43 AM


All times are GMT -5. The time now is 01:59 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration