• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Make image popup

ibaker

Well-known member
#1
I have in a template this code:
Code:
<img src="{$image_url}" style="width:240px; height:auto;" />
and what I was wanting to do was make it a popup fullsize image viewed in lightbox...any suggestions on what <a.../a> code I would need to use?
 

Jake Bunce

XenForo moderator
Staff member
#2
Here is the source code of a lightbox image:

Code:
	<a href="attachments/screen-shot-2011-11-20-at-1-12-13-am-png.24156/" target="_blank" class="LbTrigger"
		data-href="misc/lightbox"><img
		src="data/attachments/24/24157-dfcbfb08e6a77711c5a6e7acc3d06ed8.jpg" alt="Screen shot 2011-11-20 at 1.12.13 AM.png"
		class="bbCodeImage LbImage" /></a>
The uppercase class names and data-href are what enable the lightbox.