centered file information in Classic theme centered file information in Classic theme
 

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

centered file information in Classic theme

Started by Tranz, November 16, 2004, 08:37:45 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Tranz

In Internet Explorer and Opera (not in Firefox), the file information would be centered, instead of left aligned, when on the displayimage page using Classic theme. Strangely, the page looks OK in my local copy of the gallery, and I made sure that the file I uploaded was the same by adding test text. Also, I don't have this problem when viewing the same page in other themes. Since I see this problem in one server and not another, I'm wondering if anyone else has seen this. All files were updated with the latest CVS version.

Here is an example:
http://cpg.thu.lunarpages.com/displayimage.php?album=5&pos=11

So, to recap, the local and remote versions look fine in Firefox. The remote versions are centered in IE and opera.

Nibbler

The powered by coppermine footer is in the wrong place, are you sure that is an unmodified CVS version ?

Tranz

I ran a CVS update on everything:

Quote
M .cvsignore
M displayimage.php
M images/vote.jpg
M lang/english.php

Success, CVS operation completed

I edited displayimage.php for the ecard mod. But if that's the problem it would show for every theme.

I uploaded my local files and overwrote the server version.

Casper

I can't see this page in IE.  It works fine in ff, but I get this error in IE;

QuoteTemplate error
Failed to find block 'ecard_button'(#(<!-- BEGIN ecard_button -->)(.*?)(<!-- END ecard_button -->)#s) in :

        <tr>
                <td align="center" valign="middle" class="navmenu" width="48">
                        <a href="{THUMB_TGT}" class="navmenu_pic" title="{THUMB_TITLE}"><img src="images/folder.gif" width="16" height="16" align="absmiddle" border="0" alt="{THUMB_TITLE}" /></a>
                </td>
                <td align="center" valign="middle" class="navmenu" width="48">
                        <a href="javascript:;" onClick="blocking('picinfo','yes', 'block'); return false;" title="{PIC_INFO_TITLE}"><img src="images/info.gif" width="16" height="16" border="0" align="absmiddle" alt="{PIC_INFO_TITLE}" /></a>
                </td>
                <td align="center" valign="middle" class="navmenu" width="48">
                        <a href="{SLIDESHOW_TGT}" title="{SLIDESHOW_TITLE}"><img src="images/slideshow.gif" width="16" height="16" border="0" align="absmiddle" alt="{SLIDESHOW_TITLE}" /></a>
                </td>
                <td align="center" valign="middle" class="navmenu" width="100%">
                        {PIC_POS}
                </td>
                <td align="center" valign="middle" class="navmenu" width="48">
                        <a href="{ECARD_TGT}" title="{ECARD_TITLE}"><img src="images/ecard.gif" width="16" height="16" border="0" align="absmiddle" alt="{ECARD_TITLE}"></a>
                </td>
                <td align="center" valign="middle" class="navmenu" width="48">
                        <a href="{PREV_TGT}" class="navmenu_pic" title="{PREV_TITLE}"><img src="images/prev.gif" width="16" height="16" border="0" align="absmiddle" alt="{PREV_TITLE}" /></a>
                </td>
                <td align="center" valign="middle" class="navmenu" width="48">
                        <a href="{NEXT_TGT}" class="navmenu_pic" title="{NEXT_TITLE}"><img src="images/next.gif" width="16" height="16" border="0" align="absmiddle" alt="{NEXT_TITLE}" /></a>
                </td>
        </tr>

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

Casper

Should have put that on the other thread, sorry.

The centred info is due to my changes to xhtml compliance.  I will fix.  Thanks.
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

Tranz

Sorry, about that, I edited displayimage per Nibbler's suggestion in another thread, but didn't touch Classic theme lest there is another issue with it. Here's a theme that works with displayimage: http://cpg.thu.lunarpages.com/displayimage.php?album=1&pos=1&theme=classic_thu

Casper

Your theme still does not show the footer, although like mine, it is in the source code.
I have fixed the centred text, and will commit shortly.
We are already aware there are 1 or 2 issues with this theme when in displayimage.php

I have also noticed the admin.php is centred in this theme, when viewing in IE.


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

Casper

OK, this is the code I've changed.  Could you please test.

$html .= "        <tr><td colspan=\"2\" class=\"tableh2_compact\"><b>{$lang_picinfo['title']}</b></td></tr>\n";
    $template = "        <tr><td class=\"tableb_compact\" valign=\"top\" >%s:</td><td class=\"tableb_compact\">%s</td></tr>\n";
    foreach ($info as $key => $value) $html .= sprintf($template, $key, $value);


Is changed to this;

$html .= "        <tr><td colspan=\"2\" class=\"tableh2_compact\"><b>{$lang_picinfo['title']}</b></td></tr>\n";
    $template = "        <tr><td align=\"left\" class=\"tableb_compact\" valign=\"top\" >%s:</td><td align=\"left\" class=\"tableb_compact\">%s</td></tr>\n";
    foreach ($info as $key => $value) $html .= sprintf($template, $key, $value);


it still does not show the footer.
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

Tranz

The footer is at the top of the page. :D

I'm trying to figure the report mod so I'll have to try your fix later. Thanks.

Casper

I know what causes this, but don't know how to fix without losing xhtml validity.

The comments function does not have an if/else function that determines if the comments are to be displayed etc.  So if they are turned off in either groups or the album properties, the starttable and endtable are still parsed into html, but they are empty, which causes xhtml failure.

To get validity, I hardcoded the table start and end into the html template, and removed the 'starttable();' and 'endtable();' from the around the 'echo $comments;'.  What I missed was that upset the footer.

So what is needed is to make not just the comments not show if turned off, but also the starttable etc.  Then we can remove the hard coded <table> from the template.

I have got it to show and maintain validity, by placing the comments above the fileinfo, but this is more of a workaround than a proper fix.
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

Tranz

Could you just have the table with &nbsp; so it won't be empty?

Casper

re the centred problem, forget all above, it's a simple error in template.html.

Please try with template.html version 1.10.

.
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

Tranz


Nibbler

File info box is appearing below comments for me and not respoding to the (i) toggle button with classic theme, not sure if it is related though.

Tranz

Here's the reason: http://forum.coppermine-gallery.net/index.php?topic=11816.msg53191#msg53191

The changes I made should not affect the info button. I basically implemented your suggestion and commented out the last 2 lines in the else statement. The info button doesn't work for me in FF or IE either.

Casper

@ Nibbler, No, that's related to my changes to the classic theme, sorry.  I missed the toggle not working.  Working on it.

It seems to me Thu has not committed the ecard menu change yet anyway.

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


Casper

OK, I think I've got it this time.

The file info toggle is working, the comments are back under the info, and it all validates xhtml (providing the language and theme selection is turned off).

Committed to dev.
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


Tranz