Hi Ed,
I'm pretty sure this is possible because I'm pretty sure I've done it
before. I know it definitely doesn't work with Safari (I did it on a
Mac), but I seem to remember having some success with Firefox.
~~~~
Okay, actually I just tried it out and it worked for me, at least on
my Mac with Firefox. Here's what I did:
In the HTML, instead of loading the script from simile's servers, you
can load it from a local file, with something like this:
<script src="../../../api/exhibit-api.js?
views=timeline&bundle=false" type="text/javascript"></script>
Now, you'll have to change the exhibit-api.js file a bit:
One of the first lines you'll see is:
var useLocalResource = false;
Unsurprisingly, you'll change this to "true".
Now, you'll have to go through the file and change a couple places
where that variable is used, since by default it expects you to be
running a server on your own computer, so it tries to find stuff at
127.0.0.1. So scroll towards the end of the file (or search for
"useLocalResource") and you'll see this:
if (includeTimeline) {
scriptURLs.push(useLocalResources ?
"http://127.0.0.1:8888/exhibit/extensions/time/time-
extension.js" :
"http://static.simile.mit.edu/exhibit/extensions-2.0/time/
time-extension.js");
}
That little ? after the useLocalResources is basically a condensed
"if" statement. If useLocalResources is true, then do the thing
before the colon, otherwise do the thing after the colon. So now go
ahead and comment out the 127.0.0.1 line, and put in the address on
your local drive. Since my time extension folder is on my local drive
here:
/Users/gabrieldurazo/Classwork/urop/exhibit/src/webapp/extensions/
time/time-extension.js
I changed it to:
if (includeTimeline) {
scriptURLs.push(useLocalResources ?
// "http://127.0.0.1:8888/exhibit/extensions/time/time-
extension.js" :
"file:///Users/gabrieldurazo/Classwork/urop/exhibit/src/
webapp/extensions/time/time-extension.js" :
"http://static.simile.mit.edu/exhibit/extensions-2.0/time/
time-extension.js");
}
I'm not exactly sure what it would be on Windows -- maybe something
like file://C:/...... You may have to play around with it a bit.
Actually, after some Google searching, I see this may be somewhat of
a stumbling block. Make sure you can at least just open an ordinary
text file locally with file:// before you try messing with the
javascript files.
You can change the Map one this way, too, though I don't know how
useful the map will be without an internet connection.
You have to do this type of change to the third useLocalResources, in
order to load the simile-ajax stuff. e.g:
var url = useLocalResources ?
// "http://127.0.0.1:8888/ajax/api/simile-ajax-api.js" :
"file:///Users/gabrieldurazo/Classwork/urop/exhibit/src/ajax/api/
simile-ajax-api.js" :
"http://static.simile.mit.edu/ajax/api-2.0/simile-ajax-api.js";
~~~~~~~~
I hope this helps. I did this with Exhibit 2.0 since I don't have 1.0
on my computer. You can just get the whole deal with an svn checkout.
svn checkout http://simile.mit.edu/repository/exhibit/branches/2.0/
exhibit
I think some of this may be able to be avoided by just loading the
Timeline extensions directly from the HTML in a script tag along the
lines of:
<script src="../../extensions/time/time-extension.js"></script>
but I'm not sure. Maybe David or someone can chime in with a more
straightforward way of doing this.
Cheers,
Gabe
On Oct 9, 2007, at 4:36 PM, Ed Miller wrote:
Uh, it's a little more complicated than just that. I looked at the
instructions to run Exhibit offline in the wiki. For starters, it's
for version 1.0. Secondly, I need it to run with the Timeline facet,
which the instructions don't address.
1 - Is this even possible?
2 - Is it as simple as a bunch of find/replace operations?
3 - Are there even more web linkages that I haven't anticipated that
will have to be found and fixed?
_____________________________________________________
Ed Miller
Lawrence Livermore National Laboratory (LLNL)
_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://simile.mit.edu/mailman/listinfo/general