Member
Member
Citron   27-07-2009, 08:52
#1

Hi,
I'm working on the little plugin I've posted a few days ago, because I realized that I hard-coded the link to the gallery ...
So I tried to use the getGalleryIndexURL() function to retrieve the address of the gallery ... and it doesn't work :S It returns an empty string.

I there anything special to use template functions in plugins ? Any idea on what can make this function returns nothing ?

PS: I use the plugin in image.php, and in this image.php, I already use the getGalleryIndexURL() function without any problem. I just have a problem when using it inside a function of my plugin :S

Administrator
Administrator
acrylian   27-07-2009, 09:02
#2

Does your plugin function define global $_zp_gallery?

Member
Member
Citron   27-07-2009, 09:07
#3

Yes it does. I've checked other plugins which use this function, and it was the only difference
But it still doesn't work ...

Oh, after checking more carefully, I noticed that it does return something : '/'

Member
Member
Citron   27-07-2009, 09:57
#4

Aaah, this is frustrating !! I can't find a proper way to retrieve the base gallery URL !!
I could use dirname(FILE).'/../../' as a last resort, but I would really like to be able to generate a nice link

I tried to access WEBPATH but it's empty when used from my plugin's function ...

Any idea ?

Member
Member
Citron   27-07-2009, 10:09
#5

Ok, sorry to flood, but I've found a solution, although I don't know if it's really recommended to use this directly : FULLWEBPATH seems to be correctly set, so I use it.

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