function mvSeqTag(&$input, &$argv, &$parser) { global $wgTitle; //print "cur title: " . $wgTitle->getDBkey() . ' ns: ' . $wgTitle->getNamespace(); //check namespace (seq only show up via <tag> when in mvSequence namespace if ($wgTitle->getNamespace() == MV_NS_SEQUENCE) { $marker = MV_SequencePage::doSeqReplace($input, $argv, $parser); return $marker; } return ''; }
function get_sequence_xml() { $seqTitle = Title::newFromText($this->seq_title, MV_NS_SEQUENCE); $seqArticle = new MV_SequencePage($seqTitle); header('Content-Type: text/xml'); print $seqArticle->getSequenceSMIL(); }
function get_sequence_xspf(){ //get the sequence article and export in xspf format: $seqTitle = Title::newFromText($this->seq_title, MV_NS_SEQUENCE); $seqArticle = new MV_SequencePage($seqTitle); header('Content-Type: text/xml'); $o='<?xml version="1.0" encoding="UTF-8"?>'."\n"; $o.='<playlist version="1" xmlns="http://xspf.org/ns/0/">'."\n"; $o.=' <title>'.$seqTitle->getText().'</title>'."\n"; $o.=' <info>'.$seqTitle->getFullURL().'</info>'."\n"; $o.=' <trackList>'."\n"; $seqArticle->parsePlaylist(); foreach($seqArticle->clips as $clip){ $o.=' <track>'."\n"; $o.=' <title>'.htmlentities($clip['title']).'</title>'."\n"; $o.=' <location>'.htmlentities($clip['src']).'</location>'."\n"; $o.=' <info>'.htmlentities($clip['info']).'</info>'."\n"; $o.=' <image>'.htmlentities($clip['image']).'</image>'."\n"; $o.=' <annotation>'.htmlentities($clip['desc']).'</annotation>'."\n"; $o.=' </track>'."\n"; } $o.=' </trackList>'."\n"; $o.='</playlist>'; print $o; }
function mvSeqTag(&$input, &$argv, &$parser) { global $wgTitle; // print "cur title: " . $wgTitle->getDBkey() . ' ns: ' . $wgTitle->getNamespace(); // check namespace (seq only show up via <tag> when in mvSequence namespace if (!$wgTitle instanceof Title) { wfDebugLog('mvSeqTag', "wgTitle not instance of Title`"); return true; } if ($wgTitle->getNamespace() == MV_NS_SEQUENCE) { $marker = MV_SequencePage::doSeqReplace($input, $argv, $parser); return $marker; } return true; }