Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#469 2009-04-20 17:32:33

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,433
Website GitHub

Re: smd_gallery: super-flexible gallery generator

decoderltd wrote:

Alas, it’d not playing ball and I’m struggling with the javascript. Does anybody have any idea where I’m going wrong?

Not without seeing a link to diagnose any JS errors. Your tags are fine and work on my test system. Does Firebug give any clues in terms of JS errors or pages “not found” in the Net pane?

EDIT: maniqui = speed demon :-)

EDIT2: you said 2 js files (I assume jquery.js and slimbox2.js). Did you also add the slimbox2.css file as a <link> tag?

Last edited by Bloke (2009-04-20 17:35:34)


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

#470 2009-04-20 17:51:20

decoderltd
Member
From: London
Registered: 2006-06-20
Posts: 248
Website

Re: smd_gallery: super-flexible gallery generator

Hi Stef,

Thanks for coming to my rescue once again. I had everything linked and present using forms (makes updating easier) but when I moved them directly to the page head it’s starting to work – in a fashion! Instead of the fullsize image appearing as an overlay it’s showing up outside the page area. Very strange…

EDIT – Please ignore, my fault. I had the CSS link as slimbox.css rather than slimbox2.css. Thanks again for your help.

Last edited by decoderltd (2009-04-20 17:55:15)

Offline

#471 2009-04-20 17:57:07

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,433
Website GitHub

Re: smd_gallery: super-flexible gallery generator

decoderltd wrote:

Instead of the fullsize image appearing as an overlay it’s showing up outside the page area

You have a duplicate set of these lines which isn’t an error but it’s page fluff:

<script src="http://www.enfieldbeekeepers.org.uk/js/slimbox/slimbox2.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="http://www.enfieldbeekeepers.org.uk/js/slimbox/css/slimbox.css" />
<script src="http://www.enfieldbeekeepers.org.uk/textpattern/jquery.js" type="text/javascript"></script>

And now you’ve linked to slimbox2.css instead of slimbox.css, I see it’s working :-) Cool

Last edited by Bloke (2009-04-20 17:57:56)


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

#472 2009-04-20 18:03:19

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,078
Website GitHub Mastodon Twitter

Re: smd_gallery: super-flexible gallery generator

Opted to eventually start experimenting with this plugin and I’m loving it.

i am using jquery’s thickbox and constructed the code I needed in just a few seconds. I wanted to use article_image with thickbox linking to the full size.

I am posting the code here should anybody else needs it:

<txp:variable name="articleimage" value='<txp:article_image />' />
<txp:if_variable name="articleimage" value="">
<txp:else/>
<txp:smd_gallery thumblimit="1" id="?article_image"><a class="thickbox" href="{url}" title="{alt}"><txp:article_image thumbnail="1" /></a>
</txp:smd_gallery>
</txp:if_variable>

Easy:) Thanks Stef!

Last edited by colak (2009-04-20 18:04:21)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#473 2009-04-20 18:05:39

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,433
Website GitHub

Re: smd_gallery: super-flexible gallery generator

colak wrote:

Easy:) Thanks Stef!

No problem. I thought you might like it once you tried it :-) Try going back to slimbox after this…!


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

#474 2009-04-29 05:31:03

mrtunes
Member
From: Toronto, On
Registered: 2007-03-12
Posts: 575
Website

Re: smd_gallery: super-flexible gallery generator

  • is there any way for the client to create new galleries(like in flickr or facebook)?
  • does anyone ever put a paypal link into a photo with this plugin for art displays?

Offline

#475 2009-04-29 08:18:29

Roger9
New Member
Registered: 2009-04-29
Posts: 1

Re: smd_gallery: super-flexible gallery generator

The form I have for my gallery is:

<li><img src=”{url}” alt=”{alt}” title=”{title}”></li>

But I want to give the first image only a class in the <li> tag as follows:

<li class=“active”><img src=”{url}” alt=”{alt}” title=”{title}”></li>

I’ve looked at using ‘countform’ but it’s not quite achieving what I’m after, probably just doing it wrong. Can anyone help.

TIA

- Roger

Offline

#476 2009-04-29 21:39:46

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,433
Website GitHub

Re: smd_gallery: super-flexible gallery generator

mrtunes wrote:

  • is there any way for the client to create new galleries(like in flickr or facebook)?

Dunno what you mean. smd_gallery does not create galleries; you need to upload images first! But if you mean “can it automatically show a gallery when images are uploaded to the Images tab” the answer is yes if you structure your articles and smd_gallery tag(s) correctly. It’s all down to how you manage it.

For example, you could make one gallery = one article so the client creates a new article called “My Drunken Evening”, then assign it to a dedicated section (which you have set up specially for image galleries and uses an smd_gallery tag). They could then enter an image category name in a nominated custom field so the smd_gallery tag can read that and show the images from that image category. Or perhaps you could tell them to create an image category with the same name as the article Title and use category="?title". Or you could show all categories on one page by using the onchange attribute. It really depends how you want to set it up.

does anyone ever put a paypal link into a photo with this plugin for art displays?

I’ve never done it but it’s possible. As long as you know — and more importantly, can store — the paypal code in each image (description field?) then you can create a link.


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

#477 2009-04-29 21:59:38

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,433
Website GitHub

Re: smd_gallery: super-flexible gallery generator

Roger9

That’s actually more awkward than I expected. Hmmm. Without using an external plugin (smd_if) you could try this, though it’s not very elegant:

<txp:smd_gallery countforn="1:add_active, :!1:use_li">
<img src="{url}" alt="{alt}" title="{title}"></li>
</txp:smd_gallery>

In Form add_active:

<li class="active">

and in Form use_li:

<li>

If that seems too cumbersome then use smd_if:

<txp:smd_gallery>
<li<txp:smd_if field="{counter}" value="1"> class="active"</txp:smd_if>><img src="{url}" alt="{alt}" title="{title}"></li>
</txp:smd_gallery>

Both untested, but should get you close to what you want. Sorry neither is ideal. I’ll have a think about ways to improve this kind of thing.


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

#478 2009-04-29 22:05:42

mrtunes
Member
From: Toronto, On
Registered: 2007-03-12
Posts: 575
Website

Re: smd_gallery: super-flexible gallery generator

Bloke wrote:

Dunno what you mean. smd_gallery does not create galleries; you need to upload images first! But if you mean “can it automatically show a gallery when images are uploaded to the Images tab” the answer is yes if you structure your articles and smd_gallery tag(s) correctly. It’s all down to how you manage it.

ok thanks for your reply. i guess what i was thinking was some sort of thing where the second the person creates a new image category, a new gallery is spawned.

but it sounds to me like future versions of textpattern should embrace the idea of a gallery, maybe as your plugin here gets more popular and more people continue to use this cms for image management. it would be quite user friendly if galleries were integrated into the image tab.

this particular project it is requested for an art gallery thing with new exhibits needing new galleries, and on another project someone asked me about grouping pictures by trip or by year.

Offline

#479 2009-04-29 22:19:42

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,433
Website GitHub

Re: smd_gallery: super-flexible gallery generator

mrtunes wrote:

the second the person creates a new image category, a new gallery is spawned.

Doable if you use one page to show all galleries. Check out examples 6 and 8 in the help.


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

#480 2009-05-12 16:32:09

kvnmcwebn
Member
From: Ireland
Registered: 2007-01-27
Posts: 724
Website

Re: smd_gallery: super-flexible gallery generator

Hi,
Have simple slideshow using this awesome plugin.
How can I increase the duration each image is up for:

Basically how do I get this duration into the below form?
duration: 2000

here is the gallery form

<div class=“slideshow” id=“slideshow”> <img src=”<txp:site_url />images/{id#1}.jpg” alt=”{alt#1}”/>
</div>

<script type=“text/javascript”>
var myShow = new Slideshow(‘slideshow’, [{imglist}], { hu: “<txp:site_url />images/”, type: “fade” }
);
</script>
thanks.

Last edited by kvnmcwebn (2009-05-12 17:06:05)


its a bad hen that wont scratch itself.
photogallery

Offline

Board footer

Powered by FluxBB