index list with thumbnails

eelke - December 17, 2008 - 12:41
Project:Nodecarousel
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

Hi,

As previously reported it's not possible to use images in the index list, they get filtered out.
I read somewhere that it's possible with CSS backgrounds, I'm new to PHP but i was wondering if I am on the right track...
This is what I have so far:

$content .= '<div class=hidden node-carousel-index style="background-image:url(<?php print image_display($image_node, IMAGE_THUMBNAIL);?>)">'. $node->title .'</div>';

Is this how it's done or am I lost here?
Thanks in advance...

#1

eelke - December 28, 2008 - 00:17

Hi,

I was wondering if anyone could help me out,
it's the same problem as stated in the following topic;
http://drupal.org/node/305262
I was wondering if I should hack the module or if there is some work around possible with CSS, as earlier stated.
Any help would be great,
Thanks in advance.

#2

cedarm - May 13, 2009 - 23:00
Category:support request» bug report

We were just trying to do the same thing. There appears to be a bug in some javascript (not sure which). As a workaround, check_plain() everything inside the tag with class "node-carousel-index".

Explanation (as I understand it): The actual index that is visible is written to the document by javascript. It copies the content of the tag with class "node-carousel-index" into a span with class "index_control". This copy operation seems to do the equivalent of a html_entity_decode() in PHP, which is wrong.

 
 

Drupal is a registered trademark of Dries Buytaert.