summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwjames5 <will@tekimaki.com>2010-02-08 20:12:42 +0000
committerwjames5 <will@tekimaki.com>2010-02-08 20:12:42 +0000
commit9b5bb8ea0097ead62c0af0eb8be1594ee766a1ce (patch)
treed39ed250f7df13135567a8728fcde69023eaa762
parentda0b34dc2e40700946aa87b4ba95cc570b80ef6b (diff)
downloadinstall-9b5bb8ea0097ead62c0af0eb8be1594ee766a1ce.tar.gz
install-9b5bb8ea0097ead62c0af0eb8be1594ee766a1ce.tar.bz2
install-9b5bb8ea0097ead62c0af0eb8be1594ee766a1ce.zip
let user select site style - so easy, so nicepre_deprecate_bit_setup_incPRE_BIT_SETUP_CHANGE
-rw-r--r--install_bit_settings.php11
-rw-r--r--install_packages.php3
-rw-r--r--templates/install_bit_settings.tpl20
-rw-r--r--templates/install_bit_settings_done.tpl11
4 files changed, 37 insertions, 8 deletions
diff --git a/install_bit_settings.php b/install_bit_settings.php
index 79ba150..1218666 100644
--- a/install_bit_settings.php
+++ b/install_bit_settings.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_install/install_bit_settings.php,v 1.17 2009/10/01 14:17:00 wjames5 Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_install/install_bit_settings.php,v 1.18 2010/02/08 20:12:42 wjames5 Exp $
* @package install
* @subpackage functions
*/
@@ -52,6 +52,11 @@ if( count( $processors ) > 0 ) {
$formInstallValues['image_processor'] = 'liberty';
}
+// list of available site styles
+$subDirs = array( 'style_info', 'alternate' );
+$stylesList = $gBitThemes->getStylesList( NULL, NULL, $subDirs );
+$gBitSmarty->assign_by_ref( "stylesList", $stylesList );
+
// get list of available languages
$languages = array();
$languages = $gBitLanguage->listLanguages();
@@ -67,6 +72,10 @@ if( isset( $_REQUEST['bit_settings'] ) ) {
$_REQUEST['bitlanguage'] = 'en';
}
+ if( !empty( $_REQUEST["site_style"] ) ) {
+ $gBitSystem->storeConfig( 'style', $_REQUEST["site_style"], THEMES_PKG_NAME );
+ };
+
if( !array_key_exists( $_REQUEST['bitlanguage'], $languages ) ) {
$languages[$_REQUEST['bitlanguage']] = '';
}
diff --git a/install_packages.php b/install_packages.php
index d86a5bb..6a12561 100644
--- a/install_packages.php
+++ b/install_packages.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_install/install_packages.php,v 1.87 2009/10/01 14:17:00 wjames5 Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_install/install_packages.php,v 1.88 2010/02/08 20:12:42 wjames5 Exp $
* @package install
* @subpackage functions
*
@@ -476,6 +476,7 @@ if( !empty( $_REQUEST['cancel'] ) ) {
$gBitUser->mDb->query( "INSERT INTO `".BIT_DB_PREFIX."users_groups` (`user_id`, `group_id`, `group_name`,`group_desc`) VALUES ( ".ROOT_USER_ID.", 1, 'Administrators','Site operators')" );
$rootUser->addUserToGroup( ROOT_USER_ID, 1 );
} else {
+ vd( 'Errors in root user store:'.PHP_EOL );
vd( $rootUser->mErrors );
}
diff --git a/templates/install_bit_settings.tpl b/templates/install_bit_settings.tpl
index d3538bc..06bf4bb 100644
--- a/templates/install_bit_settings.tpl
+++ b/templates/install_bit_settings.tpl
@@ -16,7 +16,7 @@
{/foreach}
<div class="row">
- {formlabel label="Browser title" for="site_title"}
+ {formlabel label="Browser Title" for="site_title"}
{forminput}
<input size="40" type="text" name="site_title" id="site_title" value="{$gBitSystem->getConfig('site_title')|escape}" />
{formhelp note="Enter the text that should appear in the title bar of the user's browser when visiting your site."}
@@ -24,7 +24,7 @@
</div>
<div class="row">
- {formlabel label="Site slogan" for="site_slogan"}
+ {formlabel label="Site Slogan" for="site_slogan"}
{forminput}
<input size="40" type="text" name="site_slogan" id="site_slogan" value="{$gBitSystem->getConfig('site_slogan')|escape}" />
{formhelp note="This slogan is (usually) shown below the site title."}
@@ -32,7 +32,7 @@
</div>
<div class="row">
- {formlabel label="Home page" for="bit_index"}
+ {formlabel label="Home Page" for="bit_index"}
{forminput}
<select name="bit_index" id="bit_index">
<option value="my_home"{if $bit_index eq 'my_home'} selected="selected"{/if}>{tr}My home{/tr}</option>
@@ -56,6 +56,18 @@
</div>
<div class="row">
+ {formlabel label="Site Style" for="site_style"}
+ {forminput}
+ <select name="site_style" id="site_style">
+ {foreach from=$stylesList item=s}
+ <option value="{$s.style}" {if $s.style eq "basic"}selected="selected"{/if}>{$s.style}</option>
+ {/foreach}
+ </select>
+ {formhelp note="Pick the look and feel style you wish to use. Custom styles can be added to the themes/styles/ directory and then selected in the themes administration panel."}
+ {/forminput}
+ </div>
+
+ <div class="row">
{formlabel label="Language" for="language"}
{forminput}
<select name="bitlanguage" id="bitlanguage">
@@ -81,4 +93,4 @@
<div class="row submit">
<input type="submit" name="bit_settings" value="{tr}Set Preferences{/tr}" />
</div>
-{/form} \ No newline at end of file
+{/form}
diff --git a/templates/install_bit_settings_done.tpl b/templates/install_bit_settings_done.tpl
index c170a52..3f8b58e 100644
--- a/templates/install_bit_settings_done.tpl
+++ b/templates/install_bit_settings_done.tpl
@@ -12,7 +12,7 @@
</div>
<div class="row">
- {formlabel label="Browser title"}
+ {formlabel label="Browser Title"}
{forminput}
{$gBitSystem->getConfig('site_title')}
{/forminput}
@@ -26,13 +26,20 @@
</div>
<div class="row">
- {formlabel label="Home page"}
+ {formlabel label="Home Page"}
{forminput}
{$gBitSystem->getConfig('bit_index')}
{/forminput}
</div>
<div class="row">
+ {formlabel label="Site Style"}
+ {forminput}
+ {$gBitSystem->getConfig('style')}
+ {/forminput}
+ </div>
+
+ <div class="row">
{formlabel label="Language"}
{forminput}
{$siteLanguage.full_name}