Having a VERY hard time understanding how to customize Gallery

Johnworfin
Johnworfin's picture

Joined: 2005-09-15
Posts: 36
Posted: Thu, 2005-09-15 20:16

Hello all,

I'm obviously new to Gallery and I don't claim to be a web dev or CSS expert, but I think I know enuff to get around. The problem is I am having the hardest time understanding what needs to be altered to changes even the simplest things.

For instance, I am trying to get the theme siriux to implement with a current site within a div of about 550 pixels. I cant seem to find the right div or class within the CSS to alter this.

And Smarty? I've never even heard of it and it seems like a foreign language to me.

Is there some resource that can explain customization a bit better?

I am in fear of looking for another gallery script if I can't figure out how to customize this one :(

here is the page im working on:

http://meeks.com/gallery2/v/

If anyone can help I would much appreciate it. I'm getting soooooooo frustrated.

 
Johnworfin
Johnworfin's picture

Joined: 2005-09-15
Posts: 36
Posted: Thu, 2005-09-15 20:51

anyone?

 
RwD
RwD's picture

Joined: 2005-01-09
Posts: 383
Posted: Thu, 2005-09-15 20:55

The width for the siriux theme is for some reason set inside the template (probably to be able to alter it there with code when needed) ./themes/siriux/templates/theme.tpl The part you are looking for is the following:

<style type="text/css">
    .content {ldelim} width: {$theme.params.contentWidth}px; {rdelim}
    {if !empty($theme.params.thumbnailSize)}
        {assign var="thumbCellSize" value=$theme.params.thumbnailSize+30}
        .gallery-thumb {ldelim} width: {$thumbCellSize}px; height: {$thumbCellSize}px; {rdelim}
        .gallery-album {ldelim} height: {$thumbCellSize+30}px; {rdelim}
    {/if}
</style>

Think of smarty as the exact same thing as php only with different names if -> {if} and so on
smarty help here

There are resources that explain this better, but you are going to have to search the forums if the resources you require are not listed on http://codex.gallery2.org (this site has quite a nr of doucments and links to help with g2)

[edit][offtopic][nofi]It is not very polite to kick your topic after 40 minutes if noone answered[/nofi][/offtopic][/edit]

 
Johnworfin
Johnworfin's picture

Joined: 2005-09-15
Posts: 36
Posted: Thu, 2005-09-15 21:00

I apologize if you felt it was impolite of me to kick my topic after 40 minutes...just trying to save time. I've been trying to ffigure this script out all day and i'm a bit frustrated. So maybe I should just look for another one

 
lvthunder

Joined: 2003-09-12
Posts: 808
Posted: Thu, 2005-09-15 21:12

Have you read the stuff on customizing on http://codex.gallery2.org . It's really not that hard once you figure out what is where. Mainly your be editing the /gallery2/themes/siruix/theme.css and the tpl files in the /gallery2/themes/siruix/templates directory.

 
RwD
RwD's picture

Joined: 2005-01-09
Posts: 383
Posted: Thu, 2005-09-15 21:14

Get Firefox and the developer tools, it showed me exactly where the width was set for example. 5 seconds ;)

Kicking a topic that is ion the first page doesn't really help, I myself am actually more interested in topics with 0 replies. But I am not a moderator nor do I have anything to say in these forums, I was just saying ;)

 
Johnworfin
Johnworfin's picture

Joined: 2005-09-15
Posts: 36
Posted: Thu, 2005-09-15 21:17

Ivthunder - Yea I have tried to look through it...I find it hard to find answers with it...I guess im just not used to that type of format for a help index.. I'll have a look again thanx.

RwD - Didnt want to come off like a jerk, I appreciate your help...its just been a frustrating day and i'm still no further :(

 
Johnworfin
Johnworfin's picture

Joined: 2005-09-15
Posts: 36
Posted: Thu, 2005-09-15 21:20

RwD - can you tell me which developer tool you use? I have been using Firefox for a little while, but there are a ton of em.

thx a bunch!

JW

 
Johnworfin
Johnworfin's picture

Joined: 2005-09-15
Posts: 36
Posted: Thu, 2005-09-15 21:22

WOOHOO NM I got it...THANX A TON RwD!!!

 
RwD
RwD's picture

Joined: 2005-01-09
Posts: 383
Posted: Thu, 2005-09-15 21:25

I am using Web Developer 0.9.3. Downloadable from the firefox themes website.

You can be glad they lost the seperated theme-layout idea. It sounded nice, but was hard to build themes/layouts for!

 
Johnworfin
Johnworfin's picture

Joined: 2005-09-15
Posts: 36
Posted: Thu, 2005-09-15 21:30

Another question. About the web developer for FF. According to it, I need to change the inline styles.....what would I save that file as for uploading?

 
RwD
RwD's picture

Joined: 2005-01-09
Posts: 383
Posted: Thu, 2005-09-15 21:35

I do not get the question. But inline styles are styles defined in the element attributes, those should and can be avoided!

 
RwD
RwD's picture

Joined: 2005-01-09
Posts: 383
Posted: Thu, 2005-09-15 21:36

*doublepost, sorry

 
Johnworfin
Johnworfin's picture

Joined: 2005-09-15
Posts: 36
Posted: Thu, 2005-09-15 21:41

well, to change the width to fit my div tag at 550 it is currently sey to 700...which it says is an inline style...so I guess i'm not sure what I need to change to alter that?

 
RwD
RwD's picture

Joined: 2005-01-09
Posts: 383
Posted: Fri, 2005-09-16 06:58

The following code is inside the ./themes/siriux/templates/theme.tpl file

<style type="text/css">
    .content {ldelim} width: {$theme.params.contentWidth}px; {rdelim}
    {if !empty($theme.params.thumbnailSize)}
        {assign var="thumbCellSize" value=$theme.params.thumbnailSize+30}
        .gallery-thumb {ldelim} width: {$thumbCellSize}px; height: {$thumbCellSize}px; {rdelim}
        .gallery-album {ldelim} height: {$thumbCellSize+30}px; {rdelim}
    {/if}
</style>

The .content entry is the one that contains the width of the siriux theme. You would need to replace the {$theme.params.contentWidth} with the desired width. You could also remove this part from the tpl file and move it into the css file. BUT! this variable is a parameter which can be set in the admin panel as well without any coding whatsoever; Go to the admin panel->themes->siriux and edit the parameter called "Width of page content in pixels" which by default is set to 700.

 
Johnworfin
Johnworfin's picture

Joined: 2005-09-15
Posts: 36
Posted: Fri, 2005-09-16 12:51

hmm strange, I tried that and it still gives me a 700 width. No biggie though I find if I just remove that chunk of code, I can get the page to do what I want.

Only other things I'm a little lost on now is how to style some of the admin part. It seems to automatically use the same stylesheets as the theme.tpl. I'm wondering if there is a way to style some of the data fields...they are lapping over onto some of the website.

 
RwD
RwD's picture

Joined: 2005-01-09
Posts: 383
Posted: Fri, 2005-09-16 13:03

Admin part templates are not in the default siriux templates directory. I think that the best way for you is to look inside the html to find out the classnames, ids and if needed the paths to those elements, and add entries to the css for this.

suppose an element you want to have a red border in the html is called:

<div id="styleMeRed">
Some content
</div>

Then you can add an entry in the css like:

#styleMeRed{
  border: 1px solid red;
}

And it is done.

 
Johnworfin
Johnworfin's picture

Joined: 2005-09-15
Posts: 36
Posted: Fri, 2005-09-16 13:05

Thx RwD-

Yea, I got down how to style with CSS, I 'm just having some difficulty finding what I need to alter to affect things since they are kind of hidden. i.e. some of the header tags and what not

 
Johnworfin
Johnworfin's picture

Joined: 2005-09-15
Posts: 36
Posted: Fri, 2005-09-16 13:13

As far as the admin setting the width, got it to work just fine after I place the css in the actuall stylesheet instead of the html.

thx again.....now I just need to figure out more on the admin.

I really appreciate all your help, im having a blast with this great program now!

 
RwD
RwD's picture

Joined: 2005-01-09
Posts: 383
Posted: Fri, 2005-09-16 17:34

:P

I think the siriux theme should be changed a little bit so that width thing won't bother anybody like it did you anymore. For example, the value 0 should represent getting rid of the width setting completely and letting the browser apply the default setting. You didn't have to remove it completely;
adding a local folder and copying the theme.tpl in there would be step 1
step 2 would be to change the template so the style thing looks like this:

<style type="text/css">
    {if ($theme.params.contentWidth > 0)}
    .content {ldelim} width: {$theme.params.contentWidth}px; {rdelim}
    {/if}
    {if !empty($theme.params.thumbnailSize)}
        {assign var="thumbCellSize" value=$theme.params.thumbnailSize+30}
        .gallery-thumb {ldelim} width: {$thumbCellSize}px; height: {$thumbCellSize}px; {rdelim}
        .gallery-album {ldelim} height: {$thumbCellSize+30}px; {rdelim}
    {/if}
</style>

(This is also the change I was proposing in the beginning of this comment ;)

 
RwD
RwD's picture

Joined: 2005-01-09
Posts: 383
Posted: Fri, 2005-09-16 17:34

:P

I think the siriux theme should be changed a little bit so that width thing won't bother anybody like it did you anymore. For example, the value 0 should represent getting rid of the width setting completely and letting the browser apply the default setting. You didn't have to remove it completely;
adding a local folder and copying the theme.tpl in there would be step 1
step 2 would be to change the template so the style thing looks like this:

<style type="text/css">
    {if ($theme.params.contentWidth > 0)}
    .content {ldelim} width: {$theme.params.contentWidth}px; {rdelim}
    {/if}
    {if !empty($theme.params.thumbnailSize)}
        {assign var="thumbCellSize" value=$theme.params.thumbnailSize+30}
        .gallery-thumb {ldelim} width: {$thumbCellSize}px; height: {$thumbCellSize}px; {rdelim}
        .gallery-album {ldelim} height: {$thumbCellSize+30}px; {rdelim}
    {/if}
</style>

(This is also the change I was proposing in the beginning of this comment ;)

 
Johnworfin
Johnworfin's picture

Joined: 2005-09-15
Posts: 36
Posted: Fri, 2005-09-16 17:39

kewlio RwD.

Yea, im way into modifying the sstyle now....still need to figure out how to modify some of the admin part thoughugh

 
RwD
RwD's picture

Joined: 2005-01-09
Posts: 383
Posted: Fri, 2005-09-16 17:48

admin part template in the theme calls another template, I haven't looked at it yet. but I wrote down another method of styling three posts back, that will also work...

 
Johnworfin
Johnworfin's picture

Joined: 2005-09-15
Posts: 36
Posted: Fri, 2005-09-16 17:49

yea, I figured that that would be the best way to go