Solution Re: [greenstone-users] simple links to mp3

From ak19@cs.waikato.ac.nz
DateFri Mar 7 11:57:15 2008
Subject Solution Re: [greenstone-users] simple links to mp3
In-Reply-To (27837085-1204811608871-JavaMail-root-ctps5)
Hi Ana,

> What can I do? Can anybody help me? Thak you very much. -And sorry
> for my poor English: answers in spanish would be wellcome-.
Your English is good. Unfortunately, I don't speak in Spanish, so I will
write in English.

I may have understood your problem wrong and therefore attempted to solve
it wrong. I'll first go over the problem with you so you can check whether
I got it.

MAIN PROBLEM: you have already built a collection and now want (some of)
the collection's html files to interlink.

If I have stated your problem correctly, then:
"SOLUTION":
- I think you need to rebuild your collection *after* having created the
files with the interlinking (relative links) that you want.
That is, correct your original html documents. Then build the collection
with them again.

IN DETAIL:
You wrote:
> I have tried it too with links
> to "import" folder and even to files contained in hash folders created
> by GS. It does not work.
The import folder is used for the build process. But the contents of the
collections pages served up by the browser are not from the import folder.
Greenstone produces archive files of your contents when a collection is
built. Therefore it stores them in an internal format.
So if you make changes to the files in the import folder, they will not
show up in the browser.

You wrote:
> I do not know if the link route is
> correct (../collect/name of the collection/file.html) but there is no
> way. I suppose that the links disappear when Greenstone creates the
> html pages to be viewed in the browser.
Once the collection has been built, it has been built with the document
contents the way they were when you added them into the collection. What
data was present during collection building (such as text, urls) are
indexed and stored in an internal archive format by Greenstone in its
database as they were at that time they were included.

In other words: there is no way to make the kinds of changes you want to
make to the contents *after* building a collection.


Instead, I would advise you to
1. Edit your original html documents so that the links now point to each
other as you want.
Use *relative* urls, not absolute urls (absolute ones contain the full
path and often start with http://). This is because the locations will
change when Greenstone makes a collection out of the html files. If you
used absolute urls, Greenstone will assume the links starting with http://
are external links. If you used relative urls, Greenstone would append the
macros that generate the correct links to the local html files.

2. Use GLI to replace the old documents from the collection with these
updated documents.
HOW:
- Start GLI.
- Go to the menu File > Open. Choose your collection.
- EITHER: In the right hand pane of the Gather tab, right-click on each
document you want to replace. Click Replace in the right-click menu. A
dialog appears that lets you find the document you want to replace it
with. Browse to the updated version of the original document.
OR: In the right hand pane of the Gather tab, select all the documents you
want to replace. Right-click and choose delete. Now, from the left-hand
pane, drag the updated original documents containing the proper links into
the right-hand pane.

3. Rebuild the collection.


What version of Greenstone are you using? I have tried the following with
Greenstone 2.80:
I have built a demo collection containing 3 files (see attachments):
- mainpage.html links to both page1.html and page2.html
- page1.html links to page2.html
- page2.html links back to mainpage.html
The links in my html pages are all relative. For instance, mainpage.html
contains <a href="page1.html"> (instead of the absolute url <a
href=/full/path/to/page1.html>).

After building this collection, I viewed them with the Greenstone browser
interface and find the pages linking to each other as intended.

If you save the html files I am attaching and build these 3 files into a
separate demo collection, you can check in the web browser whether they
work for you as well.

Regards,
Anupama


> Hi,
> I have sent this mail to the list already, but I have not got
> solution. I hve read your answer about mp3 files and may be that you
> could help me. Thanks a lot.
>
> I need help with Greenstone. I am starting out with the program to
> make a collection but I have a problem: I need to create links among
> the documents which have been already incorporated to the collection.
> I have tried to do it opening incorporated html documents and, once
> edited -with Word, e. g.- I insert the link. When I click it the
> browser gives back always the message "external link to the collection"
> or "the web page does not exist". I do not know if the link route is
> correct (../collect/name of the collection/file.html) but there is no
> way. I suppose that the links disappear when Greenstone creates the
> html pages to be viewed in the browser. I have tried it too with links
> to "import" folder and even to files contained in hash folders created
> by GS. It does not work.
> What can I do? Can anybody help me? Thak you very much. -And sorry
> for my poor English: answers in spanish would be wellcome-.
>
> If you do not have an answer but you know who could help me, please,
> give me any contact info.
>
> Ana B. Mora
>