phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: sitemgr/inc class.Common_UI.inc.php,1.3,1.4 hook


From: Patrick Walsh <address@hidden>
Subject: [Phpgroupware-cvs] CVS: sitemgr/inc class.Common_UI.inc.php,1.3,1.4 hook_about.inc.php,1.1.1.1,1.2
Date: Sun, 01 Sep 2002 00:24:29 -0400

Update of /cvsroot/phpgroupware/sitemgr/inc
In directory subversions:/tmp/cvs-serv26947/inc

Modified Files:
        class.Common_UI.inc.php hook_about.inc.php 
Log Message:
bugs, preferences, etc.


Index: class.Common_UI.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/sitemgr/inc/class.Common_UI.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** class.Common_UI.inc.php     30 Aug 2002 04:54:48 -0000      1.3
--- class.Common_UI.inc.php     1 Sep 2002 04:24:27 -0000       1.4
***************
*** 14,17 ****
--- 14,18 ----
                var $t;
                var $acl;
+               var $prefs_so;
                var $public_functions = array
                (
***************
*** 23,26 ****
--- 24,28 ----
                        $this->t = $GLOBALS['phpgw']->template;
                        $this->acl = CreateObject('sitemgr.ACL_BO');
+                       $this->prefs_so = 
CreateObject('sitemgr.sitePreference_SO', True);
                }
  
***************
*** 30,53 ****
                        if ($this->acl->is_admin())
                        {
!                               $prefs_so = 
CreateObject('sitemgr.sitePreference_SO', True);
                                if ($GLOBALS['btnSave'])
                                {
!                                       
$prefs_so->setPreference('sitemgr-site-url',$GLOBALS['sitemgr_site_url']);
!                                       
$prefs_so->setPreference('sitemgr-site-dir',$GLOBALS['sitemgr_site_dir']);
!                                       
$prefs_so->setPreference('home-page-id',$GLOBALS['home_page_id']);
!                                       
$prefs_so->setPreference('sitemgr-site-name',$GLOBALS['sitemgr_site_name']);
                                        echo '<p><b>Changes Saved.</b></p>';
                                }
!                               $sitemgr_site_url = 
$prefs_so->getPreference('sitemgr-site-url');
!                               $sitemgr_site_dir = 
$prefs_so->getPreference('sitemgr-site-dir');
!                               $home_page_id = 
$prefs_so->getPreference('home-page-id');
!                               $sitemgr_site_name = 
$prefs_so->getPreference('sitemgr-site-name');
                                
$this->t->set_file('sitemgr_prefs','sitemgr_preferences.tpl');
                                
$this->t->set_var('formaction',$GLOBALS['phpgw']->link(
                                        
'/index.php','menuaction=sitemgr.Common_UI.DisplayPrefs'));
!                               
$this->t->set_var('sitemgr-site-url',$sitemgr_site_url);
!                               
$this->t->set_var('sitemgr-site-dir',$sitemgr_site_dir);
!                               $this->t->set_var('home-page-id',$home_page_id);
!                               
$this->t->set_var('sitemgr-site-name',$sitemgr_site_name);
                                $this->t->pfp('out','sitemgr_prefs');
                        }
--- 32,94 ----
                        if ($this->acl->is_admin())
                        {
!                               $preferences['sitemgr-site-name'] = array(
!                                       'title'=>'Site name',
!                                       'note'=>'(This is used chiefly for meta 
data and the title bar.)',
!                                       'default'=>'New sitemgr site'
!                               );
!                               $preferences['sitemgr-site-url']=array(
!                                       'title'=>'URL to sitemgr-site',
!                                       'note'=>'(The URL can be relative or 
absolute.  Name must end in a slash.)'
!                               );
!                               $preferences['sitemgr-site-dir']=array(
!                                       'title'=>'Filesystem path to 
sitemgr-site directory',
!                                       'note'=>'(This must be an absolute 
directory location.  <b>No trailing slash</b>.)'
!                               );
!                               $preferences['home-page-id'] = array(
!                                       'title'=>'Default home page ID number',
!                                       'note'=>'(This should be a page that is 
readable by everyone. If you leave this blank, the site index will be shown by 
default.)',
!                                       'size'=>10
!                               );
!                               $preferences['login-domain'] = array(
!                                       'title'=>'Anonymous user login domain',
!                                       'note'=>'If you\'re not sure, enter 
Default.',
!                                       'default'=>'Default'
!                               );
!                               $preferences['anonymous-user'] = array(
!                                       'title'=>'Anonymous user\'s username',
!                                       'note'=>'(If you haven\'t done so 
already, create a user that will be used for public viewing of the site.  
Recommended name: anonymous.)',
!                                       'default'=>'anonymous'
!                               );
!                               $preferences['anonymous-passwd'] = array(
!                                       'title'=>'Anonymous user\'s password',
!                                       'note'=>'(Password that you assigned 
for the aonymous user account.)',
!                                       'default'=>'anonymous'
!                               );
!                               $preferences['themesel'] = array(
!                                       'title'=>'Theme select',
!                                       'note'=>'(Choose your site\'s them.  
This corresponds to a subdirectory of sitemgr-site/themes.  If you\'re not 
sure, enter NukeNews.  Case matters.)',
!                                       'default'=>'NukeNews'
!                               );
                                if ($GLOBALS['btnSave'])
                                {
!                                       reset($preferences);
!                                       while (list($name,$details) = 
each($preferences))
!                                       {
!                                               
$this->prefs_so->setPreference($name,$GLOBALS[$name]);
!                                       }
                                        echo '<p><b>Changes Saved.</b></p>';
                                }
! 
                                
$this->t->set_file('sitemgr_prefs','sitemgr_preferences.tpl');
                                
$this->t->set_var('formaction',$GLOBALS['phpgw']->link(
                                        
'/index.php','menuaction=sitemgr.Common_UI.DisplayPrefs'));
!                               
$this->t->set_block('sitemgr_prefs','PrefBlock','PBlock');
!                               reset($preferences);
!                               while (list($name,$details) = 
each($preferences))
!                               {
!                                       $this->PrefBlock($details['title'],
!                                               
$this->inputtext($name,$details['size'],$details['default']),
!                                               $details['note']);
!                               }
                                $this->t->pfp('out','sitemgr_prefs');
                        }
***************
*** 57,60 ****
--- 98,126 ----
                        }
                        $this->DisplayFooter();
+               }
+ 
+               function inputText($name='',$size=40,$default='')
+               {
+                       if (!is_int($size))
+                       {
+                               $size=40;
+                       }
+                       $val = $this->prefs_so->getPreference($name);
+                       if (!$val)
+                       {
+                               $val = $default;
+                       }
+ 
+                       return '<input type="text" size="'.$size.
+                               '" name="'.$name.'" value="'.$val.'">';
+               }
+ 
+               function PrefBlock($title,$input,$note)
+               {
+                       //$this->t->set_var('PBlock','');
+                       $this->t->set_var('pref-title',$title);
+                       $this->t->set_var('pref-input',$input);
+                       $this->t->set_var('pref-note',$note);
+                       $this->t->parse('PBlock','PrefBlock',true);
                }
  

Index: hook_about.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/sitemgr/inc/hook_about.inc.php,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** hook_about.inc.php  29 Aug 2002 03:03:17 -0000      1.1.1.1
--- hook_about.inc.php  1 Sep 2002 04:24:27 -0000       1.2
***************
*** 13,17 ****
        function about_app($tpl,$handle)
        {
!               $s = '<b>' . lang('Web Content Manager') . '</b><p>' . 
lang('written by:') . '&nbsp;Patrick Walsh<br>Tina Alinaghian<br>&nbsp;Fang 
Ming Lo<br>&nbsp;Austin Lee<br>&nbsp;Siu Leung';
                return $s;
        }
--- 13,38 ----
        function about_app($tpl,$handle)
        {
!               $s = '<b>' . lang('Web Site Manager') . '</b><p>' .nl2br(' 
! <u>Overview</u>
! This program will generate a dynamic web site with discrete sections that 
various phpGroupWare users may edit, if the administrator gives them permission 
to do so.  In effect, the generated website can have sections which independent 
departments are in charge of maintaining.  The site administrator can choose a 
theme and create headers, footers, and sidebars to enforce a sitewide look and 
feel.  Site sections can be viewable public (viewable by anonymous users) or 
private (viewable by specified users and groups only).
! 
! <u>Background</u>
! Team 10 in the UC Irvine Systems Design Course, ICS 125, chose this as their 
project.  Seek3r served as the project\'s "customer" and the team wrote 
extensive requirements and design documents followed by the actual coding of 
the project.  The course is ten weeks long, but coding doesn\'t start until 
part-way through week 6, so version 1.0 of sitemgr was programmed in an 
intensive 3 weeks.
! 
! <u>Credits</u>
! ICS 125 Team 10:
! 
! Tina Alinaghian (tina -AT- checkyour6.net)
! Austin Lee (anhjah -AT- hotmail.com)
! Siu Leung (rurouni_master -AT- hotmail.com)
! Fang Ming Lo (flo -AT- uci.edu)
! Patrick Walsh (mr_e -AT- phpgroupware.org)
! 
! Professor:
! Hadar Ziv (profziv -AT- aol.com)
! 
! TA:
! Arijit Ghosh (arijitg -AT- uci.edu)
! ');
                return $s;
        }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]