SimplePortal

Customization => Custom Coding => Topic started by: TigPT on April 03, 2010, 07:07:31 AM

Title: Specify image dimensions, SP2.3.2, SMF 2 RC3
Post by: TigPT on April 03, 2010, 07:07:31 AM
Specify image dimensions (and alt text) can increase your page rendering but also tell the search engines that you are interested in make the best web practices.

SP 2.3.2 have some image dimensions missing that was already missing in previous versions.

Open /source/PortalBlocks.php
Code: (Find) [Select]
sp_embed_image('dot')
Code: ("Replace for") [Select]
sp_embed_image('dot','dot',8,8)


Code: (Find) [Select]
sp_embed_image('stats')
Code: ("Replace for") [Select]
sp_embed_image('stats','stats',16,16)


Code: (Find) [Select]
sp_embed_image('arrow')
Code: ("Replace for") [Select]
sp_embed_image('arrow','arrow',12,12)

After this change i uploaded to the server, cleaned up the cache and it was working fine.

Pass w3validator to be sure you didn't done nothing wrong.

Minor change but hope this could be approved and become part of next update, since only good can come from this change.
Title: Re: Specify image dimensions, SP2.3.2, SMF 2 RC3
Post by: [SiNaN] on April 03, 2010, 10:45:06 AM
Moved to the Custom Coding board since it isn't a bug.

You may add them to your files, but I don't think it's important enough to add in the package.
Title: Re: Specify image dimensions, SP2.3.2, SMF 2 RC3
Post by: TigPT on April 03, 2010, 10:54:49 AM
I've added myself, but not only is boring editing in each update, it is also something that a minor edit make it better to everyone.

After all, we only are a community if we help each other. That's why i posted it.

I don't say to release it now but to add it to the fixes for the next version.
Title: Re: Specify image dimensions, SP2.3.2, SMF 2 RC3
Post by: kaamaru on August 05, 2010, 12:57:39 PM
Ad this to the update if it isn't already! You should add image dimensions to every image.
Title: Re: Specify image dimensions, SP2.3.2, SMF 2 RC3
Post by: [SiNaN] on August 06, 2010, 08:14:08 AM
Ad this to the update if it isn't already! You should add image dimensions to every image.

Should? Really? Why is that so?
Title: Re: Specify image dimensions, SP2.3.2, SMF 2 RC3
Post by: TigPT on August 06, 2010, 10:24:07 AM
It helps browsers to render the image and the rest of the page reserving that dimention for put the image after donwload. If not, the browser need to wait for the image to be completly donwloaded before render the rest of the page.

It increses the page load speed.
It helps display well the page in all browsers.
Its a good web desining practice.
Title: Re: Specify image dimensions, SP2.3.2, SMF 2 RC3
Post by: kaamaru on November 21, 2010, 09:56:30 AM
It helps browsers to render the image and the rest of the page reserving that dimention for put the image after donwload. If not, the browser need to wait for the image to be completly donwloaded before render the rest of the page.

It increses the page load speed.
It helps display well the page in all browsers.
Its a good web desining practice.

This is why.
SimplePortal 2.3.8 © 2008-2024, SimplePortal