Clickable images ?

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Post Reply
mrix2000
Registered User
Posts: 823
Joined: Sun Dec 03, 2006 2:23 pm

Clickable images ?

Post by mrix2000 »

Hello all, my forum is very image intensive and quite often its missed whereby members do not realise they can click a image to get the bigger size.
Is there anything that can be done to promote and make more members aware images are able to be clicked 8-)
Thanks for any feedback
User avatar
AbaddonOrmuz
Recognised Extension Developer
Posts: 939
Joined: Wed Dec 25, 2013 9:06 pm
Location: /dev/null
Name: Alfredo
Contact:

Re: Clickable images ?

Post by AbaddonOrmuz »

Are those images thumbnails with a link to the original full-size image or are you using a lightbox extension? The solution would vary depending on that.

Anyways, you could just change the cursor when hovering images, like:

Code: Select all

.postimage:hover {
	cursor: zoom-in;
}
Some of my phpBB extensions:
Image Imgur | :chart_with_upwards_trend: SEO Metadata | Image Markdown | :lock: Auto-lock Topics
:trophy: Check out all my validated extensions :trophy:

:penguin: Arch Linux user :penguin:
mrix2000
Registered User
Posts: 823
Joined: Sun Dec 03, 2006 2:23 pm

Re: Clickable images ?

Post by mrix2000 »

AbaddonOrmuz wrote:
Sat Aug 01, 2020 11:17 pm
Are those images thumbnails with a link to the original full-size image or are you using a lightbox extension? The solution would vary depending on that.

Anyways, you could just change the cursor when hovering images, like:

Code: Select all

.postimage:hover {
	cursor: zoom-in;
}
Hello and thanks for the help, these are thumbnails when clicked show the full image.
Where can I adjust the code you so kindly supplied ?
User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 3910
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: Clickable images ?

Post by thecoalman »

You need to add it to CSS files, around line 276 of /styles/prosilver/theme/content.css you'll find this:

Code: Select all

.postbody img.postimage {
	max-width: 100%;
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
}
After add:

Code: Select all

.postbody img.postimage:hover {
	cursor: zoom-in;
}
You can add other effects like opacity. Instead:

Code: Select all

.postbody img.postimager:hover {
	cursor: zoom-in;
	opacity: 0.8;
}
After editing and uploading file clear the browser cache.
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
Post Reply

Return to “phpBB Custom Coding”