News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

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.

Advertisement: