Latest topics
» Forumactif Edge - Releases
by Ange Tuteur Tue 03 Sep 2019, 11:49
» GIFActif - Giphy Button for the Editor
by Ange Tuteur Wed 08 May 2019, 17:21
» Forum Closure
by Ange Tuteur Mon 01 Jan 2018, 01:28
» Chit Chat Thread
by Valoish Sun 31 Dec 2017, 19:15
» Font/Text background color.
by Valoish Sun 31 Dec 2017, 19:11
» Forumactif Messenger - Instant Message Application for Forumotion
by Wolfuryo Sun 31 Dec 2017, 18:24
» [GAME] Count to One Million!
by brandon_g Fri 29 Dec 2017, 18:58
» Post Cards
by manikbiradar Wed 20 Dec 2017, 07:50
» [GAME] Countdown from 200,000
by Valoish Wed 13 Dec 2017, 23:22
» GeekPolice Tech Support Forums - GeekPolice.net
by Dr Jay Mon 11 Dec 2017, 19:12
» Asking about some plugin for Forumotion
by Dr Jay Mon 11 Dec 2017, 19:10
» [GAME] What are you thinking right now?
by Van-Helsing Sat 09 Dec 2017, 14:51
» Widget : Similar topics
by ranbac Wed 06 Dec 2017, 18:11
» Change the Background of the Forum and put an image and how to make prefixs?
by Clement Wed 06 Dec 2017, 15:19
» Hello from Western Australia
by SarkZKalie Wed 06 Dec 2017, 05:34
by Ange Tuteur Tue 03 Sep 2019, 11:49
» GIFActif - Giphy Button for the Editor
by Ange Tuteur Wed 08 May 2019, 17:21
» Forum Closure
by Ange Tuteur Mon 01 Jan 2018, 01:28
» Chit Chat Thread
by Valoish Sun 31 Dec 2017, 19:15
» Font/Text background color.
by Valoish Sun 31 Dec 2017, 19:11
» Forumactif Messenger - Instant Message Application for Forumotion
by Wolfuryo Sun 31 Dec 2017, 18:24
» [GAME] Count to One Million!
by brandon_g Fri 29 Dec 2017, 18:58
» Post Cards
by manikbiradar Wed 20 Dec 2017, 07:50
» [GAME] Countdown from 200,000
by Valoish Wed 13 Dec 2017, 23:22
» GeekPolice Tech Support Forums - GeekPolice.net
by Dr Jay Mon 11 Dec 2017, 19:12
» Asking about some plugin for Forumotion
by Dr Jay Mon 11 Dec 2017, 19:10
» [GAME] What are you thinking right now?
by Van-Helsing Sat 09 Dec 2017, 14:51
» Widget : Similar topics
by ranbac Wed 06 Dec 2017, 18:11
» Change the Background of the Forum and put an image and how to make prefixs?
by Clement Wed 06 Dec 2017, 15:19
» Hello from Western Australia
by SarkZKalie Wed 06 Dec 2017, 05:34
Recent Tutorials
Top posting users this month
Top Achievers
Who is online?
In total there are 19 users online :: 0 Registered, 0 Hidden and 19 Guests :: 2 Bots
None
Most users ever online was 515 on Tue 14 Sep 2021, 15:24
None
Most users ever online was 515 on Tue 14 Sep 2021, 15:24
option download with image resizer
Page 1 of 1 • Share
hello
the option of image resizer to download image don't work with IE and firefox but work fine with edge and opéra
in opéra/edge
in Firefox/IE
thank for help
the option of image resizer to download image don't work with IE and firefox but work fine with edge and opéra
in opéra/edge
in Firefox/IE
thank for help
Last edited by jlmic on Wed 09 Aug 2017, 02:25; edited 1 time in total
- Wolfuryo
- Gender :
Posts : 256
Points : 3808
Reputation : 81
Language : Romanian and English
Browser : Forum Version :
Hi,
What code are you using? Are you using an old version of firefox? About IE, well, it wouldn't be IE if things work on it.
What code are you using? Are you using an old version of firefox? About IE, well, it wouldn't be IE if things work on it.
hello
i use the code "image resizer" in [FA EDGE] ALL.JS by @Ange Tuteur
the code is
and i just change this (ligne 13)
to this
version firefox 54.0.1 (the last one)
and all my members who use firefox or IE have the same problem
i use the code "image resizer" in [FA EDGE] ALL.JS by @Ange Tuteur
the code is
- Code:
/* -- 06. image resizer -- */
(function() {
window.fa_img_resizer = {
max_width : 720, // maximum image width (400px)
max_height : 480, // maximum image height (250px)
selector : '.postbody .content img, .mod_news img, .message-text img', // where images should be resized
options : {
bar : true, // resized image options bar
toggler : true, // Enlarge / Reduce Image
full_size : true, // Voir en grand
download : false, // Télécharger l\'image link
lightbox : true // lightbox effect
},
// texts
lang : {
full_size : '<i class="fa fa-external-link"></i> Voir en grand',
enlarge : '<i class="fa fa-search-plus"></i> Agrandir l\'image',
reduce : '<i class="fa fa-search-minus"></i> Réduire l\'image',
download : '<i class="fa fa-download"></i> Télécharger l\'image',
tooltip : 'Cliquez pour voir en entier'
},
// resize all images inside the "resizeIn" elements
resize : function() {
for (var a = $(fa_img_resizer.selector), i = 0, j = a.length; i < j; i++) {
if (!a[i].alt && (a[i].naturalWidth > fa_img_resizer.max_width || a[i].naturalHeight > fa_img_resizer.max_height)) {
a[i].className += ' fa_img_reduced';
// make the image a "link" if it's not wrapper with one
if (fa_img_resizer.options.lightbox && a[i].parentNode.tagName != 'A') {
a[i].style.cursor = 'pointer';
a[i].title = fa_img_resizer.lang.tooltip;
a[i].onclick = function() {
fa_img_resizer.lightbox(this);
};
}
// create the resize bar
if (fa_img_resizer.options.bar) {
(a[i].parentNode.tagName == 'A' ? a[i].parentNode : a[i]).insertAdjacentHTML('beforebegin',
'<div class="fa_img_resizer" style="width:' + (a[i].width - 8) + 'px;">'+
(fa_img_resizer.options.toggler ? '<a class="fa_img_enlarge" href="#" onclick="fa_img_resizer.toggle(this); return false;">' + fa_img_resizer.lang.enlarge + '</a>' : '')+
(fa_img_resizer.options.full_size ? '<a class="fa_img_full" href="/viewimage.forum?u=' + a[i].src + '" target="_blank">' + fa_img_resizer.lang.full_size + '</a>' : '')+
(fa_img_resizer.options.download && !/Firefox/.test(navigator.userAgent) && 'download' in document.createElement('A') ? '<a class="fa_img_download" href="' + a[i].src + '" target="_blank" download>' + fa_img_resizer.lang.download + '</a>' : '' )+
'</div>'
);
}
}
}
},
// toggle between enlarged and reduced image sizes
toggle : function(that) {
var img = that.parentNode.nextSibling;
if (img.tagName == 'A') {
img = img.getElementsByTagName('IMG')[0];
}
if (/fa_img_reduced/.test(img.className)) {
that.innerHTML = fa_img_resizer.lang.reduce;
that.className = 'fa_img_reduce';
img.className = img.className.replace(/fa_img_reduced/, 'fa_img_enlarged');
} else {
that.innerHTML = fa_img_resizer.lang.enlarge;
that.className = 'fa_img_enlarge';
img.className = img.className.replace(/fa_img_enlarged/, 'fa_img_reduced');
}
that.parentNode.style.width = img.width - 8 + 'px';
},
// lightbox effect
lightbox : function(that) {
var frag = document.createDocumentFragment(),
overlay = $('<div id="fa_img_lb_overlay" />')[0],
img = $('<img id="fa_img_lb_image" src="' + that.src + '" />')[0];
overlay.onclick = fa_img_resizer.kill_lightbox;
img.onclick = fa_img_resizer.kill_lightbox;
frag.appendChild(overlay);
frag.appendChild(img);
document.body.appendChild(frag);
document.body.style.overflow = 'hidden';
img.style.marginTop = '-' + (img.height / 2) + 'px';
img.style.marginLeft = '-' + (img.width / 2) + 'px';
},
// kill the lightbox
kill_lightbox : function() {
var overlay = document.getElementById('fa_img_lb_overlay'),
img = document.getElementById('fa_img_lb_image');
overlay && document.body.removeChild(overlay);
img && document.body.removeChild(img);
document.body.style.overflow = '';
}
};
// write styles into the document head
document.write(
'<style type="text/css">'+
fa_img_resizer.selector + ', .fa_img_reduced { max-width:' + fa_img_resizer.max_width + 'px; max-height:' + fa_img_resizer.max_height + 'px; }'+
'.fa_img_enlarged { max-width:100% !important; max-height:100% !important; }'+
'.fa_img_resizer { font-size:12px; text-align:left; padding:3px; margin:3px 0; background:#FFF; border:1px solid #CCC; }'+
'.fa_img_resizer a { display:inline-block; margin:0 3px; }'+
'.fa_img_resizer i { font-size:14px; vertical-align:middle; }'+
'#fa_img_lb_overlay { background:rgba(0, 0, 0, 0.7); position:fixed; top:0; right:0; bottom:0; left:0; z-index:999999; cursor:pointer; }'+
'#fa_img_lb_image { max-height:100%; max-width:100%; position:fixed; left:50%; top:50%; z-index:9999999; cursor:pointer; }'+
'</style>'
);
// begin modifying images when the page is loaded
$(window).load(fa_img_resizer.resize);
// kill forumactif's image resizer
if (window.resize_images) {
window.resize_images = function() {
return false;
};
}
}());
and i just change this (ligne 13)
- Code:
download : false, // Télécharger l\'image link
to this
- Code:
download : true, // Télécharger l\'image link
version firefox 54.0.1 (the last one)
and all my members who use firefox or IE have the same problem
- Wolfuryo
- Gender :
Posts : 256
Points : 3808
Reputation : 81
Language : Romanian and English
Browser : Forum Version :
Hi,
Firefox has a problem with the download attribute that is used here in this code. In Ff you can only use it to download images from the same origin. Basically, if you're forum's address is forum1.com, you won't be able to download images that are on forum2.com. This is a bug in FF, so let's hope they'll resolve it.
Firefox has a problem with the download attribute that is used here in this code. In Ff you can only use it to download images from the same origin. Basically, if you're forum's address is forum1.com, you won't be able to download images that are on forum2.com. This is a bug in FF, so let's hope they'll resolve it.
Hi,
Just the clarify, the download option in this plugin isn't supported for Firefox or IE. See Wolfuryo's post for information on why it's not supported for Firefox.
Thanks for the help btw @Wolfuryo
Just the clarify, the download option in this plugin isn't supported for Firefox or IE. See Wolfuryo's post for information on why it's not supported for Firefox.
Thanks for the help btw @Wolfuryo
Similar topics
Create an account or log in to leave a reply
You need to be a member in order to leave a reply.
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum