Textpattern CMS support forum

You are not logged in. Register | Login | Help

#441 2009-03-31 09:59:11

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: smd_gallery: super-flexible gallery generator

mlarino – you should post your smd_gallery’s code which causes error


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#442 2009-03-31 10:03:35

mlarino
Member
Registered: 2007-06-29
Posts: 367

Re: smd_gallery: super-flexible gallery generator

This is 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>

This is my Page:

<txp:output_form form="doctype"/>
<txp:output_form form="head_anuncio"/>
<body id="home">
<h1><txp:title /></h1>
<txp:smd_gallery id="?article_image form="gallery" collate="quote:{imagedef}" />
<txp:body />
</body>
</html>

Last edited by mlarino (2009-03-31 10:05:39)

Offline

#443 2009-03-31 10:12:43

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: smd_gallery: super-flexible gallery generator

You missed quote in id attr
Your code: <txp:smd_gallery id="?article_image form="gallery" collate="quote:{imagedef}" />
Should be <txp:smd_gallery id="?article_image" form="gallery" collate="quote:{imagedef}" />


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#444 2009-03-31 10:38:02

mlarino
Member
Registered: 2007-06-29
Posts: 367

Re: smd_gallery: super-flexible gallery generator

Wierd!
my code works without the “
but when I ad the “ you say is missing (and I also think it was missing) it stops working…

and nothing is redered in the html

HTML without (") in tag:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="" lang="">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="http://www.xxxxx.es/slideshow2/js/mootools.js"></script>
<script type="text/javascript" src="http://www.xxxxx.es/slideshow2/js/slideshow.js"></script>
<script type="text/javascript" src="http://www.xxxxx.es/slideshow2/js/slideshow.kenburns.js"></script>
<link rel="stylesheet" type="text/css" href="http://www.xxxxx.es/slideshow2/css/slideshow.css" />
<script type="text/javascript" src="http://www.xxxxx.es/index.php?js=upm_image"></script>
</head>
<body id="home">
<h1>Espacio 33</h1>
<div id="my_show" class="slideshow">
  <a href="2.jpg"><img src="http://www.xxxxx.es/images/2.jpg" alt="" /></a>
</div>
<script type="text/javascript">
  var data = ["2.jpg","13.jpg","14.jpg","15.jpg"];
  var myShow = new Slideshow.KenBurns('my_show', data, {controller: true, hu: 'http://www.xxxxx.es/images/'});
  myShow.start();
</script>
<p><strong>Direcci&oacute;n: </strong>Paseo de la Castellana, 250 (Torre Espacio, piso 33)<br /> <strong>Localidad: </strong>Madrid<br />     	<strong>Tel&eacute;fono: </strong>91 427 68 91<br /> <strong>Metro: </strong>Bego&ntilde;a<br /> <strong>Tipo de Cocina: </strong>De Mercado<br /> <strong>Especialidad: </strong>Langostinos de Sanl&uacute;car a la sal y carrillera de ternera en fricand&oacute; de zanahorias<br /> <strong>Precio: </strong>de 50 a 75 euros<br /> <strong>Fumadores: </strong>No<br /> <strong>Aparcacoches: </strong>No</p><p>Refero autem ut suscipit luptatum vero molior odio, ut, opto similis ex aptent enim. Vulpes abigo, ideo indoles eligo sagaciter iriure. Nostrud indoles humo consequat odio consequat caecus. Abdo sudo oppeto fere eu multo duis ad. Neo huic autem, si os, opto magna ratis, haero velit vicis autem dignissim venio. Ex, proprius facilisi praemitto wisi delenit enim in feugiat ille. Lenis euismod defui utinam amet aliquip valetudo. Nisl dolus lenis tum decet suscipere. <br /><br />Nulla quidem paulatim pala, gilvus exerci vel lobortis olim comis. Sit, roto, ut oppeto eros foras zelus singularis, ullamcorper vicis premo comis. Nostrud sino feugiat ludus letatio natu duis adipiscing sit tamen. <br /><br />Ea nostrud esse tation secundum autem olim iustum lobortis suscipit, melior lobortis erat. Populus exerci vulputate interdico ex ut ymo pagus, transverbero vel suscipere, ad pala illum jumentum. Ea macto paulatim nostrud distineo epulae, consequat illum letalis. Iusto refero ille caecus, tincidunt typicus erat nimis occuro illum.</p>
</body>
</html>

HTML with (") in tag:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="" lang="">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="http://www.xxxxx.es/slideshow2/js/mootools.js"></script>
<script type="text/javascript" src="http://www.xxxxx.es/slideshow2/js/slideshow.js"></script>
<script type="text/javascript" src="http://www.xxxxx.es/slideshow2/js/slideshow.kenburns.js"></script>
<link rel="stylesheet" type="text/css" href="http://www.xxxxx.es/slideshow2/css/slideshow.css" />
<script type="text/javascript" src="http://www.xxxxx.es/index.php?js=upm_image"></script>
</head>
<body id="home">
<h1>Espacio 33</h1>
<p><strong>Direcci&oacute;n: </strong>Paseo de la Castellana, 250 (Torre Espacio, piso 33)<br /> <strong>Localidad: </strong>Madrid<br />     	<strong>Tel&eacute;fono: </strong>91 427 68 91<br /> <strong>Metro: </strong>Bego&ntilde;a<br /> <strong>Tipo de Cocina: </strong>De Mercado<br /> <strong>Especialidad: </strong>Langostinos de Sanl&uacute;car a la sal y carrillera de ternera en fricand&oacute; de zanahorias<br /> <strong>Precio: </strong>de 50 a 75 euros<br /> <strong>Fumadores: </strong>No<br /> <strong>Aparcacoches: </strong>No</p><p>Refero autem ut suscipit luptatum vero molior odio, ut, opto similis ex aptent enim. Vulpes abigo, ideo indoles eligo sagaciter iriure. Nostrud indoles humo consequat odio consequat caecus. Abdo sudo oppeto fere eu multo duis ad. Neo huic autem, si os, opto magna ratis, haero velit vicis autem dignissim venio. Ex, proprius facilisi praemitto wisi delenit enim in feugiat ille. Lenis euismod defui utinam amet aliquip valetudo. Nisl dolus lenis tum decet suscipere. <br /><br />Nulla quidem paulatim pala, gilvus exerci vel lobortis olim comis. Sit, roto, ut oppeto eros foras zelus singularis, ullamcorper vicis premo comis. Nostrud sino feugiat ludus letatio natu duis adipiscing sit tamen. <br /><br />Ea nostrud esse tation secundum autem olim iustum lobortis suscipit, melior lobortis erat. Populus exerci vulputate interdico ex ut ymo pagus, transverbero vel suscipere, ad pala illum jumentum. Ea macto paulatim nostrud distineo epulae, consequat illum letalis. Iusto refero ille caecus, tincidunt typicus erat nimis occuro illum.</p>
</body>
</html>

I am confused…

Last edited by mlarino (2009-03-31 10:45:20)

Offline

#445 2009-03-31 12:02:29

mlarino
Member
Registered: 2007-06-29
Posts: 367

Re: smd_gallery: super-flexible gallery generator

The plugin is getting all the images from the images folder, instead of only the images from the article_image field…
I studied the plugin deeper but cant find any mistake in what I wrote…

Is it posible that this code:

<script type="text/javascript">
myShow1 = new Slideshow("slideshow1",
  { hu: "<txp:site_url />images/",
    images: [{imglist}],
    captions: [{alt}],
    classes: ["prev","next","active"],
    type: "fade"
  });
</script>

is getting all those images from the images folder instead of the ones in article_image?

because this is what I am getting in every single article:

<script type="text/javascript">
  var data = ["2.jpg","13.jpg","14.jpg","15.jpg"];
  var myShow = new Slideshow.KenBurns('my_show', data, {controller: true, hu: 'http://www.xxxxx.es/images/'});
  myShow.start();
</script>

Any ideas?
http://www(dot)cityexpert(dot)es

Last edited by mlarino (2009-03-31 16:42:21)

Offline

#446 2009-04-01 09:37:05

mlarino
Member
Registered: 2007-06-29
Posts: 367

Re: smd_gallery: super-flexible gallery generator

<txp:smd_gallery id="?article_image" form="gallery"
  collate="quote:{imagedef}:{alt}" />

Can that code be placed in a form instead of a page?
I am playing around with different options, none seem to work
id=”?article_image” doest do anything.
id=”?article_image (without the closing “) displays every image in the images folder.

Is this a bug with the ID? because I don’t see where I am making a mistake.

Has anyone successfully created a slideshow of article images inside a post?

Each post with its own article images of course.

Thanks!

Last edited by mlarino (2009-04-01 09:38:23)

Offline

#447 2009-04-01 12:15:59

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,813
Website

Re: smd_gallery: super-flexible gallery generator

mlarino wrote:

HTML without (") in tag:

If this is your HTML without the missing double quote:

<div id="my_show" class="slideshow">
  <a href="2.jpg"><img src="http://www.xxxxx.es/images/2.jpg" alt="" /></a>
</div>
<script type="text/javascript">
  var data = ["2.jpg","13.jpg","14.jpg","15.jpg"];
  var myShow = new Slideshow.KenBurns('my_show', data, {controller: true, hu: 'http://www.xxxxx.es/images/'});
  myShow.start();
</script>

then it probably means you have another missing quote or some unvalidated code elsewhere on the page. Does your page validate? Look at the code in the Firefox View Source tool because that often highlights unterminated characters and stuff it cannot interpret — it shows it up in red text.

Is this a bug with the ID?

Shouldn’t be if you are using the latest versions of smd_lib and smd_gallery. The ID range bug was squashed in v0.35 of smd_lib.

Has anyone successfully created a slideshow of article images inside a post?

Yes, me! I can assure you it works. As long as you have a comma-separated list of IDs in your article image field, your form will output the code necessary to render a slideshow. The code is being output fine on the page (as shown above, you can see it is using images 2, 13, 14, and 15). If you’re not seeing anything when it’s rendered on-screen then that is another issue to do with the sildeshow javascript and not the plugin. The plugin’s job ends when the code is output.


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

#448 2009-04-01 14:22:27

mlarino
Member
Registered: 2007-06-29
Posts: 367

Re: smd_gallery: super-flexible gallery generator

Hi Bloke,
Thanks for the reply,
The code the plugin is outputting is correct, and I see the Slideshow, the problem is that it not only outputs the coma separated images from the article field, it just outputs every image in the image/ folder.

I will try to find an error in my code and see if that is the problem.
I am using v0.51 so I guess it should work fine.
I will try and see what the problem is and come back
Thanks again for your help!

Offline

#449 2009-04-01 14:26:01

mlarino
Member
Registered: 2007-06-29
Posts: 367

Re: smd_gallery: super-flexible gallery generator

Hi Bloke,
Thanks for the reply,
The code the plugin is outputting is correct, and I see the Slideshow, the problem is that it not only outputs the coma separated images from the article field, it just outputs every image in the image/ folder.

this is and test post with the slideshow:
http://www.cityexpert.es/13

I will try to find an error in my code and see if that is the problem.
I am using v0.51 so I guess it should work fine.
I will try and see what the problem is and come back
Thanks again for your help!

Offline

#450 2009-04-01 14:32:28

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,813
Website

Re: smd_gallery: super-flexible gallery generator

mlarino wrote:

the problem is that it not only outputs the coma separated images from the article field, it just outputs every image in the image/ folder.

Ok, that’s a different problem. Sorry, I misunderstood. Can you show me where it’s doing this? I’ve looked on the site you posted earlier and if I click on one of the Foto restaurante links, a lightbox pops up with a slideshow of 8 images in it. I can’t see anywhere it is outputting all images in the image folder.


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

Board footer

Powered by FluxBB