Lines Matching refs:opts

45         $opts = array( // set default
73 $opts['width'] = $pargs['s'];
74 $opts['height'] = $pargs['s'];
77 $opts['height'] = $pargs['h'];
80 $opts['width'] = $pargs['w'];
84 $opts['noop'] = true;
88 $opts['manual'] = true;
93 $opts[$k] = $pargs[$k];
98 if(is_numeric($opts['width'])) $opts['width'] .= 'px';
99 if(is_numeric($opts['height'])) $opts['height'] .= 'px';
101 $opts['id'] = trim($id);
102 if ($opts['title'] == "") {
103 $opts['title'] = $id;
106 $opts['title'] = trim($title);
109 return array($state, $opts);
118 list($state, $opts) = $data;
119 if ($opts['id'] == '') {
123 $mediaurl = DOKU_URL . "lib/exe/fetch.php?media=" . $opts['id'];
124 if (isset($opts['noop'])) {
125 $renderer->doc .= "<a href=\"" . $mediaurl . "\">".$opts['id']."</a>";
130 $buff[] = "<b>".$opts['title']."</b><br/>";
131 $buff[] = "<div id=\"stl_cont".$opts['pos']."\" class=\"media\">";
132 $buff[] = "<a href=\"javascript:init_stl_".$opts['pos']."()\">Show stl</a>";
135 $buff[] = "function init_stl_".$opts['pos']."() {";
136 $buff[] = " var destdiv = document.getElementById(\"stl_cont".$opts['pos']."\");";
138 $buff[] = " destdiv.style.height = \"".$opts['height']."\";";
139 $buff[] = " destdiv.style.width = \"".$opts['width']."\";";
140 $buff[] = " var destdiv = document.getElementById(\"stl_cont".$opts['pos']."\");";
141 $buff[] = " var stl_viewer".$opts['pos']."=new StlViewer(";
148 $buff[] = " canvas_width: \"".$opts['width']."\",";
149 $buff[] = " canvas_height: \"".$opts['height']."\",";
150 $buff[] = " bg_color: \"".$opts['bgcolor']."\",";
153 $buff[] = " color: \"".$opts['color']."\",";
159 if (!$opts['manual']) {
160 $buff[] = "document.addEventListener(\"DOMContentLoaded\", init_stl_".$opts['pos'].");";
164 $buff[] = "<a href=\"" . DOKU_URL . ml($opts['id']) . "\" title=\"".$opts['id']."\">Download</a><br/>";