User Toggle Images

Started by Robbo_, August 29, 2009, 06:07:09 PM

Previous topic - Next topic

Robbo_

User Toggle Images





Written by: Arantor (my other mods)   Current version: 1.3
Updates: Arantor's Developments
Suitable for: 1.1.10, 1.1.11, 2.0 RC1.2, 2.0 RC2Supported languages:

Link to Mod | Mod support topic | Mod bugtracker | Donate





Summary

This 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.

Installation

Package 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 links
Manual Installation Of Mods
How Do I Modify Files?

Support

Questions should be address to the mod support topic. Anything that is a bug or feature request can additionally be reported to the mod bugtracker.

Updating

Please remove earlier versions before installing the current version.

Changelog

1.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 Images

Sources/Subs.php
Sources/Display.php
Themes/yourtheme/Settings.template.php
Themes/yourtheme/Profile.template.php
Aus-Newerth

Quote from: IRC
Roph> I just finished a double 1/2lb cheese, bacon & salad beef burger
Roph> no woman on earth could satisfy me as much as I am satisfied right now by this burger
... later on ...
Roph> how could ensie go about satisfying me =o
<Ensiferous> Roph: Merely looking at me would yield far more pleasure than a burger can provide.

Blinker

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.

Arantor

Are they attached or are they embedded with [img] tags?

Also, is it the default theme?

Blinker

The attached images still display but externally embedded ones with [img] tags don't.

I use a custom theme (Mesh).


Arantor

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.

Blinker

OK thanks Arantor. I wasn't 100% clear on that, I thought it would disable all images.

Arantor

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.

Blinker

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).

alex30

Good addition to users' profiles. Thanks.

Rohan_

Proud To Be An Indian

Sabre™

Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


bbmtalk


Arantor

I have updated this today to include the ability to optionally hide attachments too.

bullbreedluverz

nice 1, i'll add this to the list of mods for my new forum now attatchments have been added

Arantor

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.

Antechinus

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?

Arantor

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.

Antechinus

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.

Arantor

Yup. That is actually an option in the admin panel, to disable the resizing in the first place.

Antechinus

I'm not talking about resizing. I'm talking about completely blocking images from being downloaded and cached by the user's browser.

Antechinus

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.

Arantor

Oh, then this mod is what you want. It physically prevents the <img> being generated.

Touti

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


Arantor

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.

Touti

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.

Arantor

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)

Shannar

Sorry for terrible English. My native language is C++ Russian.

Arantor

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.

Arantor

I finally fixed this one for 1.1.11, will upload shortly.

Eclipse16V

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.';
I worked with:
SMF 2 in German

Shop:
SID Giessen

Eclipse16V

Nice Mod

Please update it for SMF 2.0RC3  ;)

Thanks
I worked with:
SMF 2 in German

Shop:
SID Giessen

c23_Mike

Hi there !

Yes indeed, RC3 support is also what i wish!
So long, Mike

http://www.c23.at
c23 - DER Computer Club
~ never play alone ~

Advertisement: