Re: PunBB 1.2.1

Paul wrote:

4. Scroll whole postmsg div which is not pretty but has no negative effects and is easy.

sounds good to me wink

Re: PunBB 1.2.1

I'm only going to say this once more. Using server-side image manipulation in the form of either GD or ImageMagick is NOT an option. The reasons are many.

1. It requires the server to actually be setup with these tools. A lot aren't.
2. It will increase load on the server. In direct conflict with what PunBB strives towards.
3. Depending on when the image scaling would be done, that postback would take forever if the server hosting the image was slow.
4. It's an ugly, "hacky" solution.
5. Executing external executables in IIS (e.g. ImageMagick) is a pain if you don't want to allow the IIS user execute rights to cmd.exe (which you DON'T want).
6. Lots of things I can't think of now.
7. More bad stuff.

Since some of you apparently think the image scaling in 1.2.1 is the d3vil, I guess we'll have to consider other options. Scrolling the post div is the suggestion I'm liking the most so far. Personally, I like the scaling. I mean, if someone is stupid enough to post an image that is too big, what harm is there in scaling it down so that it doesn't destroy the page layout? If you want to view it fullsize, just right click it and select "View image". Oh well.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: PunBB 1.2.1

i'm sorry if this has been covered, but can it be coded to only allow images no bigger than say 800px(maybe an admin option here) wide and if it goes past that to link them automaticly?

~James
FluxBB - Less is more

Re: PunBB 1.2.1

how can it detect (reliably) if they are 800px wide?

Re: PunBB 1.2.1

Connorhd wrote:

how can it detect (reliably) if they are 800px wide?

Avatar code seems to pick the size pretty good.

Maybe upload it, but if bigger than setting, display link instead??

Every Day Above Ground Is A Good One!!

Re: PunBB 1.2.1

that would have to download every image you post (with big images) which i guess is risky and slow

57

Re: PunBB 1.2.1

Dr.Jeckyl wrote:

i'm sorry if this has been covered, but can it be coded to only allow images no bigger than say 800px(maybe an admin option here) wide and if it goes past that to link them automaticly?

We tried it. It doesn't work because if the server the pictures are located on is slow or, even worse, unresponsive, then it causes PunBB to freeze. The reason it works fine for avatars is that they are stored locally.

If anybody wants fancy server side processing of images then somebody is going to have to write a nice gallery mod which includes image upload capabilities.

58

Re: PunBB 1.2.1

Hum ...
But you realize (and are OK) a "scaling image" is not good ... so ... could it be possible to choose in admin WHICH method we want to use ? For me Scaling image is not the best choice. And it's possible to detect a code

[url=blabla][img]img.jpg[/img][/url]

and a JS alert says "no no guy, you can't do this"

For me my actual site
http://www.fantasya.net/forum ... people post ART pics ... and SCALING image is not the good choice to see "good" the pic.

59

Re: PunBB 1.2.1

I think if the board's admin allows images, then the board's admin should be aware of the pros and cons.

If it were up to me, the [ img ] tag would just create an <img> tag, and if the layout breaks on a thread where people post desktop pics, so be it.  It's not like it makes the page less usable, it just makes that person's post ugly.

Offering up php, javascript, and css solutions is fine, but I think its extra credit.   I'd leave the image issue to those who use images.  I've seen images used on many, many message boards, and having large images stretch the page is a pain, but having a single image overflow from the layout doesn't bother me a bit, I can skip past it.

Perhaps not as elegant as you were looking for, but it's definitely less bloat.

Re: PunBB 1.2.1

Rod wrote:

Hum ...
But you realize (and are OK) a "scaling image" is not good

Yes, I realize that you don't like the scaling. I just wanted to make it very clear that any kind of server-side image processing isn't going to happen when we're talking about images posted via the [img] tag.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

61 (edited by roo 2005-02-05 16:03)

Re: PunBB 1.2.1

I haven't seen minmax.js, but another javascript alternative that will work would be this:

//shrink any in images div#punviewtopic greater than 500px to be 90% wide
function handleImages() {
    if(!document.getElementById('punviewtopic')) return;
    var pics = document.getElementById('punviewtopic').getElementsByTagName('img');
        for (var i = 0; i < pics.length; i++) {
            if(pics[i].width > 500) {
                pics[i].style.width = "90%";    
                }
        }
    }

It just checks for div#punviewtopic, and if it's there, it shrinks all images within it to 90% wide of its parent element.  It only shrinks images that are more than 500px wide so smilies and avatars will not be affected.  Only images larger than 500px will be scaled.
Run the script when the page loads, and it'll do the magic.  It's a pretty simple, W3C DOM comliant solution. Although, again, it may not be as sophisticated as you're looking for.

edit:  and if the [ img ] tag just slapped in an <img> tag instead of wrapping it up in divs, you could change that if statement above to read:

if(pics[i].style.width > pics[i].parentNode.style.width) and it would be even smarter than just specifiying a pixel width.

62

Re: PunBB 1.2.1

roo: the problem isn't big images breaking the boards layout. If the board is on a page on it's own thats not really a problem. The problem is when the board is integrated into an existing layout e.g. it is the middle column of a three column layout. Then it would blow the whole site apart.

The point about minmax is it only effects IE. The image scaling for Gecko and Opera is achieved with just IMG.postimg {max-width: 100%), nothing else is needed.

63

Re: PunBB 1.2.1

Paul wrote:

roo: the problem isn't big images breaking the boards layout. If the board is on a page on it's own thats not really a problem. The problem is when the board is integrated into an existing layout e.g. it is the middle column of a three column layout. Then it would blow the whole site apart.

ah, I see.  You guys are far more thoughtful than I'd be.  That never would have occurred to me.  yikes

Re: PunBB 1.2.1

Why not forbide to display image above a size, fixed in the admin panel ? Test the size of the image, and d'ont display it if it's more than x pixels (or better, hyperlink it).

Re: PunBB 1.2.1

you can't test the size of the image

66 (edited by roo 2005-02-06 15:28)

Re: PunBB 1.2.1

Connorhd wrote:

you can't test the size of the image

Sure you can!  (well, you can check it with javascript)  Check out the javascript I posted above.

That script, btw, could just as easily be adapted to display a hyperlink instead of the image based solely on the width of the image.

67

Re: PunBB 1.2.1

That seems like a step backwards. At the moment images are only scaled if they exceed the available width. If you were viewing at a high resolution it is quite possible you would get to see images of 1000px width without scaling. It also uses javascript to provide the functionality. The current system only uses one line of css on all browsers except IE. Providing a link doesn't improve things since you can always view the full size image in a seperate window anyway.

On a more general point, if people want to display a lot of images at the best possible quality you have got to wonder whether doing it with a bbs system is really their best option.

68

Re: PunBB 1.2.1

Connorhd wrote:

Maybe we should stop the PM war before it starts, it happened when 1.2 was released no point in doing it again

I agree.  We already beat this one to death a few weeks ago.  If people need to debate the pros and cons of Private Messaging, it would make more sense to start a separate topic for it (imho).

How stable is 1.2.1?  It sounds like there were one or two things that needed fixing.  Does it all look good now?

69 (edited by D9r 2005-02-06 17:09)

Re: PunBB 1.2.1

What about using the overflow property?  If you apply it to the image's containing block, would that work?  Then people can choose whatever they want via the stylesheet:

.visible {overflow: visible;}
.hidden {overflow: hidden;}
.scroll {overflow: scroll;}

70

Re: PunBB 1.2.1

D9r. Yes but what is the images containing block? The only element you can apply overflow:auto to without causing any problems in DIV.postmsg which I gave as one of the options many posts ago.

In any case, people can already do this with their stylesheets if they want to. Just remove IMG.postimg {max-width: 100%} and add DIV.postmsg {OVERFLOW: auto}

P.S. Does anybody have a good mod for shifting individual posts to a different thread. I think this thread badly needs it.

Re: PunBB 1.2.1

Iam srry to interrupt lol

In a wink of an eye 1.2.1 is released. Great work!

Just wanna say good luck to the the mods coding a few very popular mods for 1.2.x
Iam anxiously awaiting them wink

Cheers

72 (edited by bubach 2005-02-10 17:44)

Re: PunBB 1.2.1

I have a question.
I wonder why the [code ]-tag gets unnecessary spacing at the bottom. The quote-tag does not seem to have this extra space..
I "solved" it by adding

-(3)

to the code that decides em.
But I wonder if it had any purpose?

[edit] that -(3) "solution" wasen't very good either... wink

/ Christoffer

73

Re: PunBB 1.2.1

Hey, I have a quick question about bug fixes and releases.

When you fix something, as in it's listed in the dev tracker (dev.punbb.org), is the current version of the script reuploaded with the fix, as in the zip file?

I'm wondering this, because if it's not, does that mean I need to check the dev tracker for all fixes after the release date of the newest version?

74

Re: PunBB 1.2.1

From what I've seen, the original 1.2.1 zip has stayed the same.

All subsequent bugfixes would go to a new version, I would presume.

75

Re: PunBB 1.2.1

bubach wrote:

I have a question.
I wonder why the [code ]-tag gets unnecessary spacing at the bottom. The quote-tag does not seem to have this extra space..
I "solved" it by adding

-(3)

to the code that decides em.
But I wonder if it had any purpose?

[edit] that -(3) "solution" wasen't very good either... wink

/ Christoffer

If anybody is still interested. The reason is that the different browsers, particularly IE, require a bit of breathing room otherwise they generate a vertical scrollbar when it is not really required. The combination used is the one that produced the best cross browser results.