[Fusionforge-commits] r7158 - in trunk/gforge: cronjobs utils

Gonéri Le Bouder goneri at libremir.placard.fr.eu.org
Fri Mar 13 10:55:19 CET 2009


Author: goneri
Date: 2009-03-13 10:55:18 +0100 (Fri, 13 Mar 2009)
New Revision: 7158

Modified:
   trunk/gforge/cronjobs/homedirs.php
   trunk/gforge/utils/default_page.php
Log:
project tpl page

Drop the SF.net branding
Create a pure HTML page
Translate the page to the local language

Modified: trunk/gforge/cronjobs/homedirs.php
===================================================================
--- trunk/gforge/cronjobs/homedirs.php	2009-03-12 10:00:22 UTC (rev 7157)
+++ trunk/gforge/cronjobs/homedirs.php	2009-03-13 09:55:18 UTC (rev 7158)
@@ -55,6 +55,7 @@
 require_once $gfwww.'include/squal_pre.php';
 require $gfcommon.'include/cron_utils.php';
 
+setup_gettext_from_sys_lang();	
 define('USER_DEFAULT_GROUP','users');
 //error variable
 $err = '';
@@ -152,10 +153,18 @@
 		//$contents=str_replace('<group_id>',$g->getID(),$contents);
 		//$contents=str_replace('<group_name>',$g->getUnixName(),$contents);
 
+		$contents=str_replace('##comment##', _('Default Web Page for groups that haven\'t setup their page yet'), $contents);
+		$contents=str_replace('##purpose##', _('Please replace this file with your own website'), $contents);
+		$contents=str_replace('##welcome_to##', sprintf(_('Welcome to %s'), $g->getPublicName()), $contents);
+		$contents=str_replace('##body##',
+			sprintf(
+				_("We're Sorry but this Project hasn't yet uploaded their personal webpage yet. <br /> Please check back soon for updates or visit <a href=\"%s\">the project page</a>."),
+				"http://".$GLOBALS['sys_default_domain'].'/projects/'.$g->getUnixName()),
+			$contents);
 		//
 		//	Write the file back out to the project home dir
 		//
-		$fw=fopen($groupdir_prefix."/".$group."/htdocs/index.php",'w');
+		$fw=fopen($groupdir_prefix."/".$group."/htdocs/index.html",'w');
 		fwrite($fw,$contents);
 		fclose($fw);
 		

Modified: trunk/gforge/utils/default_page.php
===================================================================
--- trunk/gforge/utils/default_page.php	2009-03-12 10:00:22 UTC (rev 7157)
+++ trunk/gforge/utils/default_page.php	2009-03-13 09:55:18 UTC (rev 7158)
@@ -1,66 +1,36 @@
-<?php
-// Default Web Page for groups that haven't setup their page yet
-// Please replace this file with your own website
+<!--
+// ##comment##
+// ##purpose##
 //
-$headers = getallheaders();
-?>
+-->
 <html>
 <head>
-<title>SourceForge: Welcome</title>
+<title>##welcome_to##</title>
 </head>
 
-<BODY bgcolor=#FFFFFF topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" marginheight="0" marginwidth="0">
+<body topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" marginheight="0" marginwidth="0">
 
 <!-- top strip -->
-<table width="100%" border=0 cellspacing=0 cellpadding=2 bgcolor="737b9c">
+<table width="100%" border=0 cellspacing=0 cellpadding=2>
   <tr>
     <td><SPAN class=maintitlebar>&nbsp;&nbsp;
-      <a class=maintitlebar href="http://sourceforge.net/"><strong>Home</strong></a> | 
-      <a class=maintitlebar href="http://sourceforge.net/about.php"><strong>About</strong></a> | 
-      <a class=maintitlebar href="http://sourceforge.net/partners.php"><strong>Partners</strong></a> |
-      <a class=maintitlebar href="http://sourceforge.net/contact.php"><strong>Contact Us</strong></a> |
-      <a class=maintitlebar href="http://sourceforge.net/account/logout.php"><strong>Logout</strong></a></span></td>
+      <a class=maintitlebar href="http://fusionforge.fusionforge.org/"><small>FusionForge Project</small></a> |
+      <a class=maintitlebar href="http://fusionforge.org/"><small>FusionForge</small></a>
     </td>
   </tr>
 </table>
 <!-- end top strip -->
 
-<!-- top title table -->
-<table width="100%" border=0 cellspacing=0 cellpadding=0 bgcolor="" valign="center">
-  <tr valign="top" bgcolor="#eeeef8">
-    <td>
-      <a href="http://sourceforge.net/"><img src="http://sourceforge.net/images/sflogo2-steel.png" vspace="0" border=0 width="215" height="105"></a>
-    </td>
-    <td width="99%"><!-- right of logo -->
-      <a href="http://www.valinux.com"><img src="http://sourceforge.net/images/va-btn-small-light.png" align="right" alt="VA Linux Systems" hspace="5" vspace="7" border=0 width="136" height="40"></a>
-    </td><!-- right of logo -->
-  </tr>
-  <tr><td bgcolor="#543a48" colspan=2><img src="http://sourceforge.net/images/blank.png" height=2 vspace=0></td></tr>
-</table>
-<!-- end top title table -->
 
 <!-- center table -->
-<table width="100%" border="0" cellspacing="0" cellpadding="2" bgcolor="#FFFFFF" align="center">
-  <tr>
-    <td>
-      <center><br />
-      <h1>Welcome to http://<?php print $headers['Host']; ?>/</h1>
-      <p>We're Sorry but this Project hasn't yet uploaded their personal webpage yet.<br />
-      Please check back soon for updates or visit <a href="http://sourceforge.net/">SourceForge</a></p><br />
-      </center>
-    </td>
-  </tr>
-</table>
+<center>
+	<h1>##welcome_to##</h1>
+	<p>
+	##body##
+	</p>
+</center>
 <!-- end center table -->
 
-<!-- footer table -->
-<table width="100%" border="0" cellspacing="0" cellpadding="2" bgcolor="737b9c">
-  <tr>
-    <td style="text-align:center"><FONT color="#ffffff"><SPAN class="titlebar">
-      All trademarks and copyrights on this page are properties of their respective owners. Forum comments are owned by the poster. The rest is copyright &copy; 1999-2000 VA Linux Systems, Inc.</span></FONT>
-    </td>
-  </tr>
-</table>
 
 <!-- end footer table -->
 </body>




More information about the Fusionforge-commits mailing list