Hi, first of all thanks for your work on this great module.

I have been trying to follow your install instructions for how to view the slideshow which shows up fine when I click the view slideshow link but how do I have it show up in a block?

I tried adding the php code to embed the slide show in the block but must be getting this all wrong.

eg

image_cycle_show(7);

How should I write this. The link for the gallery is image/tid/7

I am using tinytinymce with the richtexteditor set to php code.

Thanks

CommentFileSizeAuthor
#11 image_cycle.jpg79.6 KBmichalczernik

Comments

maulwuff’s picture

use

echo image_cycle_show(7);
Peloose’s picture

Great, It's work.
Thx a lot

Jadzla’s picture

Version: 5.x-1.0 » 6.x-1.0
Component: User interface » Miscellaneous

I have the above code which shows the images but not in a slideshow - they are all on the page at the same time. www.narromine.nsw.au/nsc/

Can anyone help?

Thanks

boombatower’s picture

Status: Active » Postponed (maintainer needs more info)

@maulwuff: thanks for helping with the question.

@Jadzla: I don't see the issue in question. Have you removed the slideshow that had problems?

boombatower’s picture

Status: Postponed (maintainer needs more info) » Fixed

Please re-open if issue still exists.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

dalmyjr’s picture

The Image slideshow is OK in:

http://mysite.com/image_cycle/3

But when I include de code:

image_cycle_show(3);

No error and no Image ... ;-(

Ps.: The Format "PHP code" is Ok.

beiji’s picture

To dalmyj

use

<?php
echo image_cycle_show(7);
?>

My problem is that my block is small for the cycle.It is default use the original size, how can i use the thumbnail or preview size ?

boombatower’s picture

You can add custom CSS as one of the settings. Just set the image size like so:

.image_cycle_picture {
  width: 40px;
  height 40px;
}
beiji’s picture

thx~
It works use

.image_cycle_pictures img{
  width: 100px;
  height: 100px;
}
michalczernik’s picture

StatusFileSize
new79.6 KB

I have similar issue as above.

On mydomain.com/image_cycle/1 is slideshow OK.

But when I embed

<?php
echo image_cycle_show(1);
?>

there is just looong list of all images, but no slideshow.

Any sugestions?

boombatower’s picture

Have you installed the jQuery cycle js.

The code in image_cycle_show() adds it as explained in INSTALL.txt

drupal_add_js(drupal_get_path('module', 'image_cycle') . '/jquery.cycle.js')
michalczernik’s picture

Yes, I have installed jQuery cycle js as instructed in INSTALL.TXT

Place the jQuery Cycle plugin file in the image_cycle directory and rename the file to jquery.cycle.js

Slideshow works fine when accessed on mydomain.com/image_cycle/1

But I can't figure out how to embed it anywhere else (e.g. page.tpl.php or PHP block).
I have tried to embed slideshow using

<?php
echo image_cycle_show(1);
?>

but this shows just static images (as attached above).

Don't know what I'm doing wrongly..

boombatower’s picture

If you place the code in a template the javascript will not be included since Drupal has already processed that. You will need to make a custom module or something that simply triggers the javascript before you actually include in template. (not really any way to get around that)

If You use a PHP block it should work fine as I have done that myself.

Please check the HTML javascript include statement to see if it points to the file correctly.

michalczernik’s picture

I still can't figure out how to make this working :-(

JS is pointing to right location.

I have tried few things, e.g.:
- include JS in < head >
- embed JS using drupal_add_js
- create BLOCK with the CYCLE, then INVOKE the block using module_invoke('block', 'block', 'view', '1')
- echoed image_cycle_show(1); on the page where was already the node containning working CYCLE

None of above atempts was working.
Even though JS is included in < head > when I review the source code of the page, the script is not working.

Could you advice me how should I make this working? I'm trying to use CYCLE on every page instead of flash banner (on top of the CYCLE should be CSS NICE MENU for navigation).

boombatower’s picture

In theme_image_cycle_cycle() the following should tigger the cycle to start

drupal_add_js("$('#$id').cycle({" . implode(', ', $json) . "});", 'inline', 'footer');
michalczernik’s picture

Thank you very much for your support.
I have resolved this by creating another region between HEADER and CONTENT and placing IMAGE_CYCLE bock there.

There is just one issue: On every page where is IMAGE_CYCLE block, the TITLE of the particular PAGE is changed to the TITLE of the GALLERY (which contains images for IMAGE_CYCLE).

I have fixed this by commenting // drupal_set_title($term->name); in image_cycle.module in the function image_cycle_show().

Not sure if this is BUG or just FEATURE REQUEST, so I will let you deal with it.

Thanks for all your work!

boombatower’s picture

That has been fixed in dev version.

Laranjinho’s picture

Status: Closed (fixed) » Active

I'm also having trouble to integrate de image cycle module.
Getting the module working if I open the link ../image_cycle/1

But all suggestions above and in other posts related to this topic failed for me.
I am using the last versions Drupal (6.13), last versions from all modules needed and all modules are properly enabled.

When I embed

echo image_cycle_show(1);

in the page.tpl.php :

if (isset($primary_links)) { print theme('links', $primary_links, array('class' =>'linksTop', 'id' => 'navlist')) }

[[[[[[ I placed it here]]]]]]

The I get 6 photos (the defined 6 in config) stacked on top of eachother.

Addind a template.php did not resolve nothing.
I followed all correctly in the install.txt, js script is where it should be.

I am a little lost now, how can I get this to work in the header part??

Deeply grateful to who might help :o)

cheers

Laranjinho’s picture

Status: Active » Closed (fixed)

I could resolve it myself......

What I did was to add a new BLOCK where I put the code:

echo image_cycle_show(2);

Where the 2 is the slideshow number of course.

Then I had to adapt the page.tpl.php to define a region to it, since the desired region is standard not defined.

print $top

Where maincolHead is the region where I want the slideshow.
Next I had to adapt the xxxxxxx.info file to add a extra region, I defined "TOP" as extra, header worked also, but I chose "TOP"

Then it worked finally.

cheers

indiralanza’s picture

Hi

I have made all the things you have explained on this topic, but something is going wrong. The thing is that I want to add an Image Cycle to a rigthside block, I have embed the following php code inside the body of thew block:

echo image_cycle_show(191);

and the slideshow works great but in the body of every pages it's show the name of the image gallery! and overwrites the page title of the custom page. Maybe the code also displays the slideshow but is also overlapped by other components of the page, I don't know, maybe is some bug because of the "echo". In the README of the module advise to use only the code with out "echo" like this

 image_cycle_show(191);

I'm using 5.x version

Sorry my english, please help me to solve it.
Thanks

buscar
What I'm doing wrong?

boombatower’s picture

That should be fixed in 6.x dev not sure about 5.x