From: <ral...@us...> - 2003-12-29 21:18:04
|
Update of /cvsroot/egroupware/sitemgr/setup In directory sc8-pr-cvs1:/tmp/cvs-serv13219/setup Modified Files: default_records.inc.php phpgw_de.lang phpgw_en.lang Log Message: lots of fixes and reworked the default_records to install a complete demo-site without any user interaction. Anyone not used sitemgr before, should re-install it to get the benefits Index: default_records.inc.php =================================================================== RCS file: /cvsroot/egroupware/sitemgr/setup/default_records.inc.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** default_records.inc.php 26 Dec 2003 21:00:57 -0000 1.9 --- default_records.inc.php 29 Dec 2003 21:18:00 -0000 1.10 *************** *** 8,30 **** $siteurl = $oProc->f('config_value') . SEP . 'sitemgr' . SEP . 'sitemgr-site' . SEP; $sitedir = PHPGW_INCLUDE_ROOT . SEP . 'sitemgr' . SEP . 'sitemgr-site'; ! $oProc->query("INSERT INTO phpgw_sitemgr_sites (site_id,site_name,site_url,site_dir,themesel,site_languages,home_page_id,anonymous_user,anonymous_passwd) VALUES ($site_id,'Default Website','$siteurl','$sitedir','3D-Fantasy','en',0,'anonymous','anonymous')"); $dir = opendir(PHPGW_SERVER_ROOT.'/sitemgr/modules'); while($file = readdir($dir)) { ! $default_active = array('html','index','toc'); ! ! if (!eregi('class.module_([^.]*).inc.php',$file,$module)) { continue; } ! $oProc->query("INSERT INTO phpgw_sitemgr_modules (module_name) VALUES ('$module[1]')",__LINE__,__FILE__); ! if (in_array($module[1],$default_active)) { ! $module_id = $oProc->m_odb->get_last_insert_id('phpgw_sitemgr_modules','module_id'); ! $oProc->query("INSERT INTO phpgw_sitemgr_active_modules (area,cat_id,module_id) VALUES ('__PAGE__',$site_id,$module_id)",__LINE__,__FILE__); } } function cp_r($from,$to) { --- 8,98 ---- $siteurl = $oProc->f('config_value') . SEP . 'sitemgr' . SEP . 'sitemgr-site' . SEP; $sitedir = PHPGW_INCLUDE_ROOT . SEP . 'sitemgr' . SEP . 'sitemgr-site'; ! $oProc->query("INSERT INTO phpgw_sitemgr_sites (site_id,site_name,site_url,site_dir,themesel,site_languages,home_page_id,anonymous_user,anonymous_passwd) VALUES ($site_id,'Default Website','$siteurl','$sitedir','3D-Fantasy','en,de',0,'anonymous','anonymous')"); + // give Admins group rights vor sitemgr and for the created default-site + $admingroup = $GLOBALS['phpgw_setup']->add_account('Admins','Admin','Group',False,False); + $GLOBALS['phpgw_setup']->add_acl('sitemgr','run',$admingroup); + $GLOBALS['phpgw_setup']->add_acl('sitemgr',"L$site_id",$admingroup); + // give Default group rights vor sitemgr-link + $defaultgroup = $GLOBALS['phpgw_setup']->add_account('Default','Default','Group',False,False); + $GLOBALS['phpgw_setup']->add_acl('sitemgr-link','run',$defaultgroup); + + // Create anonymous user for sitemgr + $GLOBALS['phpgw_setup']->add_account('NoGroup','No','Rights',False,False); + $anonymous = $GLOBALS['phpgw_setup']->add_account('anonymous','SiteMgr','User','anonymous','NoGroup'); + // give the anonymous user only sitemgr-link-rights + $GLOBALS['phpgw_setup']->add_acl('sitemgr-link','run',$anonymous); + $GLOBALS['phpgw_setup']->add_acl('phpgwapi','anonymous',$anonymous); + + // register all modules and allow the everywhere on the page $dir = opendir(PHPGW_SERVER_ROOT.'/sitemgr/modules'); while($file = readdir($dir)) { ! if (!eregi('class.module_([^.]*).inc.php',$file,$parts)) { continue; } ! $module = $parts[1]; ! $oProc->query("INSERT INTO phpgw_sitemgr_modules (module_name) VALUES ('$module')",__LINE__,__FILE__); ! $id = $module_id[$module] = $oProc->m_odb->get_last_insert_id('phpgw_sitemgr_modules','module_id'); ! $oProc->query("INSERT INTO phpgw_sitemgr_active_modules (area,cat_id,module_id) VALUES ('__PAGE__',$site_id,$id)",__LINE__,__FILE__); ! } ! ! // create some sample categories for the site ! foreach(array( ! 'other' => 'one more', ! 'sample' => 'sample category', ! ) as $name => $descr) ! { ! $oProc->query("INSERT INTO phpgw_categories (cat_main,cat_parent,cat_level,cat_owner,cat_access,cat_appname,cat_name,cat_description,cat_data,last_mod) VALUES ($site_id,$site_id,1,-1,'public','sitemgr','$name','$descr','0',".time().")"); ! $cat_id = $cats[$name] = $oProc->m_odb->get_last_insert_id('phpgw_categories','cat_id'); ! $oProc->query("INSERT INTO phpgw_sitemgr_categories_lang (cat_id,lang,name,description) VALUES ($cat_id,'en','$name','$descr')"); ! $oProc->query("INSERT INTO phpgw_sitemgr_categories_state (cat_id,state) VALUES ($cat_id,2)"); ! foreach(array($admingroup => 3,$defaultgroup => 1,$anonymous => 1) as $account => $rights) { ! $GLOBALS['phpgw_setup']->add_acl('sitemgr',"L$cat_id",$account,$rights); ! } ! } ! foreach(array( ! 'sample-page' => array($cats['sample'],'Sample page','just a sample', ! )) as $name => $data) ! { ! list($cat_id,$title,$subtitle) = $data; ! $oProc->query("INSERT INTO phpgw_sitemgr_pages (cat_id,sort_order,hide_page,name,state) VALUES ($cat_id,0,0,'$name',2)"); ! $page_id = $pages[$name] = $oProc->m_odb->get_last_insert_id('phpgw_pages','page_id'); ! $oProc->query("INSERT INTO phpgw_sitemgr_pages_lang (page_id,lang,title,subtitle) VALUES ($page_id,'en','$title','$subtitle')"); ! // please note: this pages have no own content so far, we add it in the following paragraph ! } ! ! // set up some site- and page-wide content ! $visibility = array('all' => 0,'user' => 1,'admin' => 2,'anon' => 3); ! $blocks = array( ! array($module_id['administration'],'right',$site_id,0,$visibility['admin'],'Administration'), ! array($module_id['lang_block'],'right',$site_id,0,$visibility['all'],'Select language'), ! array($module_id['toc'],'right',$site_id,0,$visibility['all'],'Content areas'), ! array($module_id['calendar'],'right',$site_id,0,$visibility['user'],'Calendar'), ! array($module_id['goggle'],'right',$site_id,0,$visibility['all'],'Goggle'), ! array($module_id['login'],'right',$site_id,0,$visibility['anon'],'Login'), ! array($module_id['html'],'header',$site_id,0,$visibility['all'],'HTML Module','a:1:{s:11:"htmlcontent";s:21:"<h1>SiteMgr Demo</h1>";}'), ! array($module_id['html'],'footer',$site_id,0,$visibility['all'],'HTML Module','a:1:{s:11:"htmlcontent";s:213:"Please visit our Homepage <a href="http://www.egroupware.org" target="_blank">www.eGroupWare.org</a> and our <a href="http://www.sourcefourge.net/projects/egroupware/" target="_blank">Sourceforge Project page</a>.";}'), ! array($module_id['html'],'center',$cats['sample'],$pages['sample-page'],$visibility['all'],'HTML Module','a:1:{s:11:"htmlcontent";s:35:"some sample <b>HTML</b> content ...";}'), ! ); ! foreach($blocks as $order => $block) ! { ! list($module,$area,$cat_id,$page_id,$visible,$title_en,$content_en) = $block; ! if (!$module) continue; ! $oProc->query("INSERT INTO phpgw_sitemgr_blocks (area,cat_id,page_id,module_id,sort_order,viewable) VALUES ('$area',$cat_id,$page_id,$module,$order,$visible)",__LINE__,__FILE__); ! $block_id = $oProc->m_odb->get_last_insert_id('phpgw_sitemgr_blocks','block_id'); ! $oProc->query("INSERT INTO phpgw_sitemgr_blocks_lang (block_id,lang,title) VALUES ($block_id,'en','$title_en')",__LINE__,__FILE__); ! $oProc->query("INSERT INTO phpgw_sitemgr_content (block_id,arguments,state) VALUES ($block_id,NULL,2)",__LINE__,__FILE__); ! $version_id = $oProc->m_odb->get_last_insert_id('phpgw_sitemgr_content','version_id'); ! if ($content_en) ! { ! $oProc->query("INSERT INTO phpgw_sitemgr_content_lang (version_id,lang,arguments_lang) VALUES ($version_id,'en','$content_en')",__LINE__,__FILE__); } } + echo "SiteMgr demo site installed<br>"; + // install sitemgr-link via symlink or copy (windows) function cp_r($from,$to) { Index: phpgw_de.lang =================================================================== RCS file: /cvsroot/egroupware/sitemgr/setup/phpgw_de.lang,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** phpgw_de.lang 23 Dec 2003 22:27:54 -0000 1.15 --- phpgw_de.lang 29 Dec 2003 21:18:00 -0000 1.16 *************** *** 83,89 **** --- 83,91 ---- downloaded sitemgr de Download abgeschlossen draft sitemgr de Entwurf + draft mode sitemgr de Entwurfsmodus edit categories and permissions common de Kategorien und Zugriffsrechte bearbeiten edit category sitemgr de Kategorie bearbeiten edit individual pages common de Einzelne Seiten bearbeiten + edit mode sitemgr de Bearbeitungsmodus edit page sitemgr de Seite bearbeiten edit properties of module %1 for %2 with scope %3 sitemgr de Bearbeiten der Eigenschaften des Moduls %1 für %2 im Bereich *************** *** 196,199 **** --- 198,202 ---- preunpublished sitemgr de Vor nicht mehr veröffentlicht previous sitemgr de Vorhergehend + production mode sitemgr de Pruduktionsmodus published sitemgr de Veröffentlicht reactivate content sitemgr de Inhalt wieder aktivieren *************** *** 253,258 **** the config.inc.php file needs to be edited to point to the phpgroupware directory. copy the config.inc.php.template file to config.inc.php and then edit it. sitemgr de Die config.inc.php Datei muss bearbeitet werden damit die Pfade auf das phpGroupWare Verzeichnis verweisen. Kopieren Sie bitte die config.inc.php.template Datei nach config.inc.php und bearbeiten Sie anschliesend diese the file to be downloaded sitemgr de Die Datei die heruntergeladen werden soll ! the first directory to think about is sitemgr-link. if you move this to the parent directory of sitemgr (your phpgroupware root directory) then you can use setup to install the app and everyone with access to the app will get an icon on their navbar that links them directly to the public web site. if you don't want this icon, there's no reason to ever bother with the directory. sitemgr de Das erste Verzeichnis über welches Sie sich Gedanken machen sollten ist sitemgr-link. Wenn Sie dieses Verzeichnis in das Root Verzeichnis ihrer phpGroupWare installation verschieben, können Sie Setup benutzen um diese Applikation zu installieren. Durch Rechtezuweisung für sitemgr-link erscheint das sitemgr-link Icon in der Navigationsleiste des Beutzers. Dieser kann dann direkt auf die öffentlich zugängliche sitemgr installation zugreifen. Wenn Sie dieses Icon nicht in der Navigationsleite haben möchten, besteht kein Grund dieses in das Root Verzeichnis von phpGroupWare zu verschieben. ! the images' common name sitemgr de der name des Bildes the name field cannot contain punctuation or spaces (field modified). sitemgr de Das Feld Name darf keine Punkte oder Leerzeichen enthalten (field modified). the page name must be unique. sitemgr de Der Seiten Name muss einmalig sein. --- 256,261 ---- the config.inc.php file needs to be edited to point to the phpgroupware directory. copy the config.inc.php.template file to config.inc.php and then edit it. sitemgr de Die config.inc.php Datei muss bearbeitet werden damit die Pfade auf das phpGroupWare Verzeichnis verweisen. Kopieren Sie bitte die config.inc.php.template Datei nach config.inc.php und bearbeiten Sie anschliesend diese the file to be downloaded sitemgr de Die Datei die heruntergeladen werden soll ! the first directory to think about is sitemgr-link. if you move this to the parent directory of sitemgr (your phpgroupware root directory) then you can use setup to install the app and everyone with access to the app will get an icon on their navbar that links them directly to the public web site. if you don't want this icon, there's no reason to ever bother with the directory. sitemgr de Das erste Verzeichnis über welches Sie sich Gedanken machen sollten ist sitemgr-link. Wenn Sie dieses Verzeichnis in das Root Verzeichnis ihrer phpGroupWare installation verschieben, können Sie Setup benutzen um diese Applikation zu installieren. Durch Rechtezuweisung für sitemgr-link erscheint das sitemgr-link Icon in der Navigationsleiste des Beutzers. Dieser kann dann direkt auf die öffentlich zugängliche sitemgr installation zugreifen. Wenn Sie dieses Icon nicht in der Navigationsleite haben möchten, besteht kein Grund dieses in das Root Verzeichnis von eGroupWare zu verschieben. ! the images' common name sitemgr de der Name des Bildes the name field cannot contain punctuation or spaces (field modified). sitemgr de Das Feld Name darf keine Punkte oder Leerzeichen enthalten (field modified). the page name must be unique. sitemgr de Der Seiten Name muss einmalig sein. Index: phpgw_en.lang =================================================================== RCS file: /cvsroot/egroupware/sitemgr/setup/phpgw_en.lang,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** phpgw_en.lang 23 Dec 2003 22:27:54 -0000 1.14 --- phpgw_en.lang 29 Dec 2003 21:18:00 -0000 1.15 *************** *** 80,86 **** --- 80,88 ---- downloaded sitemgr en downloaded draft sitemgr en draft + draft mode sitemgr en Draft mode edit categories and permissions common en Edit Categories and Permissions edit category sitemgr en Edit Category edit individual pages common en Edit Individual Pages + edit mode sitemgr en Edit mode edit page sitemgr en Edit Page edit properties of module %1 for %2 with scope %3 sitemgr en Edit properties of module %1 for %2 with scope %3 *************** *** 192,195 **** --- 194,198 ---- preunpublished sitemgr en preunpublished previous sitemgr en Previous + production mode sitemgr en Production mode published sitemgr en published reactivate content sitemgr en Reactivate content |