Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#109 2008-06-07 13:56:43

immarabi
Member
Registered: 2008-04-29
Posts: 57

Re: smd_gallery: super-flexible gallery generator

Is your Admin->Preferences -> Site URL set to just xxx.com?

No, it is set to www.xxx.com

should it be without the www for the plugin to work?

Last edited by immarabi (2010-10-03 16:29:33)

Offline

#110 2008-06-07 14:30:12

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

Re: smd_gallery: super-flexible gallery generator

immarabi wrote:

No, it is set to www.shattuckart.com. should it be without the www for the plugin to work?

Dunno, but it’s worth trying. It may be that the slideshow plugin sees the www and non-www as two different domains and doesn’t like it.


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

#111 2008-06-08 08:30:57

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: smd_gallery: super-flexible gallery generator

Hi Stef, trying to find a clean and simple way of displaying various image galleries on one page, using a background colour and border for each gallery.

Currently, I have this in the page source:

<div class="contentbox">
<txp:smd_gallery category="one, two, three, four" wraptag="div" class="thumbs" form="gallery" />
</div>

And this in the gallery form:

<txp:if_different>
<h2>{category_title}</h2>
</txp:if_different>
<a href="{url}" title="{title}"><img src="{thumburl}" alt="{alt}" /></a>

What happens now is that the contentbox div surrounds all the galleries, rather than each one. Is there a simple way to do this?

Edit: I realise that I could just make four smd_gallery tags and surround each one with the div, but that’s not clean :-) Tried placing the div into the form, but that gave some interesting results!

Last edited by jstubbs (2008-06-08 08:32:53)

Offline

#112 2008-06-08 08:46:11

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

Re: smd_gallery: super-flexible gallery generator

jstubbs wrote:

If you remove the contentbox from round the smd_gallery tag, does this work:

<txp:if_different>
<h2>{category_title}</h2>
<div class="contentbox">
</txp:if_different>
<a href="{url}" title="{title}"><img src="{thumburl}" alt="{alt}" /></a>
<txp:if_different>
</div>
</txp:if_different>

?? It’s a bit kludgy.

If it doesn’t work I’ll have to try and find a better way of handling multiple galleries from one tag. Will put my thinking cap on, thanks for highlighting 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

#113 2008-06-08 09:23:17

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: smd_gallery: super-flexible gallery generator

Hi Stef, thanks for the tip. I had tried something similar earlier, and the result is the same – the div surrounds the H2 and the first image of each gallery.

I have changed the page/form back to what I had before. The gallery is here

Edit: You can see from the page what I am trying to achieve – a div box surrounding each gallery, as opposed to all the galleries.

Last edited by jstubbs (2008-06-08 09:24:31)

Offline

#114 2008-06-08 09:35:09

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

Re: smd_gallery: super-flexible gallery generator

jstubbs wrote:

the div surrounds the H2 and the first image of each gallery.

Bugger, of course. OK, I’ll see what I can come up with to enhance the plugin later today. Sorry for the inconvenience.


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

#115 2008-06-08 09:52:27

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: smd_gallery: super-flexible gallery generator

Hi again, is it possible to sort the categories according to the order they are placed in the tag?

<div class="contentbox">
<txp:smd_gallery category="one, two, three, four" wraptag="div" class="thumbs" form="gallery" />
</div>

In this example, what I would like to do is display the categories in the exact order I place them. I can see some sort options in the plugin help, but not sure if it works according to the order the categories are called.

Offline

#116 2008-06-08 10:03:19

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

Re: smd_gallery: super-flexible gallery generator

jstubbs wrote:

Hi again, is it possible to sort the categories according to the order they are placed in the tag?

I think it’s pot luck with categories, since MySQL returns them in the order they are inserted into the database. By default the plugin will order by category (sort="" will stop that and leave the order to chance).

At the moment, sort="fixed" only works if you use the id parameter for the categories. I can’t remember why I limited it to that scenario, but there was probably a good reason. If, however I find there isn’t a good reason and it was just a legacy bit of code from slimbox, I’ll lift the restriction. Hmph, I call this a flexible gallery plugin, but it’s clearly not! I’ll see what I can do.

A temporary workaround until I can tend to this would be to use id="4, 12, 2, 7" sort="fixed" instead of the category names.


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

#117 2008-06-09 12:04:49

progre55
Member
Registered: 2006-05-02
Posts: 668

Re: smd_gallery: super-flexible gallery generator

immarabi:

I could not recreate your issue so I am glad to see you got it worked out.

progre55

Offline

#118 2008-06-09 14:02:26

progre55
Member
Registered: 2006-05-02
Posts: 668

Re: smd_gallery: super-flexible gallery generator

Bloke:

Hoping you can assist with this one. Now I am trying to integrate the plug in with: Galleria

I can get it working without smd_gallery: super-flexible gallery generator.

I am sure I am overlooking something obvious, but the best I could get with tweaking the plug in script was getting the first image in a category to pull up.

My Tag

<txp:smd_gallery category="index" form="gallery_bloke" collate="quote:{imagedef}" />

My Form

<ul class="gallery"> 
<img src="{imagepath#1}{imagedef#1}" alt="{alt#1}" />
</ul>

progre55

Offline

#119 2008-06-09 14:32:52

robin746
Member
From: Ireland
Registered: 2007-09-22
Posts: 113
Website

Re: smd_gallery: super-flexible gallery generator

I have added this plugin to a site formerly (and still) using Slimbox, which works fine. Before changing anything my setup included mootools.js and slimbox.js linked to in my page header. I have an article with three attached images.

To get smd_gallery working I installed the latest version and turned it on. I created a form named r-gallery like so:

<a rel=“lightbox-smd” href=”{url}” title=”{title}”>{object}</a>

(Is this supposed to be an article or misc form? I have tried both.)

My code to display the images is in an article form like so:

<txp:upm_if_article_image>
<txp:smd_gallery form=“r-gallery” thumbsize=“270, 200” thumblimit=“1” sort=“fixed” id=”?article_image” />
</txp:upm_if_article_image>
&nbsp;

Nothing shows up on the rendered page. Revealing codes reveals only the nbsp… nothing else where the gallery code should be. No errors are generated. What I am doing wrong this time? Is there a step in the install I missed?


robin

Offline

#120 2008-06-09 15:05:48

immarabi
Member
Registered: 2008-04-29
Posts: 57

Re: smd_gallery: super-flexible gallery generator

So without the www in the Admin> PReferences and an .htaccess code like this:

#DirectoryIndex  index.php  index.html 

#Options +FollowSymLinks
#Options -Indexes

<IfModule mod_rewrite.c> RewriteEngine On #RewriteBase /relative/web/path/ RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+) – [PT,L]

RewriteRule ^(.*) index.php

RewriteCond %{HTTP:Authorization} !^$ RewriteRule .* – [E=REMOTE_USER:%{HTTP:Authorization}]

RewriteCond %{HTTP_REFERER} !^http://(.+\.)?xxx\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*\.(jpe?g|gif|bmp|png|jpg)$ /images/nosteal.jpe [L]

  1. For sites running on a port other than 80
    RewriteCond %{HTTP_HOST} !^www\.xxx\.com [NC]
    RewriteCond %{HTTP_HOST} !^$
    RewriteCond %{SERVER_PORT} !^80$
    RewriteRule ^/(.*) http://sitename.com%{SERVER_PORT}/$1 [L,R]

</IfModule>

#php_value register_globals 0

the slideshow doesn’t work when you type in www in the address bar

and with the www in Admin > Preferences and a different .htaccess
the slideshow works in IE both ways but doesn’t work in Firefox without the www and I get this error:

Access to restricted URI denied" code: "1012

Any suggestions?

Last edited by immarabi (2010-08-13 14:48:32)

Offline

Board footer

Powered by FluxBB