How to make a mac_ox_x logo in the header, not the body? How to make a mac_ox_x logo in the header, not the body?
 

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

How to make a mac_ox_x logo in the header, not the body?

Started by owenb, November 11, 2005, 03:27:50 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

owenb

Hi,

I have been hacking together my own version of the mac_ox_x theme, and have so far not had to ask anyone for help, but there are now two issues I just can't resolve myself. This is the REALLY problematic one, though, and I really have looked through dozens of similar requests for help but cannot work out how to implement the code I have.

I have got rid of the 'name' of my gallery, and the graphics that appear directly above the 'tabs' in the theme, as I want to replace them all with a logo that I have made. However, getting this logo to sit in the header, and CENTRALLY, is causing me a headache.

As my site is limited to my localhost at the moment till I get it hosted, I have posted the current code from the template.html below.

This is the line that is causing me problems:

<tr>
                <td align="center"><a href="http://localhost/~owen/coppermine/index.php"><img src="themes/mac_ox_x/images/topbar.gif" alt="" border="0" /></a>
        </tr>


I thought this had worked till I realised that the admin mouse-over menu from one of the tabs was appearing up near the top of the screen, over the logo. This alerted me that putting the logo in the body as opposed to the header wasn't going to work after all, but whenever I put the code into the header (well, above the <body> code anyways) I can't make the td align="center" do anything - the logo sits flush left all the time.

Anyway, here's the (wrong) code that I have. What am I doing wrong? Thanks!

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="{LANG_DIR}">
<head>
<title>{TITLE}</title>
<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
<meta http-equiv="Pragma" content="no-cache" />
{META}
<link rel="stylesheet" href="themes/mac_ox_x/style.css" />
<script type="text/javascript" src="scripts.js"></script>
<!--
  Coppermine version: 1.3.5
  $Source: /cvsroot/coppermine/stable/themes/mac_ox_x/template.html,v $
  $Revision: 1.7 $
  $Author: gaugau $
  $Date: 2005/09/24 16:32:10 $
-->
</head>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
//-->
</script>

                               




<body>




<div id="Menu1" style="position:absolute; width:800px; height:30px; z-index:1; left: 25px; top: 95px; visibility: hidden;">
                <span class="topmenu">
                        <table border="0" cellpadding="0" cellspacing="0">
                       
                       
                       
                        <tr>
                           
                             
                                        {MAIN_MENU1}
                                        </td>
                        </tr>
                        </table>
                </span>
</div>
<table border="0" cellpadding="0" cellspacing="0" width="100%" class="top_panel">
  <tr>
    <td><table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
          <td align="center" class="top_panel_tr">
           
           
         
        </tr>
      </table></td>
  </tr>
  <tr>
    <td><table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
                <td align="center"><a href="http://localhost/~owen/coppermine/index.php"><img src="themes/mac_ox_x/images/topbar.gif" alt="" border="0" /></a>
        </tr>
          <tr>
          <td align="center" background="themes/mac_ox_x/images/top_panel_r2_c1b.gif">
                        <table border="0" cellpadding="0" cellspacing="0" border="0" class="top_menu_bttn">
                                <tr>
                                   {MAIN_MENU2}
                                </tr>
                        </table>
          </td>
         <!-- <td width="100%" background="themes/mac_ox_x/images/top_panel_r2_c1b.gif">&nbsp;</td> -->
        </tr>
      </table></td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="15">
  <tr>
    <td align="center">{ADMIN_MENU} {GALLERY}<br><a href="http://laughingsquid.com/"><img src="http://laughingsquid.net/images/powered_white.gif" width="150"height="50" style="border:0" alt="Powered by Laughing Squid" /></a> </td>
  </tr>
</table>
{THEME_SELECT_LIST}{LANGUAGE_SELECT_LIST}{LANGUAGE_SELECT_FLAGS}
<p>&nbsp;</p>
</body>
</html>

Joachim Müller

edit the vertical menu offset in the line<div id="Menu1" style="position:absolute; width:800px; height:30px; z-index:1; left: 25px; top: 95px; visibility: hidden;">

owenb

Aha! Brilliant, thank you, GauGau.

I've done that now, but am wondering if I've gone about getting what I want the wrong way in the first place? I've read so many topics that say logos etc should go in the custom header that I feel dirty for not having been able to get that to work.

Are there no repercussions for having put my logo in the body hacked the Hidden Menu position around? Or is it a perfectly feasible alternative way to get what I want?

Cheers,
Owen

Joachim Müller

regular logo images should go into template.html just as you did. Only dynamic stuff (banner rotation) is suppossed to go into a custom header. In other words: you did this OK, it's the best option for 99% of all users who just want to edit the looks of their theme.