News:

Join the Facebook Fan Page.

Main Menu

SMF Gallery

Started by SMFHacks.com Team, September 16, 2006, 07:13:02 PM

Previous topic - Next topic

vbgamer45

You could try doing manual code such as css to force the image size on the view picture page.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

sc2142

Quote from: vbgamer45 on September 18, 2019, 10:10:32 AM
You could try doing manual code such as css to force the image size on the view picture page.
Sorry, Im not sure what you mean.

vbgamer45

Basically there is no built in way in the lite version and would have to be custom coded to be added to the lite version.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

sc2142

Quote from: vbgamer45 on September 18, 2019, 10:27:27 AM
Basically there is no built in way in the lite version and would have to be custom coded to be added to the lite version.
Ah, Okay, Ill have to find someone to code it for me, Thanks.

Diego Andrés

Using CSS would be the best way of doing it like vbgamer suggested.

SMF Tricks - Free & Premium Responsive Themes for SMF.

sc2142

Quote from: Diego Andrés on September 19, 2019, 09:51:12 AM
Using CSS would be the best way of doing it like vbgamer suggested.
Okay, Well, I dont know how so unless someone here wants to do it for me i dont know.

Diego Andrés

Quote from: sc2142 on September 19, 2019, 09:52:10 AM
Quote from: Diego Andrés on September 19, 2019, 09:51:12 AM
Using CSS would be the best way of doing it like vbgamer suggested.
Okay, Well, I dont know how so unless someone here wants to do it for me i dont know.

Could you provide a link to see this issue

SMF Tricks - Free & Premium Responsive Themes for SMF.

sc2142

Quote from: Diego Andrés on September 19, 2019, 09:53:17 PM
Quote from: sc2142 on September 19, 2019, 09:52:10 AM
Quote from: Diego Andrés on September 19, 2019, 09:51:12 AM
Using CSS would be the best way of doing it like vbgamer suggested.
Okay, Well, I dont know how so unless someone here wants to do it for me i dont know.

Could you provide a link to see this issue
This is my test site. https://fgcjhbdn.website/forums/gallery/picture/2/ [nofollow]
Heres a virus total: https://www.virustotal.com/gui/url/ff1dc7063550d501dde641601924bb15c5e3f8ab24569fac67b5e120647188d2/detection [nofollow]

Diego Andrés

Try adding something like

td#sp_center img {
    width: Xpx
}


Replace X with your width

SMF Tricks - Free & Premium Responsive Themes for SMF.

sc2142

Quote from: Diego Andrés on September 20, 2019, 10:56:38 AM
Try adding something like

td#sp_center img {
    width: Xpx
}


Replace X with your width
Sorry, Im not the brightest, where do i put it xD

Diego Andrés

At the end of the /css/index.css file in your theme folder

SMF Tricks - Free & Premium Responsive Themes for SMF.

sc2142

It did work, However, It made every other image enlarge everywhere else on the forum also.

Diego Andrés

Yes I'm aware just was waiting for you to complain ;D
I'm not familiar with SMF Gallery so I have to install the mod to give you more specific instructions, I'll do that later.

SMF Tricks - Free & Premium Responsive Themes for SMF.

sc2142


Diego Andrés

Code (Gallery2.template.php) Select

<img height="' . $context['gallery_pic']['height']  . '" width="' . $context['gallery_pic']['width']  . '" src="' . $modSettings['gallery_url'] . $context['gallery_pic']['filename']  . '" alt="' . $context['gallery_pic']['title']  . '" />


Code (Replace) Select

<img class="gallery_pic" height="' . $context['gallery_pic']['height']  . '" width="' . $context['gallery_pic']['width']  . '" src="' . $modSettings['gallery_url'] . $context['gallery_pic']['filename']  . '" alt="' . $context['gallery_pic']['title']  . '" />




img.gallery_pic {
    width: Xpx
}


No testing either so no promises again  ;D

SMF Tricks - Free & Premium Responsive Themes for SMF.

sc2142

Quote from: Diego Andrés on September 20, 2019, 11:21:26 AM
Code (Gallery2.template.php) Select

<img height="' . $context['gallery_pic']['height']  . '" width="' . $context['gallery_pic']['width']  . '" src="' . $modSettings['gallery_url'] . $context['gallery_pic']['filename']  . '" alt="' . $context['gallery_pic']['title']  . '" />


Code (Replace) Select

<img class="gallery_pic" height="' . $context['gallery_pic']['height']  . '" width="' . $context['gallery_pic']['width']  . '" src="' . $modSettings['gallery_url'] . $context['gallery_pic']['filename']  . '" alt="' . $context['gallery_pic']['title']  . '" />




img.gallery_pic {
    width: Xpx
}


No testing either so no promises again  ;D

Thanks bud, It works, Anyway to keep it from upscaling now? LMAO

Diego Andrés

For lower resolutions?

SMF Tricks - Free & Premium Responsive Themes for SMF.

sc2142

Yes, I would like to keep resolutions that are lower than what is specified untouched.

Diego Andrés

Sorry I forgot about this was a bit busy

You'd have something like this
@media screen and (max-width: 767px) {
img.gallery_pic {
    width: Xpx
}
}


You can replace max with min (if you want) and the resolution, or add more  :D

Also works with a range
@media screen and (min-width: 240px) and (max-width: 640px)

SMF Tricks - Free & Premium Responsive Themes for SMF.

sc2142

It works, However, It ignores the larger images now. :-\

Advertisement: