Member
Member
Roland   17-12-2022, 18:30
#1

Hello !
two years ago, Acrylian help me by using this function.

After updating to 1.6 and using the Deprecated function on Zenphoto dashboard, it says it's now time to change :-)
I've been looking to https://docs.zenphoto.org/1.5.x/annotation-group-deprecated.html and https://docs.zenphoto.org/1.5.x/function-isImagePhoto.html without success.

Maybe someone have a clue to update my theme ?
thanks for your help and thanks for making Zenphoto alive !

Edit : I've been looking to debug, the solution seems to be using isPhoto() instead.
I 'll try :)

USER DEPRECATED NOTICE: isImagePhoto (called from album.php line 52) is deprecated. Use Image object method isPhoto() instead in /Users/roland/Sites/collections/zp-core/functions/functions-basic.php on line 2106
trigger_error called from deprecationNotice (functions-basic.php [2106])

Edit 2 : Nope, it's blank now.

Administrator
Administrator
acrylian   17-12-2022, 18:40
#2

isImagePhoto() is a new deprecation in 1.6.

Look at the line mentined. You find something like isImagePhoto($_zp_current_image). Change that to $_zp_current_image->isPhoto().

using the Deprecated function on Zenphoto dashboard,

Just to note that this does not cover all deprecations anymore and is deprecated itself. See the release post about that.

Member
Member
Roland   18-12-2022, 07:47
#3

Hello acrylian, thanks for your help. I'm gonna to take some time soon for this big release post :-)

Member
Member
maymar   03-05-2023, 17:24
#4

Hi acrylian, i try to swap deprecated function by new one but when i try to change isImagePhoto() to isPhoto() i get blank page.
Here is code:
function checkForImages() {
global $_zp_current_image, $_zp_current_album, $_zp_current_search, $_zp_gallery;
$c = 0;
while (next_image()):
if (isImagePhoto()) $c++;
endwhile;
if ($c > 0) {
return true;
} else {
return false;
}
}

how i should replace it correctly?
Above example that you post, when you have variable works. Sry but i'm not programmer.
its form zpbase theme.

Administrator
Administrator
acrylian   03-05-2023, 17:48
#5

It is an image class method. You have to use $_zp_current_image->isPhoto() instead.

Member
Member
maymar   03-05-2023, 18:06
#6

thx :-)

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