Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#433 2009-03-27 12:58:20

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

Re: smd_gallery: super-flexible gallery generator

Is not rendering anything at all, Its like its not there at all:

<!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&#160;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>

Offline

#434 2009-03-27 13:21:30

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

Re: smd_gallery: super-flexible gallery generator

mlarino wrote:

Is not rendering anything at all

D’oh! We are trying to use image IDs aren’t we? Not categories; so why are we using the category attribute?! Try using the id="?article_image" instead :-)


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

#435 2009-03-27 13:26:03

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

Re: smd_gallery: super-flexible gallery generator

WOw!!!
It works!!! hehe
I didnt even see that…

Thanks so much for your help!

(anyway to exclude the first image in the article image from the slideshow?)

Offline

#436 2009-03-27 13:56:09

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

Re: smd_gallery: super-flexible gallery generator

Yay; got there in the end!

mlarino wrote:

anyway to exclude the first image in the article image from the slideshow?

Erm, not really, unless you know the image ID then you can hard-code it to be excluded (using the ! terminology in your id attribute)

Can you perhaps remove the image from the list in the first place? Look at what you are telling the gallery plugin to do: “read my article_image field and make a gallery out of all the images you find there”. Why would you want to go to the trouble of adding an image ID to your slideshow that you don’t want in your slideshow?!

Are you using the first image for something else? If so, what? A thumbnail? Can this image ID be moved elsewhere? Or can your list of images that you do want in your slideshow be moved to a custom field to leave the article_image with a single ID that you use for a thumbnail?

You could always put the ID of the image you don’t want in a custom field called exclude_image and do this: id="?article_image, !exclude_image" but why you would want to do that when it is simpler to just omit the ID of the unwanted image in the first place, is beyond me!


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

#437 2009-03-27 16:58:19

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

Re: smd_gallery: super-flexible gallery generator

Can smd_gallery output thumbnails’ width\height neither this info is absent in db? Can is parse it with php?


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

#438 2009-03-27 17:12:50

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

Re: smd_gallery: super-flexible gallery generator

the_ghost wrote:

Can smd_gallery output thumbnails’ width\height neither this info is absent in db?

Not yet, although it’ll output any fixed width/height you give it via the thumbsize attribute (which is not much use!)

Can is parse it with php?

It could get the info via PHP but it doesn’t. And from now on (SVN) I won’t have to because the thumb dimensions are in the DB. So I’m hoping to put this request off for a while until TXP 4.0.9 is released whereby I can do it natively with almost no extra code ;-)


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

#439 2009-03-27 17:27:32

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

Re: smd_gallery: super-flexible gallery generator

And from now on (SVN) I won’t have to because the thumb dimensions are in the DB. So I’m hoping to put this request off for a while until TXP 4.0.9 is released whereby I can do it natively with almost no extra code ;-)

Will wait! Also i want ability to manage thumbnails’ sizes and create them for selected images, not only by one…


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

#440 2009-03-31 09:36:24

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

Re: smd_gallery: super-flexible gallery generator

Hi again,
There is a big problem with the slideshow! instead of showing the article_images of the post I am looking at, it makes a slideshow of every single image in article_image of any article published!

-regarding the “excluding the first image” its because in the list of articles, I display the first article image (small image) next to the Excerpt. If you click on it you get the full article with the slideshow. I guess I could make a custome field for that image (I will try to figure that out)

Any clues on the article image slideshow problem?
Thanks!

Offline

#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

Board footer

Powered by FluxBB