Display images in a grid of mutlitple columns.

Looking for a MOD? Have a MOD request? Post here for help. (Note: This forum is community supported; phpBB does not have official MOD authors)
Ideas Centre
Locked
soniceyepod
Registered User
Posts: 3
Joined: Mon Oct 01, 2007 5:24 am

Display images in a grid of mutlitple columns.

Post by soniceyepod »

I would like posted images to be displayed in multiple columns. I allow 20 images per post so I would like the thumbnails to display in 4 rows of 5 pics each. I do not really like all the images to be in one column at the left. I also don't need comments or other info displayed with the images.

I have looked through the code and have found that the attachments are parsed and put into an array called postrow. Then for each attachment in the array a new <td> is created for odd and even attachement ids. I think that if I could have a way to directly get each attachment from the array one by one I could display them how I want. However this kind of programming is as of now beyond me.

I have researched for a long time to find out how the conditional statements in the template html pages work.

Statements like:

Code: Select all

<!-- IF postrow.S_HAS_ATTACHMENTS --> <!-- ENDIF -->
how does this syntax work? Is it parsed on the server? And if so is it php? I don't see any php tags.

I also am curious how variables like:

Code: Select all

{postrow.attachment.DISPLAY_ATTACHMENT}
work.

I can see that this statement is replaced by the value that it represents, but how is this variable stored?
Also how does the server or client know to run the code for each row?

If I could get information on where I can learn about these methods I might be able to write the mod I need myself. But even all the php tutorials and programming I have done has never had this kind of conditional statements and variables inside the html pages.

Any tips on how to go about learning this would be appreciated.

Edit: I did a little more research and realized that there is a template engine in use by phpbb. I had never heard about such a thing until I googled php and template. So I now have a new area to learn about.

Also I would like to know if any mods are in the works that would do what I am looking to do with the image displays.

Thank you.
Locked

Return to “[3.0.x] MOD Requests”