SimplePortal

Support => English Support => Topic started by: trehol on October 24, 2009, 06:32:52 PM

Title: Not resize image in block
Post by: trehol on October 24, 2009, 06:32:52 PM
I am sorry for bad English. Machine translation.
There was a problem: after an upgrade with 1.1.10 on 2.0RC1-2 pictures in the right block do not change the resize. Very much it is not beautiful.
http://laserforum.ru
I ask the help, in advance thanks.

http://simpleportal.net/index.php?topic=3260.msg20929#msg20929 not help
Title: Re: Not resize image in block
Post by: Nathaniel on October 24, 2009, 07:46:18 PM
I can't the issue on your website. The only images I can see, are being resized properly (in your articles).
Title: Re: Not resize image in block
Post by: trehol on October 24, 2009, 08:42:35 PM
No articles. Images in right block. See screenshot.
(http://s45.radikal.ru/i110/0910/3b/26c51129f79bt.jpg) (http://radikal.ru/F/s45.radikal.ru/i110/0910/3b/26c51129f79b.jpg.html)

Now in the right block of a portal as the last pictures, but to the utmost before are displayed. I.e. pictures have the size превью a forum, and not in pixel it is less that is ugly. Before picture upgrade were small and accurate.
Has not helped:
Resizes images on portal on\off
Cleaning of a cache by forum resources, service of files, check on errors forum resources
Manipulations with the size thumbs at a forum

Permission for guest edited. See link. http://laserforum.ru
Title: Re: Not resize image in block
Post by: Nathaniel on October 25, 2009, 02:40:36 AM
That is a 'Recent Image Attachments' block, correct?

Does the same problem occur in the default theme?
Title: Re: Not resize image in block
Post by: trehol on October 25, 2009, 07:09:56 AM
Yes. You have correctly written.
Title: Re: Not resize image in block
Post by: trehol on October 26, 2009, 02:09:42 PM
Prompt please, what code snippet, in what file, is responsible for my problem?
Title: Re: Not resize image in block
Post by: Nathaniel on October 28, 2009, 11:04:54 PM
Make sure that the 'Resize images when showing under posts' setting is enabled, it can be found in your admin panel, under 'Forum' -> 'Attachments and Avatars ' -> 'Attachment Settings'.
Title: Re: Not resize image in block
Post by: trehol on October 31, 2009, 04:29:37 PM
It is included. The result is not present.
Title: Re: Not resize image in block
Post by: [SiNaN] on January 20, 2010, 12:41:42 PM
I think it's because your attachment thumbnails are quite large to fit in that block.

./Sources/PortalBlocks.php

Code: (Find) [Select]
$item['file']['image']['link']
Code: (Replace) [Select]
str_replace('<img', '<img width="100"', $item['file']['image']['link'])
You can change 100 in the code as you like. It's in pixels.
Title: Re: Not resize image in block
Post by: swoodie on February 18, 2010, 09:42:21 PM
I think it's because your attachment thumbnails are quite large to fit in that block.

./Sources/PortalBlocks.php

Code: (Find) [Select]
$item['file']['image']['link']
Code: (Replace) [Select]
str_replace('<img', '<img width="100"', $item['file']['image']['link'])
You can change 100 in the code as you like. It's in pixels.
i did this to remove scroll bars in the block but now i get errors
http://www.xxxx.com/forum/index.php?action=dlattach;topic=131.0;attach=71;image8: Undefined index: is_guestFile: C:/xampp/htdocs/webpage/forum/Sources/Subs-Portal.php
Line: 257

 C:/xampp/htdocs/webpage/forum/Sources/Subs-Portal.php
Line: 203

 C:/xampp/htdocs/webpage/forum/Sources/Load.php
Line: 1820


 C:/xampp/htdocs/webpage/forum/Themes/default/languages/SPortal.english.php
Line: 119

would u have any idea why i get this error now?

Title: Re: Not resize image in block
Post by: swoodie on February 21, 2010, 07:42:36 PM
any 1 have any idea?
Title: Re: Not resize image in block
Post by: [SiNaN] on February 27, 2010, 05:35:22 AM
It's an SMF bug:

http://simpleportal.net/index.php?topic=3839.msg24415#msg24415
Title: Re: Not resize image in block
Post by: swoodie on April 20, 2010, 07:02:19 AM
I think it's because your attachment thumbnails are quite large to fit in that block.

./Sources/PortalBlocks.php

Code: (Find) [Select]
$item['file']['image']['link']
Code: (Replace) [Select]
str_replace('<img', '<img width="100"', $item['file']['image']['link'])
You can change 100 in the code as you like. It's in pixels.


I have this issue again in RC3 but can't seem to find code in file 
Title: Re: Not resize image in block
Post by: AngelinaBelle on April 20, 2010, 03:27:12 PM
Looks like you already replaced $item['file']['image']['link'] with $item['file']['image']['thumb']?
 
So you can try
Code: (Find) [Select]
$item['file']['image']['thumb']
Code: (Replace) [Select]
str_replace('<img', '<img width="100"', $item['file']['image']['link'])
Title: Re: Not resize image in block
Post by: swoodie on April 20, 2010, 04:35:50 PM
thanks that worked removed scroll bars but removed the link to the post can it be done with keeping link as well as remove scroll bars ?.

it also filled up the error logs of about 80 pages with that change
Title: Re: Not resize image in block
Post by: AngelinaBelle on April 20, 2010, 07:20:07 PM
I am sorry I did not look into it more deeply -- I only told you how to get from where you were to where you said you wanted to go.
 
First -- what error did you get from that change?
Title: Re: Not resize image in block
Post by: swoodie on April 21, 2010, 01:46:56 AM
Don't be sorry prob me eror

Looks like you already replaced $item['file']['image']['link'] with $item['file']['image']['thumb']?
 
So you can try
Code: (Find) [Select]
$item['file']['image']['thumb']
Code: (Replace) [Select]
str_replace('<img', '<img width="100"', $item['file']['image']['link'])

i put the change back in again but i only got 1 error this time
PortalBlocks.php
Line: 1598


but haven't had any other at this time i may have put a extra charter in by mistake, can i link it to the post  with this code added?
Title: Re: Not resize image in block
Post by: AngelinaBelle on April 21, 2010, 09:09:21 AM
i put the change back in again but i only got 1 error this time
PortalBlocks.php
Line: 1598


but haven't had any other at this time i may have put a extra charter in by mistake, can i link it to the post  with this code added?

I feel a little lost. Please help me.
 
1) What change did you put in -- which code are you using?
2) What is the entier error message -- not just the line number?
3) I don't know what is on line 1598 of your PortalBlocks.php -- can you show the line?
4) To avoid typing errors, you can use the "Select" on code in a message, then copy and paste the code into your file.
 
5) In the end, it might be easier to save the images in a width that is a good fit for your block. This avoids the problem of editing SimplePortal code by hand.
Title: Re: Not resize image in block
Post by: swoodie on April 21, 2010, 08:57:32 PM
Hi thanks for your help i resolved the issue i used this
<a href="' . $item['topic']['href'] . '">', str_replace('<img', '<img width="100"', $item['file']['image']['thumb']), '</a>

from topic http://simpleportal.net/index.php?topic=4118.msg30022#msg30022   post#31
so the image would still link to the post with no scroll bars on image


thanks again
Title: Re: Not resize image in block
Post by: AngelinaBelle on April 22, 2010, 10:00:45 AM
@swoodie -- I am glad I could help
 
@trehol -- Is your problem solved, or do you need more help?
SimplePortal 2.3.8 © 2008-2024, SimplePortal