40 $this->_obj =
$xoops->module;
53 $this->_menutop[] = array(
'link' =>
$link,
'name' =>
$name);
61 $this->addOptionTop($k, $v);
65 $this->addOptiontop($k, $k);
76 $this->_menutabs[] = array(
'link' =>
$link,
'name' =>
$name,
'current' => 0);
84 $this->addMenuTabsTop($k, $v);
88 $this->addMenuTabsTop($k, $k);
96 $this->_header = $value;
101 $this->_subheader = $value;
106 global $bc_site, $bc_label;
108 $return_str =
"<a href=\"/\">$basename</a>";
111 $arr = split(
'/', $str);
115 foreach ($arr as $val) {
116 $return_str .=
' > <a href="' . $site . $val .
'/">' . $bc_label[$val] .
'</a>';
122 $return_str .=
' > <a href="' . $bc_site . $arr .
'/">' . $bc_label[$arr] .
'</a>';
129 public function render($currentoption = 1, $display =
true)
132 $xoops->tpl()->assign(
'xo_module_menu_top', $this->_menutop);
133 $this->_menutabs[$currentoption][
'current'] = 1;
134 $xoops->tpl()->assign(
'xo_module_menu_tab', $this->_menutabs);
142 $_dirname = $this->_obj->getVar(
'dirname');
148 foreach ($this->_menutabs as $k => $menus) {
149 $menuItems[] = $menus;
152 $menuItems[$currentoption] =
'current';
155 $menu =
"<div id='buttontop_mod'>";
156 $menu .=
"<table style='width: 100%; padding: 0;' cellspacing='0'>\n<tr>";
157 $menu .=
"<td style='font-size: 10px; text-align: left; color: #2F5376; padding: 0 6px; line-height: 18px;'>";
158 foreach ($this->_menutop as $k => $v) {
159 $menu .=
" <a href=\"$k\">$v</a> |";
164 $menu .=
"<td style='text-align: right;'><strong>" . $this->_obj->getVar(
'name') .
"</strong> : " .
$breadcrumb .
"</td>";
165 $menu .=
"</tr>\n</table>\n";
167 $menu .=
"<div id='buttonbar_mod'><ul>";
168 foreach ($this->_menutabs as $k => $v) {
169 $menu .=
"<li id='" . $menuItems[
$i] .
"'><a href='" .
\XoopsBaseConfig::get(
'url') .
"/modules/" . $this->_obj->getVar(
'dirname') .
"/" . $k .
"'><span>$v</span></a></li>\n";
172 $menu .=
"</ul>\n</div>\n";
173 if ($this->_header) {
174 $menu .=
"<h4 class='admin_header'>";
175 if (isset($modversion[
'name'])) {
176 if ($modversion[
'image'] && $this->_obj->getVar(
'mid') == 1) {
177 $system_image =
\XoopsBaseConfig::get(
'url') .
'/modules/system/images/system/' . $modversion[
'image'];
179 $system_image =
\XoopsBaseConfig::get(
'url') .
'/modules/' . $_dirname .
'/images/' . $modversion[
'image'];
181 $menu .=
"<img src='$system_image' align='middle' height='32' width='32' alt='' />";
182 $menu .=
" " . $modversion[
'name'] .
"</h4>\n";
184 $menu .=
" " . $this->_header .
"</h4>\n";
187 if ($this->_subheader) {
188 $menu .=
"<div class='admin_subheader'>" . $this->_subheader .
"</div>\n";
190 $menu .=
'<div class="clear"> </div>';
192 if ($display ==
true) {
breadcrumb_nav($basename="Home")
addMenuTabs($link, $name="")
addMenuTabsArray($options, $multi=true)
addMenuTopArray($options, $multi=true)
addMenuTop($link, $name="")
render($currentoption=1, $display=true)