Zend GData - Proper Place for Block?
Permalink
Working on Google Calendar Block, and wondering where the proper place would be to incorporate Zend Gdata Library (that is, assuming I can get it to work - XPath works nicely, so I may go that route).
I am currently sticking it in the tools sub in by block, but maybe it should reside in Libraries instead?
I am currently sticking it in the tools sub in by block, but maybe it should reside in Libraries instead?
but then got to thinking that GData is much larger than just Calendar. Basically provides access to the entire Google API set.
Anyway ... need to get a working version either with Zend or XPath. And then worry about where stuff resides. ;-)
Anyway ... need to get a working version either with Zend or XPath. And then worry about where stuff resides. ;-)
You're right :)
I haven't messed around with the zend framework much, but I do have zend studio 6.1 and frameworks always make things nice. I can see it being part of a package/app.
I am considering using some of it myself, have to dig into where it would be beneficial.
I haven't messed around with the zend framework much, but I do have zend studio 6.1 and frameworks always make things nice. I can see it being part of a package/app.
I am considering using some of it myself, have to dig into where it would be beneficial.
Zend needs too many changes for the average user (potentially need access to php.ini, etc.)
As an aside, I may have solved the Google Timezone issue and PHP mentioned earlier.
I think the culprit of Timezone switching is the PHP Date function, which apparently has it's own interpretation of what your timezone *should* be.
One can fix this via the PHP function date_default_timezone_set('America/Chicago');
Google's feed supports a CTZ parameter, but if you format the resulting StartTime or EndTime with PHP Date(), this parameter is rendered effectively useless.
Caused me a couple hours of frustration.
As an aside, I may have solved the Google Timezone issue and PHP mentioned earlier.
I think the culprit of Timezone switching is the PHP Date function, which apparently has it's own interpretation of what your timezone *should* be.
One can fix this via the PHP function date_default_timezone_set('America/Chicago');
Google's feed supports a CTZ parameter, but if you format the resulting StartTime or EndTime with PHP Date(), this parameter is rendered effectively useless.
Caused me a couple hours of frustration.
In reality, if you aren't attaching a single page to administer the block, then i would keep everything in a deployable block layout w/ this residing in the tools folder makes perfect sense to me.
If you have single pages for administering through the dashboard then I would go full out and put the code in the libraries folder. Really easy to copy the directory tree in an app, otherwise you have to upload in a few different places...which to me doesn't make sense unless you have to. I don't see this zend library used anywhere else assuming that this block encompasses all functionality with the add and edit forms.
One bonus with the libraries folder is you get a consistent helper method to get the path to the directory/library. getblockpath or getToolsUrl or whatever it was called from the block controller was something i wrestled with a while ago and just let go. I resorted to building the path the same way the getBlockPath does from the view :).
My 2 cents..again it is your code and you can certainly do what you want :)