ZenphotoCMS Forum
Making Zenphoto Wordpress friendly in 3 lines of code - 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: Making Zenphoto Wordpress friendly in 3 lines of code (/thread-5502.html)



Making Zenphoto Wordpress friendly in 3 lines of code - Joen - 2009-07-20

Please, please, please consider making Zenphoto more Wordpress friendly.

It's not so hard to integrate Zenphoto into Wordpress (so that templates share the syntax Wordpress themes do), it really only involves:

1: editing zp-core/lib-gettext/gettext.inc and replacing
function _($msgid) {
return $msgid;
}

with

if (!functionexists('')) {
function _($msgid) {
return $msgid;
}
}

2: turning off E_STRICT error reporting by removing instances of it from "zp-core/functions-basic.php".

It would be so much easier for me to upgrade Zenphoto.




Making Zenphoto Wordpress friendly in 3 lines of code - sbillard - 2009-07-20

Maybe you should ask Wordpress to be more friendly to all other applications. If you do indeed need this change, then Wordpress is defining the funtions _($msgid) without also defining its full and proper version gettext($msgid)

But since Zenphoto does not actually use this shortened version (such shortcuts are really bad programming practice, by the way) we will remove it.




Making Zenphoto Wordpress friendly in 3 lines of code - Joen - 2009-07-21

Let it be known first that my respect for Zenphoto outweighs my respect for Wordpress. I have no doubt that Zenphoto not only has prettier and better code.

But I still appreciate it you'll tweak this. Thanks.

As for the error reporting feature -- could it be made into an option in the admin, so that I didn't have to hack functions-basic.php? You could have it default to what it does now. I know I'm asking a lot.




Making Zenphoto Wordpress friendly in 3 lines of code - sbillard - 2009-07-21

Actually, that is already done in the next release. It was an oversite on 1.2.5. We want the test builds to have the E_STRICT so we see errors. But not the released versions. So now there is a decision based on if the version is a released one.