Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#889 2012-02-06 13:44:24
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,308
Re: smd_gallery: super-flexible gallery generator
do i need to add something to onchange=""
cause it solved the thumblimit issue, but now only shows images from last added category?
Offline
#890 2012-02-06 13:51:42
Re: smd_gallery: super-flexible gallery generator
Gallex wrote:
do i need to add something to
onchange=""
cause it solved the thumblimit issue, but now only shows images from last added category?
No, but you will need to remove the -{category}
from your rel="fancy-{category}"
because that’s telling the lightbox script that you only want to cycle through images with the same rel
value.
Last edited by Bloke (2012-02-06 13:52:42)
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
Online
#891 2012-02-06 14:07:45
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,308
Re: smd_gallery: super-flexible gallery generator
bingo! thank’s bloke!
Offline
#892 2012-02-12 14:54:33
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,308
Re: smd_gallery: super-flexible gallery generator
i would like to sort my gallery by category date – last added category would be first. did this:
<txp:smd_gallery category="!header-image, !site-design, !content, !toetajad" sort="category desc, date desc" thumblimit="1" thumbsize="70" onchange="category_title" onchangewraptag="h3" grouptag="div" groupclass="album">
{grouptagstart}
<a class="fancybox" rel="fancy-{category}" href="{url}" title="{caption}">
{object}
</a>
{onchange:category_title}
{grouptagend}
</txp:smd_gallery>
but it sorts by category name :( category name starting with letter ‘a’ is last and category name starting with ‘s’ is first. take a look
hmm…..
Offline
#893 2012-02-12 19:21:11
Re: smd_gallery: super-flexible gallery generator
Gallex wrote:
i would like to sort my gallery by category date
There’s no such field, so you’re out of luck. Categories don’t have the concept of insertion order: they’re merely arranged into a hierarchical tree (internally stored as a modified preorder binary tree if you’re interested).
Hence sort="category desc"
is giving you reverse category by name, and then date desc
orders each category by reverse date.
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
Online
#894 2012-02-13 10:32:11
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,308
Re: smd_gallery: super-flexible gallery generator
Bloke wrote:
There’s no such field, so you’re out of luck. Categories don’t have the concept of insertion order
pitty…
one more question: i use category based gallery (code above), is it possible to create category based navigation? display 10 categories per page for example
Offline
#895 2012-02-15 11:34:54
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,308
Re: smd_gallery: super-flexible gallery generator
is it?
Offline
#896 2012-02-15 12:00:51
Re: smd_gallery: super-flexible gallery generator
Gallex wrote:
is it possible to create category based navigation? display 10 categories per page for example
Can’t you use Txp for this? You can use /category/image/cat-name
URLs now and use <txp:if_category>
’s type
attribute to detect an image cat list. Once you have detected that, you can render a gallery tag per cat (the container of <txp:category_list type="image">
maybe?). Txp should be able to page cat image lists using standard offset/limit and newer/older paging tags. As a last resort, smd_gallery’s paging options might do it.
I can’t recall trying it, but if you fiddle about along those lines something workable should pop out.
Last edited by Bloke (2012-02-15 12:02:09)
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
Online
#897 2012-02-17 10:59:11
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,308
Re: smd_gallery: super-flexible gallery generator
this is too much for me… i’m afraid
Offline
#898 2012-03-23 10:32:56
- ff0000.it
- New Member
- From: Italy
- Registered: 2012-03-14
- Posts: 9
Re: smd_gallery: super-flexible gallery generator
Hi all,
i’m new to TXP and I was (trying to) play with smd_gallery to build a slideshow for the frontpage, but it won’t work.
Here the tags:
<txp:if_section name="">
<txp:smd_gallery category="frontpage-slideshow" combo="imglist:{id}{ext}" collate="quote:{imglist}:{alt}" form="frontpage_slideshow" />
<script type="text/javascript">
var frontpage_slideshow = new Slideshow("frontpage-slideshow", { hu: "<txp:site_url />images/", images: [{imglist}], caption: [{alt}], type: "fade" });
</script>
</txp:if_section>
and the form:
<div id="frontpage-slideshow" class="slideshow">
<img src="<txp:site_url />images/{id#1}{ext#1}"
alt="{alt#1}" width="760" height="425" />
</div>
basically It’s the same as the slideshow example available on plugin’s help page.
I encounter two issues:
- the smd_gallery tag expands to the first image only
- the Javascript goes wrong and Firebug output is “invalid object initializer ‘images: [{imglist}]’”
where am i wrong?!?
Thanks,
ff0000.it
{Added Textile’s bc.
for better code display. – Uli}
Last edited by uli (2012-03-23 10:58:25)
Offline
#899 2012-03-23 11:01:31
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,311
Re: smd_gallery: super-flexible gallery generator
It’s been a while since I last used smd_gallery but from what I see you’re using replacement tags outside the gallery tag. Try placing the script tag inside the form (try above or below the HTML, like I said: it’s been a while).
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#900 2012-03-23 11:09:31
- ff0000.it
- New Member
- From: Italy
- Registered: 2012-03-14
- Posts: 9
Re: smd_gallery: super-flexible gallery generator
uli wrote:
It’s been a while since I last used smd_gallery but from what I see you’re using replacement tags outside the gallery tag. Try placing the script tag inside the form (try above or below the HTML, like I said: it’s been a while).
Thanks Uli, now the Javascript error is gone… i messed up something else, but it seems to be going on the right way :-)
Last edited by ff0000.it (2012-03-23 11:29:13)
Offline