require_once $gfwww.'include/Layout.class.php';
-define('THEME_DIR', util_make_url ('/themes/gforge'));
+define('THEME_DIR', util_make_uri ('/themes/gforge'));
define('TOP_TAB_HEIGHT', 30);
define('BOTTOM_TAB_HEIGHT', 22);
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>'. $params['title'] . '</title>
- <link rel="icon" type="image/png" href="'. util_make_url('/images/icon.png') .'" />
- <link rel="shortcut icon" type="image/png" href="'. util_make_url('/images/icon.png') .'" />';
+ <link rel="icon" type="image/png" href="'. util_make_uri('/images/icon.png') .'" />
+ <link rel="shortcut icon" type="image/png" href="'. util_make_uri('/images/icon.png') .'" />';
echo $this->headerLink();
echo '
- <script type="text/javascript" src="'. $this->jsroot .'gforge.js"></script>
+ <script type="text/javascript" src="'. util_make_uri('/js/common.js') .'"></script>
<script type="text/javascript">';
plugin_hook ("javascript",false);
echo '</script>';
if (isset($params['group']) && $params['group']) {
echo $this->projectTabs($params['toptab'],$params['group']);
}
+ echo '<div id="maindiv">
+';
+ }
+
+ function bodyFooter($params) {
+ echo '</div>
+';
}
function footer($params) {
<!-- PLEASE LEAVE "Powered By FusionForge" on your site -->
<div class="align-right">
<a href="http://fusionforge.org/">
- <img src="'. util_make_url ('/images/pow-fusionforge.png') .'" alt="Powered By FusionForge" />
+ <img src="'. util_make_uri ('/images/pow-fusionforge.png') .'" alt="Powered By FusionForge" />
</a></div>
';
echo '
<link href="http://yui.yahooapis.com/2.6.0/build/reset-fonts-grids/reset-fonts-grids.css" type="text/css" rel="stylesheet" />
<link href="http://yui.yahooapis.com/2.6.0/build/base/base-min.css" type="text/css" rel="stylesheet" />
- <link rel="stylesheet" type="text/css" href="'. util_make_url ('/themes/css/fusionforge.css') .'" />
+ <link rel="stylesheet" type="text/css" href="'. util_make_uri ('/themes/css/fusionforge.css') .'" />
<link rel="stylesheet" type="text/css" href="'. THEME_DIR .'/css/theme.css" />
<link rel="stylesheet" type="text/css" href="'. THEME_DIR .'/css/theme-pages.css" />
';
*
* @param array The array of titles
* @param array The array of title links
+ * @param boolean Whether to highlight or not the entry
*/
function listTableTop ($title_arr,$links_arr=false,$selected=false) {
$return = '<table class="width-100p100 listTable';
}
- function tabGenerator($TABS_DIRS,$TABS_TITLES,$nested=false,$selected=false,$sel_tab_bgcolor='WHITE',$total_width='100%') {
- $count=count($TABS_DIRS);
- $width=intval((100/$count));
-
+ function tabGenerator($TABS_DIRS, $TABS_TITLES, $nested=false, $selected=false, $sel_tab_bgcolor='WHITE', $total_width='100%') {
+ $count=count($TABS_DIRS);
+ if ($count < 1) {
+ return;
+ }
$return = '
<!-- start tabs -->
<table class="tabGenerator width-100p100" summary="" ';
$folder = $this->imgroot.($nested ? 'bottomtab-new/' : 'toptab-new/');
+ $accumulated_width = 0;
for ($i=0; $i<$count; $i++) {
+ $tabwidth = intval(ceil(($i+1)*100/$count)) - $accumulated_width ;
+ $accumulated_width += $tabwidth ;
+
if ($selected == $i) {
$left_img = $folder.'selected-left.gif';
$middle_img = $folder.'selected-middle.gif';
$return .= '</td>' . "\n";
// middle part
- $return .= '<td class="tg-middle" style="width:'.$width.'%;">' . "\n";
+ $return .= '<td class="tg-middle" style="width:'.$tabwidth.'%;">' . "\n";
$return .= '<div';
if ($selected == $i) {
$return .= ' class="selected"';
$return .= '</td>' . "\n";
}
}
-
+
$return .= '</tr>
</table>
<!-- end tabs -->';