The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Images don't resize normally

View previous topic View next topic Go down

Solved Images don't resize normally

Post by Luffy on January 6th 2015, 11:02 pm

Hello,

For some reason the images stopped all of a sudden to work. All images are not resized and stay to their normal sizes. Any ideas how can i fix this issue?

Luffy

Luffy
Manager
Manager

Male Posts : 4245
Reputation : 424
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: Images don't resize normally

Post by _Twisted_Mods_ on January 6th 2015, 11:38 pm

have you added any css or script if so can you provide it

_Twisted_Mods_
Helper
Helper

Male Posts : 2032
Reputation : 302
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Solved Re: Images don't resize normally

Post by Luffy on January 6th 2015, 11:40 pm

Hey,

The weird thing is that i haven't touched the Admin Panel the last 2 days and today i compressed the CSS and haven't added anything but this started.
Unfortunately i didn't backup the CSS so i don't have a backup Sad
Is there a way to fix this?






Luffy
Manager
Manager

Male Posts : 4245
Reputation : 424
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: Images don't resize normally

Post by _Twisted_Mods_ on January 6th 2015, 11:45 pm

goto acp and click save on your css and see if it shows any errors at the top something as simple as one extra } at the top of your css will make every css under it not work so


also is it just one area or your whole forum .. and do you have the default css turned on? the option is under your css

_Twisted_Mods_
Helper
Helper

Male Posts : 2032
Reputation : 302
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Solved Re: Images don't resize normally

Post by Luffy on January 6th 2015, 11:50 pm

Thanks for you reply,

I've checked the CSS, none mistakes. Also to be specific this showed up in a post i just posted but i don't know why it happened now. Other posts are normally. How can we do this to all posts no matter what?






Luffy
Manager
Manager

Male Posts : 4245
Reputation : 424
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: Images don't resize normally

Post by _Twisted_Mods_ on January 7th 2015, 12:20 am

whats your forum version?

_Twisted_Mods_
Helper
Helper

Male Posts : 2032
Reputation : 302
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Solved Re: Images don't resize normally

Post by Luffy on January 7th 2015, 12:23 am

All the details on my profile are correct.
My forum Version is phpBB3






Luffy
Manager
Manager

Male Posts : 4245
Reputation : 424
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: Images don't resize normally

Post by _Twisted_Mods_ on January 7th 2015, 12:27 am

then this should work.. makes it so no images in a post go over 300px width and the height is auto based on width so it stays proportional

Code:
.postbody .content img{max-width:300px}

_Twisted_Mods_
Helper
Helper

Male Posts : 2032
Reputation : 302
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Solved Re: Images don't resize normally

Post by Luffy on January 7th 2015, 12:40 am

Τhis resizes them but it doesn't show the enlrage/reduce/view full window links.






Luffy
Manager
Manager

Male Posts : 4245
Reputation : 424
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: Images don't resize normally

Post by _Twisted_Mods_ on January 7th 2015, 12:50 am

ohh ok i understand what ur looking for now.. i think thier is a option in acp but im a lil unsure .. someone with more knowledge on this will have to assist you

_Twisted_Mods_
Helper
Helper

Male Posts : 2032
Reputation : 302
Language : English
Location : Ms

http://liquidcode.forumotion.com

Back to top Go down

Solved Re: Images don't resize normally

Post by Ange Tuteur on January 7th 2015, 12:54 am

Hey @Luffy,

Firstly I noticed an error thrown for users who are logged out. It comes from this script :
Code:
function changeToolbar(word, replacement) {
 for (var name in word) {
  document.getElementById('fa_notifications').innerHTML = document.getElementById('fa_notifications').innerHTML.replace(RegExp(name, 'g'), word[name])
 }
}
$(window).load(function () {
 changeToolbar({
  'Notifications': 'Ειδοποιήσεις'
 })
});

When logged out fa_notifications is null, so this throws an error for guests which in turn could cause other scripts to not work for them. Replace it to :
Code:
function changeToolbar(word, replacement) {
 for (var name in word) {
  document.getElementById('fa_notifications').innerHTML = document.getElementById('fa_notifications').innerHTML.replace(RegExp(name, 'g'), word[name])
 }
}
$(window).load(function () {
 if (_userdata.session_logged_in == 0) return;
 changeToolbar({
  'Notifications': 'Ειδοποιήσεις'
 })
});


Now regarding the image resize module found in the AP. If you're using this script :
Code:
$(function () {
 $(function () {
  if (!document.getElementById('text_editor_textarea')) return;
  $('.sceditor-group:last').after('<div id="st-boutons" class="sceditor-group"></div>');
  userTag(1, 'Luffy', 'https://cdn1.iconfinder.com/data/icons/glaze/16x16/mimetypes/source_p.png', '<div class="Luffy">', '</div>');
  function userTag(id, tagname, image, htmlStart, htmlEnd) {
  var breg = new RegExp('\\[' + tagname + '\\](.+?)\\[\\/' + tagname + '\\]', 'gi');
  if (_userdata.user_id === id) {
  $('#st-boutons').append('<a id=\'' + tagname + '-b\' class=\'sceditor-button\'><div style=\'background-image:url(' + image + ')\' title=\'Προσωπικός Κώδικας\'></div></a>');
  $('#' + tagname + '-b').click(function () {
  $('#text_editor_textarea').sceditor('instance').insertText('[' + tagname + ']', '[/' + tagname + ']')
  })
  }
  $('div.postbody div').each(function () {
  if ($(this).text().indexOf('[' + tagname + ']') != - 1) $(this).html($(this).html().replace(breg, htmlStart + '$1' + htmlEnd))
  })
  }
 })
});

It replaces the HTML in your post. When this occurs it overwrites the resized images.

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Images don't resize normally

Post by Luffy on January 7th 2015, 1:18 am

Hello @Ange Tuteur,
I fixed the error js but i cannot use the second script you send all the times. That script is for notifications and warns that i use. Not for everything.. :/






Luffy
Manager
Manager

Male Posts : 4245
Reputation : 424
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: Images don't resize normally

Post by Ange Tuteur on January 7th 2015, 1:21 am

Could you provide an example where the image resize is not working ? I checked the forum and it appears to be working here.



Thanks

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Images don't resize normally

Post by Luffy on January 7th 2015, 1:23 am

Hi, try this one here






Luffy
Manager
Manager

Male Posts : 4245
Reputation : 424
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: Images don't resize normally

Post by Ange Tuteur on January 7th 2015, 1:26 am

Resized :


Press F12 and go to Console. Are there any errors for you there ?

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Images don't resize normally

Post by Luffy on January 7th 2015, 1:30 am

I've got 4 errors

Luffy
Manager
Manager

Male Posts : 4245
Reputation : 424
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: Images don't resize normally

Post by Ange Tuteur on January 7th 2015, 1:38 am

None of those look like they belong to your installed scripts, but I'll register to see if it's a problem for logged in members.

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Images don't resize normally

Post by Luffy on January 7th 2015, 1:39 am

Ok. For me after clearing my browser cashe nothing changed.






Luffy
Manager
Manager

Male Posts : 4245
Reputation : 424
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: Images don't resize normally

Post by Ange Tuteur on January 7th 2015, 1:50 am

Do you have anything that is shown specifically for staff members, like widgets ? I checked over your JavaScripts and they all look fine, plus I'm logged in and the image resize is working for me.

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Images don't resize normally

Post by Luffy on January 7th 2015, 1:55 am

I have 2 Javascripts. One for the BBCodes you send before and one for the ModTools. But i was going to tell you about Mozilla and Chrome but my admin says he sees it like i do and he uses mozilla and i use chrome. :/

Edit: Oh wow i believe the bbcodes is the one that makes it like that. if you remove that it fixes it?

Luffy
Manager
Manager

Male Posts : 4245
Reputation : 424
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: Images don't resize normally

Post by Ange Tuteur on January 7th 2015, 2:30 am

Yeah, the custom bbcode is the problem. I disabled so you can see.

The problem is that it replaces the HTML content. The images are resized once, but once the HTML is replaced the resized image is lost.

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Images don't resize normally

Post by Luffy on January 7th 2015, 2:32 am

SO if we deactivate that one they all will get resized normally?






Luffy
Manager
Manager

Male Posts : 4245
Reputation : 424
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: Images don't resize normally

Post by Ange Tuteur on January 7th 2015, 2:37 am

Correct, take a look around. It looks like all of the images are resizing correctly again. It only occurred when the script had to replace [Luffy][/Luffy] in the post.

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Images don't resize normally

Post by Luffy on January 7th 2015, 2:41 am

Ok thanks a lot! Topic solved!


Thanks for your time,
Luffy!






Luffy
Manager
Manager

Male Posts : 4245
Reputation : 424
Language : Greek, English
Location : Greece

http://helpgr.forumgreek.com/forum

Back to top Go down

Solved Re: Images don't resize normally

Post by Ange Tuteur on January 7th 2015, 2:45 am

You're welcome Mr. Green

Topic archived

Have a nice day. Smile

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum