User Toggle Images
Written by: Arantor (http://www.simplemachines.org/community/index.php?action=profile;u=53626) (my other mods (http://custom.simplemachines.org/mods/index.php?action=profile;u=53626)) | Current version: 1.3 |
| Updates: Arantor's Developments (http://ara.ixos.org/) |
Suitable for: 1.1.10, 1.1.11, 2.0 RC1.2, 2.0 RC2 | Supported languages: |
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=2099) | Mod support topic (http://www.simplemachines.org/community/index.php?topic=333601.0) | Mod bugtracker (http://ara.ixos.org/index.php?project=15) | Donate (https://www.paypal.com/cgi-bin/webscr&cmd=_s-xclick&hosted_button_id=7164850)
SummaryThis mod allows the user to selectively disable pictures in profiles - for users with slow connections, this enables them to not see all the pictures embedded into the page, but have a link to them instead.
Additionally it allows them to turn off attachment thumbnails.
Both options are visible in Look and Layout Preferences, available from the user profile area.
InstallationPackage Manager should work in most cases. If you need to make any edits, the full list can be obtained from the Parse function on the right.
Useful linksManual Installation Of Mods (http://docs.simplemachines.org/index.php?topic=402)
How Do I Modify Files? (http://www.simplemachines.org/community/index.php?topic=24110.0)
SupportQuestions should be address to the mod support topic (http://www.simplemachines.org/community/index.php?topic=333601.0). Anything that is a bug or feature request can additionally be reported to the mod bugtracker (http://ara.ixos.org/index.php?project=15).
UpdatingPlease remove earlier versions before installing the current version.
Changelog1.3 - 29 December 2009
Added support for 1.1.11.
Also fixed stupid bug in English/English-British where it was applying edits twice.
1.2 - 1 November 2009
Added support for 2.0 RC2.
1.1 - 2 September 2009
Added support for hiding attachment pictures too.
1.0 - 23 August 2009
First release
Files modified by User Toggle ImagesSources/Subs.php
Sources/Display.php
Themes/yourtheme/Settings.template.php
Themes/yourtheme/Profile.template.php
Hi Arantor, nice mod, good idea.
Installed perfectly but it doesn't seem to work for attached pics.
I've flagged the option in my profile and saved but every topic I check that has attached pics still displays them but if they're hosted elsewhere then a link displays.
Am I missing something? Is it supposed to only work for offsite images inside [img] code? 1.1.10 btw.
Are they attached or are they embedded with [img] tags?
Also, is it the default theme?
The attached images still display but externally embedded ones with [img] tags don't.
I use a custom theme (Mesh).
Then it's working precisely as designed. It turns off embedded images with img tags. Since attachments are not embedded with img tags, it won't turn them off.
OK thanks Arantor. I wasn't 100% clear on that, I thought it would disable all images.
My mod description wasn't very clear, true enough.
I've logged it into the bug tracker to add it as an enhancement to also allow users to hide attachment images too.
Quote from: Arantor on August 29, 2009, 10:13:32 PMallow users to hide attachment images too.
That would be awesome dude. It would make the mod a more "complete" bandwidth saver for those still on dialup (poor bastards).
Good addition to users' profiles. Thanks.
Thanks You Arantor Bro
Very nice :)
Thank You
Yes thank you for this!!
I have updated this today to include the ability to optionally hide attachments too.
nice 1, i'll add this to the list of mods for my new forum now attatchments have been added
Excellent to hear, thanks :)
As ever, if any new features are requested, please either post here or on the bugtracker as linked in the first post and I'll see what I can do about it.
Just spotted this and I can see it being handy for some people. Question: does this just hide the images or does it actually disable loading them? I mean is it merely aesthetic or does it actually eliminate download/caching time for linked images?
Merely aesthetic.
What SMF does normally: the resolution of 'loading time' is actually done on post saving; it figures out on save whether it should resize the image but it doesn't actually resize it. It simply encapsulates the original image in an [img width=xyz height=xyz]img url[/img] tag. Meaning that it will load the full picture but the browser will resize it on display.
Without ripping apart the code that SMF uses for this (and effectively forcing it to download and store as an attachment, rather than download just to gather sizes) you can't really get around it much.
Ok, so it wont really benefit anyone on a slower connection then. To really speed up the rendering of pages it would need to stop the image being downloaded and cached to start with.
Yup. That is actually an option in the admin panel, to disable the resizing in the first place.
I'm not talking about resizing. I'm talking about completely blocking images from being downloaded and cached by the user's browser.
This is a problem not just for people on slow connections but also for people who may be accessing sites from work and have to worry about being hit for downloading NSFW images. Even if the image does not display on their screen it is still downloaded by their browser and they could well be subject to disciplinary action if anyone checked up on this.
Oh, then this mod is what you want. It physically prevents the <img> being generated.
Arantor,
This mod is not compatible with 1.1.11 because of the changes it makes in Subs.php. I was unable to install 1.1.11 until I removed it and now I can't re-install it because it no longer find the strings to modify in Subs.php
That's because I haven't had time to update it for 1.1.11 yet. Considering that it's only been out a couple of hours, and I have 20-odd mods to review and retest, I think I've done rather well in updating most of them. I'll fix this one shortly.
I apologize if my post sounded like I was complaining, I assure you it wasn't the case. I posted because it took me a while to figure out which mod was stopping me from installing 1.1.11 and I thought it could help others who have this mod installed.
Ah, yeah - I'm sorry, it's late here and we had a few problems with the initial package.
Unfortunately many many mods are going to be in the same way and I expect to see lots of similar issues as people upgrade (as 1.1.11 is a huge patch)
Quote from: Arantor on December 01, 2009, 09:55:07 PM
I'll fix this one shortly.
Sorry, but how quickly it can be?
Sorry, I have had more important things going on than fixing a mod I'm still trying to give away.
Will be fixed 'soon', sorry can't give a better timeframe than that.
I finally fixed this one for 1.1.11, will upload shortly.
Nice Mod
Here the German Lang
// User Toggle Images MOD
$txt['hide_img_contents'] = 'Keine Bilder in Beiträgen anzeigen, dafür Links.';
$txt['hide_img_attachments'] = 'Keine Vorschaubilder für Dateianhänge in Beiträgen anzeigen, dafür Links.';
Nice Mod
Please update it for SMF 2.0RC3 ;)
Thanks
Hi there !
Yes indeed, RC3 support is also what i wish!