Pictures as background, possible? Pictures as background, possible?
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Pictures as background, possible?

Started by Citroen, April 28, 2007, 02:19:19 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Citroen

Hello.
I wonder if it is possible tu use a .gif as background in the classic team. What I mean is a small one, showing "side-by-side", covering what by default is grey in "classic", around the gallery itself.

It would fe great if someone colud help.

Joachim Müller

Sure, this is possible. For details: post details (a link to your gallery and a link to the GIF that you want to use as a background).

Citroen

Thank you for taking the trouble guiding me.

I'm not sure if you can help (yet) since you are asking for the url's. Maybe thing should been more in their place first. :-[ The thing is that I am going to change host for one of my sites in about a week. At the same time I will install the gallery there, and (try to) bridge it to the websites forum.

But for the time being I'm playing around figuring out how to customize the look - for this reasen I have only installed the gallery at a free-host. So.....the url down under will not be the actual one in the finaly installation.

I have not yet put the gif (actually it's a .jpg, but I can use the format you suggest)in any folder of Coppermine, did'nt know if that's the right way doing it?

Url to the gallery I'm color-playing with: http://brehus5.100webspace.net/Coppermine/
Url to the "picture" stand-alone: http://brehus5.100webspace.net/antik.jpg
Url to the forum (at the host I use for this homepage today) using the background based on it: http://www.lhm-kaffe.com/forum

And: Sorry for my bad english, hope you understand most of it.........

Joachim Müller

It doesn't matter that you're currently in the design stage and that you're planning to move webhosts later (or start a fresh install). After all, you design your theme with relative links to resources (images), which sould remain the same no matter what webhost you're on.

This being said, you should make sure to design your custom theme portable: this means (in the first place) to give it a unique name (do not edit the classic theme, but create a copy of the classic theme). Here's the instructions for that - copied from the preliminary documentation for the next coppermine version cpg1.5.x (that applies for your version cpg1.4.x as well):
QuoteCreating your custom theme
To create a new theme, the best solution is to use an existing one as its copy template. To do that, make a copy of the folder of the theme you want to use as a basis. Then edit the "template.html" and "theme.php" files and replace all occurences of "themes/old_theme_dir" with "themes/new_theme_dir" in order for the links to point to the correct place.
Avoid using spaces and special chars in your custom theme name - only use alphanumerals and the underscore (_).
In your case, let's name your custom theme "citroen_showroom". I attached this custom theme (based on the modifications that you have already applied minus the advert crap that you or your webhost injects) to this posting; just download and unzip into http://brehus5.100webspace.net/Coppermine/themes/ (preserving the folder structure within the archive). Note that I put your background image into the images sub-folder of you new custom theme.

There are various options how you can add your image as a background: it is mandatory that you understand how the greyish background color is being determined in the theme that you're using: after all, it's the body background showing through, which is being defined in your stylesheetbody {
        font-family : Verdana, Arial, Helvetica, sans-serif;
        font-size: 12px;
        background : #CCCCCC;
        color : Red;
        margin: 0px;
}
You could either change this by adding the background-image there, or you could use the inline-stylesheet option by changing <body>in template.html to<body style="background-image:url(themes/citroen_showroom/images/antik.jpg);background-repeat:repeat;">

This is not related to Coppermine specifically, but basic HTML/CSS. If you need to know details, read up some HTML/CSS tutorials or buy a book about this.

Citroen

Thank you very much, GauGau. :) That was much more helpful than I could hope for!

Sure, I was planning to copy "Classic" and make it a separate theme. Just haven't done it yet.

I'm almost afraid to ask this, but: I would like to try out the same bacground inside the "category" areas. Don't know if I will like it, but I would like to see the result. Could you possible guide me in the right possition for doing that as well? Og course I understand if you do not want to go any further helping like this - or if you rather mean I should ask for this in a new posting. Please understand: I DO read documentation, FAQ's and in this forum - it just so much to sort out and separate that I honestly need some "do it this way" right now.

If you answer or not: Again thank's a lot for superb help. It made my day sunny - and coming evening busy. ;)   

Joachim Müller

Use the web developer toolbar or similar to find out what CSS class is controlling which section of the screen. Then apply the background image (or any other CSS stuff) to the corresponding class as you see fit. Please keep in mind that we have a "one question per thread" policy. Again: this is not a particular Coppermine issue, but plain HTML/CSS. Imo you should look for answers by learning more about CSS reading some good tutorial(s) instead of asking just for the class name and what you'll need to edit. I could easily come up with the class name and even suggest the code that you would have to change, but you wouldn't learn anything from my reply, so I'd prefer if you tried out the web developer toolbar for Firefox, learn how to use it and come up with much more fascinating stuff than just a plain background image.

Citroen

Yepp, I'll look into these things, at least to find out what i'm able to figure out and learn. Thank's. :)