function alchemy_include_alchemy_class in Alchemy 6
Same name and namespace in other branches
- 7 alchemy.module \alchemy_include_alchemy_class()
Includes the Alchemy API Class, checking first to see if it exists.
2 calls to alchemy_include_alchemy_class()
- alchemy_contentanalysis_analyzer in modules/
alchemy_contentanalysis/ alchemy_contentanalysis.module - Implementation of hook_analyzer() via custom define callback
- alchemy_new_alchemy_obj in ./
alchemy.module
File
- ./
alchemy.module, line 162 - DO NOT COMMIT TO DRUPAL CONTRIB! THIS MODULE IS FOR DEVELOPMENT ONLY.
Code
function alchemy_include_alchemy_class() {
$file = './' . drupal_get_path('module', 'alchemy') . '/AlchemyAPI/module/AlchemyAPI.php';
if (!file_exists($file)) {
$msg = t('The Alchemy module requires the Alchemy SDK. Use the PHP version of the SDK');
$msg .= l(t('Download the SDK here.'), 'http://www.alchemyapi.com/tools/', array(
'attributes' => array(
'target' => 'alchemy',
),
));
$msg .= "<br><br>";
$msg .= t(' Download the files and place them in a folder named "AlchemyAPI" under the alchemy module directory.');
if ($analysis) {
$analysis['messages'][] = contentanalysis_format_message($msg, 'error');
}
else {
drupal_set_message($msg, 'error');
}
return FALSE;
}
require_once $file;
return TRUE;
}