Question

I am wanting to do stuff with the Google Data API, the contacts specifically. The easist method i have found so far is using Zend. The problem I am having is adding the Zend framework. Does anyone know how to do this with WordPress?

Thanks

Was it helpful?

Solution

you can use "hardcoded" includes if you fail to setup autoloading ->

in /wp-content/themes/levitation/send.php insert to the first line: require_once 'your/path/to/zend/Zend/GData/ClientLogin.php';

Problem is you need to get through all the errors and alwas include the missing class (inside classes are the includes taken care of...

Or in the main file (guess index.php) insert:

set_include_path(get_include_path() . PATH_SEPARATOR . 'your/path/to/zend/');
//for ZF below 1.8 
require_once 'Zend/Loader.php'; 
Zend_Loader::registerAutoload();
 //for ZF > 1.8 
require_once 'Zend/Loader/Autoloader.php';
Zend_Loader_Autoloader::setFallbackAutoloader(true);

OTHER TIPS

It should be pretty trivial.

Write and test some bootstrap code that sets up ZF's autoloading and make sure it generally works.

Stick that code in a wordpress plugin, and tie things up to the right hooks in wordpress.

Make sure that you are calling:

Zend_Loader::loadClass('Zend_Gdata_ClientLogin');

before you are using that class. And that you have a developer key.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top