[vhffs-dev] [687] Hoster can now set a website URL which points to its website, this URL will be used in the panel to put links to the website

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 687
Author:   gradator
Date:     2007-07-08 01:33:58 +0000 (Sun, 08 Jul 2007)

Log Message:
-----------
Hoster can now set a website URL which points to its website, this URL will be used in the panel to put links to the website

Modified Paths:
--------------
    trunk/vhffs-api/src/Vhffs/Conf.pm
    trunk/vhffs-api/src/Vhffs/Panel/Commons.pm
    trunk/vhffs-backend/conf/vhffs.conf.dist.in
    trunk/vhffs-backend/conf/vhffs.conf.in


Modified: trunk/vhffs-api/src/Vhffs/Conf.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Conf.pm	2007-07-08 01:14:03 UTC (rev 686)
+++ trunk/vhffs-api/src/Vhffs/Conf.pm	2007-07-08 01:33:58 UTC (rev 687)
@@ -730,6 +730,12 @@
 }
 
 
+sub get_host_website
+{
+	return $Config{'global'}{'host_website'};
+}
+
+
 sub get_listengine_domain
 {
 	if( defined $Config{"services"}{"listengine"}{"domain"} )

Modified: trunk/vhffs-api/src/Vhffs/Panel/Commons.pm
===================================================================
--- trunk/vhffs-api/src/Vhffs/Panel/Commons.pm	2007-07-08 01:14:03 UTC (rev 686)
+++ trunk/vhffs-api/src/Vhffs/Panel/Commons.pm	2007-07-08 01:33:58 UTC (rev 687)
@@ -42,13 +42,21 @@
     my ($vhffs, $panel) = @_;
 
     my $hostname = $vhffs->get_config->get_host_name;
+    my $website = $vhffs->get_config->get_host_website;
     my $cgi = $panel->{cgi};
 
+    my $hosturl;
+    if( defined $website )  {
+        $hosturl = '<a href="'.$vhffs->get_config->get_host_website.'">'.$vhffs->get_config->get_host_name.'</a>';
+    } else {
+        $hosturl = $hostname;
+    }
+
     my $templatedir = $panel->{templatedir};
     my $template = new HTML::Template( filename => $templatedir."/main/auth.tmpl" );
 
     $template->param( TITLE => gettext("VHFFS Login") );
-    $template->param( TEXT_WELCOME => sprintf( gettext("Welcome on %s") , $hostname )   );
+    $template->param( TEXT_WELCOME => sprintf( gettext("Welcome on %s") , $hosturl )   );
     $template->param( VHFFS_INFO => sprintf( "Run VHFFS %s (%s)" , Vhffs::Constants::VHFFS_VERSION , Vhffs::Constants::VHFFS_RELEASE_NAME ) );
     $template->param( TEXT_PLEASEIDENTIFY => gettext("Please enter your username and password") );
     $template->param( TEXT_USERNAME => gettext("Username") );
@@ -67,7 +75,7 @@
         my $users  = $stats->get_user_total;
         my $groups = $stats->get_groups_total;
 
-        $template->param( TEXT_STATS => sprintf( gettext( "Woah, %s users and %s groups already trust %s" ) , $users, $groups , $hostname ) );
+        $template->param( TEXT_STATS => sprintf( gettext( "Woah, %s users and %s groups already trust %s" ) , $users, $groups , $hosturl ) );
     }
 
     if( $vhffs->get_config->get_panel_public == 1 ) {

Modified: trunk/vhffs-backend/conf/vhffs.conf.dist.in
===================================================================
--- trunk/vhffs-backend/conf/vhffs.conf.dist.in	2007-07-08 01:14:03 UTC (rev 686)
+++ trunk/vhffs-backend/conf/vhffs.conf.dist.in	2007-07-08 01:33:58 UTC (rev 687)
@@ -7,6 +7,10 @@
 	#This is the name of your hosting service
 	host_name		=	My Hosting service
 
+	#This is the URL of the website of the hoster,
+	#if unset, no links will be added to hoster website
+	host_website		=	http://vhffs.org/
+
 	#The directory where you store ALL data
 	datadir			=	/data
 

Modified: trunk/vhffs-backend/conf/vhffs.conf.in
===================================================================
--- trunk/vhffs-backend/conf/vhffs.conf.in	2007-07-08 01:14:03 UTC (rev 686)
+++ trunk/vhffs-backend/conf/vhffs.conf.in	2007-07-08 01:33:58 UTC (rev 687)
@@ -7,6 +7,10 @@
 	#This is the name of your hosting service
 	host_name		=	My Hosting service
 
+	#This is the URL of the website of the hoster,
+	#if unset, no links will be added to hoster website
+	host_website		=	http://vhffs.org/
+
 	#The directory where you store ALL data
 	datadir			=	/data
 


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/