Lines Matching refs:opts
46 $opts = array( // set default
75 $opts['width'] = $pargs['s'];
76 $opts['height'] = $pargs['s'];
79 $opts['height'] = $pargs['h'];
82 $opts['width'] = $pargs['w'];
85 $opts['noop'] = true;
88 $opts['manual'] = true;
91 $opts['display'] = $pargs['display'];
96 $opts[$k] = $pargs[$k];
101 if(is_numeric($opts['width'])) $opts['width'] .= 'px';
102 if(is_numeric($opts['height'])) $opts['height'] .= 'px';
104 $opts['id'] = trim($id);
105 if ($opts['title'] == "") {
106 $opts['title'] = $id;
109 $opts['title'] = trim($title);
112 return array($state, $opts);
121 list($state, $opts) = $data;
122 if ($opts['id'] == '') {
126 $mediaurl = DOKU_URL . "lib/exe/fetch.php?media=" . $opts['id'];
127 if (isset($opts['noop'])) {
128 $renderer->doc .= "<a href=\"" . $mediaurl . "\">".$opts['id']."</a>";
133 $buff[] = "<b>".$opts['title']."</b><br/>";
134 $buff[] = "<div id=\"stl_cont".$opts['pos']."\" class=\"media\">";
135 $buff[] = "<a href=\"javascript:init_stl_".$opts['pos']."()\">Show stl</a>";
138 $buff[] = "function init_stl_".$opts['pos']."() {";
139 $buff[] = " var destdiv = document.getElementById(\"stl_cont".$opts['pos']."\");";
141 $buff[] = " destdiv.style.height = \"".$opts['height']."\";";
142 $buff[] = " destdiv.style.width = \"".$opts['width']."\";";
143 $buff[] = " var destdiv = document.getElementById(\"stl_cont".$opts['pos']."\");";
144 $buff[] = " var stl_viewer".$opts['pos']."=new StlViewer(";
151 $buff[] = " canvas_width: \"".$opts['width']."\",";
152 $buff[] = " canvas_height: \"".$opts['height']."\",";
153 $buff[] = " bg_color: \"".$opts['bgcolor']."\",";
156 $buff[] = " color: \"".$opts['color']."\",";
157 $buff[] = " display: \"".$opts['display']."\",";
163 if (!$opts['manual']) {
164 $buff[] = "document.addEventListener(\"DOMContentLoaded\", init_stl_".$opts['pos'].");";
168 …$buff[] = "<a href=\"" . DOKU_URL . ml($opts['id']) . "\" title=\"".$opts['id']."\">Download</a><b…