00001 <?php
00002
00015
00016
00017
00018 import('help.HelpMappingFile');
00019
00020 class OJSHelpMappingFile extends HelpMappingFile {
00024 function OJSHelpMappingFile() {
00025 parent::HelpMappingFile('help/help.xml');
00026 }
00027
00031 function getTocFilename($tocId) {
00032 $help =& Help::getHelp();
00033 return sprintf('help/%s/%s.xml', $help->getLocale(), $tocId);
00034 }
00035
00039 function getTopicFilename($topicId) {
00040 $help =& Help::getHelp();
00041 return sprintf('help/%s/%s.xml', $help->getLocale(), $topicId);
00042 }
00043
00044
00045 function getTopicIdForFilename($filename) {
00046 $parts = split('/', str_replace('\\', '/', $filename));
00047 array_shift($parts);
00048 array_shift($parts);
00049 return substr(join('/', $parts), 0, -4);
00050 }
00051
00052 function getSearchPath($locale = null) {
00053 if ($locale == '') {
00054 $help =& Help::getHelp();
00055 $locale = $help->getLocale();
00056 }
00057 return 'help' . DIRECTORY_SEPARATOR . $locale;
00058 }
00059 }
00060
00061 ?>