31 include_once(
"./Services/COPage/classes/class.ilParagraphPlugin.php");
55 $this->plugins = array();
57 $this->skipDirectories = array ();
58 $this->skipDirectories [$this->pluginDirectory.
"/classes"] =
"skip";
59 $this->skipDirectories [$this->pluginDirectory.
"/resources"]=
"skip";
60 $this->skipDirectories [$this->pluginDirectory.
"/CVS"]=
"skip";
77 foreach ($this->plugins as $plugin) {
78 if (strcasecmp($pluginDir, $plugin->getDirectory()) == 0)
89 $this->plugins[$plugin->serializeToString()] = $plugin;
94 foreach ($this->plugins as $plugin) {
95 if (strcasecmp(get_class($plugin), $pluginClassname) == 0)
105 return implode (
"|", array_keys($this->plugins));
112 if (file_exists($this->pluginDirectory))
114 $pluginDirs = glob($this->pluginDirectory.
"/*",GLOB_ONLYDIR);
115 if (is_array($pluginDirs))
117 foreach ($pluginDirs as $pluginDir) {
119 if (array_key_exists($pluginDir,$this->skipDirectories) || !file_exists($pluginDir.
"/plugin.xml")) {
126 $pluginDOM =
new ilDOMXML();
127 $pluginDOM->loadDocument(
"plugin.xml", $pluginDir,
false);
128 $pluginNodes = $pluginDOM->getElementsByTagname(
"plugin");
130 if ( count ($pluginNodes)>0 )
133 $pluginNode = $pluginNodes[0];
136 $pluginSubDir = str_replace($this->pluginDirectory.
"/",
"",$pluginDir);
139 $classfile = $pluginNode->get_attribute (
"classfile");
141 $classname = $pluginNode->get_attribute (
"classname");
144 $filetype = $pluginNode->get_attribute (
"filetype");
147 $active = strcasecmp($pluginNode->get_attribute (
"active"),
"true") == 0;
160 $classfile = $pluginDir .
"/classes/".$classfile;
169 if (file_exists($classfile) && $active && !$this->
isRegistered($classname))
171 include_once ($classfile);
172 $plugin =
new $classname($pluginSubDir, $title, $filetype, $link, $description, $active);
176 if (is_a($plugin,
"ilParagraphPlugin") && $plugin->isActive()) {
198 $elems = $a_element -> get_elements_by_tagname ( $nodename );
199 if (count ($elems) > 0)
201 return $elems[0]->get_content();