SimplePortal

Support => English Support => Topic started by: Mick. on February 13, 2013, 08:11:42 AM

Title: Article image resizer ?
Post by: Mick. on February 13, 2013, 08:11:42 AM
When ticking the box to resize image in the article admin, it resizes it to 300px.  I'd like to find where in  sources i can change this to a bigger value.

I searched but no luck.
Title: Re: Article image resizer ?
Post by: phantomm on February 13, 2013, 10:18:20 AM
PortalArticles.php is checking if setting is enabled, and changes class for images on portal:
Code: [Select]
if ($modSettings['sp_resize_images'])
$row['body'] = preg_replace('~class="bbc_img~i', 'class="bbc_img sp_article', $row['body']);

and function sp_image_resize() in portal.js does the rest:
Code: [Select]
if (temp_image.width > 300)
{
possible_images[i].height = (300 * temp_image.height) / temp_image.width;
possible_images[i].width = 300;
}
else
{
possible_images[i].width = temp_image.width;
possible_images[i].height = temp_image.height;
}


At least that's how I see it..
Title: Re: Article image resizer ?
Post by: Mick. on February 13, 2013, 10:24:01 AM
Ah. portal.js the only place i didnt look. That figures. lol.  Thank you.
Title: Re: Article image resizer ?
Post by: Mikael Jensen on February 07, 2014, 05:36:12 AM
I am trying to find portal.js,  but I really can't find the file.

Can anyone tell me where it is located?
Title: Re: Article image resizer ?
Post by: AngelinaBelle on February 07, 2014, 09:28:10 AM
portal.js is found in Themes/default/scripts
SimplePortal 2.3.8 © 2008-2024, SimplePortal