addLocaleData(); $request =& PKPApplication::getRequest(); $templateMgr =& TemplateManager::getManager($request); $templateMgr->register_modifier('bibtex_escape', array(&$this, 'bibtexEscape')); return $success; } /** * Get the name of this plugin. The name must be unique within * its category. * @return String name of plugin */ function getName() { return 'BibtexCitationPlugin'; } function getDisplayName() { return __('plugins.citationFormats.bibtex.displayName'); } function getCitationFormatName() { return __('plugins.citationFormats.bibtex.citationFormatName'); } function getDescription() { return __('plugins.citationFormats.bibtex.description'); } /** * @function bibtex_escape Escape strings for inclusion in BibTeX cites * @param $arg string * @return string */ function bibtexEscape($arg) { return htmlspecialchars($returner = str_replace( array('{', '}', '$','"', '''), array('\\{', '\\}', '\\$', '\\"', '\''), html_entity_decode($arg, ENT_QUOTES, 'UTF-8') )); } } ?>