Josh Ferry contacted me on email saying:

Hello,
First I would like to thank you for your contributed module "Slideshow
Creator". I have created CCK nodes and am using contemplate as well and I
am having a lot of trouble with the slideshow. I can't seem to figure out
how to get the slideshow to display with the javascript so that the
pictures will automatically transition rather than it breaking down and
showing next and previous buttons. In the readme it said that I needed to
use php but I was reading on issues for the module that this still does not
enable javascript. Is it going to be possible to have the automatic
transition slideshow on a cck node?

----------------
massa

Comments

brmassa’s picture

Josh,

correct me if im wrong: you want a automatic rotation AND not showing the next/previous buttons? well, there are two diffent thigs:

1* on a testing node, type it

<?php slideshow_creator_process_text('[slideshow: 2, rotate=2, name=testingsite, img=|http://drupal.org/themes/bluebeach/logos/drupal.org.png|drupal.org|Drupal|The ultimate CMS. Download it now!|Drupal|, img=|http://www.mysql.com/common/logos/mysql_100x52-64.gif|http://www.mysql.com|MySQL|Free and reliable SQL server and client.|_self|] '); ?>

and see if shows the Drupal and MySQL images. if does, your site support nicely the module!

2* to hide the buttons, change you theme CSS. using the same exemple above, put this on you CSS

.testingsite.slideshow-previous,.testingsite.slideshow-next,.testingsite.slideshow-index,.testingsite .slideshow-description,.testingsite .slideshow-title {
display:none;
}
.testingsite .slideshow,.testingsite,.testingsite .slideshow-image,.testingsite .slideshow-description,.testingsite .slideshow-title {
display:inline;
}

It should hide the commands, title and description, showing only the slideshow images

did worked?

best regards to all in japan!

massa

orionvortex’s picture

The images will show up but there is no transition from one image to the next. I can see the next picture if I hit the next button but the entire page has to be refreshed. Is there something I am doing wrong here?

You speak Japanese Massa? Most people have no idea what hiragana even is so I was shocked to hear you say something about it.

brmassa’s picture

Josh,

1* i just updated the module. give another try and them give me a feedback.
2* what drupal are you using? 4.7 or 5?
3* if its not doing the automatic rotation, iits because there is some problem with javascript. your browser acept javascript (IE has a few issues about JS)?
4* i used to speak japanese. But by now, i badly can talk to a child. he he! and before you ask me, massa is an italian surname.

best regards,

massa

brmassa’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)
bsonnich’s picture

Version: 4.7.x-1.0 » 5.x-1.17

Hello,

I've set up a CCK node where my content contributors can upload multiple images in the "Slideshow Images" field. In my content template I've put the following code where I want the slideshow to apper:

<div class="field field-type-image field-field-primary-image">
  <div class="field-items">
	<?php 
	$images = "";
	$ss_counter = 0;
	foreach ((array)$field_slideshow_images as $item) {
		if($ss_counter) $images .= ",";
		$temp_str = $item['view'];
		$reg_ex = '/http[a-zA-Z0-9\.\:\/_\-]*/';
		preg_match($reg_ex, $temp_str, $img_filepath);
		$images .= "|" . $img_filepath[0] . "|";
		$ss_counter++;
	}
	slideshow_creator_process_text('[slideshow: 2, rotate=2, name=fv_slideshow, img='.$images.'] '); ?>
  </div>
</div>

When I visit the page there is nothing displayed and no JavaScript errors. When I view the source the following line has been added and appears to be correct:

<script type="text/javascript" src="/beta/sites/all/modules/slideshow_creator/slideshow_creator.js"></script>
<script type="text/javascript">Drupal.extend({ settings: { "ssc": { "1": { "total": 1, "rotate": "2", "name": "fv_slideshow", "1": { "src": "http://www.mydomain.com/files/imagecache/full/files/premium/1_1.jpg", "link": "javascript: void(0);", "title": "", "description": "", "target": "_blank" }, "current": 1, "timeout": {  }, "layout": "default" } } } });</script>

Is there some additional code I need to add to my template to indicate where to display the slideshow?

bsonnich’s picture

Status: Closed (fixed) » Active

I'm sorry if I'm doing this the wrong way. I'm not sure what the protocol is for posting to support forums.

bsonnich’s picture

One more update, on further inspection the JavaScript code being generated is not adequate. It's only recognizing the first of the multiple images in that Slideshow Images field.

brmassa’s picture

Brendan,

thanks for reporting. your code has 2 bugs:
1* each slideshow image must start with "img=", so you must code as if($ss_counter) $images .= ", img=";
2* you are not printing the result. you should code print slideshow_creator_process_text('[slideshow: 2, rotate=2, name=fv_slideshow, img='.$images.'] '); ?>

i recommend to only print the slideshow_creator_process_text IF there is at least one image. add an if clause to verify this.

test this and report if it worked!

regards,

massa

bsonnich’s picture

Status: Active » Closed (fixed)

That worked excellently!

Here is the completed code which is in my content template.

<?php 
	$images = "";
	$ss_counter = 0;
	foreach ((array)$field_slideshow_images as $item) {
		if($ss_counter) $images .= ", ";
		$temp_str = $item['view'];
		$reg_ex = '/http[a-zA-Z0-9\.\:\/_\-\%]*/';
		preg_match($reg_ex, $temp_str, $img_filepath);
		$images .= "img=|" . $img_filepath[0] . "|";
		$ss_counter++;
	}
	print slideshow_creator_process_text('[slideshow: 2, rotate=2, name=fv_slideshow, '.$images.'] '); 
?>
brmassa’s picture

Status: Closed (fixed) » Fixed
killes@www.drop.org’s picture

Status: Fixed » Closed (fixed)
rimma’s picture

Got an error use above code Fatal error: Call to undefined function slideshow_creator_process_text()

rimma’s picture

i found if I use _slideshow_creator_process_text() , it works (difference is _ in front of it )

irishgringo’s picture

Version: 5.x-1.17 » 6.x-1.32

btw, I have the latest 6. something version of slideshow.. as I am running drupal 6.8

I am using cck, and contemplate. with the slideshow

i setit up, and I can get the test block to work in a blank page.

so I try to do some test stuff in contemplate using this function: slideshow_creator_process_text

and I completely crash contemplate. Cant even get back in with out using mysqladmin to cut the code that I entered.

I am on a fresh copy of drupal 6.6 with the latest slideshow creator.

I want to create a slide show of my imagesfields... and no luck so far.
is there a document that discusses and API or somethign like that?

also, is there an alternative that turns the imagefield into a slide show?

simakas’s picture

File: slideshow_creator.admin.inc

$form['layout'] = array(..)

Forgot to add 'none' => t('None'), it leads to many problems, trying to find how to hide those annoying buttons.

Simon