* @version $Id$
*/
-require_once ('www/search/include/SearchManager.class.php');
+require_once $gfwww.'search/include/SearchManager.class.php';
class Theme extends Error {
}
- /**
- * createLinkToUserHome() - Creates a link to a user's home page
- *
- * @param string The user's user_name
- * @param string The user's realname
- */
- function createLinkToUserHome($user_name, $realname) {
- return '<a href="'.$GLOBALS['sys_urlprefix'].'/users/'.$user_name.'/">'.$realname.'</a>';
- }
-
/**
* headerStart() - common code for all themes
*
* @param array Header parameters array
*/
function headerStart($params) {
- global $Language;
-
if (!$params['title']) {
$params['title'] = $GLOBALS['sys_name'];
} else {
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo _('en') ?>"
lang="<?php echo _('en') ?>">
<head>
<title><?php echo $params['title']; ?></title>
<link rel="alternate"
title="<?php echo $GLOBALS['sys_name']; ?> - Project News Highlights RSS"
- href="<?php echo $GLOBALS['sys_urlprefix']; ?>/export/rss_sfnews.php"
+ href="<?php echo util_make_url ('/export/rss_sfnews.php'); ?>"
type="application/rss+xml" />
<link rel="alternate"
title="<?php echo $GLOBALS['sys_name']; ?> - Project News Highlights RSS 2.0"
- href="<?php echo $GLOBALS['sys_urlprefix']; ?>/export/rss20_news.php"
+ href="<?php echo util_make_url ('/export/rss20_news.php'); ?>"
type="application/rss+xml" />
<link rel="alternate"
title="<?php echo $GLOBALS['sys_name']; ?> - New Projects RSS"
- href="<?php echo $GLOBALS['sys_urlprefix']; ?>/export/rss_sfprojects.php"
+ href="<?php echo util_make_url ('/export/rss_sfprojects.php'); ?>"
type="application/rss+xml" />
<?php if (isset($GLOBALS['group_id'])) {
- $activity = '<link rel="alternate" title="'.$GLOBALS['sys_name'].' - New Activity RSS" href="'.$GLOBALS['sys_urlprefix'].'/export/rss20_activity.php?group_id='.$GLOBALS['group_id'].'" type="application/rss+xml"/>';
+ $activity = '<link rel="alternate" title="'.$GLOBALS['sys_name'].' - New Activity RSS" href="'.
+ util_make_url ('/export/rss20_activity.php?group_id='.$GLOBALS['group_id']).
+ '" type="application/rss+xml"/>';
echo $activity;
}
?>
$theme_cssfile=$GLOBALS['sys_themeroot'].$GLOBALS['sys_theme'].'/css/'.$GLOBALS['sys_theme'].'.css';
if (file_exists($theme_cssfile)){
echo '
-<link rel="stylesheet" type="text/css" href="'.$GLOBALS['sys_urlprefix'].'/themes/'.$GLOBALS['sys_theme'].'/css/'.$GLOBALS['sys_theme'].'.css"/>';
+<link rel="stylesheet" type="text/css" href="'.util_make_url ('/themes/'.$GLOBALS['sys_theme'].'/css/'.$GLOBALS['sys_theme'].'.css').'"/>';
}
?>
<div id="container">
<div id="logo">
-<h1><a href="<?php echo $GLOBALS['sys_urlprefix']; ?>/">Goto GForge</a></h1>
-<!--<a href="<?php echo $GLOBALS['sys_urlprefix']; ?>/"><img src="<?php echo $GLOBALS['sys_urlprefix']; ?>/themes/gforge-simple-theme/images/logo.png" border="0" margin="0" padding="0" valign="top"/></a>-->
+<h1><?php echo util_make_link ('/',_('Home')); ?></h1>
</div>
-<div id="util"><?php if (session_loggedin()) {
- ?> <a
- href="<?php echo $GLOBALS['sys_urlprefix']; ?>/account/logout.php"><?php echo _('Log Out'); ?></a><br />
-<a href="<?php echo $GLOBALS['sys_urlprefix']; ?>/account/"><?php echo _('My Account'); ?></a><br />
-
- <?php
+<div id="util">
+<?php
+if (session_loggedin()) {
+ echo util_make_link ('/account/logout.php',_('Log Out'));
+ echo '<br />';
+ echo util_make_link ('/account/',_('My Account'));
+ echo '<br />';
} else {
- ?> <a href="<?php echo $GLOBALS['sys_urlprefix']; ?>/account/login.php"><?php echo _('Log In'); ?></a><br />
-<a href="<?php echo $GLOBALS['sys_urlprefix']; ?>/account/register.php"><?php echo _('New Account'); ?></a>
- <?php
+ echo util_make_link ('/account/login.php',_('Log In'));
+ echo '<br />';
+ if (!$GLOBALS['sys_user_reg_restricted']) {
+ echo util_make_link ('/account/register.php',_('New Account'));
+ echo '<br />';
+ }
}
-?></div>
+?>
+</div>
-<div id="content"><br />
+<div id="headercontent"><br />
<?php echo $this->searchBox();
?></div>
$this->footerEnd($params);
}
-function footerEnd($params) { ?> <!-- PLEASE LEAVE "Powered By GForge" on your site -->
-<div id="footer"><a href="http://gforge.org/"><img
- src="<?php echo $GLOBALS['sys_urlprefix']; ?>/images/pow-gforge.png"
- alt="Powered By GForge Collaborative Development Environment"
- border="0" /></a></div>
+function footerEnd($params) { ?> <!-- PLEASE LEAVE "Powered By FusionForge" on your site -->
+<div id="footer"><a href="http://fusionforge.org/"><img
+ src="<?php echo util_make_url ('/images/pow-fusionforge.png'); ?>"
+ alt="Powered By FusionForge"
+ border="0" /></a>
+</div>
<?php
global $sys_show_source;
if ($sys_show_source) {
- print '<a class="showsource" href="'.$GLOBALS['sys_urlprefix'].'/source.php?file=' . getStringFromServer('SCRIPT_NAME') . '"> '._('Show source').' </a>';
+ echo util_make_link ('/source.php?file='.getStringFromServer('SCRIPT_NAME'),_('Show source'),array('class'=>'showsource'));
}
?>
<table cellspacing="0" cellpadding="0" width="100%" border="0">
<tr class="tableheading">
- <td valign="top" align="right" width="10"><img src="'.$this->imgroot.'clear.png" width="10" height="20" alt="" /></td>
+ <td valign="top" align="right" width="10"><img src="'.$this->imgroot.'clear.png'.'" width="10" height="20" alt="" /></td>
<td width="100%"><span class="titlebar">'.$title.'</span></td>
- <td valign="top" width="10"><img src="'.$this->imgroot.'clear.png" width="10" height="20" alt=""/></td>
+ <td valign="top" width="10"><img src="'.$this->imgroot.'clear.png'.'" width="10" height="20" alt=""/></td>
</tr>
<tr>
<td colspan="3">
function outerTabs($params) {
- global $Language,$sys_use_trove,$sys_use_snippet,$sys_use_people;
+ global $sys_use_trove,$sys_use_snippet,$sys_use_people;
$selected=0;
$TABS_DIRS[]='/';
} elseif (!$project->isProject()) {
} else {
- $TABS_DIRS[]='/projects/'.$project->getUnixName().'/';
+ $TABS_DIRS[]=util_make_url_g ($project->getUnixName(),$params['group']);
$TABS_TITLES[]=$project->getPublicName();
$selected=count($TABS_DIRS)-1;
}
$this->selected_title = $TABS_TITLES[$i];
$this->selected_dir = $TABS_DIRS[$i];
$this->selected_id = $TABS_IDS[$i];
- $return .= '<a id="gforge-selected" title="'.$TABS_TITLES[$i].'" href="'.$TABS_DIRS[$i].'" >'.$TABS_TITLES[$i].'</a> ';
+ @$return .= util_make_link ($TABS_DIRS[$i],$TABS_TITLES[$i],array('id'=>'gforge-selected','title'=>$TABS_TITLES[$i]));
}
else{
- $return .= '<a id="gforge-'.$TABS_IDS[$i].'" title="'.$TABS_TITLES[$i].'"
-href="'.$TABS_DIRS[$i].'">'.$TABS_TITLES[$i].'</a> ';
+ @$return .= util_make_link ($TABS_DIRS[$i],$TABS_TITLES[$i],array('id'=>'gforge-'.$TABS_IDS[$i],'title'=>$TABS_TITLES[$i]));
}
}
if(isset($params['group']) && $params['group']) {
- $return .= '<a id="gforge-selected" title="'.$TABS_TITLES[$i].'"
-href="'.$TABS_DIRS[$i].'">'.$TABS_TITLES[$i].'</a> ';
+ $return .= util_make_link ($TABS_DIRS[$i],$TABS_TITLES[$i],array('id'=>'gforge-selected','title'=>$TABS_TITLES[$i]));
$this->selected_title = $TABS_TITLES[$i];
}
return $return;
// $TABS_TITLES[]=$project->getPublicName();
// Summary
- $TABS_DIRS[]='/projects/'. $project->getUnixName() .'/';
+ if (isset ($GLOBALS['sys_noforcetype']) && $GLOBALS['sys_noforcetype']) {
+ $TABS_DIRS[]='/project/?group_id='.$group;
+ } else {
+ $TABS_DIRS[]='/projects/'.$project->getUnixName();
+ }
$TABS_IDS[]='gforge-project-summary';
$TABS_TITLES[]=_('Summary');
(($toptab == 'home') ? $selected=(count($TABS_TITLES)-1) : '' );
if ($selected==$i){
$this->selected_title = $TABS_TITLES[$i];
$this->selected_dir = $TABS_DIRS[$i];
- $this->selected_id = $TABS_IDS[$i];
- $return .= '<a id="gforge-project-selected" href="'.$TABS_DIRS[$i].'">'.$TABS_TITLES[$i].'</a> ';
+ //$this->selected_id = $TABS_IDS[$i];
+ $return .= util_make_link ($TABS_DIRS[$i],$TABS_TITLES[$i],array('id'=>'gforge-project-selected'));
}
else{
- if ($TABS_IDS[$i]==''){
- $return .= '<a id="gforge-project-std" title="'.$TABS_TITLES[$i].'" href="'.$TABS_DIRS[$i].'">'.$TABS_TITLES[$i].'</a>';
+ if (!isset($TABS_IDS[$i]) || $TABS_IDS[$i]==''){
+ $return .= util_make_link ($TABS_DIRS[$i],$TABS_TITLES[$i],array('id'=>'gforge-project-std','title'=>$TABS_TITLES[$i]));
}
else {
- $return .= '<a id="'.$TABS_IDS[$i].'" title="'.$TABS_TITLES[$i].'" href="'.$TABS_DIRS[$i].'">'.$TABS_TITLES[$i].'</a>';
+ $return .= util_make_link ($TABS_DIRS[$i],$TABS_TITLES[$i],array('id'=>$TABS_IDS[$i],'title'=>$TABS_TITLES[$i]));
}
}
}
if (isset($group_id)&& $group_id) {
- print '
-
- <a class="lnkutility" href="'.$GLOBALS['sys_urlprefix'].'/search/advanced_search.php?group_id='.$group_id.'"> '._('Advanced search').'</a>';
+ echo util_make_link ('/search/advanced_search.php?group_id='.$group_id,_('Advanced search'),array('class'=>'lnkutility'));
}
print '</form>';
}
function createUnderSections($sectionsArray) {
- global $Language;
$countLines = 0;
foreach ($sectionsArray as $section) {
if(is_array($section)) {
$return = '';
for ($i=0; $i<$count; $i++) {
- $return .= '
- <a href="'.$links_arr[$i].'">'.$title_arr[$i].'</a> | ';
+ $return .= util_make_link ($links_arr[$i],$title_arr[$i]).' | ';
}
- $return .= '
- <a href="'.$links_arr[$i].'">'.$title_arr[$i].'</a>';
+ $return .= util_make_link ($links_arr[$i],$title_arr[$i]);
return $return;
}
if (db_result($res,$i,'use_tracker')) {
$ret .= '
<option value="/tracker/?group_id='.db_result($res,$i,'group_id').'"> Tracker</option>';
- if (db_result($res,$i,'admin_flags') || db_result($res,$i,'tracker_flags')) {
+ if (db_result($res,$i,'admin_flags') || db_result($res,$i,'artifact_flags')) {
$ret .= '
<option value="/tracker/admin/?group_id='.db_result($res,$i,'group_id').'"> Admin</option>';
}