Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#121 2006-06-22 18:45:01
Re: [plugin] [ORPHAN] bas_lightbox (Thumbnail galery with unobtrusive javascript)
Just one comment:
I have noticed that, when looking an image using the lightbox, scrolling the page is considerable slowlest in Firefox than in IE6.
Does anybody else notice this? is there any reason?
My “logic” says: it should be faster in FF than in IE6 (just because IE6 is the “bad” boy).
Offline
#122 2006-06-22 22:51:03
Re: [plugin] [ORPHAN] bas_lightbox (Thumbnail galery with unobtrusive javascript)
i don’t stop the time while scrolling, but for me FF 1.5 and IE & SP2 an Win XP there seems to be no difference in scrolling.
But sometimes i meet an similarly effect:
FF scrolls slow in pages with a fixed
element. Don’t know why.
Offline
#123 2006-06-25 18:51:25
- roelof
- Member
- Registered: 2005-03-27
- Posts: 647
Re: [plugin] [ORPHAN] bas_lightbox (Thumbnail galery with unobtrusive javascript)
Hello,
Im trying to implement this script into my site.
I have put all the images into the images map of my site.
I have put the css and the .js files into the map textpattern.
Now i see the images under each other instead of next to each other.
And when i click on a image a new page opens with only the images and not like the demo.
You can see it at http://www.tamarawobben.nl/test
What went wrong ??
Roelof
Offline
#124 2006-06-26 03:09:42
Re: [plugin] [ORPHAN] bas_lightbox (Thumbnail galery with unobtrusive javascript)
Hey decoderltd (and others),
Getting lightbox to display thumbnails is a simple matter. In the extensions tab (remember, click the admin tab for it to mysteriously appear), enter “div” in both the wraptag and the break fields. Then give them each a class. I got verbose and used LightboxContainer and LightboxThumb, respectively.
Then it’s all up to CSS. There are various methods for making fluid galleries. One of my favorite references for a long time now is the simple explation offered at Real World Style. Check out the Floating thumbnails section. I’m sure code purists could find exception with my method because you could do the same thing with a container div and floating the individual images, but I contained the images in a div because I may want to add captions before long.
Hope this helps, if I can be further service, please don’t hesitate to ask.
Regards,
TJ
PS, if anyone could send me a link to where I can learn how to post proficiently in this forum, I’d appreciate it. I can’t figure out how to do seemingly simple things like referencing previous posts and such. Thanks!
Offline
#125 2006-06-26 19:58:36
Re: [plugin] [ORPHAN] bas_lightbox (Thumbnail galery with unobtrusive javascript)
I read that there are some new posts here, but i have no time to anser them. I hope i find the time end of this week.
Sorry!
Offline
#126 2006-06-28 18:05:10
Re: [plugin] [ORPHAN] bas_lightbox (Thumbnail galery with unobtrusive javascript)
Hi Bastian,
can you take a look at this post: http://forum.textpattern.com/viewtopic.php?pid=116075#p116075
A summary: txp:bas_lightbox is making queries to the DB even when it’s not in the output of the page.
In other words, if I call an article that has txp:bas_lightbox in the body, even when I don’t need to process the body (i mean: i call the article just to output its title) the plug-in tag is processed, making many queries to the DB. :(
Thanks in advance.
Offline
#127 2006-06-28 18:17:13
Re: [plugin] [ORPHAN] bas_lightbox (Thumbnail galery with unobtrusive javascript)
I also add a home page tag trace
Look all the calls that bas_lightbox made, and I’m not even using the lightbox in the home page.
Thanks again for your time to take a look, Bastian.
Offline
#128 2006-06-28 18:38:24
Re: [plugin] [ORPHAN] bas_lightbox (Thumbnail galery with unobtrusive javascript)
This happens in line #66 of bas_lightbox:
$big = safe_row('id, ext,'.$caption,'txp_image','id ="'.$getImg.'"');
As far as I have understood the control flow of current Textpattern code, it parses the body and the excerpt of an article in advance, even if it is not needed. This includes the execution of plugin code. There is no way for Bastian’s plugin to avoid this.
zem recently added an alternate way of handling this which is available at the subversion repository. This change set still has issues with respect to sticky articles which needs some tender care.
So that’s at least what I have understood… Maybe someone with a deeper insight might add details or clarifications.
Last edited by wet (2006-06-28 18:39:24)
Offline
#129 2006-06-28 18:48:22
Re: [plugin] [ORPHAN] bas_lightbox (Thumbnail galery with unobtrusive javascript)
Thanks you, wet.
I didnt know that. I thought that body (and other fields) where only parsed if they were needed for the page output.
Is there any change that can be made at that line to avoid the problem?
If not, I will have to rethink a few things in my site and maybe discard bas_lightbox for a while… :(
I really like it but the slow performance with all that calls is really noticeable.
Offline
#130 2006-06-28 18:54:08
Re: [plugin] [ORPHAN] bas_lightbox (Thumbnail galery with unobtrusive javascript)
What, if you surrounded bas_lightbox by if_individual_article
?
Offline
#131 2006-06-28 18:55:06
Re: [plugin] [ORPHAN] bas_lightbox (Thumbnail galery with unobtrusive javascript)
Thank maniqui to point me on this and wet for the links.
I will have a look on that…
Offline
#132 2006-06-28 20:36:26
Re: [plugin] [ORPHAN] bas_lightbox (Thumbnail galery with unobtrusive javascript)
wet wrote:
What, if you surrounded bas_lightbox by
if_individual_article
?
Hi wet,
that was a good idea, and in fact, it has reduced the numbers of queries.
The only problem is that in many cases, even in individual-article context, I use the txp:article
tag in more than one place (to call some chunks but not the body of the currently displayed article).
So, with your clever sugggestion, the queries are reduced (because it doesnt make the queries for all the other articles, even if you are at an individual-article and have also a recent-articles list made with a txp:article_custom
, with your trick, those listed recent-articles doesn’t make the queries to the DB that’s cool but weird…).
It seems that the parse ignores the content inside txp:if_individual_article
that is inside an article body that is not the same as the currently displayed individual-article.
Do I explain myself?
Finally, I didnt take your suggested tip.
I choose to move the bas_lightbox
tag from the article body to an article form.
Of course, I have lost in customization capabilites (because I can’t put the plug-in tag wherever I want in the article body) but I have win in performance.
It seems that 4.0.4 will not parse article bodies
Thanks you, wet & Bastian.
BTW: friday… Argentina vs. Germany… many people will die of a heart attack. dont you think that?
Offline