coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: majay on August 21, 2006, 06:37:37 PM

Title: Intermediate pictures display is different for guests
Post by: majay on August 21, 2006, 06:37:37 PM
Hello,

I've just noticed this slight problem with the display of the imageborder around intermediate pics in my gallery.

In Firefox:
When users are logged in, it looks fine, like this:
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fimg237.imageshack.us%2Fimg237%2F1769%2Fiborderloggedinwz4.jpg&hash=96a7e2abf51a31c853508b137086a5346c98e309) (http://imageshack.us)

But when guests view intermediate pictures, the left and right borders are uneven, like this:
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fimg237.imageshack.us%2Fimg237%2F1923%2Fiboderguestft7.jpg&hash=a4e556cfaf6fe53e8abc6e066dd09bc9914227ab) (http://imageshack.us)

In IE the problem differs slightly for guests, as it's only the bottom border that is too thick. But the border display is normal for logged in users.

This has been happening ever since I added a new custom theme to my gallery. However, the same problem occurs with all of my themes (I used the Classic skin for this example), although I'm sure I didn't edit any files other than those in my new theme folder.

Does anyone have an idea of how to fix this, please?

Thank you.
Title: Re: Intermediate pictures display is different for guests
Post by: Nibbler on August 21, 2006, 08:11:22 PM
Post a link.
Title: Re: Intermediate pictures display is different for guests
Post by: majay on August 21, 2006, 11:29:52 PM
I am sorry, there is currently a MySql connection problem on my server, so there's no way to view the gallery at this time.
What I can do in the meantime is post the code from files that you think might be relevant.
Title: Re: Intermediate pictures display is different for guests
Post by: majay on August 22, 2006, 02:11:14 AM
After deleting my gallery's cookie it seemed the problem had been fixed, but now it's back again. I also optimized my database tables, in case it might have something to do with it.
Title: Re: Intermediate pictures display is different for guests
Post by: Sami on August 22, 2006, 07:47:38 AM
you have extra br tag after image , do you have any plugin or mod installed?

Update:
br tag will show when you are login , it seems that you have installed something like control fullsize plugin
Title: Re: Intermediate pictures display is different for guests
Post by: Gizmo on August 22, 2006, 01:54:25 PM
I found something strange with the nowrap="nowarp" property in your source code. While it should be and cause no issue, in your case it seems to be problematic. As bmossavari asked, do you have any plugins or mods inistalled? What about editing the photos after you uploaded them? In any case, try this and see if it doesn't solve your problem.

If the below code isn't in your theme.php, copy it from the sample=>theme.php and paste it in.

// HTML template for intermediate image display
$template_display_media = <<<EOT
        <tr>
                <td align="center" class="display_media" nowrap="nowrap">
                        <table cellspacing="2px" cellpadding="0px" class="imageborder">
                                <tr>
                                        <td align="center">
                                                {IMAGE}

                                        </td>
                                </tr>
                        </table>
                </td></tr>
                <tr><td>
                                                <table width="100%" cellspacing="2px" cellpadding="0px" class="tableb">
                                <tr>
                                        <td align="center">

                                                {ADMIN_MENU}
                                        </td>
                                </tr>
                        </table>





<!-- BEGIN img_desc -->
                        <table cellpadding="0px" cellspacing="0px" class="tableb" width="100%">
<!-- BEGIN title -->
                                <tr>
                                        <td class="tableb"><center><b>
                                                {TITLE}
                                        </b></center></td>
                                </tr>
<!-- END title -->
<!-- BEGIN caption -->
                                <tr>
                                        <td class="tableb"><center>
                                                {CAPTION}
                                        </center></td>
                                </tr>
<!-- END caption -->
                        </table>
<!-- END img_desc -->
                </td>
        </tr>

EOT;


Remove the nowrap="nowrap" property from this line
                <td align="center" class="display_media" nowrap="nowrap">

to give only
                <td align="center" class="display_media">
Title: Re: Intermediate pictures display is different for guests
Post by: majay on August 22, 2006, 02:43:35 PM
Yes I have control fullsize and onlinstats plugins. But as far as I know control fullsize didn't cause any problem before. At least I had never noticed anything similar to this.

I have applied what you told me Gizmo and it seems to work absolutely fine in Firefox, I've checked many intermediate pictures in both of my themes, logged in and out, and it all seems great! Thanks a lot for your help! In IE though there is still this thicker bottom border for guests. I personally only use Firefox but I know most of the visitors use IE.

I've had a look at the control fullsize files, but I couldn't find any code pertaining to display_image.
Do you reckon the extra br tag bmossavari told me about is causing trouble? If so in what file could I remove it?
Title: Re: Intermediate pictures display is different for guests
Post by: Sami on August 22, 2006, 02:54:38 PM
forget the br tag it should be there ;) it was my mistake ...

@gizmo: you rock :)
Title: Re: Intermediate pictures display is different for guests
Post by: majay on August 22, 2006, 03:51:54 PM
Oh ok then, thank you!

But about this IE border problem, do you think that can be fixed by editing one of my files or is that just due to one of IE's many flaws?
Title: Re: Intermediate pictures display is different for guests
Post by: Sami on August 22, 2006, 05:26:58 PM
:)
this time you need to add br tag to control fullsize plugin ...
I'm working on that ....
Title: Re: Intermediate pictures display is different for guests
Post by: Sami on August 22, 2006, 06:01:04 PM
 :D once again br tag was innocent
here is the problem :
You need to remove title properties of a tag (I mean this <a href=...) that generated by fullsize access plugin , but in this way you will lose the hint (on mouse over hint)
to remove it you should open up plugins/control_fullsize/codebase.php
and change this (line 134)

$cpicdata['html'] = preg_replace('/alt=\".*\"/i','alt="'.$alt_text.'" title="'.$alt_text.'"',$cpicdata['html']);

with this

$cpicdata['html'] = preg_replace('/alt=\".*\"/i','alt="'.$alt_text.'"',$cpicdata['html']);

At the end this is not a template issue any more ::)
Title: Re: Intermediate pictures display is different for guests
Post by: majay on August 23, 2006, 12:36:25 AM
Thank you bmossavari, but it doesn't seem to work in IE. I've deleted the cache, cookies and rebooted my comp but there still is this border problem and the ALT message is there too. In Firefox however, the ALT message is gone.

That thick bottom border problem doesn't matter that much though, people probably haven't even noticed! Anyway thanks again for your help!