00001 <?php
00002
00015
00016
00017 class CitationPlugin extends Plugin {
00018 function CitationPlugin() {
00019 parent::Plugin();
00020 }
00021
00027 function getName() {
00028
00029 return 'CitationPlugin';
00030 }
00031
00036 function getDisplayName() {
00037
00038
00039 return 'Abstract Citation Plugin';
00040 }
00041
00045 function getCitationFormatName() {
00046
00047 fatalError('ABSTRACT METHOD');
00048 }
00049
00053 function getDescription() {
00054 return 'This is the CitationPlugin base class. Its functions can be overridden by subclasses to provide citation support.';
00055 }
00056
00061 function displayCitationHook($hookName, $args) {
00062 $params =& $args[0];
00063 $templateMgr =& $args[1];
00064 $output =& $args[2];
00065
00066 $output .= $templateMgr->fetch($this->getTemplatePath() . '/citation.tpl');
00067 return true;
00068 }
00069
00078 function displayCitation(&$paper, &$conference, &$schedConf) {
00079 HookRegistry::register('Template::RT::CaptureCite', array(&$this, 'displayCitationHook'));
00080 $templateMgr =& TemplateManager::getManager();
00081 $templateMgr->assign_by_ref('citationPlugin', $this);
00082 $templateMgr->assign('paper', $paper);
00083 $templateMgr->assign('conference', $conference);
00084 $templateMgr->assign('schedConf', $schedConf);
00085 $templateMgr->display('rt/captureCite.tpl');
00086 }
00087
00094 function fetchCitation(&$paper, &$conference, &$schedConf) {
00095 $templateMgr =& TemplateManager::getManager();
00096 $templateMgr->assign_by_ref('citationPlugin', $this);
00097 $templateMgr->assign('paper', $paper);
00098 $templateMgr->assign('conference', $conference);
00099 $templateMgr->assign('schedConf', $schedConf);
00100 return $templateMgr->fetch($this->getTemplatePath() . '/citation.tpl');
00101 }
00102 }
00103
00104 ?>