How do you have photos, images and pictures scale automatically to fit your phpbb forum's window width?

by Jerry Lincoln

So the first thing you notice when somebody posts a photo on your phpbb forum, is that the photo might be far too large for the viewing window. Can you make your forum scale pictures automatically to fit in the window? Absolutely - heres how:

If you searched for how to do this, you might have seen some people advise you to install a mod. DO NOT INSTALL A MOD! You do not need to risk installing something that doesn't work with your version of phpbb forum software. Instead, follow these easy steps:

1. Log into your phpbb forum with your Admin username.

2. At the bottom, click to go into the Administration Control Panel. You'll re-authenticate yourself, and then you're in.

3. In the Administration Control Panel, go to the POSTING tab. You will then be faced with BBcodes if you have added BBcodes like YouTube video etc., or there might not be any BBcodes added.

4. Look for the ADD NEW BBCODE button, and click it.

You are now presented with a form in which you can type in your Custom BBCodes.

5. Copy and paste the following into the rectangle under "BBcode usage":

6. Copy and paste the following into the rectangle of the "HTML Replacement" section:

7. In the "Help Line" section, paste the following:

Add your image or photo's URL inbetween the [PHOTO] and the [/PHOTO] tags

8. Make sure the "Display on posting page" button is clicked.

9. Click "Submit".

Viola! All done.

Now your forum members can use the PHOTO button which will now appear on the post editor whenever they are making a post, and post their photo url inbetween the PHOTO tags. The photo will display neatly centered and fill 90 % of the post window, no matter what size, screen resolution or zoom setting the user's computer is at.

For smaller photos that won't look good displayed that big, they can still use the IMG button. Make sure you limit the size the image can be by setting a maximum width in the "Post Settings", also under the "Posting" tab.