![]() |
|
getCommentCount() Bug - 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: getCommentCount() Bug (/thread-4793.html) |
getCommentCount() Bug - joshrodgers - 03-03-2009 I have ZenPHOTO 1.2.3 installed and the getCommentCount() function didn't work. Not sure why, it just didn't. If anyone else has the same problem just download ZenPHOTO 1.2.1 and replace: ` function getCommentCount() {
} ` with: ` function getCommentCount() {
} ` Not sure if that is the recommended procedure -- but it fixed my problem. *I tried to highlight this in green. If it doesn't work my apologies. Josh getCommentCount() Bug - acrylian - 03-03-2009 This is of course not recommened procedure! For example this code is not compatible with the Zenpage plugin. Recommended is to try the nightly build if you encounter issues with the last official version. The issue might already been fixed there. getCommentCount() Bug - joshrodgers - 03-03-2009 I tried the nightly build before trying this method. I know this code might not be compatible with Zenpage, but at least it's working!! I am not using Zenpage, so I didn't notice. I know this isn't the recommended route, but this worked for me. Hopefully it will work for others who encounter this issue (and don't have Zenpage installed). Hopefully this will be fixed when the next version is released or in the next nightly build. Just wanted to provide a fix and report a bug. Thanks, Josh getCommentCount() Bug - sbillard - 03-03-2009 Tell me more! If you are not using zenpage, then the code differences appear to be the test on the current image or album being NULL in which case false is returned. The code you copied just will fault in those cases, so I cannot see how it has fixed your problem. getCommentCount() Bug - joshrodgers - 03-03-2009 Ok, I compared each line and noticed what is causing the problem. There are only two places that need to be changed. The original code is: ` if (in_context(ZP_IMAGE) & in_context(ZP_ALBUM)) { ` It should be: ` if (in_context(ZP_IMAGE) AND in_context(ZP_ALBUM)) { ` ================================================================ The next change is: The original code is: ` } else if (!in_context(ZP_IMAGE) & in_context(ZP_ALBUM)) { ` It should be: ` } else if (!in_context(ZP_IMAGE) AND in_context(ZP_ALBUM)) { ` ================================================================ Use "AND" instead of the "&". That's all I did and it fixed it. Now my code looks like: ` function getCommentCount() {
} ` getCommentCount() Bug - joshrodgers - 03-03-2009 Copied the wrong thing. My code now looks like: function getCommentCount() {
} ` getCommentCount() Bug - sbillard - 04-03-2009 You have a better eye than I. That getCommentCount() Bug - joshrodgers - 04-03-2009 Guess so. Thanks for the help. Josh |