Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Disassociating the navmenu from maintable  (Read 4193 times)

0 Members and 1 Guest are viewing this topic.

owenb

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Disassociating the navmenu from maintable
« on: November 15, 2005, 02:47:28 am »

Hi,

This is possibly quite complex, but I know my way round my Coppermine php files quite well now, so I'm willing to try.

I want to disassociate the 'navmenu' from whichever table it is that puts the dropshadow around it, in the mac_ox_x theme.

I've managed to disconnect it from the background that runs along the bar, but the drop shadow remains, and I want the icons to sit alone on the white background. I've even gone so far as to paint out the shadow from the .gif files to see how it looks with the rest of the site, and I don't REALLY mind there not being a drop shadow in the whole site, but I'd rather put it back and find out how to stop the navmenu from using it.

While I'm at it, I'd like to stop the bar above it - the Home>Album bar - from using it too (as when I comment out the code for that bar, the drop shadow from the table remains, for some reason).

This is pretty much the last thing on my list of tweaking. Can anyone help?

Cheers,
Owen
« Last Edit: November 16, 2005, 11:21:26 pm by GauGau »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Disassociating the navmenu from maintable
« Reply #1 on: November 15, 2005, 07:50:08 am »

edit themes/mac_ox_x/theme.php, find
Code: [Select]
// HTML template for the image navigation barand edit the stuff underneath it. Remove/replace the css class attributes in the html markup
Logged

owenb

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: Disassociating the navmenu from maintable
« Reply #2 on: November 15, 2005, 08:35:47 am »

Cheers for replying so quickly GauGau. I'd already found that section, and had been putting in references to my custom icons thusly:

Code: [Select]
// HTML template for the image navigation bar
$template_img_navbar = <<<EOT

        <tr>
                <td align="center" valign="top" class="navmenu" width="48">
                        <a href="{THUMB_TGT}" title="{THUMB_TITLE}"><img src="images/spacer.gif" width="0" height="0" border="0" alt="" /><img src="images/eject.gif" width="36" height="36" border="0" align="absmiddle" alt="{THUMB_TITLE}" /></a>
                </td>
                <td align="center" valign="top" class="navmenu" width="48">
                        <a href="javascript:;" onClick="blocking('picinfo','yes', 'block'); return false;" title="{PIC_INFO_TITLE}"><img src="images/spacer.gif" width="36" height="0" border="0" alt="" /><img src="images/info.gif" width="36" height="36" border="0" align="absmiddle" alt="{PIC_INFO_TITLE}" /></a>
                </td>
                <td align="center" valign="top" class="navmenu" width="48">
                        <a href="{SLIDESHOW_TGT}" title="{SLIDESHOW_TITLE}"><img src="images/spacer.gif" width="36" height="0" border="0" alt="" /><img src="images/slideshow.gif" width="36" height="36" border="0" align="absmiddle" alt="{SLIDESHOW_TITLE}" /></a>
                </td>
               
                <td align="center" valign="top" class="none" style="background-color: white; border-left: 0px solid #838383;" width="100%" height="36">       
                </td>

                <td align="center" valign="top" class="navmenu" width="48">
                        <a href="{ECARD_TGT}" title="{ECARD_TITLE}"><img src="images/spacer.gif" width="36" height="0" border="0" alt="" /><img src="images/ecard.gif" width="36" height="36" border="0" align="absmiddle" alt="{ECARD_TITLE}" /></a>
                </td>
                <td align="center" valign="top" class="navmenu" width="48">
                        <a href="{PREV_TGT}" class="navmenu_pic" title="{PREV_TITLE}"><img src="images/spacer.gif" width="36" height="0" border="0" alt="" /><img src="images/prev.gif" width="36" height="36" border="0" align="absmiddle" alt="{PREV_TITLE}" /></a>
                </td>
                <td align="center" valign="top" class="navmenu" width="48">
                        <a href="{NEXT_TGT}" class="navmenu_pic" title="{NEXT_TITLE}"><img src="images/spacer.gif" width="36" height="0" border="0" alt="" /><img src="images/next.gif" width="36" height="36" border="0" align="absmiddle" alt="{NEXT_TITLE}" /></a>
                </td>
        </tr>

EOT;

However, I've played around with removing various elements throughout this code, but I'm afraid I don't get which bits you mean when you refer to the css class attributes in the html markup. In order to remove the dropshadow that surrounds tables, do I have to remove something in the above section, or something in the style.css?
Cheers.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Disassociating the navmenu from maintable
« Reply #3 on: November 15, 2005, 10:33:36 am »

the dropshadow is being defined in themes/mac_ox_x/theme.php, find
Code: [Select]
function endtable()and edit the stuff that comes after it to get rid of the dropshadow altogether.
Logged

owenb

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: Disassociating the navmenu from maintable
« Reply #4 on: November 15, 2005, 03:27:18 pm »

Thanks again for your swift reply, GauGau, but I think we are talk at crosspurposes (although it's educational!).

I've had a root around where you pointed me in your last reply, and if I understand correctly, playing with that code would remove the drop shadow elements from all tables that use them, throughout the site - a similar but less time consuming result to my method of 'painting' the shadows out of the gifs in Photoshop.

However, what I want to do is remove ALL table border elements (so the left side, the bottom and the right side) from the navmenu ONLY (and ideally the table above it - the 'breadcrumb' table), so that the table that holds the icons is still there, but the border elements are not.

Is THAT possible somewhere - the ability to tell the navmenu to NOT refer to the border graphics? Or, to tell it to refer to border graphics that I set as plain white?

If this involves a fair bit of code-hacking, I can take it. I'm not good at making code up, but I tend to understand what I'm given, once I've seen how it works. Thanks a lot,

Owen
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Disassociating the navmenu from maintable
« Reply #5 on: November 15, 2005, 11:56:07 pm »

OK, I think I understand what you're trying to accomplish. Edit themes/mac_ox_x/theme.php, find
Code: [Select]
    starttable();
    echo $nav_menu;
    endtable();
and replace with
Code: [Select]
echo '    <table border="0" cellspacing="0" cellpadding="0">';
    echo $nav_menu;
    echo '</table>';
Do the similar thing for the breadcrumb - find
Code: [Select]
    starttable('100%');
    if ($breadcrumb) {
        $template = template_extract_block($template_breadcrumb, 'breadcrumb');
        $params = array('{BREADCRUMB}' => $breadcrumb
            );
        echo template_eval($template, $params);
    }
    endtable();
and replace the starttable and endtable references with your custom code that doesn't contain reference to the dropshadow. If the starttable bit is ok for you, then leave it as is and just replace the endtable section.
HTH.

Joachim
Logged

owenb

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: Disassociating the navmenu from maintable
« Reply #6 on: November 16, 2005, 10:15:06 pm »

GauGau, you, sir, are a genius.

Did the trick. I even added my own cheeky little

Code: [Select]
width="780"
into it so that it wouldn't extend past the edges of the widest photos.

Consider this closed. Cheers!

Owen
Logged
Pages: [1]   Go Up
 

Page created in 0.028 seconds with 21 queries.