MyBB Community Forums

Full Version: [Release 1.4/1.6] Fit on Page (Update: v2.3 Released)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
Quote:For now look at the js file as thats where I set the class of the text to be shown(line 61), you can change it there. In the next version I'll make the text and the bar customizable from the plugin's settings.

I guess you meant line 25 Toungue Done already,was pretty simple thanks Smile
A suggestion: Maybe change the text 'Image has been scaled down.Click this bar to view original image' when the user has actually clicked it so it prompts something like 'Image on original size. Click this bar to view the scaled down version'

Keep it up Wink
(2009-07-28, 08:15 PM)- G33K - Wrote: [ -> ]
(2009-07-27, 07:15 PM)bositman Wrote: [ -> ]Great plugin,thanks a lot Smile Already using and it works as expected!
One thing: Is there any way I could change the text color in the text 'Image has been scaled down. Click this bar to view original image. Click image to open in new window.'
since I'm using a Dark Theme and gray is barely visible.
Thanks again Smile

For now look at the js file as thats where I set the class of the text to be shown(line 61), you can change it there. In the next version I'll make the text and the bar customizable from the plugin's settings.

(2009-07-28, 08:17 AM)AndrewPH Wrote: [ -> ]how about for some google adsense banner?

I haven't really tried using it with any ad banners, If it doesn't work with your banners, just wait a couple of days for the next version of the plugin. In the next version, I've fixed the banner resizing problem, so you will not have to add any class to the banners, it will resize the images only in the posts area.
I will test it with banner ads both within the posts area and other places on the page to make sure it doesn't resize them.

For those who are interested, for the next version of the plugin, as mentioned above, you will not have to add any class to your headers/banners. I've also extended the functionality of the plugin to resize images in private messages, and the newreply pages. I'm currently trying to work out an efficient way for it to automatically resize the image when an image is posted through quick reply without doing a page refresh.
Unfortunately, I do not have an eta on when I'll be able to release it as other more pressing things have taken precedence right now, but I should be back within a week or so, so hang in there.

cool we'll look forward to that.. Smile nice plugin anyway!
ok got 1 question Smile

If I want everything to be 800x600 pixels like most screen resolutions can you tell me how to do this or this is not for this type of scalling?


my logo is made for 1280 by 1024 pixels will it be shredded down to 800x600 pixels ?
(2009-07-30, 09:22 AM)bositman Wrote: [ -> ]
Quote:For now look at the js file as thats where I set the class of the text to be shown(line 61), you can change it there. In the next version I'll make the text and the bar customizable from the plugin's settings.


I guess you meant line 25 Toungue Done already,was pretty simple thanks Smile
A suggestion: Maybe change the text 'Image has been scaled down.Click this bar to view original image' when the user has actually clicked it so it prompts something like 'Image on original size. Click this bar to view the scaled down version'

Keep it up Wink

Yeah I guess I was looking at my working copy of the script which has pushed that line down.

(2009-08-01, 04:10 PM)technoman Wrote: [ -> ]ok got 1 question Smile

If I want everything to be 800x600 pixels like most screen resolutions can you tell me how to do this or this is not for this type of scalling?


my logo is made for 1280 by 1024 pixels will it be shredded down to 800x600 pixels ?

Not sure what you want to do and if this is the plugin you want.
goood.. goood. good nice mod Smile
Awesome plugin... Thanks ^^
(2009-07-25, 09:16 AM)- G33K - Wrote: [ -> ]
(2009-07-25, 08:27 AM)Milnez Wrote: [ -> ]Nice mod but it resizes my banner too. Anyway I can change this? Dodgy

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.

Don't work for me :l
(2009-08-16, 02:14 AM)alvarorojas4 Wrote: [ -> ]Awesome plugin... Thanks ^^
Don't work for me :l

Pero a mi me funcó Huh

But for me works Huh

I have fully tested, and is an awesome plugin Big Grin
Ok finally I've gotten round to releasing the second version of this plugin.

Couple of things:

- You no longer have to use the no_fop class to prevent banners from being resized. The plugin now works on the post area only. If you have added a no_fop class, you can go ahead and remove it as its no longer needed.

- I have experimented with google adsense banners both in the header area and the post area with wide image image ads and I have not had any problems with the plugin incorrectly resizing when it shouldn't. If you encounter any such problem, I'd like to hear about them as there are loads of different ad providers and I obviously could not test each and every one out there.

- The plugin now adds a imgnoresize MyCode to your MyCode list, this can be used in a case where images need to be posted and not resized, the plugin will skip images posted using the imgnoresize mycode instead of the standard img code. If you do not require this functionality, you will need to disable the "Image No Resize" MyCode from the MyCode list.

- Lastly, images posted through Quick Reply and Quick Edit (AJAX) will still require a page refresh before the plugin will resize them. This however is not the case if the images are already cached in your browser, meaning you have already opened/accessed the images in the browser. If thats the case then it works without a refresh of the page. I tried a couple of work arounds to get it to work regardless of the image being cached but the results either forced a page refresh hence defeating the whole purpose of quick reply/quick edit or in other cases it increased the ajax load times while the script pre-cached the image which imo also defeated the whole reason for "quick" reply. I have hence left it as it is since I don't think its that big a deal, I will look at it again when I have more time to work on it.

---------------------------------------------

/**********************/
/* Fit on Page v2.0 by -G33K - */
/* MyBB v1.4.* Plugin */

Change Log:

Version 2.0
- Fixed issue where images outside the posts area were also being resized. Temporary fix was to add a no_fop class which is no longer required
- Made the top info bar elements customizable from pugin's settings page
- Top info bar has a dynamic message which changes depending on if image is resized or viewed in full resolution
- Extended functionality of the plugin to newreply and private message pages

Version 1.0
- Initial Release


DESCRIPTION:
Scales down or resizes large embeded images so as to avoid the page running over.

FEATURES:
- Customizable from settings page.
- Pretty much every element of the plugin can be customized from the settings.
- Automatically adjusts according to screen size for fluid layouts.
- Fixed width option for fixed layouts
- Scaling is done on client side through javascript hence no extra load on the site's servers
- Works in the showthread, newreply and private message pages
- Resizes only those images in posts and not the headers and other images
- Automatically adds a imgnoresize mycode which can be used to post images that you do not want to be resized

INSTALL:
- Unzip/Unrar, upload inc/plugins/fitonpage.php, jscripts/fitonpage.js and inc/languages/english/fitonpage.lang.php to the respective directories on the server
- Activate the plugin from the Admin Panel, Plugins section
- Setup options from settings page.

UPDATE:
- Deactivate old plugin
- Upload the newer version files, overwriting the older ones (If you're not allowed to overwrite, delete the old files first
- Activate the plugin making sure it shows the new version number
- Setup your options from the settings page

UNINSTALL:
- Deactivate from the plugins page

Plugin validated!
http://mods.mybboard.net/view/fit-on-page

Alternate Download Location:
http://geekplugins.com/
Nice!

Thanks for the Update, this is other Great Plugin release Smile

I cant download it!!! Sad
Thanks, great work!
Downloaded without a glitch

Gene
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37