Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#133 2006-06-28 23:17:54

Bastian
Plugin Author
From: Wuppertal, Germany
Registered: 2005-02-02
Posts: 376
Website

Re: [plugin] [ORPHAN] bas_lightbox (Thumbnail galery with unobtrusive javascript)

I will have a closer look, but the fast response:

I added the seperate queries for thumbs and orginal images, because txp doesn’t store the thumbs in db, there is only a @thumbs=[1|0] entry at the image table. Never cared about when the body is parsing and when not.

But perhaps this was a little bit “von hinten durch die brust ins auge” like Germans say. Don’t know the English expression.

Two solution in mind:

  • rewrite the queries should reduce this effect
  • A new attr individual_article_only = [true|false] as build in if_individual_article

I’m open for any other ideas.

WM 06: Why should anyone get a heart attack?

Gary Lineker: Football is a simple game; 22 men chase a ball for 90 minutes and at the end, the Germans always win.

Last edited by Bastian (2006-06-28 23:25:35)

Offline

#134 2006-07-02 00:09:48

ejverslu
New Member
From: Loveland, CO USA
Registered: 2006-07-01
Posts: 5

Re: [plugin] [ORPHAN] bas_lightbox (Thumbnail galery with unobtrusive javascript)

>>tjnuckolls (or if anyone else knows)

I checked out your site (looks GREAT!) and you have it set up exactly how I am trying to do with galleries off of an article list. I am very new to txp and am just trying to figure out the basics. Care to share how you set this up?

I am trying to use the category declaration but in order to have it update, the category needs to be a variable. <b>txp:bas_lightbox cat=“article-(txp:article_id /)” </b> doesnt work for image categories of the form article-ID (i.e. article-8), methings it is something with the syntax. Can I not nest txp tags inside other txp tags?

Or perhaps I am taking the entirely wrong approach here. How did you make that look so great TJ?

Thanks
Eric

Last edited by ejverslu (2006-07-02 01:01:03)

Offline

#135 2006-07-05 08:31:48

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: [plugin] [ORPHAN] bas_lightbox (Thumbnail galery with unobtrusive javascript)

Hi Bastian, what to you think of litebox as a way of reducing file size?

Offline

#136 2006-07-05 13:38:53

tameboy
Plugin Author
Registered: 2006-06-29
Posts: 48

Re: [plugin] [ORPHAN] bas_lightbox (Thumbnail galery with unobtrusive javascript)

Hi

I created a hack for this plugin. I wanted to be able to link directly to certain image thumbnails within large galleries. I was thinking it would be nice if there as an anchor by each thumbnail image so I could do this. As there isn’t, I edited part of the code.

In the function <code>bas_lightbox($atts, $thing)</code> a quick modification can make the anchors labelled “image<em>id</em>” where <em>id</em> is the textpattern image ID like so: <code><a id=“imageid” href=“etc… /></code>

I found this very useful and wondered if others might. I didn’t want to post the modification here without Bastian’s permission. If Bastian agrees I will post the hack, otherwise you could email me for instructions.

It would probably require some clever JavaScript and an onload event, but it would be even cooler if you could link direct to the Lightbox enlarged version of the image.

Thanks for the great plugin Bastian.

Tameboy

Last edited by tameboy (2006-07-05 14:01:31)

Offline

#137 2006-07-05 15:04:11

Bastian
Plugin Author
From: Wuppertal, Germany
Registered: 2005-02-02
Posts: 376
Website

Re: [plugin] [ORPHAN] bas_lightbox (Thumbnail galery with unobtrusive javascript)

tameboy, even when i don’t understand what the hack does: Post whatever you want.

TXP-Plugins are GPL and you don’t need my permission. But nice that you asked :)

Offline

#138 2006-07-05 20:14:50

tameboy
Plugin Author
Registered: 2006-06-29
Posts: 48

Re: [plugin] [ORPHAN] bas_lightbox (Thumbnail galery with unobtrusive javascript)

Sorry, I might not have made myself clear enough. The hack I applied means that the links/anchors on a bas_lightbox generated gallery have an id associated with them eg:

<code><a href=“images/76.jpg” rel=“lightbox6“ id=“image76” title=“Sam Christmas 2005”><img src=“images/76t.jpg” alt=“Christmas 2005” /></a></code>

This allows me to link to a particular image in the gallery from another article. If I want to refer the reader to a particular part of the large gallery I now use a link along the lines of <code><a href=“index.php?id=21#image76”>Link text</a></code>. This is not much use if you only have a few images in a gallery, but if like me you have large galleries this link will take the browser to the correct part of the gallery.

I wonder if it might be worth adding to the next update as it is only a simple modification:

in the function <code>bas_lightbox($atts, $thing)</code> replace:

foreach($getImgs as $getImg){ $thumb = thumbnail(Array(‘id’ => $getImg)); $big = safe_row(‘id, ext,’.$caption,‘txp_image’,‘id =”’.$getImg.’”’); $out[] = ‘<code><a href=”’.hu.$img_dir.’/’.$big[‘id’].$big[‘ext’].’” rel=“lightbox[‘.$prefs[‘bas_lightbox_roadtrip’].’]” title=”’.$big[$caption].’”>’.$thumb.’</a></code>’; }

with

foreach($getImgs as $getImg){ $thumb = thumbnail(Array(‘id’ => $getImg)); $big = safe_row(‘id, ext,’.$caption,‘txp_image’,‘id =”’.$getImg.’”’); $out[] = ‘<code><a href=”’.hu.$img_dir.’/’.$big[‘id’].$big[‘ext’].’” rel=“lightbox[‘.$prefs[‘bas_lightbox_roadtrip’].’]” id=“image’.$big[‘id’].’” title=”’.$big[$caption].’”>’.$thumb.’</a></code>’; }

Offline

#139 2006-07-08 16:46:00

roelof
Member
Registered: 2005-03-27
Posts: 647

Re: [plugin] [ORPHAN] bas_lightbox (Thumbnail galery with unobtrusive javascript)

hello bastiaan,

Can you look into my problem on page 5

Roelof

Offline

#140 2006-07-09 10:25:39

TNT
Member
From: Rotterdam, Netherlands
Registered: 2006-01-06
Posts: 256
Website

Re: [plugin] [ORPHAN] bas_lightbox (Thumbnail galery with unobtrusive javascript)

Roelof,

Did you put <code><txp:bas_lightbox_head /></code> in the head of your page(s)?


Prrrrrrrr

Offline

#141 2006-07-09 10:32:19

roelof
Member
Registered: 2005-03-27
Posts: 647

Re: [plugin] [ORPHAN] bas_lightbox (Thumbnail galery with unobtrusive javascript)

Yep,

Here is the page that i use to test this plugin

<code>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN”

“http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>
<html xmlns=“http://www.w3.org/1999/xhtml” lang=“en”>
<head> <meta http-equiv=“content-type” content=“text/html; charset=utf-8” /> <meta http-equiv=“imagetoolbar” content=“no” /> <title><txp:page_title /></title> <link rel=“stylesheet” href=”<txp:css />” type=“text/css” media=“screen” /> <txp:bas_lightbox_head />
</head>
<body>
<div id=“container”>
<div id=“head”>
&nbsp;
</div>
<div id=“wrapper”>
<div id=“sidebar-1”>
<h2>Algemeen</h2><br />
<a href=”/gastenboek”>gastenboek</a>
<a href=”/contact”>contact</a><br />
<txp:rss_suparchive section=“article” dateformat=“F Y” showsubdate=“1” form=“datum” /><br />
<a href=”/jaar1”>1e levensjaar</a><br /><br />
<a href=”/bevalling”>bevalling</a><br /><br />
<a href=”/zwangerschap”>zwangerschap</a><br /><br />
</div>
<div id=“content”>
<txp:if_section name=“test”>
<txp:bas_lightbox cat=‘fotoboek’ caption=“name” />
</txp:if_section>
</div>
</div>
<div id=“foot”>
Design by <a href=“http://www.ryanarrowsmith.com/”>Ryan Arrowsmith</a> but feel free to share / Proudly
powered by <a href=“http://www.textpattern.com/”>Textpattern</a>.
</div>
</div>
</body>
</html>
</code>

Offline

#142 2006-07-10 21:45:46

roelof
Member
Registered: 2005-03-27
Posts: 647

Re: [plugin] [ORPHAN] bas_lightbox (Thumbnail galery with unobtrusive javascript)

Nobody ??

that’s disappointed.

Roelof

Offline

#143 2006-07-10 23:19:49

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: [plugin] [ORPHAN] bas_lightbox (Thumbnail galery with unobtrusive javascript)

hello bastiaan,
Can you look into my problem on page 5
Roelof

Roelof,
are you disappointed?
I’m disappointed that you never say “please” or “thanks” in many of your posts I have read across the forum. But maybe that’s your style when asking for help in a forum.

I have take a look at your code here and the lightbox scripts files are not being loaded because the src isn’t correct.

<code><script type=‘text/javascript’ src=‘http://www.tamarawobben.nl/files/’></script>
<script type=‘text/javascript’ src=‘http://www.tamarawobben.nl/files/?load=effects’></script>
<script type=‘text/javascript’ src=‘http://www.tamarawobben.nl/files/’></script></code>

Now, you have to find out why those files are not being loaded.

Another option is to load them manually:
<code>
<script type=‘text/javascript’ src=’/files/bas_lb04_prototype.js’></script>
<script type=‘text/javascript’ src=’/files/bas_lb04_scriptaculous.js?load=effects’></script>
<script type=‘text/javascript’ src=’/files/bas_lb04_lightbox.js’></script></code>

Replace bas_lighbox_head by those lines above.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#144 2006-07-11 00:35:04

Bastian
Plugin Author
From: Wuppertal, Germany
Registered: 2005-02-02
Posts: 376
Website

Re: [plugin] [ORPHAN] bas_lightbox (Thumbnail galery with unobtrusive javascript)

Sorry folks, but i have little time the next three weeks!
Some examinations have to be done before my term ends. And i will spend a week in spain at the IUSY

So my order is: Examinations, Spain, TXP.

Most of the time i’m offline: no net, no temptation ;)

Offline

Board footer

Powered by FluxBB