You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Nicola Ken Barozzi <ni...@apache.org> on 2002/11/16 19:33:10 UTC

Real-life problem: XPI install

Good news  go to http://cvs.apache.org/~nicolaken/stuff/index.html
    :-)     with Mozilla and click on the _Forrestbar XPI Install link_
            It will automatically install the bar :-)

I want to put this in the main forrest site, because it's really cool, 
but...

Bad news:  It needs Javascript on teh top of the page and an
    :-(     onclick attribute on the link.


How is one supposed to do this :-?

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


Re: Real-life problem: XPI install

Posted by Nicola Ken Barozzi <ni...@apache.org>.

Jeff Turner wrote:
> On Sat, Nov 16, 2002 at 07:33:10PM +0100, Nicola Ken Barozzi wrote:
> 
>>Good news  go to http://cvs.apache.org/~nicolaken/stuff/index.html
>>   :-)     with Mozilla and click on the _Forrestbar XPI Install link_
>>           It will automatically install the bar :-)
>>
>>I want to put this in the main forrest site, because it's really cool, 
>>but...
>>
>>Bad news:  It needs Javascript on teh top of the page and an
>>   :-(     onclick attribute on the link.
>>
>>How is one supposed to do this :-?
> 
> 
> Today: add a HTML file to src/documentation/content/html, and add a
> custom sitemap rule to the project sitemap.

Actually I want to be able to put something in the xml page that is 
added verbatim to the result only if the xml will be transformed in html.

That is transformation result dependent content.

Pfew!

> In the future: no idea.. CAPs possibly?  We have two possible *.html
> matches:
> 
> <!-- Serve up hand-edited HTML -->
> <map:match pattern="**/*.html">
>   <map:read src="content/{0}"/>
>   <map:serialize/>
> </map:match>
> 
> <!-- Serve up generated HTML -->
> <map:match pattern="**/*.html">
>   <map:generate src="content/{1}/{2}.xml"/>
>   ...
>   <map:serialize/>
> </map:match>

Actually it's alreay doable by putting the html in 
src/documentation/content.
It will pick it up before trying the xml version.

> I think the original use-case for CAPs was determining what stylesheet to apply,
> to transform format X into documentv11:
> 
> <map:match pattern="*.html">
>   <map:act type="CAPAction">
>     <map:parameter name="config" value="doctypes.properties"/>
>     <map:generate src="{1}.xml"/>
>     <map:transform src="stylesheets/{doctype}2docv11.xsl"/>
>     <map:transform src="stylesheets/document2html.xsl"/>
>     <map:serialize/>
>   </map:match>
> 
> 
> But as Steven mentioned a while back:
>   "and have some SetMimeTypeAction which sets mimetype according to
>   file extension (or even better: /etc/mime.types for OSes that care
>   about mimetypes)."
>     <3D...@outerthought.org>
> 
> So if we knew the MIME type from an Action..
>     
> We'd have something looking very much like a resource-exists test.  A
> great big switch.

Hmmm, it's already there since some time now.
The problem is that when it finds the file it serves it with no correct 
mime-type, thus the webapp works but the crawler chokes on thinking that 
the unknown mimetype means html.

> Just unenlightened ramblings..

keep'em coming...

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


Re: Real-life problem: XPI install

Posted by Jeff Turner <je...@apache.org>.
On Sat, Nov 16, 2002 at 07:33:10PM +0100, Nicola Ken Barozzi wrote:
> 
> Good news  go to http://cvs.apache.org/~nicolaken/stuff/index.html
>    :-)     with Mozilla and click on the _Forrestbar XPI Install link_
>            It will automatically install the bar :-)
> 
> I want to put this in the main forrest site, because it's really cool, 
> but...
> 
> Bad news:  It needs Javascript on teh top of the page and an
>    :-(     onclick attribute on the link.
> 
> How is one supposed to do this :-?

Today: add a HTML file to src/documentation/content/html, and add a
custom sitemap rule to the project sitemap.

In the future: no idea.. CAPs possibly?  We have two possible *.html
matches:

<!-- Serve up hand-edited HTML -->
<map:match pattern="**/*.html">
  <map:read src="content/{0}"/>
  <map:serialize/>
</map:match>

<!-- Serve up generated HTML -->
<map:match pattern="**/*.html">
  <map:generate src="content/{1}/{2}.xml"/>
  ...
  <map:serialize/>
</map:match>

I think the original use-case for CAPs was determining what stylesheet to apply,
to transform format X into documentv11:

<map:match pattern="*.html">
  <map:act type="CAPAction">
    <map:parameter name="config" value="doctypes.properties"/>
    <map:generate src="{1}.xml"/>
    <map:transform src="stylesheets/{doctype}2docv11.xsl"/>
    <map:transform src="stylesheets/document2html.xsl"/>
    <map:serialize/>
  </map:match>


But as Steven mentioned a while back:
  "and have some SetMimeTypeAction which sets mimetype according to
  file extension (or even better: /etc/mime.types for OSes that care
  about mimetypes)."
    <3D...@outerthought.org>

So if we knew the MIME type from an Action..
    
We'd have something looking very much like a resource-exists test.  A
great big switch.

Just unenlightened ramblings..


--Jeff

Re: Real-life problem: XPI install

Posted by Nicola Ken Barozzi <ni...@apache.org>.
Tony Collen wrote:
> On Sat, 16 Nov 2002, Nicola Ken Barozzi wrote:
> 
> 
>>Good news  go to http://cvs.apache.org/~nicolaken/stuff/index.html
>>    :-)     with Mozilla and click on the _Forrestbar XPI Install link_
>>            It will automatically install the bar :-)
>>
> 
> 
> 
> Hey, cool! :)  This just gave me an idea, too.  What if Forrest allowed
> one to aggregate the "news" from a specific project?  Like if Forrest was
> able to provide an RSS feed based on the entries on a project's news page?
> One could even aggregate all the news from all the projects into one feed
> if desired.

Yes, definately. I've already planned to make these infos available as 
RSS feeds.

Look at the status.xml file, it contains changes, todos, votes , etc 
about the project, these will all be possible feeds.

:-)

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


Re: Real-life problem: XPI install

Posted by Tony Collen <tc...@hist.umn.edu>.
On Sat, 16 Nov 2002, Nicola Ken Barozzi wrote:

>
> Good news  go to http://cvs.apache.org/~nicolaken/stuff/index.html
>     :-)     with Mozilla and click on the _Forrestbar XPI Install link_
>             It will automatically install the bar :-)
>


Hey, cool! :)  This just gave me an idea, too.  What if Forrest allowed
one to aggregate the "news" from a specific project?  Like if Forrest was
able to provide an RSS feed based on the entries on a project's news page?
One could even aggregate all the news from all the projects into one feed
if desired.

Tony

Tony Collen -- tc@socsci.umn.edu
College of Liberal Arts   University of Minnesota, Minneapolis, West Bank


Re: Real-life problem: XPI install

Posted by Nicola Ken Barozzi <ni...@apache.org>.

Bert Van Kets wrote:
> At 19:33 16/11/2002 +0100, you wrote:
> 
>> Good news  go to http://cvs.apache.org/~nicolaken/stuff/index.html
>>    :-)     with Mozilla and click on the _Forrestbar XPI Install link_
>>            It will automatically install the bar :-)
>>
>> I want to put this in the main forrest site, because it's really cool, 
>> but...
>>
>> Bad news:  It needs Javascript on teh top of the page and an
>>    :-(     onclick attribute on the link.
>>
>>
>> How is one supposed to do this :-?
> 
> 
> Huh, you need help on this javascript stuff?
> What do you exactly want to do, I might be able to help.
> I suppose you need a browser detection and when Mozilla is used you want 
> it to install automagically.  How can you detect that it already is 
> installed?

Currently the javascript does not check if it's Mozilla, so you could 
add this.

> Besides, you need to restart the browser after the install, not really 
> user friendly.

AFAIK it's normal for Mozilla XPI installations.

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


Re: Real-life problem: XPI install

Posted by Bert Van Kets <be...@vankets.com>.
At 19:33 16/11/2002 +0100, you wrote:

>Good news  go to http://cvs.apache.org/~nicolaken/stuff/index.html
>    :-)     with Mozilla and click on the _Forrestbar XPI Install link_
>            It will automatically install the bar :-)
>
>I want to put this in the main forrest site, because it's really cool, but...
>
>Bad news:  It needs Javascript on teh top of the page and an
>    :-(     onclick attribute on the link.
>
>
>How is one supposed to do this :-?

Huh, you need help on this javascript stuff?
What do you exactly want to do, I might be able to help.
I suppose you need a browser detection and when Mozilla is used you want it 
to install automagically.  How can you detect that it already is installed?
Besides, you need to restart the browser after the install, not really user 
friendly.

Bert


>--
>Nicola Ken Barozzi                   nicolaken@apache.org
>             - verba volant, scripta manent -
>    (discussions get forgotten, just code remains)
>---------------------------------------------------------------------