Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#451 2009-04-01 14:39:25
- mlarino
- Member
- Registered: 2007-06-29
- Posts: 367
Re: smd_gallery: super-flexible gallery generator
Ok, this post has only image 2,13 in the article_image field.
http://www.cityexpert.es/13/hola-tania
but as you can see in the source, its outputting 17,2,13,14,15,19,18,16 (all images in the images folder)
var data = ["17.jpg","2.jpg","13.jpg","14.jpg","15.jpg","19.jpg","18.jpg","16.jpg"];
var myShow = new Slideshow.KenBurns('my_show', data, {controller: true, hu: 'http://www.cityexpert.es/images/'});
myShow.start();
Last edited by mlarino (2009-04-01 14:42:33)
Offline
#452 2009-04-01 14:57:29
Re: smd_gallery: super-flexible gallery generator
mlarino wrote:
this post has only image 2,13 in the article_image field.
Baffling. I’ve just put this in my article form (right before <txp:body />):
<txp:smd_gallery
id="?article_image" form="gallery"
collate="quote:{imagedef}:{alt}" />
and this in my gallery form:
<div id="my_show" class="slideshow">
<a href="{imagedef#1}"><img src="{imagepath#1}{imagedef#1}" alt="{alt#1}" /></a>
</div>
<script type="text/javascript">
var data = [{imagedef}];
var myShow = new Slideshow.KenBurns('my_show', data, {controller: true, hu: '{imagepath#1}'});
myShow.start();
</script>
And when I put 2,13 in my Article Image field I see:
var data = ["2.jpg","13.jpg"];
in the HTML source. Clearly something is not working in your case, but I cannot figure out what it is because your exact code works on my test server! :-s
You do have smd_lib v0.35 installed, yes?
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
#453 2009-04-01 15:06:13
- mlarino
- Member
- Registered: 2007-06-29
- Posts: 367
Re: smd_gallery: super-flexible gallery generator
Yes, Smd_lib v0.35 is installed
Also ump_image, could that be causing some errors?
I will make a fresh install and see whats wrong, cant find mistakes in the code at all…
I will post if I see something
Thanks a lot for your help Bloke! I hope I can figure this out fast!
Offline
#454 2009-04-01 16:54:41
- mlarino
- Member
- Registered: 2007-06-29
- Posts: 367
Re: smd_gallery: super-flexible gallery generator
Is there a minimum requirement of textpattern version?
I am using 4.0.6
Offline
#455 2009-04-01 17:05:58
Re: smd_gallery: super-flexible gallery generator
mlarino wrote:
Is there a minimum requirement of textpattern version?
I don’t think so, but I’ve not tried v0.5 in anything less than 4.0.7. I would think you’d see more actual errors than just a functional one if it was not working (assuming your site is in debugging mode?) But you should definitely upgrade anyway.
BTW, what happens if you add debug="2" to the smd_gallery tag? Can you let me know what you see under ++ INCLUDED/EXCLUDED IDs AND CATs ++ and ++ WHERE CLAUSE ++ for the article you mentioned above please?
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
#456 2009-04-01 18:47:30
- mlarino
- Member
- Registered: 2007-06-29
- Posts: 367
Re: smd_gallery: super-flexible gallery generator
This is what I get with both (“”)
++ INCLUDED/EXCLUDED IDs AND CATs ++
array (
0 => '\'?article_image\'',
)
++ WHERE CLAUSE ++
(1=1 AND (txp_image.id IN ('?article_image')) ) ORDER BY txp_image.id asc
SELECT DISTINCT
txp_image.name,txp_image.id,txp_image.alt,txp_image.caption,txp_image.category,txp_image.author,txp_image.date,txp_image.ext,txp_image.w,txp_image.h,txp_image.thumbnail, txp_category.title AS category_title
FROM txp_image LEFT JOIN txp_category
ON txp_image.category = txp_category.name
WHERE (1=1 AND (txp_image.id IN ('?article_image')) ) ORDER BY txp_image.id asc
LIMIT 0, 99999
This is without the closing (“)
++ INCLUDED/EXCLUDED IDs AND CATs ++++ WHERE CLAUSE ++
(1=1) ORDER BY txp_image.category asc
SELECT DISTINCT txp_image.name,txp_image.id,txp_image.alt,txp_image.caption,txp_image.category,txp_image.author,txp_image.date,txp_image.ext,txp_image.w,txp_image.h,txp_image.thumbnail, txp_category.title AS category_title
FROM txp_image LEFT JOIN txp_category
ON txp_image.category = txp_category.name
WHERE (1=1) ORDER BY txp_image.category asc
LIMIT 0, 99999
I wish I could update to the latest textpattern but I am using a plugin I really need that only works in version 6, and not in 7 or 8 :(
Last edited by mlarino (2009-04-01 18:48:33)
Offline
#457 2009-04-02 00:17:50
Re: smd_gallery: super-flexible gallery generator
mlarino wrote:
array ( 0 => ‘\’?article_image\’‘,)
Aha! There’s the problem then. The ?article_image is not being converted to the list of images. It’s being passed literally to the query which is causing it to return nothing. In the ‘missing double quote’ version, the plugin cannot interpret your illegal id attribute so it just shrugs its shoulders and gives you all images instead.
What’s odd is that smd_lib should always strip off the leading ? or ! character. Thus, if you used ?squid and there was no TXP field called ‘squid’, it would use the literal word squid instead. It never leaves the ? behind.
The question is why. I doubt it’s the version of TXP because this is a rudimentary piece of code. It’s almost as if the contents of the id attribute are not being passed to smd_lib at all. One daft question: the quotes around your id attribute are ‘true’ quotes and not ‘curly’ quotes aren’t they? If your site is not in debugging mode, please put it in that mode and see if the plugin throws any other errors. I’m really stumped.
Last edited by Bloke (2009-04-02 00:18:55)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
#458 2009-04-02 07:33:04
- mlarino
- Member
- Registered: 2007-06-29
- Posts: 367
Re: smd_gallery: super-flexible gallery generator
I am going to see what heppens in a new installation of textpattern without any of the other plugins, but I would prefer finding the problem in this one, there is a lot of work into this site already :(
Thats what I get in debugging mode:
Error de etiqueta <txp:smd_gallery
id="?article_image" form="gallery"
collate="quote:{imagedef}:{alt}"/> -> Warning: preg_match_all() [function.preg-match-all]: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 10 on line 66
textpattern/lib/txplib_misc.php(469) : eval()'d code:66 preg_match_all()
textpattern/lib/txplib_misc.php(574) : eval()'d code:198 smd_dolist()
textpattern/publish.php:970 smd_gallery()
processtags()
textpattern/publish.php:929 preg_replace_callback()
textpattern/lib/txplib_misc.php:1460 parse()
textpattern/publish.php:800 parse_form()
textpattern/publish.php:826 doarticle()
textpattern/publish.php:519 parsearticles()
textpattern/publish.php:970 article()
Error de etiqueta <txp:smd_gallery
id="?article_image" form="gallery"
collate="quote:{imagedef}:{alt}"/> -> Warning: preg_match_all() [function.preg-match-all]: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 10 on line 66
textpattern/lib/txplib_misc.php(469) : eval()'d code:66 preg_match_all()
textpattern/lib/txplib_misc.php(574) : eval()'d code:199 smd_dolist()
textpattern/publish.php:970 smd_gallery()
processtags()
textpattern/publish.php:929 preg_replace_callback()
textpattern/lib/txplib_misc.php:1460 parse()
textpattern/publish.php:800 parse_form()
textpattern/publish.php:826 doarticle()
textpattern/publish.php:519 parsearticles()
textpattern/publish.php:970 article()
Offline
#459 2009-04-02 08:32:42
- mlarino
- Member
- Registered: 2007-06-29
- Posts: 367
Re: smd_gallery: super-flexible gallery generator
Nothing,
New installation of Textpattern .8 and nothing works
no clue whats going on.
Tag error: <txp:smd_gallery
id="?article_image" form="gallery"
collate="quote:{imagedef}:{alt}"/> -> Warning: preg_match_all() [function.preg-match-all]: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 10 on line 66
Tag error: <txp:smd_gallery
id="?article_image" form="gallery"
collate="quote:{imagedef}:{alt}"/> -> Warning: preg_match_all() [function.preg-match-all]: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 10 on line 66
and I get this on the .6 installation
Error de etiqueta <txp:smd_gallery
id="?article_image" form="gallery"
collate="quote:{imagedef}:{alt}"/> -> Warning: preg_match_all() [function.preg-match-all]: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 10 on line 66
textpattern/lib/txplib_misc.php(469) : eval()'d code:66 preg_match_all()
textpattern/lib/txplib_misc.php(574) : eval()'d code:198 smd_dolist()
textpattern/publish.php:970 smd_gallery()
processtags()
textpattern/publish.php:929 preg_replace_callback()
textpattern/lib/txplib_misc.php:1460 parse()
textpattern/publish.php:800 parse_form()
textpattern/publish.php:826 doarticle()
textpattern/publish.php:519 parsearticles()
textpattern/publish.php:970 article()
Error de etiqueta <txp:smd_gallery
id="?article_image" form="gallery"
collate="quote:{imagedef}:{alt}"/> -> Warning: preg_match_all() [function.preg-match-all]: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 10 on line 66
textpattern/lib/txplib_misc.php(469) : eval()'d code:66 preg_match_all()
textpattern/lib/txplib_misc.php(574) : eval()'d code:199 smd_dolist()
textpattern/publish.php:970 smd_gallery()
processtags()
textpattern/publish.php:929 preg_replace_callback()
textpattern/lib/txplib_misc.php:1460 parse()
textpattern/publish.php:800 parse_form()
textpattern/publish.php:826 doarticle()
textpattern/publish.php:519 parsearticles()
textpattern/publish.php:970 article()
Last edited by mlarino (2009-04-02 11:40:00)
Offline
#460 2009-04-02 12:58:35
Re: smd_gallery: super-flexible gallery generator
mlarino wrote:
Warning: preg_match_all() [function.preg-match-all]: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset 10 on line 66
There’s nothing I can do about that. If you’d had the site in debugging mode from the start you’d have seen this error right away!
It’s your server configuration that is the reason it is not working. See RedFox’s identical post with smd_slimbox and my temporary solution. Ask your host to upgrade the PCRE component in their PHP installation.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
#461 2009-04-02 16:08:43
Re: smd_gallery: super-flexible gallery generator
I wrote:
There’s nothing I can do about that.
I lied. smd_lib v0.36 | compressed will now gracefully fall back to ASCII mode if your server does not support Unicode. Anyone using v0.35, please upgrade.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
#462 2009-04-02 16:12:21
- mlarino
- Member
- Registered: 2007-06-29
- Posts: 367
Re: smd_gallery: super-flexible gallery generator
Thanks Bloke! that solved all my problems!
Offline
#463 2009-04-05 15:02:55
Re: smd_gallery: super-flexible gallery generator
- First
- «
- 1
- 2
- »
- Last
instead of “First « 1 2 » Last”. I think it’s due to the default <li>. What should I do to change it? Thank you in advance for your time!
Offline
#464 2009-04-05 15:18:30
Re: smd_gallery: super-flexible gallery generator
feiliao wrote:
the gallery_nav form. It showed as bulletin points:
Yes it’s designed that way by default. The paging attribute uses <li> (which you can of course change using navwraptag and navbreak) but the easiest method for dealing with the bullets is to apply CSS to tame the list. Specifically something like this (untested):
.smd_gallery_nav {
list-style: none;
display: inline;
}
Does that get you going in the right direction?
Last edited by Bloke (2009-04-05 15:18:55)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Hire Txp Builders – finely-crafted code, design and Txp
Offline
#465 2009-04-06 01:18:32
Re: smd_gallery: super-flexible gallery generator
Thanks Bloke! I didn’t aware that I could change navwraptag and navbreak (my bad, I did read the instruction but somehow it slipped out of my mind). So I changed them and applied some css to .smd_gallery_nav, and everything looks beautiful now. Thank you so much for answering my question and, most importantly, writing this plugin.
Offline