Index: main/trunk/package-kits/scripts/perllib/Greenstone/Site.pm
===================================================================
--- main/trunk/package-kits/scripts/perllib/Greenstone/Site.pm	(revision 29680)
+++ main/trunk/package-kits/scripts/perllib/Greenstone/Site.pm	(revision 29681)
@@ -25,437 +25,8 @@
     my $dir = $self->dir;
     mkdir "$dir/collect" or die "Failed to create collections directory: $!\n";
-    return write_xml $configTemplate, "$dir/siteConfig.xml";
+    my $config = read_xml "$dir/../localsite/siteConfig.xml";
+    return write_xml $config, "$dir/siteConfig.xml";
 }
 
-$configTemplate = {
-    'siteConfig' => {
-        'siteList' => {},
-        'serviceRackList' => {
-            'serviceRack' => [
-                {
-                    '.attr' => {
-                        'name' => 'Authentication'
-                    },
-                    'recaptcha' => [
-                        {
-                            '.attr' => {
-                                'name' => 'public_key',
-                                'value' => '6LckI88SAAAAACUYjj97WMcnz5HPjVp3lI-x-ue8'
-                            }
-                        },
-                        {
-                            '.attr' => {
-                                'value' => '6LckI88SAAAAAGnGy1PwuXYZzIMXZYoPxN51bWWG',
-                                'name' => 'private_key'
-                            }
-                        }
-                    ]
-                },
-                {
-                    '.attr' => {
-                        'name' => 'ArchiveIO'
-                    }
-                },
-                {
-                    '.attr' => {
-                        'name' => 'DocumentMaker'
-                    }
-                },
-                {
-                    '.attr' => {
-                        'name' => 'DocXMLUtil'
-                    }
-                },
-                {
-                    '.attr' => {
-                        'name' => 'DocumentBasket'
-                    }
-                },
-                {
-                    '.attr' => {
-                        'name' => 'BerryBasket'
-                    }
-                },
-                {
-                    '.attr' => {
-                        'name' => 'GS2Construct'
-                    }
-                },
-                {
-                    '.attr' => {
-                        'name' => 'DebugService'
-                    }
-                },
-                {
-                    '.attr' => {
-                        'name' => 'UserTracker'
-                    }
-                },
-                {
-                    'format' => {
-                        'gsf:template' => {
-                            '.attr' => {
-                                'match' => 'documentNode'
-                            },
-                            'td' => [
-                                {
-                                    'a' => {
-                                        'xsl:attribute' => {
-                                            'xsl:value-of' => [
-                                                {
-                                                    '.attr' => {
-                                                        'select' => '$library_name'
-                                                    }
-                                                },
-                                                {
-                                                    '.attr' => {
-                                                        'select' => '@collection'
-                                                    }
-                                                },
-                                                {
-                                                    '.attr' => {
-                                                        'select' => '@nodeID'
-                                                    }
-                                                }
-                                            ],
-                                            '.value' => '/collection//document/',
-                                            '.attr' => {
-                                                'name' => 'href'
-                                            }
-                                        },
-                                        'gsf:icon' => {}
-                                    }
-                                },
-                                {
-                                    'gsf:metadata' => {
-                                        '.attr' => {
-                                            'name' => 'Title'
-                                        }
-                                    }
-                                },
-                                {
-                                    'a' => {
-                                        'xsl:value-of' => {
-                                            '.attr' => {
-                                                'select' => '/page/pageResponse/service/paramList/param[@name=\'collection\']/option[@name=$collname]/displayItem[@name=\'name\']'
-                                            }
-                                        },
-                                        '.attr' => {
-                                            'href' => '{$library_name}/collection/{$collname}/page/about'
-                                        }
-                                    }
-                                }
-                            ],
-                            'xsl:variable' => {
-                                '.attr' => {
-                                    'name' => 'collname',
-                                    'select' => '@collection'
-                                }
-                            }
-                        }
-                    },
-                    '.attr' => {
-                        'name' => 'CrossCollectionSearch'
-                    }
-                }
-            ]
-        },
-        '.attr' => {
-            'xmlns:gsf' => 'http://www.greenstone.org/greenstone3/schema/ConfigFormat',
-            'xmlns:xsl' => 'http://www.w3.org/1999/XSL/Transform'
-        },
-        'serviceClusterList' => {},
-        'metadataList' => {
-            'metadata' => [
-                {
-                    '.attr' => {
-                        'lang' => 'en',
-                        'name' => 'siteName'
-                    },
-                    '.value' => 'My Greenstone Library'
-                },
-                {
-                    '.attr' => {
-                        'lang' => 'fr',
-                        'name' => 'siteName'
-                    },
-                    '.value' => "Mon site de d\x{e9}velopment"
-                },
-                {
-                    '.attr' => {
-                        'name' => 'siteDescription',
-                        'lang' => 'en'
-                    },
-                    '.value' => 'This is just a random site for testing stuff...'
-                },
-                {
-                    '.attr' => {
-                        'lang' => 'fr',
-                        'name' => 'siteDescription'
-                    },
-                    '.value' => 'C\'est juste un site pour tester des trucs...'
-                },
-                {
-                    '.value' => 'admin@example.com',
-                    '.attr' => {
-                        'name' => 'siteAdmin'
-                    }
-                }
-            ],
-            '.attr' => {
-                'xmlns:xsl' => 'http://www.w3.org/1999/XSL/Transform',
-                'xmlns:gsf' => 'http://www.greenstone.org/greenstone3/schema/MetadataFormat'
-            }
-        },
-        'replaceList' => [
-            {
-                'replace' => [
-                    {
-                        '.attr' => {
-                            'scope' => 'metadata',
-                            'text' => '<img src=\'interfaces/default/images/ipdf.gif\' border=\'0\'/>',
-                            'macro' => '_iconpdf_',
-                            'resolve' => 'false'
-                        }
-                    },
-                    {
-                        '.attr' => {
-                            'macro' => '_icondoc_',
-                            'resolve' => 'false',
-                            'text' => '<img src=\'interfaces/default/images/imsword.gif\' border=\'0\'/>',
-                            'scope' => 'metadata'
-                        }
-                    },
-                    {
-                        '.attr' => {
-                            'scope' => 'metadata',
-                            'resolve' => 'false',
-                            'macro' => '_iconps_',
-                            'text' => '<img src=\'interfaces/default/images/ips.gif\' border=\'0\'/>'
-                        }
-                    },
-                    {
-                        '.attr' => {
-                            'text' => '<img src=\'interfaces/default/images/irtf.gif\' border=\'0\'/>',
-                            'macro' => '_iconrtf_',
-                            'resolve' => 'false',
-                            'scope' => 'metadata'
-                        }
-                    },
-                    {
-                        '.attr' => {
-                            'scope' => 'metadata',
-                            'text' => '<img src=\'interfaces/default/images/iexcel.gif\' border=\'0\'/>',
-                            'resolve' => 'false',
-                            'macro' => '_iconxls_'
-                        }
-                    },
-                    {
-                        '.attr' => {
-                            'macro' => '_iconppt_',
-                            'resolve' => 'false',
-                            'text' => '<img src=\'interfaces/default/images/ippt.gif\' border=\'0\'/>',
-                            'scope' => 'metadata'
-                        }
-                    },
-                    {
-                        '.attr' => {
-                            'text' => '<img src=\'interfaces/default/images/itext.gif\' border=\'0\'/>',
-                            'resolve' => 'false',
-                            'macro' => '_icontext_',
-                            'scope' => 'metadata'
-                        }
-                    },
-                    {
-                        '.attr' => {
-                            'scope' => 'metadata',
-                            'text' => '<img src=\'interfaces/default/images/ibtext.gif\' border=\'0\'/>',
-                            'macro' => '_iconblanktext_',
-                            'resolve' => 'false'
-                        }
-                    },
-                    {
-                        '.attr' => {
-                            'scope' => 'metadata',
-                            'text' => '<img src=\'interfaces/default/images/imp3.gif\' border=\'0\'/>',
-                            'macro' => '_iconmp3_',
-                            'resolve' => 'false'
-                        }
-                    },
-                    {
-                        '.attr' => {
-                            'scope' => 'metadata',
-                            'text' => '<img src=\'interfaces/default/images/imidi.gif\' border=\'0\'/>',
-                            'macro' => '_iconmidi_',
-                            'resolve' => 'false'
-                        }
-                    },
-                    {
-                        '.attr' => {
-                            'text' => '<img src=\'interfaces/default/images/iworld.gif\' border=\'0\'/>',
-                            'macro' => '_iconworld_',
-                            'resolve' => 'false',
-                            'scope' => 'metadata'
-                        }
-                    },
-                    {
-                        '.attr' => {
-                            'text' => '<img src=\'interfaces/default/images/iunknown.gif\' border=\'0\'/>',
-                            'resolve' => 'false',
-                            'macro' => '_iconunknown_',
-                            'scope' => 'metadata'
-                        }
-                    },
-                    {
-                        '.attr' => {
-                            'resolve' => 'false',
-                            'macro' => '[archivedir]',
-                            'scope' => 'all',
-                            'metadata' => 'assocfilepath'
-                        }
-                    },
-                    {
-                        '.attr' => {
-                            'metadata' => 'assocfilepath',
-                            'scope' => 'all',
-                            'macro' => '[assocfilepath]',
-                            'resolve' => 'false'
-                        }
-                    },
-                    {
-                        '.attr' => {
-                            'resolve' => 'false',
-                            'macro' => '[srcurl]',
-                            'metadata' => 'srcurl',
-                            'scope' => 'metadata'
-                        }
-                    },
-                    {
-                        '.attr' => {
-                            'resolve' => 'false',
-                            'macro' => '[SourceFile]',
-                            'metadata' => 'SourceFile',
-                            'scope' => 'metadata'
-                        }
-                    },
-                    {
-                        '.attr' => {
-                            'scope' => 'metadata',
-                            'text' => '_httpsite_/collect/_clustername_',
-                            'macro' => '_httpcollection_',
-                            'resolve' => 'true'
-                        }
-                    },
-                    {
-                        '.attr' => {
-                            'scope' => 'metadata',
-                            'text' => '_httpsite_',
-                            'macro' => '_httpprefix_',
-                            'resolve' => 'true'
-                        }
-                    },
-                    {
-                        '.attr' => {
-                            'text' => '_httpsite_/collect/_clustername_/index/assoc/[assocfilepath]/',
-                            'resolve' => 'true',
-                            'macro' => '_httpdocimg_',
-                            'scope' => 'text'
-                        }
-                    },
-                    {
-                        '.attr' => {
-                            'scope' => 'text',
-                            'text' => '_libraryname_/collection/_clustername_/document/[DocOID]',
-                            'resolve' => 'true',
-                            'macro' => '_httpsamepagelink_'
-                        }
-                    },
-                    {
-                        '.attr' => {
-                            'text' => '_clustername_',
-                            'resolve' => 'true',
-                            'macro' => '[collection]',
-                            'scope' => 'all'
-                        }
-                    },
-                    {
-                        '.attr' => {
-                            'scope' => 'all',
-                            'macro' => '_httpextlink_',
-                            'resolve' => 'true',
-                            'text' => '_libraryname_?el=&a=d&c=_clustername_&d='
-                        }
-                    }
-                ],
-                '.attr' => {
-                    'id' => 'gs2-standard'
-                }
-            },
-            {
-                'replace' => [
-                    {
-                        '.attr' => {
-                            'macro' => '[Image]',
-                            'resolve' => 'false',
-                            'metadata' => 'Image',
-                            'scope' => 'metadata'
-                        }
-                    },
-                    {
-                        '.attr' => {
-                            'metadata' => 'Thumb',
-                            'scope' => 'metadata',
-                            'resolve' => 'false',
-                            'macro' => '[Thumb]'
-                        }
-                    },
-                    {
-                        '.attr' => {
-                            'scope' => 'metadata',
-                            'metadata' => 'ThumbWidth',
-                            'macro' => '[ThumbWidth]',
-                            'resolve' => 'false'
-                        }
-                    },
-                    {
-                        '.attr' => {
-                            'metadata' => 'ThumbHeight',
-                            'scope' => 'metadata',
-                            'resolve' => 'false',
-                            'macro' => '[ThumbHeight]'
-                        }
-                    },
-                    {
-                        '.attr' => {
-                            'macro' => '[Screen]',
-                            'resolve' => 'false',
-                            'metadata' => 'Screen',
-                            'scope' => 'metadata'
-                        }
-                    },
-                    {
-                        '.attr' => {
-                            'metadata' => 'ScreenWidth',
-                            'scope' => 'metadata',
-                            'macro' => '[ScreenWidth]',
-                            'resolve' => 'false'
-                        }
-                    },
-                    {
-                        '.attr' => {
-                            'resolve' => 'false',
-                            'macro' => '[ScreenHeight]',
-                            'metadata' => 'ScreenHeight',
-                            'scope' => 'metadata'
-                        }
-                    }
-                ],
-                '.attr' => {
-                    'id' => 'gs2-image'
-                }
-            }
-        ]
-    }
-};
+1;
 
-1;
