Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2014-01-15 05:54:53

kevlove92
Member
Registered: 2014-01-15
Posts: 14

How do i intergrate light box into text pattern theme

I have been messing around a lot with text pattern lately, i really like how everything works. I have been trying to get light box to work on my site, and i cant seem to get the code correct? Im not sure how to make ‘ rel=‘lightbox” work in the code. Anyone have any tutorials, or plugins that could help me out? Thanks.

Offline

#2 2014-01-15 07:39:15

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: How do i intergrate light box into text pattern theme

Hi kev and welcome to txp.

Are you using lightbox 1? here’s a solution to display images belonging to a particular image category named cats.

<txp:images category="cats">
<div class="thumbnail">
<a href="/images/<txp:image_info type="id" /><txp:image_info type ="ext" />" rel="lightbox"><txp:thumbnail /></a>
<div class="caption">
<a href="/images/<txp:image_info type="id" /><txp:image_info type ="ext" />" rel="lightbox"><txp:image_info type="caption" /></a>
</div>
</div>
</txp:images>

The tag reference will be of help to you.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2014-01-15 10:36:28

kevlove92
Member
Registered: 2014-01-15
Posts: 14

Re: How do i intergrate light box into text pattern theme

I am using light box 2, i tried to use light box 1 but it wasnt working. i still cant seem to figure it out and all the plugins that i look at are out of date.

Offline

#4 2014-01-15 11:08:50

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: How do i intergrate light box into text pattern theme

Hi Kev

Here’s a sample code for image sets in lightbox 2. No plugins are required.

<div class="image-row">
<div class="image-set">
<txp:images category="cats">
<a class="example-image-link" href="/images/<txp:image_info type="id" /><txp:image_info type ="ext" />" data-lightbox="example-set" title="<txp:image_info type="title" />."><txp:thumbnail /></a>
</txp:images>
</div>
</div>

Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#5 2014-01-15 11:52:07

kevlove92
Member
Registered: 2014-01-15
Posts: 14

Re: How do i intergrate light box into text pattern theme

Would i put this code in the form section? It still doesnt work.

Offline

#6 2014-01-15 11:53:28

kevlove92
Member
Registered: 2014-01-15
Posts: 14

Re: How do i intergrate light box into text pattern theme

the only way i can get it too work is if i use the <txp:thumbnail /> code and it only works if i include the “id” attribute, but then it only shows one image.

Offline

#7 2014-01-15 12:04:27

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: How do i intergrate light box into text pattern theme

Hi kev

Can you please

  1. post the URL of the page you are working on
  2. post the code you are using

We will be able to help you to get this to work


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#8 2014-01-15 12:20:58

kevlove92
Member
Registered: 2014-01-15
Posts: 14

Re: How do i intergrate light box into text pattern theme

for some reason when i use the code below it generates 3 of the same images,

http://kevinmlove.com/

form code :

<txp:thumbnail id="18" link="boolean" link_rel="lightbox" />

page code :

<script src="/lightbox/js/jquery-1.10.2.min.js"></script>
<script src="/lightbox/js/lightbox-2.6.min.js"></script>
<link href="/lightbox/css/lightbox.css" rel="stylesheet" />
<Style type="text/css">
</style>


<div id="articles">
<txp:article_custom form="front" pgonly="0" />
</div>

Offline

#9 2014-01-15 12:49:56

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,473

Re: How do i intergrate light box into text pattern theme

Your URL shows only an incomplete source:

<script src="/lightbox/js/jquery-1.10.2.min.js"></script>
<script src="/lightbox/js/lightbox-2.6.min.js"></script>
<link href="/lightbox/css/lightbox.css" rel="stylesheet" />
<Style type="text/css">

</style>

<div id="articles">

</div>

In your page it needs at least:

<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8">
		<title>Title</title>
		<script src="/lightbox/js/jquery-1.10.2.min.js"></script>
		<script src="/lightbox/js/lightbox-2.6.min.js"></script>
		<link href="/lightbox/css/lightbox.css" rel="stylesheet" />
	</head>
	<body>
		<!-- your content code, maybe calling a form -->
	</body>
</html>

Last edited by GugUser (2014-01-15 13:09:51)

Offline

#10 2014-01-15 12:57:08

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,473

Re: How do i intergrate light box into text pattern theme

The pgonly="0" attribute is not for txp:article_custom.

In txp:thumbnail the attribute link="boolean" means values of 1 or 0.

For better understanding it would be useful if you’d show more of your code context.

Last edited by GugUser (2014-01-15 12:59:08)

Offline

#11 2014-01-15 21:02:45

kevlove92
Member
Registered: 2014-01-15
Posts: 14

Re: How do i intergrate light box into text pattern theme

Could some one point me to a tutorial? or post a code i could try? I just want a simple photo page, that has thumbnails and when you click it , lightbox works.

Offline

#12 2014-01-15 21:09:07

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,473

Re: How do i intergrate light box into text pattern theme

How do you want to select or determine the images which are to be shown?

Offline

Board footer

Powered by FluxBB