-- cgit v1.2.3 From 325343a4922543a0043b91054984354624cf5504 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 23 May 2012 07:38:31 -0400 Subject: Update install wizard - writable .htconfig.php not required - add test for working .htaccess/mod_rewrite configuration - fix last pass: create tables, eventually show config text and print a "What next" section --- images/icons.png | Bin 12389 -> 12608 bytes mod/install.php | 87 +++++++++++++++++++++++--------------- view/install_checks.tpl | 6 +-- view/theme/duepuntozero/style.css | 1 + 4 files changed, 56 insertions(+), 38 deletions(-) diff --git a/images/icons.png b/images/icons.png index dd3af3aee..0ff5c430c 100644 Binary files a/images/icons.png and b/images/icons.png differ diff --git a/mod/install.php b/mod/install.php index 6f5552076..1bdb792a9 100644 --- a/mod/install.php +++ b/mod/install.php @@ -4,6 +4,12 @@ $install_wizard_pass=1; function install_init(&$a){ + + // $baseurl/install/testrwrite to test if rewite in .htaccess is working + if ($a->argc==2 && $a->argv[1]=="testrewrite") { + echo "ok"; + killme(); + } global $install_wizard_pass; if (x($_POST,'pass')) $install_wizard_pass = intval($_POST['pass']); @@ -110,14 +116,7 @@ function install_content(&$a) { $wizard_status = ""; $install_title = t('Friendica Social Communications Server - Setup'); - if(x($a->data,'txt') && strlen($a->data['txt'])) { - $tpl = get_markup_template('install.tpl'); - return replace_macros($tpl, array( - '$title' => $install_title, - '$pass' => t('Database connection'), - '$text' => manual_config($a), - )); - } + if(x($a->data,'db_conn_failed')) { $install_wizard_pass = 2; @@ -128,39 +127,20 @@ function install_content(&$a) { $wizard_status = t('Could not create table.'); } + $db_return_text=""; if(x($a->data,'db_installed')) { $txt = '

'; $txt .= t('Your Friendica site database has been installed.') . EOL; - $txt .= t('IMPORTANT: You will need to [manually] setup a scheduled task for the poller.') . EOL ; - $txt .= t('Please see the file "INSTALL.txt".') . EOL ; - $txt .= '
'; - $txt .= '' . t('Proceed to registration') . '' ; - $txt .= '

'; - - $tpl = get_markup_template('install.tpl'); - return replace_macros($tpl, array( - '$title' => $install_title, - '$pass' => t('Proceed with Installation'), - '$text' => $txt, - )); - + $db_return_text .= $txt; } if(x($a->data,'db_failed')) { $txt = t('You may need to import the file "database.sql" manually using phpmyadmin or mysql.') . EOL; $txt .= t('Please see the file "INSTALL.txt".') . EOL ."
" ; $txt .= "
".$a->data['db_failed'] . "
". EOL ; - - $tpl = get_markup_template('install.tpl'); - return replace_macros($tpl, array( - '$title' => $install_title, - '$pass' => t('Database connection'), - '$status' => t('Database import failed.'), - '$text' => $txt, - )); - + $db_return_text .= $txt; } - + if($db && $db->connected) { $r = q("SELECT COUNT(*) as `total` FROM `user`"); if($r && count($r) && $r[0]['total']) { @@ -174,6 +154,19 @@ function install_content(&$a) { } } + if(x($a->data,'txt') && strlen($a->data['txt'])) { + $tpl = get_markup_template('install.tpl'); + $db_return_text .= manual_config($a); + } + + if ($db_return_text!="") { + return replace_macros($tpl, array( + '$title' => $install_title, + '$pass' => "", + '$text' => $db_return_text . what_next(), + )); + } + switch ($install_wizard_pass){ case 1: { // System check @@ -191,7 +184,8 @@ function install_content(&$a) { check_php($phpath, $checks); - + check_htaccess($checks); + function check_passed($v, $c){ if ($c['required']) $v = $v && $c['status']; @@ -422,14 +416,26 @@ function check_htconfig(&$checks) { $status=false; $help = t('The web installer needs to be able to create a file called ".htconfig.php" in the top folder of your web server and it is unable to do so.') .EOL; $help .= t('This is most often a permission setting, as the web server may not be able to write files in your folder - even if you can.').EOL; - $help .= t('Please check with your site documentation or support people to see if this situation can be corrected.').EOL; - $help .= t('If not, you may be required to perform a manual installation. Please see the file "INSTALL.txt" for instructions.').EOL; + $help .= t('At the end of this procedure, we will give you a text to save in a file named .htconfig.php in your Friendica top folder.').EOL; + $help .= t('You can alternatively skip this procedure and perform a manual installation. Please see the file "INSTALL.txt" for instructions.').EOL; } - check_add($checks, t('.htconfig.php is writable'), $status, true, $help); + check_add($checks, t('.htconfig.php is writable'), $status, false, $help); } +function check_htaccess(&$checks) { + $a = get_app(); + $status = true; + $help = ""; + $test = fetch_url($a->get_baseurl()."/install/testrewrite"); + if ($test!="ok") { + $status = false; + $help = t('Url rewrite in .htconfig is not working. Check your server configuration.'); + } + check_add($checks, t('Url rewrite is working'), $status, true, $help); +} + function manual_config(&$a) { $data = htmlentities($a->data['txt']); @@ -465,5 +471,16 @@ function load_database($db) { return $errors; } +function what_next() { + $a = get_app(); + $baseurl = $a->get_baseurl(); + return + t('

What next

') + ."

".t('IMPORTANT: You will need to [manually] setup a scheduled task for the poller.') + .t('Please see the file "INSTALL.txt".') + ."

" + .t("Go to your new Firendica node registration page and register as new user. Remember to use the same email you have entered as administrator email. This will allow you to enter the site admin panel.") + ."

"; +} diff --git a/view/install_checks.tpl b/view/install_checks.tpl index a1a75ade6..8a76c454c 100644 --- a/view/install_checks.tpl +++ b/view/install_checks.tpl @@ -3,9 +3,9 @@
{{ for $checks as $check }} - + {{if $check.help }} - + {{endif}} {{ endfor }}
$check.title {{if $check.required}}(required){{endif}}
$check.title {{if $check.required}}(required){{endif}}
$check.help
$check.help
@@ -19,6 +19,6 @@ {{ else }} - + {{ endif }}
diff --git a/view/theme/duepuntozero/style.css b/view/theme/duepuntozero/style.css index fca935dee..f984cab68 100644 --- a/view/theme/duepuntozero/style.css +++ b/view/theme/duepuntozero/style.css @@ -2950,6 +2950,7 @@ aside input[type='text'] { .starred { background-position: -16px -48px; } .unstarred { background-position: -32px -48px; } .tagged { background-position: -48px -48px; } +.yellow { background-position: -64px -48px; } .filer-icon { -- cgit v1.2.3 From 789063da399675575f61e150f11dbe534d7db3c5 Mon Sep 17 00:00:00 2001 From: Simon L'nu Date: Wed, 23 May 2012 15:58:22 -0400 Subject: add a placeholder attribute on search-text; dispy fixes Signed-off-by: Simon L'nu --- include/text.php | 2 +- view/theme/darkbubble/unsupported | 0 view/theme/dispy/dark/style.css | 18 ++++++++++-------- view/theme/dispy/dark/style.less | 31 +++++++++++++++++++++---------- view/theme/dispy/group_side.tpl | 5 ++--- view/theme/dispy/light/style.css | 6 +++--- view/theme/dispy/light/style.less | 31 +++++++++++++++++++++---------- 7 files changed, 58 insertions(+), 35 deletions(-) delete mode 100644 view/theme/darkbubble/unsupported diff --git a/include/text.php b/include/text.php index e93c24ef4..d6a9ef5d3 100644 --- a/include/text.php +++ b/include/text.php @@ -646,7 +646,7 @@ function search($s,$id='search-box',$url='/search',$save = false) { $a = get_app(); $o = '
'; $o .= '
'; - $o .= ''; + $o .= ''; $o .= ''; if($save) $o .= ''; diff --git a/view/theme/darkbubble/unsupported b/view/theme/darkbubble/unsupported deleted file mode 100644 index e69de29bb..000000000 diff --git a/view/theme/dispy/dark/style.css b/view/theme/dispy/dark/style.css index 6f29ef1f4..612c24f5c 100644 --- a/view/theme/dispy/dark/style.css +++ b/view/theme/dispy/dark/style.css @@ -58,7 +58,7 @@ h6{font-size:xx-small;} #articlemain{width:100%;height:100%;margin:0 auto;} .button{color:#eeeecc;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;padding:5px;cursor:pointer;}.button a{color:#eeeecc;font-weight:bold;} #profile-listing-desc a{color:#eeeecc;font-weight:bold;} -[class$="-desc"],[id$="-desc"]{color:#eeeecc;background:#2e2f2e;border:3px outset #eeeecc;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;margin:3px 10px 7px 0;padding:5px;font-weight:bold;font-size:smaller;} +[class$="-desc"],[id$="-desc"]{color:#eeeecc;background:#2e2f2e;border:3px ridge #eeeecc;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;margin:3px 10px 7px 0;padding:5px;font-weight:bold;font-size:smaller;} #item-delete-selected-desc{float:left;margin-right:5px;}#item-delete-selected-desc:hover{text-decoration:underline;} .intro-approve-as-friend-desc{margin-top:10px;} .intro-desc{margin-bottom:20px;font-weight:bold;} @@ -121,7 +121,7 @@ nav #nav-notifications-linkmenu.on .icon.s22.notify,nav #nav-notifications-linkm #intro-update{background-position:-120px 0px;} #lang-select-icon{cursor:pointer;position:fixed;left:28px;bottom:6px;z-index:10;} #language-selector{position:fixed;bottom:2px;left:52px;z-index:10;} -.menu-popup{position:absolute;display:none;background:white;color:#2e2f2e;margin:0px;padding:0px;font-size:small;line-height:1.1;border:3px solid #88a9d2;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;z-index:100000;-moz-box-shadow:5px 5px 5px 0px #111111;-o-box-shadow:5px 5px 5px 0px #111111;-webkit-box-shadow:5px 5px 5px 0px #111111;-ms-box-shadow:5px 5px 5px 0px #111111;box-shadow:5px 5px 5px 0px #111111;}.menu-popup a{display:block;color:#2e2f2e;padding:5px 10px;text-decoration:none;}.menu-popup a:hover{color:#eeeecc;background-color:#88a9d2;} +.menu-popup{position:absolute;display:none;background:white;color:#2e2f2e;margin:0px;padding:0px;font-size:small;line-height:1.2;border:3px solid #88a9d2;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;z-index:100000;-moz-box-shadow:5px 5px 5px 0px #111111;-o-box-shadow:5px 5px 5px 0px #111111;-webkit-box-shadow:5px 5px 5px 0px #111111;-ms-box-shadow:5px 5px 5px 0px #111111;box-shadow:5px 5px 5px 0px #111111;}.menu-popup a{display:block;color:#2e2f2e;padding:5px 10px;text-decoration:none;}.menu-popup a:hover{color:#eeeecc;background-color:#88a9d2;} .menu-popup .menu-sep{border-top:1px solid #4e4f4e;} .menu-popup li{float:none;overflow:auto;height:auto;display:block;}.menu-popup li img{float:left;width:16px;height:16px;padding-right:5px;} .menu-popup .empty{padding:5px;text-align:center;color:#9ea8ac;} @@ -135,7 +135,7 @@ nav #nav-notifications-linkmenu.on .icon.s22.notify,nav #nav-notifications-linkm #asidemain{float:left;font-size:small;margin:20px 0 20px 35px;width:25%;display:inline;} #asideright,#asideleft{display:none;} .vcard .fn{font-size:1.5em;font-weight:bold;border-bottom:1px solid #638ec4;padding-bottom:3px;} -.vcard #profile-photo-wrapper{margin:20px;}.vcard #profile-photo-wrapper img{-moz-box-shadow:3px 3px 10px 0 #111111;-o-box-shadow:3px 3px 10px 0 #111111;-webkit-box-shadow:3px 3px 10px 0 #111111;-ms-box-shadow:3px 3px 10px 0 #111111;box-shadow:3px 3px 10px 0 #111111;} +.vcard #profile-photo-wrapper{margin:20px 0;background-color:#555753;padding:5px;width:175px;height:175px;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;-moz-box-shadow:3px 3px 10px 0 #111111;-o-box-shadow:3px 3px 10px 0 #111111;-webkit-box-shadow:3px 3px 10px 0 #111111;-ms-box-shadow:3px 3px 10px 0 #111111;box-shadow:3px 3px 10px 0 #111111;} #asidemain h4{font-size:1.2em;} #asidemain #viewcontacts{text-align:right;} #asidemain #contact-block{width:99%;}#asidemain #contact-block .contact-block-content{width:99%;}#asidemain #contact-block .contact-block-content .contact-block-div{float:left;margin:0 5px 5px 0;width:50px;height:50px;padding:3px;position:relative;} @@ -389,21 +389,23 @@ div[id$="wrapper"]{height:100%;}div[id$="wrapper"] br{clear:left;} .fc-state-highlight{background:#eeeecc;color:#2e2f2e;} .directory-item{float:left;margin:0 5px 4px 0;padding:3px;width:180px;height:250px;position:relative;} #group-sidebar{margin-bottom:10px;} -.group-selected,.nets-selected,.fileas-selected{background:#eeeecc;color:#2e2f2e;border:1px solid #638ec4;padding:4px;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;}.group-selected:hover,.nets-selected:hover,.fileas-selected:hover{background:#2e3436;color:#eeeecc;border:1px solid #638ec4;} -.group-selected a,.nets-selected a,.fileas-selected a{color:#2e2f2e;text-decoration:none;} +.categories-selected,.group-selected,.nets-selected,.fileas-selected{color:#2e2f2e;background:#eeeecc;color:#2e2f2e;border:1px solid #638ec4;padding:4px;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;}.categories-selected:hover,.group-selected:hover,.nets-selected:hover,.fileas-selected:hover{background:#2e3436;color:#eeeecc;border:1px solid #638ec4;} +.categories-selected a,.group-selected a,.nets-selected a,.fileas-selected a{color:#2e2f2e;text-decoration:none;} .groupsideedit{margin-right:10px;} #sidebar-group-ul{padding-left:0;} #sidebar-group-list{margin:0 0 5px 0;}#sidebar-group-list li{margin-top:10px;} #sidebar-group-list .icon{display:inline-block;width:12px;height:12px;} -.sidebar-group-element{border:1px solid #638ec4;padding:4px;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;}.sidebar-group-element:active,.sidebar-group-element:hover{background:#2e3436;color:#eeeecc;border:1px solid #638ec4;} +.sidebar-group-element{border:1px solid #638ec4;padding:4px;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;color:#eeeecc;}.sidebar-group-element:active,.sidebar-group-element:hover{background:#2e3436;color:#eeeecc;border:1px solid #638ec4;} .sidebar-group-element a{border:0;text-decoration:none;} +.sidebar-group-element.group-selected{color:#2e2f2e;} #sidebar-new-group{margin:auto;display:inline-block;color:#eeeeee;text-decoration:none;text-align:center;} #peoplefind-sidebar form{margin-bottom:10px;} #sidebar-new-group:hover{} #sidebar-new-group:active{position:relative;top:1px;} #side-peoplefind-url{border:1px solid #999999;margin-right:3px;width:75%;} -.nets-ul{margin:0px;padding:0px;list-style:none;list-style-position:inside;}.nets-ul li{margin:10px 0 0;} -.nets-link,.nets-all{margin-left:0px;} +.categories-ul,.nets-ul{margin:0px;padding:0px;list-style:none;list-style-position:inside;}.categories-ul li,.nets-ul li{margin:10px 0 0;} +.categories-link,.nets-link,.nets-all{border:1px solid #638ec4;padding:4px;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;-o-border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;margin-left:0px;}.categories-link:active,.nets-link:active,.nets-all:active,.categories-link:hover,.nets-link:hover,.nets-all:hover{background:#2e3436;color:#eeeecc;border:1px solid #638ec4;} +.categories-link a,.nets-link a,.nets-all a{border:0;text-decoration:none;} #netsearch-box{margin:20px 0px 30px;width:135px;}#netsearch-box #search-submit{margin:5px 5px 0px 0px;} #pending-update{float:right;color:white;font-weight:bold;background-color:red;padding:0 0.3em;} .admin.linklist{border:0;padding:0;} diff --git a/view/theme/dispy/dark/style.less b/view/theme/dispy/dark/style.less index 000918a9b..51bf7ca30 100644 --- a/view/theme/dispy/dark/style.less +++ b/view/theme/dispy/dark/style.less @@ -312,7 +312,7 @@ h6 { [id$="-desc"] { color: @main_colour; background: @bg_colour; - .borders(3px, outset, @main_colour); + .borders(3px, ridge, @main_colour); .rounded_corners; // .box_shadow(3px, 3px, 5px); margin: 3px 10px 7px 0; @@ -510,7 +510,8 @@ nav .nav-link { background-position: -44px -190px; } } -#nav-login-link, #nav-logout-link { +#nav-login-link, +#nav-logout-link { background-position: 0 -88px; &:hover { background-position: -22px -88px; @@ -669,11 +670,10 @@ nav #nav-notifications-linkmenu { #mini-search-text { background: white; color: @bg_colour; - margin: 8px; } #search-text { .borders(1px, solid, @main_alt_colour); - margin: 8px 0; + margin: 5px 0; } #mini-search-text { font-size: 8pt; @@ -771,7 +771,7 @@ nav #nav-notifications-linkmenu { margin: 0px; padding: 0px; font-size: small; - line-height: 1.1; + line-height: 1.2; .borders(3px, solid, @link_colour); .rounded_corners; z-index: 100000; @@ -880,10 +880,12 @@ nav #nav-notifications-linkmenu { padding-bottom: 3px; } #profile-photo-wrapper { - margin: 20px; - img { - .box_shadow(3px, 3px, 10px, 0); - } + margin: 20px 0; + background-color: @menu_bg_colour; + padding: 5px; + .box(175px, 175px); + .rounded_corners; + .box_shadow(3px, 3px, 10px, 0); } } #asidemain { @@ -2333,11 +2335,12 @@ div { #group-sidebar { margin-bottom: 10px; } +.categories-selected, .group-selected, .nets-selected, .fileas-selected { // padding: 4px; - // color: @bg_colour; + color: @bg_colour; // background: @main_colour; // .borders(1px, solid, @link_colour); .multibutton_active; @@ -2369,6 +2372,10 @@ div { .sidebar-group-element { .multibutton; .rounded_corners; + color: @main_colour; + &.group-selected { + color: @bg_colour; + } } #sidebar-new-group { margin: auto; @@ -2396,14 +2403,18 @@ div { margin-right: 3px; width: 75%; } +.categories-ul, .nets-ul { .list_reset; li { margin: 10px 0 0; } } +.categories-link, .nets-link, .nets-all { + .multibutton; + .rounded_corners; margin-left: 0px; } #netsearch-box { diff --git a/view/theme/dispy/group_side.tpl b/view/theme/dispy/group_side.tpl index 10ecec2e8..be8e23de0 100644 --- a/view/theme/dispy/group_side.tpl +++ b/view/theme/dispy/group_side.tpl @@ -5,10 +5,9 @@