Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#409 2009-03-09 09:38:09
Re: smd_gallery: super-flexible gallery generator
mrtunes
Glad it helps.
i have to also say that quoting and coding on this forum is really hard to figure out. :(
It’s Textile so it takes a while to get your head round it. FYI, you need to put a blank line above any bc.
and a blank line below any bq.
for it to render correctly. Meh.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#410 2009-03-10 23:14:49
Re: smd_gallery: super-flexible gallery generator
Bloke wrote:
It’s Textile so it takes a while to get your head round it. FYI, you need to put a blank line above any
bc.
and a blank line below anybq.
for it to render correctly. Meh.
ok so i got my last issue with the links in the images ironed out, thanks. the next one is with the slimbox example. i’m not sure where i go to add the preferences that enable the previous and next buttons to show up. ideally i would also want to activate those on the keyboard. from the slimbox documentation i found an example of options, but not where to insert this. again, not entirely in the scope of smd_gallery, you just offer the tools, i know ;)
{ overlayOpacity: 0.6,
easing: "easeOutElastic",
captionAnimationDuration: 1,
counterText: "Image {x} sur {y}",
closeKeys: [27, 70],
nextKeys: [39, 83] }
Last edited by mrtunes (2009-03-10 23:15:34)
Offline
#411 2009-03-10 23:32:35
Re: smd_gallery: super-flexible gallery generator
mrtunes
From Christophe’s site:
There are some options that you can specify in the form of a javascript object inside the script (look for “put custom options here”)
Have a look in the slimbox2.js file and see if you can override the options there.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#412 2009-03-14 18:06:41
Re: smd_gallery: super-flexible gallery generator
Hi Bloke,
Not sure if I’m doing something wrong, or if I don’t fully understand the new escape
attribute.
I’m using the last version (0.51) of smd_gallery.
When using this caption:
Wyclef rockin' out a Pensa at the BET Inauguration Ball
I’m still getting the following error:
Parse error: syntax error, unexpected T_STRING in /nfs/c01/h07/mnt/37744/domains/rudysmusic.com/html/textpattern/lib/txplib_misc.php(570) : eval()'d code(244) : eval()'d code on line 3
If I remove the offending quote ('
), the error disappears.
By reading the plugin help, I see that the default value for escape is set to escape the caption, the alt, and the title.
I’ve tried also by putting the attribute explicitly, but no luck.
I’m not sure if the plugin is meant to escape those straight single quotes
In the meanwhile, I’ve used a curly quote (’
), and it works fine with that one.
Thanks in advance.
Last edited by maniqui (2009-03-14 18:52:47)
Offline
#413 2009-03-14 18:23:27
Re: smd_gallery: super-flexible gallery generator
maniqui wrote:
If I remove the offending quote (
'
), the error disappears.
Dammit, I forgot to fix that stupid bug when I released the latest version. Sorry. I’ll try and remember to get it sorted in the next rev.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#414 2009-03-18 15:23:26
Re: smd_gallery: super-flexible gallery generator
Bloke just a quick note I am using smd_gallery version 0.5 not sure if you fixed this bug in the new version or not but here it is: If you name a image category “my-category” and leave the title also as “my-category” when you call plugin in an article like so:
<txp:smd_gallery category=“my-category” form=“some-form” sort=“random” />
you get the results returned twice so you get 2 of each image. Think it is a querry issue, just letting you know. Not the big of a deal as most use a different title for their categories but some may not.
Last edited by cuda (2009-03-18 15:24:11)
Offline
#415 2009-03-18 18:56:46
Re: smd_gallery: super-flexible gallery generator
@cuda:
It happened to me too!
Check this post by me (it came from this post, also by me)
If you don’t want to read that much, just try resaving your category (in Content -> Category), and see if that makes the difference.
It was something mysterious for me…
Offline
#416 2009-03-19 15:44:07
Re: smd_gallery: super-flexible gallery generator
Hi Bloke,
I’ve this code:
<txp:upm_textile>{caption} <!-- testing upm_textile: "a link":http://www.google.com --> </txp:upm_textile>
And inside caption
, I’ve got:
Check "example":http://www.example.com, it's _italic_.
This is what I get:
- the link inside the comment is textiled.
- the link inside the caption isn’t textiled
- the
_italic_
is textiled.
I’ve also tried this, with no luck:
<txp:variable name="caption" value="{caption}" />
<txp:upm_textile><txp:variable name="caption" /></txp:upm_textile>
Any idea of what could be going wrong? Changing the plugin order on “Admin -> Plugins” could make any difference?
Thanks in advance.
Offline
#417 2009-03-19 19:43:20
Re: smd_gallery: super-flexible gallery generator
maniqui wrote:
the link inside the comment is textiled ; the link inside the caption isn’t textiled ; the
_italic_
is textiled
Bizarre! Why would it run only part of it through Textile? Oh, wait, hang on. Is it because smd_gallery is set to escape
the caption by default? Thus it’s converting it into:
Check "example":http://www.example.com, it's _italic_.
which Textile won’t be able to parse?
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#418 2009-03-19 20:08:18
Re: smd_gallery: super-flexible gallery generator
Ops… I’ve to test but you are probably right… I’m ashamed.
So, if I set smd_gallery
to escape caption to avoid playing with explosive material when using {caption}
inside smd_if
(that’s the reason which the attribute was created for, isn’t it? can’t remember, even when I was the one who asked for it), then I can’t use it unescaped for other magic tricks… like the textile trick above…
Mmmm… I’m trapped… the only possible escape (no pun intended) is… a yet-to-be-coded {caption_esc}
magic tag?
Offline
#419 2009-03-19 21:48:15
Re: smd_gallery: super-flexible gallery generator
maniqui wrote:
So, if I set
smd_gallery
to escape caption… then I can’t use it unescaped for other magic tricks… like the textile trick above…
If the plugin handled apostrophes correctly you could probably safely turn off escaping and use Textile as you intend. I really must fix that.
…a yet-to-be-coded
{caption_esc}
magic tag?
I considered that before I added the escape
attribute, and rejected the idea because it added too many replacements. Besides, where does it end? {date_esc}
in case you want to mis-use the date field?!
If you want to use both escaped and unescaped replacements, make up a combo called {caption_esc}
from the {caption}
and don’t include caption_esc in the list of things to escape
. Escaping is done at the very end of the plugin, just prior to output, so combos can be freely made up from any existing unescaped info (I’ve not tested it, but it’s suppposed to work that way).
Last edited by Bloke (2009-03-19 21:49:41)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#420 2009-03-20 18:14:10
- kevinpotts
- Member
- From: Ghost Coast
- Registered: 2004-12-07
- Posts: 370
Re: smd_gallery: super-flexible gallery generator
Stef — Amazing plugin. Have used it on numerous sites, but I’m trying to do something relatively simple and I can not seem to get the query correct. Essentially, I am trying to display the number of images within a specific image category. Here is what I have for the call inside an article form:
<txp:smd_gallery category='<txp:article_url_title />' form="gallery.count" />
The image category name is deliberately matched to the the title of the article to marry the two together. Here is the form gallery.count
:
{totalimages} pictures
The output kind of works. It counts the number of images inside the image category correctly, but then outputs the data the same number of times as the actual count. So if there are five images inside a category, it outputs:
5 pictures5 pictures5 pictures5 pictures5 pictures
I tried setting the attribute thumblimit
to “1” but that did not do anything. Any thoughts? Thanks!
Kevin
(graphicpush)
Offline