MyBB Community Forums

Full Version: Looking for two plugins...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
1: automatic resizing of images that stretch the width of a post (this one does not work)

2: something that allows users to easily identify the last viewed page of a thread (something along the lines of a subtle highlighting background colour on said page number)
for #1 I am working on a plugin that allows the admin to set max dimensions and max file size for image uploads.

I am having some logic issues and optimization problems due to GD limitations and PNG files though. It is in early beta testing now and i hope i can find some time over the upcoming holidays to work on it some more. it will require the admin change the max attachment size in the default settings as I can't grab the upload prior to that with the current attachment system.
I'm using this one and it works fine: http://mods.mybb.com/view/fit-on-page
The fit on page is a nice mod, but it has a couple of limitations (not the plugins fault)

1) You have to load javascript (http request)
2) It scales the image so it still costs you on bandwidth.

The solution Pavemen is working on resizes the file on upload, so no js required to resize it and as it reduces KB size as well as image size it is better for bandwidth and server space.
Wait hold on a second here. The one I said didn't work...Does it save the file to the server to create a smaller one? If so, I'd rather not do that, seeing as what you are implying is this other plugin does just that. These forums are meant to be small, and bandwidth isn't a major issue.

Ideally, I'd like to just be able to fix things manually with CSS, but I don't know where I would have to go. The CSS for each theme shows a lot of sitewide features use the same classes, so if I change the values associated with the post bodies, I might change everything else as well, and end up with unpredictable results. I could set a second class in addition to the one the post bodies already have, but again, I'd need to know where to do, and perhaps I'd need the CSS attributes as well, in case I overlook something.
The two plugins linked so far use javascript to resize the images on display, neither effect the actual file on the server.

the plugin I am working on actually modifies the file on the server at the time of upload. so a large file is uploaded and then my plugin will resize and/or resample the image to permanently modify the image. The original upload is no longer on the server.

the fit-on-page plugin works well in most cases and is customizable by page you are viewing as the JS parameters are inserted into the page templates and not the header./headerinclude
but is there a purely CSS solution? that would be the best option, to set the maximum width of a file to a certain percentage (well, it would be 100% of the parent div).

i have file uploads disabled due to space limitations. all images that are posted are hosted externally with one of the many image hosting services.
i suppose CSS option will work as long as you modify the templates accordingly to set the item IDs, but its not 100% browser compatible with older ones
(2012-12-20, 04:14 PM)pavemen Wrote: [ -> ]its not 100% browser compatible with older ones
Should look forward and not let old browsers stop us from using all brilliant CSS features.
I allready filter anything that is below 'Mozilla/5.0' and send to page where visitor is kindly prompted to update browser. (especially while there are many modern and FREE browsers to chose from). Additionally in W3C here (or anywhere else) we may see that 90% of people allready use modern browsers and this number growing fast to 100%.

(2012-12-20, 04:14 PM)pavemen Wrote: [ -> ]i suppose CSS option will work as long as you modify the templates accordingly to set the item IDs,
I thought the same. Just wrap post area in div and enforce some CSS rules to images within this div like max-width ect.
(2012-12-20, 04:33 PM)avril Wrote: [ -> ]Should look forward and not let old browsers stop us from using all brilliant CSS features.

until you have to deal with corporate users or older users that dont upgrade
Pages: 1 2