Adding image in sidebar

gaynormcc
gaynormcc's picture

Joined: 2003-09-05
Posts: 426
Posted: Sun, 2006-02-05 23:46

I am wanting to add an image (images) and perhaps urls/text below them into the sidebar in G2.
I have done this in G1.

I presume I do this by adapting the theme.css
but don;t know how to do it.

I assume I add the information in the third section of the css where it has:-

/* ********************************************************************************
* Sections
* #gallery Page container
* #gsNavBar Top bar with breadcrumb and other links
* #gsSidebar Sidebar
* #gsContent Main content
* #giFormUsername Form field for entering a username
* #giFormGroupname Form field for entering a group name
*/

#gsNavBar div {
margin-top: 0.1em; /* Align system links with breadcrumb */
font-weight: bold;
}

#gsSidebar div ul { /* no > in IE */
font-size: 1.1em;
font-weight: bold;
}
#gsSidebar div ul ul { font-size: 1.0em; }

#gsSidebar ul span {
color: #5e6120;
}

#giFormUsername, .giFormUsername {

---------------------------------
(BTW is there a way to identify the line numbers eg if I were to copy the file into MSWord or some other document?)

It would be really helpful if you could insert "image01" and "add Text" in the above as an example for me.
Does it understand html code?

Gaynor

 
ckdake
ckdake's picture

Joined: 2004-02-18
Posts: 2258
Posted: Wed, 2006-02-08 03:03

Using the existing imageblock module is probably the way to go. Have you looked at it?

 
gaynormcc
gaynormcc's picture

Joined: 2003-09-05
Posts: 426
Posted: Wed, 2006-02-08 10:49

Thanks Chris, but that doesn;t give the option to choose a specific image to be there.

In G1 I was able, for instance, to put images from brochures advertising places we had visited, and their web URLs in that "vacant space"

I have set some of my themes with the Image Block feature you mention and there seems no way to even limit the images to those within the album being used.

Still it is a start.
Thanks.
Gaynor

 
ckdake
ckdake's picture

Joined: 2004-02-18
Posts: 2258
Posted: Wed, 2006-02-08 15:28

There is an album option to not include an album in the image block, but that's not specific enough for what you want. If there are only a few specific images you want, you could hardcode them into one of your template files, and if you need it to be configurable per album/item, You'd need to write a module.

 
gaynormcc
gaynormcc's picture

Joined: 2003-09-05
Posts: 426
Posted: Wed, 2006-02-08 21:23

Thanks Chris,
We are getting closer now.
How do I "hardcode them into one of my template files"

That is one of the things I want to do.

I'd also like to be able to have one being a random image from within a specific sub-album.
I wouldn't know the first thing about beginning to write a new module.

Gaynor

 
gaynormcc
gaynormcc's picture

Joined: 2003-09-05
Posts: 426
Posted: Wed, 2006-02-08 23:55

OK I have found where the options are.
Presumably
In gallery2/modules/imageblock/templates/blocks/blocks.inc

I need to add Adaptations of the line
'randomImage' => $gallery->i18n('Random image'),

eg
'specificItemImage' => $gallery->i18n('SpecificItem image'),
and
'RandomInThisAlbumImage' => $gallery->i18n('RandomInThisAlbum image'),
But where do I define the "specificItem Image" and
'RandomInThisAlbum Image'

And how do I go about defining them?

Gaynor

 
gaynormcc
gaynormcc's picture

Joined: 2003-09-05
Posts: 426
Posted: Thu, 2006-02-09 02:36

As this has evolved into a Module query, I have transferred it to the Modules Forum at
http://gallery.menalto.com/node/44201

Gaynor