double cell borders? double cell borders?
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

double cell borders?

Started by wayfarer, November 12, 2004, 01:18:00 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

wayfarer

I've tried absolutely everything on this one and just can't seem to make any change that affects this.  ??? On my main category table on the Coppermine home page, I have what seems to be extra cell spacing between rows, at the bottom of each row. I have looked at the gallery with the other themes in config, and it always seems to be the same. On mine it makes the line look extra thick because I have a black table background in behind. The screenshot illustrates the problem - both in my theme and in the Mac ox x theme.

I want to close up the thickness so it's the same as the vertical lines in the table. Any clues as to where and what to look for?

sicily18

Yes, I'm wondering how to get the 2 lines for horizontal bars so theres only 1 line. like on the site www.gobritney.com. they have 1 lines between the categories instead of 2.

donnoman

Post a link to your gallery, we can't tell much from the screen shot.

What theme are you using and has it been customized at all?

Joachim Müller

Two table cells next to each other, each with a thin line around them will result in a not-so-thin line (at least two pixels wide). To fine-tune this, you will have to adjust the border attributes of all your table cells.

Joachim

sicily18

is that the same for this (see link )

sorry i dont fully understand you. and ive seen it on other image gallerys.


(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fimg28.exs.cx%2Fimg28%2F8793%2Ftt13.jpg&hash=c65e14c7024ad7b415a46c7bb6d3ac7e8d220929)

instead of these 2 lines, i would like to have one  :)


thanx for helping

donnoman

Specifying style="border-collapse: collapse;" in the table definition may solve the specific problem of two cells butted up with borders specified, but without looking at the underlying html I can't tell you.  

And by specifying the style options in theme.php may cause problems in other tables that you don't desire the effect.

Horizontal space could also be caused by extra table definitions that have empty cells but minimum cell heights. Or by the introduction of the spacer.gif by the original author (or subsequent author) because they preferred the look.

I feel like I'm playin pin the tail on the donkey, and I missed. Post a link to a specific page with the problem. I enjoyed the pics of Britney but got tired of the click noise and ads so I stopped looking around.

Casper

Try changing the css cell padding settings for the tables in your style.css.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

sicily18

Quote from: donnoman on November 19, 2004, 06:21:46 AM
Specifying style="border-collapse: collapse;" in the table definition may solve the specific problem of two cells butted up with borders specified, but without looking at the underlying html I can't tell you. 

And by specifying the style options in theme.php may cause problems in other tables that you don't desire the effect.

Horizontal space could also be caused by extra table definitions that have empty cells but minimum cell heights. Or by the introduction of the spacer.gif by the original author (or subsequent author) because they preferred the look.

I feel like I'm playin pin the tail on the donkey, and I missed. Post a link to a specific page with the problem. I enjoyed the pics of Britney but got tired of the click noise and ads so I stopped looking around.


they changed it back  :-\\  but thanx for your help  :D lemme try this :)

Fking

see the picture
some of the lines between the rows are double
how to fix that?

kegobeer

That's not a problem, it's by design.  The double lines show a separation of what appears to be your categories; single lines divide what appear to be your albums.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

Joachim Müller

edit your stylesheet (themes/yourtheme/style.css) to get rid of the double-lines (which are in fact singleborders around table cells with a margin).

Joachim

Fking

Quote from: GauGau on November 22, 2004, 07:43:46 AM
edit your stylesheet (themes/yourtheme/style.css) to get rid of the double-lines (which are in fact singleborders around table cells with a margin).

Joachim

what have i to edit there?

sicily18

Quote from: donnoman on November 19, 2004, 06:21:46 AM
Specifying style="border-collapse: collapse;" in the table definition may solve the specific problem of two cells butted up with borders specified, but without looking at the underlying html I can't tell you. 

And by specifying the style options in theme.php may cause problems in other tables that you don't desire the effect.

Horizontal space could also be caused by extra table definitions that have empty cells but minimum cell heights. Or by the introduction of the spacer.gif by the original author (or subsequent author) because they preferred the look.

I feel like I'm playin pin the tail on the donkey, and I missed. Post a link to a specific page with the problem. I enjoyed the pics of Britney but got tired of the click noise and ads so I stopped looking around.



o.O i just cant find it :( can someone be alittle bit more specific?  ???

an image of what again:

make these lines into 1 (so closer to each other ) big thanx :D

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fimg129.exs.cx%2Fimg129%2F4838%2Flines1.jpg&hash=040a9c131a0e48ff178170d518c4e7b57c60948d)

donnoman

The space in the middle of those two lines is actually the cell where the albums for that category would normally display.

If you aren't allowing first level albums to be printed then you can just remove that cell from the template to fix the problem.

this is from the rainy_day theme yours may not match exactly but this is the idea

Find:

<!-- BEGIN catrow -->
       <tr>
               <td class="tableb"><table border="0"><tr><td>{CAT_THUMB}</td><td><span class="catlink"><b>{CAT_TITLE}</b></span>{CAT_DESC}</td></tr></table></td>
               <td class="tableb" align="center">{ALB_COUNT}</td>
               <td class="tableb" align="center">{PIC_COUNT}</td>
       </tr>
     <tr>
           <td class="tableb" colspan=3>{CAT_ALBUMS}</td>
     </tr>
<!-- END catrow -->


Remove everything including the containing <tr> and </tr> of the line with {CAT_ALBUMS}


<!-- BEGIN catrow -->
       <tr>
               <td class="tableb"><table border="0"><tr><td>{CAT_THUMB}</td><td><span class="catlink"><b>{CAT_TITLE}</b></span>{CAT_DESC}</td></tr></table></td>
               <td class="tableb" align="center">{ALB_COUNT}</td>
               <td class="tableb" align="center">{PIC_COUNT}</td>
       </tr>
<!-- END catrow -->


BIG NOTE: This removes the ability for you to display the first level ablums in the catlist, period, end of story. You've been warned.  

I don't like this fix, because #1 it overrides an option in the configuration, and #2 if you ever decide you DO want to display first level alb thumnails in the CAT you may not remember that you did this little hack.  But if you don't find a better way to do it, and those lines still annoy you. Here's an option.

Part of the problem with modifying the CSS to fix this is that the table's corresponding CSS is "maintable".

What is making the 1px blank cell in the middle which prevents border-collapse from working, is cellspacing="1" in the function starttable (theme.php).

If you edit either of those things ugly things start to happen with the rest of the site.  You are more than welcome to play with them, just keep a backup  ;D

To do this right I think you would need to create a new table in the cat_list header make it a new css style, add it to the style sheet, close the table in the footer.  That should give you the control you need.


donnoman

OK, here is a much better solution that respects the admins config but still gets rid of the extra cell.

in your theme.php (This work was done on CPG1.32 Rainy Day) Your theme may differ slightly.

find:

<!-- BEGIN catrow -->
       <tr>
               <td class="tableb"><table border="0"><tr><td>{CAT_THUMB}</td><td><span class="catlink"><b>{CAT_TITLE}</b></span>{CAT_DESC}</td></tr></table></td>
               <td class="tableb" align="center">{ALB_COUNT}</td>
               <td class="tableb" align="center">{PIC_COUNT}</td>
       </tr>
     <tr>
           <td class="tableb" colspan=3>{CAT_ALBUMS}</td>
     </tr>
<!-- END catrow -->


Change to:

<!-- BEGIN catrow -->
       <tr>
               <td class="tableb"><table border="0"><tr><td>{CAT_THUMB}</td><td><span class="catlink"><b>{CAT_TITLE}</b></span>{CAT_DESC}</td></tr></table></td>
               <td class="tableb" align="center">{ALB_COUNT}</td>
               <td class="tableb" align="center">{PIC_COUNT}</td>
       </tr>
      {CAT_ALBUMS}
<!-- END catrow -->


Find:

function theme_display_cat_list($breadcrumb, &$cat_data, $statistics)
{
   global $template_cat_list, $lang_cat_list;

Change to:

function theme_display_cat_list($breadcrumb, &$cat_data, $statistics)
{
   global $template_cat_list, $lang_cat_list;
   
   $non_empty_cat_albums=<<<EOT
      <tr >
           <td colspan=3>{CAT_ALBUMS}</td>
     </tr>
EOT;


In the same function find:

   $template = template_extract_block($template_cat_list, 'catrow');
   foreach($cat_data as $category) {

Change to:

   $template = template_extract_block($template_cat_list, 'catrow');
   
   $params = array('{CAT_ALBUMS}' => $non_empty_cat_albums);
   $template_non_empty_cat_albums = template_eval($template,$params);
   
   foreach($cat_data as $category) {


In the same function find:

       } else {
           $params = array('{CAT_TITLE}' => $category[0],
               '{CAT_THUMB}' => $category['cat_thumb'],
               '{CAT_DESC}' => $category[1],
               '{CAT_ALBUMS}' => $category['cat_albums'],
               '{ALB_COUNT}' => $category[2],
               '{PIC_COUNT}' => $category[3],
               );
           echo template_eval($template, $params);
       }



change to:


       } else {
           $params = array('{CAT_TITLE}' => $category[0],
               '{CAT_THUMB}' => $category['cat_thumb'],
               '{CAT_DESC}' => $category[1],
               '{CAT_ALBUMS}' => $category['cat_albums'],
               '{ALB_COUNT}' => $category[2],
               '{PIC_COUNT}' => $category[3],
               );
           if ($category['cat_albums']) {
              echo template_eval($template_non_empty_cat_albums,$params);
           } else {
           echo template_eval($template, $params);
           }
       }




Hope that helps.

Devs, I've seen folks asking to get rid of those extra lines a few times, perhaps this can be thrown in the feature requests and maybe a "Dev Approved" version can be implemented for at least the base themes in the next release.

donnoman


Casper

Nice hack.

But I think this is all a matter of taste.  I prefer the double lines between the cats. IMHO, if we changed the themes to do this, we would no doubt get complaints and requests to put it back.

We can always point anyone who asks to get rid of the spaces to this thread.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

sicily18

thanx! im gonna try it out after i made a back up :D

sicily18

ok the second one didnt work ( my fault lol) but i used the first, since i know for sure that were not gonna use first level show of albums thanx so muchos  :-* :D

donnoman

#19
True enough Casper, The double lines never bothered me, and we can't please everybody all of the time.

If the author of a theme wants to get rid of it, they can reference this thread.