Hi all. Running G2 final on IIS6. Everythings great. I'm using the Matrix theme, and would like to change the grey album cell background color on the MAIN page only /gallery2/, i want it all to be white. But I want the rest of gallery to fall under the standard theme, grey cell background for albums, rest of the background white, etc.
Sure would be nice to be able to edit the css in the theme (global) and on individual albums. this would allow me to achieve the above.
Or am I missing on how to do it?
thanks
Posts: 383
I do not know of a way that comes standard with gallery, but I have not looked into it very deeply. However, I do know of a way how to do it:
That should do it. I haven't tested this method, but in theory it is working...
Posts: 383
ps, can anybody tell me if the css file can also be altered in a way that will not destroy your changes when uploading a new version of gallery (by simply overwriting the old file ).
Posts: 16504
Yes, you can create a 'local' directory in /themes/<yourtheme>/ and place the css file in there. If you reference images in your css file (like the next, last, previous, first, login images, etc) you can either copy the theme's images directory into that file, change the references in the css file to ../images or create a symlink in that 'local' directory of images -> ../images
Posts: 383
Ow ok, this was one of my wrong assumptions then yet again where I thought the trick probably wouldn't work for css files because their path is included in the html file instead of them being included by the php script.
Something in de back of my mind did tell me I could do that :P
--------
In this case the css should be copied into a directory called local, and change that.
Posts: 174
Thanks RwD I'll give it a try and let you know.
Posts: 174
Exactly what i wanted. Thanks.
I chose white witht the default template because im using spiral notebook frames on just my front page. and they're white. this looks great. Thank you.
Maybe someone can post this as a feature request? Be able to manipulate the CSS per album..
Posts: 383
Hmmz, I am not sure how you envision per album cs manipulation, several ways can be thought of. But they are all very much dependant on the contents like my solution is. It might work on one, but not the other...
Perhaps there is a way to indeed do that, but I think the next best thing would to be able to have first page specific settings. That would be very nice. I would for example want a random image block on the root gallery, but not in the others. Right now I have to program it because right now I don't want to use the solution I gave you of having the template sort it out. (I want a programmatical solution that will work for everyone). I will post something here if it ain't too overly complex to easily explain...
edit
Actually I just thought perhaps it would be possible to define a style sheet that is stored in the database and included when an album loads. This stylesheet simply includes the normal stylesheet or the normal stylesheet is loaded before the custom one in a different fashion; and it is done. Doesn't sound too hard...
Perhaps you should make it a feature request; I would vote for it :P
Posts: 174
I might have already, i made a couple.
RwD, since you were right on the ball with this, let me see if you can take it one more step. I had around 3 other gallery 1 installs on my server, I just did a big upgrade today to g2 for them all using the multisite installation. As I converted mine over to the multisite codebase, I (of course) lost this customization I just had. I could easily reapply it to the codebase, but then every install would have this effect.
Is there a way around this to just apply it to mine?
Edit:
I found 'giAlbumCell{$theme.item.id}' in the tpl file. If I can just add another identifier that is unique to MY gallery, I can modify the stylesheet the same way and do it. Ironically my theme.item.id is 6 and everyone elses so far is 7, so its not effecting anything. But i'd really appreciate a tip on what I can use thats unique to me.
thanks
Posts: 383
Since you have the problem that the change is visible for every gallery on the multisite installation I think there is not a lot you can change easily inside the theme itself and it will have to become a setting you make for your gallery in the database:
You could for example simply copy the matrix theme folder and call it "matrix reloaded" or "matrixtoo" :P
If you change the inc file in the "matrixtoo" folder and change every mention of the word matrix into matrixtoo, you can use the second matrix theme next to the other and only have your gallery use the matrixtoo style. Do remember to undo the changes for the standard matrix style.
Here is an example of what a changed theme'c inc file (The theme is called Example) looks like at the start:
(I am not that much into multi languag, but I think the '$gallery->i18n' names are also identifiers for multilanguages if you set those up...)
(I am also not sure if this is the best way to do it, but it works...)