Re: [greenstone-users] Need help in user interface part

From Richard Managh
DateThu, 26 Jan 2006 11:55:41 +1300
Subject Re: [greenstone-users] Need help in user interface part
In-Reply-To (20060125055336-48048-qmail-web32205-mail-mud-yahoo-com)
Hi Jasmine,

I'll deal with 2) first.

> 2) I would like the frame (wavy green design) to be removed but i
> couldn't find any solution to it.

Looking at the html for the pages in the collection reveals

<body bgcolor="#ffffff" text="#000000" link="#006666"
alink="#cc9900" vlink="#666633" background="/images/chalk.gif"
onLoad="initialize();">

The background="/images/chalk.gif" specifies that wavy green design to
be the background image for the page.

using "grep" to search the main macro directory <greenstone install
dir>\macros\ for the pattern chalk.gif

i.e.

/home/fred/apps/greenstone/macros>grep chalk.gif
base.dm:_httpiconchalk_ {_httpimg_/chalk.gif}

or

C:\Program Files\Greenstone\macros>grep chalk.gif
base.dm:_httpiconchalk_ {_httpimg_/chalk.gif}

reveals _httpiconchalk_ in base.dm:

A quick look at base.dm to see the package that _httpiconchalk_ is in
shows it is in the Global package.

So, one way of removing this wavy image would be to put the following in
a Global package section of your extra.dm

i.e.

package Global

_httpiconchalk_ { }

overiding the httpiconchalk macro to contain nothing.

> 1) I tried shfiting the header image(icon) below the banner but still
> doesn't work. I had also tried refering to the reference given.

> 3) The top navigational bar (help, preference) i tried to shift it
> down together with the navigation bar that is placed after the header
> image. It still stay at the same position (top right corner)
>

Katherine has already suggested looking at the _pagebanner_ macro in
style.dm

This area of the page is defined in the _pagebanner_ macro in style.dm
-- you'll need to change this. I recommend you read
http://www.wrlc.org/dcpc/UserInterface/interface.htm if you haven't
already.

If you look in <greenstone install dir>\macros\style.dm you will see
this pagebanner macro, it contains two macros, _imagecollection_ and
_imagethispage_ which are presumably the two images you want to move in
your items 1) and 3)

We care about the navigation bar as well, and another grep of the macros
directory reveals _navigationbar_ in base.dm

In base.dm near the macro definition for _navigationbar_ is

_navigationbar_ {}

we can also see below that:

# The following is useful if collection specific macro. Override
# _optnavigationbar_ to be empty if you don't want the navigation bar to
# appear in the standard place, and then specify _navigationbar_ elsewhere
# in a collection specific macro file(s) to be where you do want it.
_optnavigationbar_{_navigationbar_}

So this gives us another tool to use in changing the relative position
of the navigation bar on pages in the collection.

Remember from my previous email, when I talk about how all of the pages
in greenstone are made up of a _header_ then a _content_ macro then a
_footer_ ?

Well, if we look at the _header_ macro in <greenstone install
dir>\macros\Style.dm

_header_ {_cgihead_
_htmlhead_(background="_httpiconchalk_")_startspacer__pagebanner_
}

we can see the _pagebanner_ macro in the _header_ macro. You want the
_navigationbar_ above this. So lets put it all together:

In your extra.dm under package Style (as this is where _header_ is
defined) we need to override the default header with

package Style

_header_ {_cgihead_
_htmlhead_(background="_httpiconchalk_")_startspacer__navigationbar__pagebanner_
}

Now we have a navigation bar above those images, but now we have two
navigation bars. So we use that _optnavigationbar_
macro to remove the default one, with in your extra.dm under package Global

package Global

_optnavigationbar_{}


Now you should have the navigation bar above those two images. This may
not be exactly what you want, but its a start.


Hope this helps,


Richard
--
DL Consulting
Greenstone Digital Library and Digitisation Specialists
contact@dlconsulting.co.nz
www.dlconsulting.co.nz

(from previous mail)

I realise that the icon (About,Search, etc) were always at the
left
> side. But for my design I wanted to shift it down to like this:
>
> --------------------------
> | Banner |
> --------------------------
> -----------------About <---position of icon
>
> XXXXXXXXXXXXXXX <--navigation bar
>
>
> How do i change the posittion of that icon and will it affect my
> naviation bar as well? My Home, Preference and Help link will be
> shifted to naviation bar as well together with the Search and
Browsing
> part. How do i do that?

This area of the page is defined in the _pagebanner_ macro in style.dm
-- you'll need to change this. I recommend you read
http://www.wrlc.org/dcpc/UserInterface/interface.htm if you haven't
already.

Thank you

Regards,
Jasmine (Sorry, I do not have any in-depth knowldge on html and macros)