Member
Member
manik   2011-07-10, 16:47
#1

Hi,

I'm trying to add the printPagesThumbsNav in the sidebar, the plugin is activated and I've found the code in image.php.

But when I add this short code to sidebar.php, it only works on the album page, generating an error for everything else — [i]Fatal error: Call to a member function getFileName() on a non-object in XX/XX/template-functions.php on line 1866[/i]

Quote:
Any idea?

Thanks

Member
Member
sbillard   2011-07-10, 17:02
#2

printPagedThumbsNav() prints the nav links for an album. What are you expecting to happen if you use it on a non-album script page?

You will either have to setup an album context for it to make the nav links for or not use the function except when there is an album context setup. For the latter you can use the test if ($_zp_gallery_page == 'image.php') to insure you are in an image page. [note: $_zp_gallery_page may need to be declared global if you are referencing it within a function.]

Member
Member
manik   2011-07-10, 17:07
#3

Thanks sbillard, it works just fine now!

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