1 (edited by gleb 2008-04-15 17:54)

Topic: *SOLVED* Image resize - Problem with small *.gif and *.png in IE 6and7

I have a small but really annoying problem with my forum and within .../viewtopic.php... I'm currently using small "icons", country flags at my forum and there seemes to be some kind of problem with IE 6 and 7 and the size. Works just fine in Firefox and Safari but IE is another story :S

Here how it looks!

http://img134.imageshack.us/img134/9357/flagpt8.jpg

So, as you can see the flag gets out of hand and is way to big. The original size is 12px x 12px but somehow it resize's. Anyone with a clue? I'm lost here sad

Re: *SOLVED* Image resize - Problem with small *.gif and *.png in IE 6and7

If all the flags are the same size then add the following to the img tag.

width="12px" height="12px"

This should fix the problem.

I have a simliar problem. When my page loads and the img is not loaded it creates a weird shape on my site because the image is much smaller than the default IE no image icon. Setting width and height fixed this problem. big_smile

3 (edited by gleb 2008-04-14 18:11)

Re: *SOLVED* Image resize - Problem with small *.gif and *.png in IE 6and7

Hmm...I've tried to use...

[img width="12px" height="12px"]http://www...../img/flags/small/no.gif[/img]

Output: [img width="12px" height="12px"]http://www...../img/flags/small/no.gif[/img]

...but it  doesn't work. Am I getting all this wrong?

Re: *SOLVED* Image resize - Problem with small *.gif and *.png in IE 6and7

My mistake. I thought it was outside a post...

If you change the img tag globally then it will change all images on your site to that size. sad

5

Re: *SOLVED* Image resize - Problem with small *.gif and *.png in IE 6and7

Why are you using country flags within posts? Surely the user details segment would be a better place.

6 (edited by gleb 2008-04-14 18:10)

Re: *SOLVED* Image resize - Problem with small *.gif and *.png in IE 6and7

Aight, to bad not what I'm looking for...

Is this a possible solution?
http://www.punres.org/viewtopic.php?id=3045


MattF wrote:

Why are you using country flags within posts? Surely the user details segment would be a better place.

Okey ...could you guide me?

7

Re: *SOLVED* Image resize - Problem with small *.gif and *.png in IE 6and7

If you look over on Punres, I believe someone released a mod for the country flags. (I seem to remember it had flaws, though. I could be mistaken upon that, however).

8 (edited by gleb 2008-04-14 18:18)

Re: *SOLVED* Image resize - Problem with small *.gif and *.png in IE 6and7

MattF wrote:

If you look over on Punres, I believe someone released a mod for the country flags. (I seem to remember it had flaws, though. I could be mistaken upon that, however).

Aight! I'll check on that! It might work, Thanks alot!

9

Re: *SOLVED* Image resize - Problem with small *.gif and *.png in IE 6and7

CountryFlagMod-1.1 1.0
AMP_BB_Code_ImgSize 1.1

Wasn't what I'm was looking for. I don't want to get a country flag per user I want to be able do describe a person, team or whatever by using a country flag/country image before the name. Let's say I want to describe a match between two teams. I will use:

[img]http://www...../img/flags/small/no.gif[/img] Norway - [img]http://www...../img/flags/small/no.gif[/img] Germany

Output: http://de.static.ggl.com/CB/images/flags/no.gif Norway - http://de.static.ggl.com/CB/images/flags/de.gif Germany

So the problem is that I don't nessacary want to describe a registerd person, it could be anyone or anything.

Would it be possible to edit parser.php or any other file and add a new TAG called [flag] were you could add px limitation to 12px X 12px?

10

Re: *SOLVED* Image resize - Problem with small *.gif and *.png in IE 6and7

That would appear to be a css problem but without a link to your forum its not possible to tell exactly where it is.

11

Re: *SOLVED* Image resize - Problem with small *.gif and *.png in IE 6and7

gleb wrote:

Wasn't what I'm was looking for. I don't want to get a country flag per user I want to be able do describe a person, team or whatever by using a country flag/country image before the name. Let's say I want to describe a match between two teams. I will use:

[snipped...]

Would it be possible to edit parser.php or any other file and add a new TAG called [flag] were you could add px limitation to 12px X 12px?

Ah, apologies. I misinterpreted your requirements. smile Just copy all the img entries in the parser, rename the new entries to flag, (except for the output which obviously needs to be <img), and add the height/width parameters to its output tag.

12

Re: *SOLVED* Image resize - Problem with small *.gif and *.png in IE 6and7

I friend of mine solved it yesterday before I saw your respong MattF big_smile Thanks for your help anyways! Your the man big_smile


Here's how to solve it for anyone who's interested.

parser.php

// Turns an URL from the [flag] tag into an <img> tag or a <a href...> tag//

function handle_flag_tag($url, $is_signature = false)

{
    global $lang_common, $pun_config, $pun_user;

    $img_tag = '<a href="'.$url.'"><'.$lang_common['Image link'].'></a>';

    if ($is_signature && $pun_user['show_img_sig'] != '0')

        $img_tag = '<img class="sigimage" src="'.$url.'" alt="'.htmlspecialchars($url).'" />';

    else if (!$is_signature && $pun_user['show_img'] != '0')

        $img_tag = '<img class="postflag" src="'.$url.'" alt="'.htmlspecialchars($url).'" />';


    return $img_tag;

}

base.css
Add this under section 7.4 These items control overflow and scrolling within posts.

IMG.postflag {width: 12px}