EDIT: 08/16/09
This fix is not required for v2.0 of the plugin. I am removing the js file I attached to this post as it is no longer necessary.
--------------------------------------------------
Oh damn! I totally overlooked the fact that some users will have large banners or other images on their pages.
To fix this:
1. Overwrite the jscripts/fitonpage.js with the one I've attached to this post.
2. Add a 'no_fop' class to any large image that you do not want to resize.
For example to prevent your header being resized, go to your header template and look for the img element which holds the logo and add class="no_fop". If you already have a class then add it like this: class="yourexistingclass no_fop"
For example, the default MyBB logo img element in the header template looks like this
After the changes it would look like this:
OR
This should fix it and if you have any problems let me know.
This fix is not required for v2.0 of the plugin. I am removing the js file I attached to this post as it is no longer necessary.
--------------------------------------------------
(2009-07-25, 08:27 AM)Milnez Wrote: Nice mod but it resizes my banner too. Anyway I can change this?
Oh damn! I totally overlooked the fact that some users will have large banners or other images on their pages.
To fix this:
1. Overwrite the jscripts/fitonpage.js with the one I've attached to this post.
2. Add a 'no_fop' class to any large image that you do not want to resize.
For example to prevent your header being resized, go to your header template and look for the img element which holds the logo and add class="no_fop". If you already have a class then add it like this: class="yourexistingclass no_fop"
For example, the default MyBB logo img element in the header template looks like this
<div class="logo"><a href="{$mybb->settings['bburl']}/index.php"><img src="{$theme['logo']}" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" /></a></div>
After the changes it would look like this:
<div class="logo"><a href="{$mybb->settings['bburl']}/index.php"><img src="{$theme['logo']}" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" class="no_fop" /></a></div>
OR
<div class="logo"><a href="{$mybb->settings['bburl']}/index.php"><img src="{$theme['logo']}" alt="{$mybb->settings['bbname']}" title="{$mybb->settings['bbname']}" class="someexistingclass no_fop" /></a></div>
This should fix it and if you have any problems let me know.