Member
Member
sarthaksinghal   2010-07-08, 09:42
#1

Hi,

I am trying to get 4 images (2 Prev and 2 next) around the currently displayed image on image page. I am trying the Prev and Next functions but get only the first prev and first next.

Is there a way I can get 4 or a more number which can be specified as an argument?
I plan to show them as thumbnail on the image page. It is also ok if some random 4 images can be displayed from the current album.

..Sarthak

Administrator
Administrator
acrylian   2010-07-08, 10:04
#2

The prev/next does only workwith one prev and one next images. If you want more prev or next images you will have to code that yourself using the object model (see the user guide).

You can also use the paged_thumbs_Nav or the jCarousel thumb nav plugins. Those display thumbs from the album, you may have to add the plugin functions to your theme.

Member
Member
sarthaksinghal   2010-07-16, 06:51
#3

Thanks acrylian. I am trying to add the function in image.php as and running into a fatal error.

Any help would be appreciated.

Administrator
Administrator
acrylian   2010-07-16, 09:11
#4

You probably should enable the plugin that function belongs to.

Member
Member
sarthaksinghal   2010-07-16, 11:12
#5

I checked in the plugins tab and the v1.3.0 of this plugin is checked.

Administrator
Administrator
acrylian   2010-07-16, 11:22
#6

You did not look at hte documentation, did you? The function is wrong. Please note we don't have every single one in our head, too..

Member
Member
sarthaksinghal   2010-07-16, 11:49
#7

Apologies for the confusion.
The plugin in admin panel was reporting wrong url. I found it at http://www.zenphoto.org/documentation/plugins/_zp-extensions---jcarousel_thumb_nav.php.html

where it mentions "Place printjCarousel() on your theme's image.php where you want it to appear."

I am still confused on how to proceed further.

Administrator
Administrator
acrylian   2010-07-16, 12:11
#8

Sorry for the indeed wrong doc... But right below the correct and only function is documentated in detail. Also the Zenpage theme provides an example.

Junior Member
Junior Member
ranmajen   2010-07-20, 10:09
#9

Use this should be fine:

Member
Member
sarthaksinghal   2010-07-22, 12:07
#10

Thanks ranmajen. It worked!

Member
Member
Bookofsand   2010-08-19, 23:13
#11

I am trying to implement the jCarousel plugin as well. I've added ranmajen's code to image.php, but I don't see anything.

When I look at the rendered page source, there's a lot of jCarousel-related Javascript, defining the mycarousel_itemList variable and a couple of functions. After the Javascript, I see this:

'

'

But nothing is displayed on the page.

I put the jcarousel.css file, and the 3 graphic files, into the theme folder, as directed. I can see in the rendered page source that there are links to jquery.jcarousel.pack.js and jquery.jcarousel.css in their existing location (in zp-core/zp-extensions/jcarousel_thumb_nav/), so I assume I don't have to move those, or any other files, to the theme folder, right?

Any help appreciated.

Member
Member
sbillard   2010-08-20, 00:12
#12

I guess the first thing you should try is to activate the zenpage theme and see if the printjCarouselThumbNav() works for it. That and check to see if your browser is reporting any javascript errors.

Member
Member
Bookofsand   2010-08-20, 04:13
#13

Thanks for the suggestions. The error console helped me solve the problem.

It showed an issue in the Javascript that preloads thumbnails, titles, and links for the jCarousel plugin. I looked at the indicated line in the page source, and noticed that it was referencing an image whose title contained double quote marks.

I guess that this must have been breaking the Javascript, because the error said that this line was missing a closing curly bracket. I changed the image's title to use single quotes instead... and now jCarousel works fine.

The interesting thing is that the problem was occurring on any page I viewed, not just the one with the double quotes in the image title. Because the Javascript was preloading titles for all the images in the album, it was encountering this problem every time it ran.

Maybe there is a way to make the jCarousel plugin detect and deal with double quotes... my Javascript skills are not that great, so I don't know if I want to try to tackle this. But for now, I'll just avoid double quotes in image titles.

Administrator
Administrator
acrylian   2010-08-20, 07:51
#14

We will take a look at escaping those quotes.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.