Disassociating the navmenu from maintable Disassociating the navmenu from maintable
 

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

Disassociating the navmenu from maintable

Started by owenb, November 15, 2005, 02:47:28 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

owenb

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

Joachim Müller

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

owenb

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

// 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.

Joachim Müller

the dropshadow is being defined in themes/mac_ox_x/theme.php, findfunction endtable()and edit the stuff that comes after it to get rid of the dropshadow altogether.

owenb

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

Joachim Müller

OK, I think I understand what you're trying to accomplish. Edit themes/mac_ox_x/theme.php, find    starttable();
    echo $nav_menu;
    endtable();
and replace withecho '    <table border="0" cellspacing="0" cellpadding="0">';
    echo $nav_menu;
    echo '</table>';
Do the similar thing for the breadcrumb - find    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

owenb

GauGau, you, sir, are a genius.

Did the trick. I even added my own cheeky little

width="780"

into it so that it wouldn't extend past the edges of the widest photos.

Consider this closed. Cheers!

Owen