![]() |
|
Creating new global variables - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: Creating new global variables (/thread-13986.html) |
Creating new global variables - ctdlg - 2024-10-22 Hello, I would like to add some more options to my plugin. I can declare but I cannot declare those variables as global in keyboardnav-extended.php Links I want to get in my plugin are in keyboardnav-extended.php plugin : I will then be able to use the joystick of a vr headset to navigate easily ! Creating new global variables - ctdlg - 2024-10-23 Problem solved : I get variables from "image.php" instead of "keyboardnav-extended.php" I can now use the VR controller joystick to reach next or previous image if available. Those images are equirectangular pictures : they are displayed in 360° view in headsets. Creating new global variables - acrylian - 2024-10-23 I am not sure you really neeed new globals. You can just use the $_zp_current_image global object as you can get the next/prev image via the object model, too.
You need to declare globals within every function you wish to use them. Creating new global variables - ctdlg - 2024-10-25 Thanks acrylian, |