[greenstone-users] PagedImagePlugin navigation buttons and [srclink]

From Jay Clark
DateFri Oct 22 04:09:50 2010
Subject [greenstone-users] PagedImagePlugin navigation buttons and [srclink]
In-Reply-To (4CBFF528-5050709-comune-belluno-it)
Hi William,
I have mucked around in the source code for Greenstone 2 recently trying to make the HTML more standards compliant (i.e. not using tables for layout) and have had to make changes like this in runtime-srcsrcrecptvlistbrowserclass.cpp and then recompile before the changes become visible in the web browser.

I think the changes you are looking to make are in the vlistbrowserclass.cpp file. It's possible you may also need to make changes in pageaction.cpp in the same folder.

Unfortunately, this is the only way I've found to make changes like this for browsing classifier-based pages in Greenstone.

I'm not familiar enough yet with the way the hierarchy display and bookshelf icons are output to be of any help on that topic.


Jay Clark
MAF Learning Technologies
www.maflt.org


-----Original Message-----
From: greenstone-users-bounces@list.scms.waikato.ac.nz [mailto:greenstone-users-bounces@list.scms.waikato.ac.nz] On Behalf Of William Mann
Sent: Thursday, October 21, 2010 2:09 AM
To: Diego Spano
Cc: greenstone-users@list.scms.waikato.ac.nz
Subject: Re: [greenstone-users] PagedImagePlugin navigation buttons and [srclink]

Hi and thanks!

> 1- Edit the file macros/document.dm. At line 100 you will find all the
> code for displaying the goto form. You can add there what you want.
>

I already know where the code for the goto form was and that was no problem. My problem is that in the generated page there is a table _before_ the goto code:

<table>
<tr align=top>
<td colspan=3><center><b>page 1</b>&nbsp;<i>(94 pages)</i></center></td> </tr> <tr valign=middle> <td align=right></td> <td align=center valign=top>[goto form code]</td> <td align=left>[next arrow]</td> </tr> </table>

and it is this table that I'd like to modify but I can't find where it's being generated. Would you happen to know where this is going on? I'd just like to add a width=100% attribute to the <table> tag.

> 3- To have only the "document" icon you have to delete the
> [link][icon][/link] part of the Vlist format statement that applies to
> container icons. Containers are hierarchy nodes represented with
> bookshelves. So you can write something like this:
>
> format VList "<td valign="top">{If}{[numleafdocs],
> [link][Title][/link]</td>,
> [link][icon][/link]</td><td>[link][Title][/link]</td>}"
>
> If the node is a container, then show only a link with node□s name. If
> the node is a document, then show the icon and the Title.
>

The actual statement that I'm using is:

format VList "<td valign="top">[link][icon][/link]</td>
<td
valign="top">[ex.srclink]{Or}{[ex.thumbicon],[ex.srcicon]}[ex./srclink]</td>
<td valign="top">[highlight]
{Or}{[dc.Title],[exp.Title],[ex.Title],Untitled}
[/highlight]</td>"

and it works as it's supposed to. My problem is that when I navigating I get something like this:

[shelf_icon] Drawings, paintings and photographs (18)
[shelf_icon] Drawings and paintings (2)
[shelf_icon] Drawings (1)
[doc_icon] Drawings

so in the end, for Drawings, I have both a shelf_icon and a doc_icon.
The document level Drawings contain the relative images. What I wanted was to not have a [shelf_icon] for Drawings and just have the doc_icon one. Maybe I created the metadata wrong for this. Basically my .item file for the directory containing the drawings has the following defined as metadata:

<Title>Disegni
<Subject and Keywords>Drawings, paintings and photographs|Drawings and
paintings|Drawings

Should I have <Subject and Keywords>Drawings, paintings and
photographs|Drawings and paintings instead? What I would like to obtain
is this:

[shelf_icon] Drawings, paintings and photographs (18)
[shelf_icon] Drawings and paintings (2)
[doc_icon] Drawings
[doc_icon] Paintings

Is this possible?

--
Rag. William Mann
Comune di Belluno
Servizio Sistemi Informativi
Piazza Castello, 14
32100 Belluno
Tel. 0437-913156
e-mail: wtmann@comune.belluno.it


>
> -----Mensaje original-----
> De: greenstone-users-bounces@list.scms.waikato.ac.nz
> [mailto:greenstone-users-bounces@list.scms.waikato.ac.nz] En nombre de
> William Mann
> Enviado el: Mi□rcoles, 20 de Octubre de 2010 09:04 a.m.
> Para: Katherine Don
> CC: greenstone-users@list.scms.waikato.ac.nz
> Asunto: [greenstone-users] PagedImagePlugin navigation buttons and [srclink]
>
> Hi,
>
> I've almost arrived at the finish line with my first collection! I just have
> another couple of questions.
>
> 1. I'm trying to personalize the collection without adding too much stuff
> myself. And I've basically found all the output and how to format it except
> for this piece the table that gets created in the document that shows the
> page number, number of pages, goto form, and arrows when using the
> PagedImagePlugin. I want to add something to that table but I can't find
> where it's being generated.
>
> 2. I use the [srclink] tag to show the original image but I'd like for the
> image to come up in a new window (target=_blank): is there a way to get just
> the href to the image source without the<a> tag so I can construct the link
> myself? Or if I modify the ImagePlugin how can I then make Greenstone use
> the new version?
>
> 3. I've noticed that if I use a hierarchical structure with directories like
> so:
>
> <Title>Disegni
> <Subject and Keywords>Disegni, dipinti e fotografie|Disegni e quadri|Disegni
>
> I then get a bookshelf icon at 'Disegni, dipinti e fotografie', 'Disegni e
> quadri' and 'Disegni' as well as a document icon at 'Disegni'. Is there a
> way to have only the document icon when I get to the bottom of the
> structure? I'm attaching a sample .item file.
>
> Thanks for all your patience and help you've provided!
>
> --
> Rag. William Mann
> Comune di Belluno
> Servizio Sistemi Informativi
> Piazza Castello, 14
> 32100 Belluno
> Tel. 0437-913156
> e-mail: wtmann@comune.belluno.it
>
>
>

_______________________________________________
greenstone-users mailing list
greenstone-users@list.scms.waikato.ac.nz
https://list.scms.waikato.ac.nz/mailman/listinfo/greenstone-users