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: Named anchor taking space it shouldn't  (Read 5165 times)

0 Members and 1 Guest are viewing this topic.

kaptainkory

  • Tester
  • Coppermine regular visitor
  • *
  • Offline Offline
  • Posts: 51
Named anchor taking space it shouldn't
« on: July 28, 2005, 09:08:27 am »

In themes.inc.php,

FIND (Line 635):

Code: [Select]
                <td align="center" valign="middle" class="navmenu" width="48px"><a name="top_display_media"></a>
REPLACE WITH:

Code: [Select]
                <td align="center" valign="middle" class="navmenu" width="48px">
All I've done is remove the named anchor.  For some reason, it is taking up space on the page and shifting the navigation buttons off alignment (tested in Firefox and IE).  I searched the rest of the CPG files and can't find that anything actually uses this named anchor anyway, so why have it?

Thanks.
« Last Edit: August 05, 2005, 06:10:11 am by GauGau »
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: Named anchor taking space it shouldn't
« Reply #1 on: July 30, 2005, 05:42:59 am »

I suspect this is a problem with whatever theme you are using, and I would further suspect that your theme and/or the style.css has issues that are causing this undesired behavior.

The anchor was added for third party themes to use, even though none of the canned themes that come with coppermine use it.

You typically see this anchor used with themes that end up with a really large header (content above the actual gallery), when users are thumbing through displayimage.php either by using the filmstrip or the forward / backward buttons, a theme can be written to use that anchor and keep the top of the page page at the nav menu.

It doesn't seem to aggravate any of the canned themes, I don't see a need to remove it.

If you can point me at your gallery with it enabled and tell me where the problem is, I'll see If I can discover whats causing the spacing issue.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Named anchor taking space it shouldn't
« Reply #2 on: July 30, 2005, 07:08:00 am »

Just to be sure, you could do this:
Code: [Select]
<td align="center" valign="middle" class="navmenu" width="48px"><a name="top_display_media" style="padding:0px;margin:0px"></a>or assign a class to the anchor tag and define the css style in your stylesheet.
Logged

kaptainkory

  • Tester
  • Coppermine regular visitor
  • *
  • Offline Offline
  • Posts: 51
Re: Named anchor taking space it shouldn't
« Reply #3 on: August 02, 2005, 02:05:00 am »

Capture-1.jpg shows a capture with the named anchor as it is.  I know I'm not blind...do you guys see that extra blue space above the folder icon?

Capture-2.jpg shows a capture with the named anchor removed.  I might note that I got the exact same result with the added style as suggested by GauGau.

I'm going to suggest that this style attribute be added to the named anchor in CVS.

Thanks.
Logged

kaptainkory

  • Tester
  • Coppermine regular visitor
  • *
  • Offline Offline
  • Posts: 51
Re: Named anchor taking space it shouldn't
« Reply #4 on: August 02, 2005, 02:15:06 am »

Attachments...
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: Named anchor taking space it shouldn't
« Reply #5 on: August 02, 2005, 04:44:05 am »

Thanks for posting those images. Once I knew what to look for I confirmed that there are 4 pixels taken up on every theme, and it shoves the folder icon down just a bit.

I'm going to agree with kaptainkory's first assessment, it should just come out.

I've searched all the code, css, and html. That anchor isn't referenced by ANYTHING in the default package.

Further to actually make that function work to automatically call that anchor, those templates need to be overridden by the user supplied theme anyway.

I suggest just taking the anchor out, can I get another dev to second it?

fyi you can also get rid of it with style="display:none"
Code: [Select]
<td align="center" valign="middle" class="navmenu" width="48px"><a name="top_display_media" style="display:none"></a>
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Named anchor taking space it shouldn't
« Reply #6 on: August 02, 2005, 08:51:14 am »

All solutions are fine for me:
Code: [Select]
<a name="top_display_media" style="padding:0px;margin:0px"></a>as well as
Code: [Select]
<a name="top_display_media" style="display:none"></a>as well as removing the anchor completely. Go ahead and remove it, please.
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: Named anchor taking space it shouldn't
« Reply #7 on: August 03, 2005, 05:31:44 am »

Removed the anchor and committed.
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 19 queries.