From d06beb143150940a51784697dd5d72354fda2d8e Mon Sep 17 00:00:00 2001 From: Fabrixxm Date: Tue, 23 Jun 2015 12:32:35 +0200 Subject: [PATCH 1/2] install: load htconfig template from templates/ --- mod/install.php | 8 +++-- view/templates/htconfig.tpl | 71 +++++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+), 3 deletions(-) create mode 100644 view/templates/htconfig.tpl diff --git a/mod/install.php b/mod/install.php index ed07c4ea6..99ebfc6ba 100755 --- a/mod/install.php +++ b/mod/install.php @@ -73,7 +73,7 @@ function install_post(&$a) { // connect to db $db = new dba($dbhost, $dbuser, $dbpass, $dbdata, true); - $tpl = get_intltext_template('htconfig.tpl'); + $tpl = get_markup_template('htconfig.tpl'); $txt = replace_macros($tpl,array( '$dbhost' => $dbhost, '$dbuser' => $dbuser, @@ -84,13 +84,15 @@ function install_post(&$a) { '$phpath' => $phpath, '$adminmail' => $adminmail )); + $result = file_put_contents('.htconfig.php', $txt); if(! $result) { $a->data['txt'] = $txt; } - + $errors = load_database($db); + if($errors) $a->data['db_failed'] = $errors; @@ -148,7 +150,7 @@ function install_content(&$a) { return replace_macros($tpl, array( '$title' => $install_title, '$pass' => '', - '$status' => t('Permission denied.'), + '$status' => t('Database already in use.'), '$text' => '', )); } diff --git a/view/templates/htconfig.tpl b/view/templates/htconfig.tpl new file mode 100644 index 000000000..7c71623dd --- /dev/null +++ b/view/templates/htconfig.tpl @@ -0,0 +1,71 @@ +path = '{{$urlpath}}'; + +// Choose a legal default timezone. If you are unsure, use "America/Los_Angeles". +// It can be changed later and only applies to timestamps for anonymous viewers. + +$default_timezone = '{{$timezone}}'; + +// What is your site name? + +$a->config['sitename'] = "My Friend Network"; + +// Your choices are REGISTER_OPEN, REGISTER_APPROVE, or REGISTER_CLOSED. +// Be certain to create your own personal account before setting +// REGISTER_CLOSED. 'register_text' (if set) will be displayed prominently on +// the registration page. REGISTER_APPROVE requires you set 'admin_email' +// to the email address of an already registered person who can authorise +// and/or approve/deny the request. + +$a->config['register_policy'] = REGISTER_OPEN; +$a->config['register_text'] = ''; +$a->config['admin_email'] = '{{$adminmail}}'; + +// Maximum size of an imported message, 0 is unlimited + +$a->config['max_import_size'] = 200000; + +// maximum size of uploaded photos + +$a->config['system']['maximagesize'] = 800000; + +// Location of PHP command line processor + +$a->config['php_path'] = '{{$phpath}}'; + +// Location of global directory submission page. + +$a->config['system']['directory_submit_url'] = 'http://dir.friendica.com/submit'; +$a->config['system']['directory_search_url'] = 'http://dir.friendica.com/directory?search='; + +// PuSH - aka pubsubhubbub URL. This makes delivery of public posts as fast as private posts + +$a->config['system']['huburl'] = '[internal]'; + +// Server-to-server private message encryption (RINO) is allowed by default. +// Encryption will only be provided if this setting is true and the +// PHP mcrypt extension is installed on both systems + +$a->config['system']['rino_encrypt'] = true; + +// default system theme + +$a->config['system']['theme'] = 'duepuntozero'; + +// By default allow pseudonyms + +$a->config['system']['no_regfullname'] = true; From a3cd16bd9fbc4d7e241928b83f61f8f331427a78 Mon Sep 17 00:00:00 2001 From: Fabrixxm Date: Tue, 23 Jun 2015 12:34:57 +0200 Subject: [PATCH 2/2] remove localized htconfig templates --- view/ca/smarty3/htconfig.tpl | 69 --------------------------------- view/cs/smarty3/htconfig.tpl | 74 ------------------------------------ view/de/smarty3/htconfig.tpl | 69 --------------------------------- view/en/smarty3/htconfig.tpl | 72 ----------------------------------- view/es/smarty3/htconfig.tpl | 69 --------------------------------- view/fr/smarty3/htconfig.tpl | 69 --------------------------------- view/it/smarty3/htconfig.tpl | 69 --------------------------------- view/sv/smarty3/htconfig.tpl | 69 --------------------------------- 8 files changed, 560 deletions(-) delete mode 100644 view/ca/smarty3/htconfig.tpl delete mode 100644 view/cs/smarty3/htconfig.tpl delete mode 100644 view/de/smarty3/htconfig.tpl delete mode 100644 view/en/smarty3/htconfig.tpl delete mode 100644 view/es/smarty3/htconfig.tpl delete mode 100644 view/fr/smarty3/htconfig.tpl delete mode 100644 view/it/smarty3/htconfig.tpl delete mode 100644 view/sv/smarty3/htconfig.tpl diff --git a/view/ca/smarty3/htconfig.tpl b/view/ca/smarty3/htconfig.tpl deleted file mode 100644 index cfe4d55ad..000000000 --- a/view/ca/smarty3/htconfig.tpl +++ /dev/null @@ -1,69 +0,0 @@ - -path to 'directory/subdirectory'. - -$a->path = '{{$urlpath}}'; - -// Choose a legal default timezone. If you are unsure, use "America/Los_Angeles". -// It can be changed later and only applies to timestamps for anonymous viewers. - -$default_timezone = '{{$timezone}}'; - -// What is your site name? - -$a->config['sitename'] = "La Meva Xarxa d'Amics"; - -// Your choices are REGISTER_OPEN, REGISTER_APPROVE, or REGISTER_CLOSED. -// Be certain to create your own personal account before setting -// REGISTER_CLOSED. 'register_text' (if set) will be displayed prominently on -// the registration page. REGISTER_APPROVE requires you set 'admin_email' -// to the email address of an already registered person who can authorise -// and/or approve/deny the request. - -$a->config['register_policy'] = REGISTER_OPEN; -$a->config['register_text'] = ''; -$a->config['admin_email'] = '{{$adminmail}}'; - -// Maximum size of an imported message, 0 is unlimited - -$a->config['max_import_size'] = 200000; - -// maximum size of uploaded photos - -$a->config['system']['maximagesize'] = 800000; - -// Location of PHP command line processor - -$a->config['php_path'] = '{{$phpath}}'; - -// Location of global directory submission page. - -$a->config['system']['directory_submit_url'] = 'http://dir.friendica.com/submit'; -$a->config['system']['directory_search_url'] = 'http://dir.friendica.com/directory?search='; - -// PuSH - aka pubsubhubbub URL. This makes delivery of public posts as fast as private posts - -$a->config['system']['huburl'] = '[internal]'; - -// Server-to-server private message encryption (RINO) is allowed by default. -// Encryption will only be provided if this setting is true and the -// PHP mcrypt extension is installed on both systems - -$a->config['system']['rino_encrypt'] = true; - -// default system theme - -$a->config['system']['theme'] = 'duepuntozero'; - diff --git a/view/cs/smarty3/htconfig.tpl b/view/cs/smarty3/htconfig.tpl deleted file mode 100644 index a8062e64d..000000000 --- a/view/cs/smarty3/htconfig.tpl +++ /dev/null @@ -1,74 +0,0 @@ - -path na 'adresar/podadresar'. - -$a->path = '{{$urlpath}}'; - -// Vyberte platnou defaultní časovou zónu. Pokud si nejste jistí, použijte use "Europe/Prague". -// Toto nastavení lze změnit i později a používá se pouze pro časové značky anonymních čtenářů. - -$default_timezone = '{{$timezone}}'; - -// Jak se jmenuje Váš web? - -$a->config['sitename'] = "Moje síť přátel"; - -// Nastavení defaultního jazyka webu - -$a->config['system']['language'] = 'cs'; - -// Vaše možnosti jsou REGISTER_OPEN, REGISTER_APPROVE, or REGISTER_CLOSED. -// Ujistěte se, že jste si vytvořili Váš osobníúčet dříve, než nastavíte -// REGISTER_CLOSED. 'register_text' (pokud je nastaven) se bude zobrazovat jako první text na -// registrační stránce. REGISTER_APPROVE vyžaduje aby byl nastaven 'admin_email' -// na e-mailovou adresu již existující registrované osoby, která může autorizovat -// a/nebo schvalovat/odmítat žádosti o registraci. - -$a->config['register_policy'] = REGISTER_OPEN; -$a->config['register_text'] = ''; -$a->config['admin_email'] = '{{$adminmail}}'; - -// Maximální velikost importované zprávy, 0 je neomezeno - -$a->config['max_import_size'] = 200000; - -// maximální velikost nahrávaných fotografií - -$a->config['system']['maximagesize'] = 800000; - -// cesta k PHP command line processor - -$a->config['php_path'] = '{{$phpath}}'; - -// URL adresy globálního adresáře. - -$a->config['system']['directory_submit_url'] = 'http://dir.friendica.com/submit'; -$a->config['system']['directory_search_url'] = 'http://dir.friendica.com/directory?search='; - -// PuSH - také zvaný jako pubsubhubbub URL. Tímto zajistíte doručování veřejných přízpěvků stejně rychle jako těch soukromých - -$a->config['system']['huburl'] = '[internal]'; - -// Server-to-server private message encryption (RINO) je defaultně povolen. -// Šifrování bude zajištěno pouze pokud je toto nastaveno na true a -// PHP mcrypt extension jsou nainstalována na obou systémech - -$a->config['system']['rino_encrypt'] = true; - -// defaultní systémové grafické téma - -$a->config['system']['theme'] = 'duepuntozero'; - - diff --git a/view/de/smarty3/htconfig.tpl b/view/de/smarty3/htconfig.tpl deleted file mode 100644 index c828bed48..000000000 --- a/view/de/smarty3/htconfig.tpl +++ /dev/null @@ -1,69 +0,0 @@ - -path to 'directory/subdirectory'. - -$a->path = '{{$urlpath}}'; - -// Choose a legal default timezone. If you are unsure, use "America/Los_Angeles". -// It can be changed later and only applies to timestamps for anonymous viewers. - -$default_timezone = '{{$timezone}}'; - -// What is your site name? - -$a->config['sitename'] = "My Friend Network"; - -// Your choices are REGISTER_OPEN, REGISTER_APPROVE, or REGISTER_CLOSED. -// Be certain to create your own personal account before setting -// REGISTER_CLOSED. 'register_text' (if set) will be displayed prominently on -// the registration page. REGISTER_APPROVE requires you set 'admin_email' -// to the email address of an already registered person who can authorise -// and/or approve/deny the request. - -$a->config['register_policy'] = REGISTER_OPEN; -$a->config['register_text'] = ''; -$a->config['admin_email'] = '{{$adminmail}}'; - -// Maximum size of an imported message, 0 is unlimited - -$a->config['max_import_size'] = 200000; - -// maximum size of uploaded photos - -$a->config['system']['maximagesize'] = 800000; - -// Location of PHP command line processor - -$a->config['php_path'] = '{{$phpath}}'; - -// Location of global directory submission page. - -$a->config['system']['directory_submit_url'] = 'http://dir.friendica.com/submit'; -$a->config['system']['directory_search_url'] = 'http://dir.friendica.com/directory?search='; - -// PuSH - aka pubsubhubbub URL. This makes delivery of public posts as fast as private posts - -$a->config['system']['huburl'] = '[internal]'; - -// Server-to-server private message encryption (RINO) is allowed by default. -// Encryption will only be provided if this setting is true and the -// PHP mcrypt extension is installed on both systems - -$a->config['system']['rino_encrypt'] = true; - -// default system theme - -$a->config['system']['theme'] = 'duepuntozero'; - diff --git a/view/en/smarty3/htconfig.tpl b/view/en/smarty3/htconfig.tpl deleted file mode 100644 index ae9697d94..000000000 --- a/view/en/smarty3/htconfig.tpl +++ /dev/null @@ -1,72 +0,0 @@ - -path to 'directory/subdirectory'. - -$a->path = '{{$urlpath}}'; - -// Choose a legal default timezone. If you are unsure, use "America/Los_Angeles". -// It can be changed later and only applies to timestamps for anonymous viewers. - -$default_timezone = '{{$timezone}}'; - -// What is your site name? - -$a->config['sitename'] = "My Friend Network"; - -// Your choices are REGISTER_OPEN, REGISTER_APPROVE, or REGISTER_CLOSED. -// Be certain to create your own personal account before setting -// REGISTER_CLOSED. 'register_text' (if set) will be displayed prominently on -// the registration page. REGISTER_APPROVE requires you set 'admin_email' -// to the email address of an already registered person who can authorise -// and/or approve/deny the request. - -$a->config['register_policy'] = REGISTER_OPEN; -$a->config['register_text'] = ''; -$a->config['admin_email'] = '{{$adminmail}}'; - -// Maximum size of an imported message, 0 is unlimited - -$a->config['max_import_size'] = 200000; - -// maximum size of uploaded photos - -$a->config['system']['maximagesize'] = 800000; - -// Location of PHP command line processor - -$a->config['php_path'] = '{{$phpath}}'; - -// Location of global directory submission page. - -$a->config['system']['directory_submit_url'] = 'http://dir.friendica.com/submit'; -$a->config['system']['directory_search_url'] = 'http://dir.friendica.com/directory?search='; - -// PuSH - aka pubsubhubbub URL. This makes delivery of public posts as fast as private posts - -$a->config['system']['huburl'] = '[internal]'; - -// Server-to-server private message encryption (RINO) is allowed by default. -// Encryption will only be provided if this setting is true and the -// PHP mcrypt extension is installed on both systems - -$a->config['system']['rino_encrypt'] = true; - -// default system theme - -$a->config['system']['theme'] = 'duepuntozero'; - -// By default allow pseudonyms - -$a->config['system']['no_regfullname'] = true; diff --git a/view/es/smarty3/htconfig.tpl b/view/es/smarty3/htconfig.tpl deleted file mode 100644 index 340491c38..000000000 --- a/view/es/smarty3/htconfig.tpl +++ /dev/null @@ -1,69 +0,0 @@ - -path to 'directory/subdirectory'. - -$a->path = '{{$urlpath}}'; - -// Choose a legal default timezone. If you are unsure, use "America/Los_Angeles". -// It can be changed later and only applies to timestamps for anonymous viewers. - -$default_timezone = '{{$timezone}}'; - -// What is your site name? - -$a->config['sitename'] = "La Mia Rete di Amici"; - -// Your choices are REGISTER_OPEN, REGISTER_APPROVE, or REGISTER_CLOSED. -// Be certain to create your own personal account before setting -// REGISTER_CLOSED. 'register_text' (if set) will be displayed prominently on -// the registration page. REGISTER_APPROVE requires you set 'admin_email' -// to the email address of an already registered person who can authorise -// and/or approve/deny the request. - -$a->config['register_policy'] = REGISTER_OPEN; -$a->config['register_text'] = ''; -$a->config['admin_email'] = '{{$adminmail}}'; - -// Maximum size of an imported message, 0 is unlimited - -$a->config['max_import_size'] = 200000; - -// maximum size of uploaded photos - -$a->config['system']['maximagesize'] = 800000; - -// Location of PHP command line processor - -$a->config['php_path'] = '{{$phpath}}'; - -// Location of global directory submission page. - -$a->config['system']['directory_submit_url'] = 'http://dir.friendica.com/submit'; -$a->config['system']['directory_search_url'] = 'http://dir.friendica.com/directory?search='; - -// PuSH - aka pubsubhubbub URL. This makes delivery of public posts as fast as private posts - -$a->config['system']['huburl'] = '[internal]'; - -// Server-to-server private message encryption (RINO) is allowed by default. -// Encryption will only be provided if this setting is true and the -// PHP mcrypt extension is installed on both systems - -$a->config['system']['rino_encrypt'] = true; - -// default system theme - -$a->config['system']['theme'] = 'duepuntozero'; - diff --git a/view/fr/smarty3/htconfig.tpl b/view/fr/smarty3/htconfig.tpl deleted file mode 100644 index c828bed48..000000000 --- a/view/fr/smarty3/htconfig.tpl +++ /dev/null @@ -1,69 +0,0 @@ - -path to 'directory/subdirectory'. - -$a->path = '{{$urlpath}}'; - -// Choose a legal default timezone. If you are unsure, use "America/Los_Angeles". -// It can be changed later and only applies to timestamps for anonymous viewers. - -$default_timezone = '{{$timezone}}'; - -// What is your site name? - -$a->config['sitename'] = "My Friend Network"; - -// Your choices are REGISTER_OPEN, REGISTER_APPROVE, or REGISTER_CLOSED. -// Be certain to create your own personal account before setting -// REGISTER_CLOSED. 'register_text' (if set) will be displayed prominently on -// the registration page. REGISTER_APPROVE requires you set 'admin_email' -// to the email address of an already registered person who can authorise -// and/or approve/deny the request. - -$a->config['register_policy'] = REGISTER_OPEN; -$a->config['register_text'] = ''; -$a->config['admin_email'] = '{{$adminmail}}'; - -// Maximum size of an imported message, 0 is unlimited - -$a->config['max_import_size'] = 200000; - -// maximum size of uploaded photos - -$a->config['system']['maximagesize'] = 800000; - -// Location of PHP command line processor - -$a->config['php_path'] = '{{$phpath}}'; - -// Location of global directory submission page. - -$a->config['system']['directory_submit_url'] = 'http://dir.friendica.com/submit'; -$a->config['system']['directory_search_url'] = 'http://dir.friendica.com/directory?search='; - -// PuSH - aka pubsubhubbub URL. This makes delivery of public posts as fast as private posts - -$a->config['system']['huburl'] = '[internal]'; - -// Server-to-server private message encryption (RINO) is allowed by default. -// Encryption will only be provided if this setting is true and the -// PHP mcrypt extension is installed on both systems - -$a->config['system']['rino_encrypt'] = true; - -// default system theme - -$a->config['system']['theme'] = 'duepuntozero'; - diff --git a/view/it/smarty3/htconfig.tpl b/view/it/smarty3/htconfig.tpl deleted file mode 100644 index b4ccf924c..000000000 --- a/view/it/smarty3/htconfig.tpl +++ /dev/null @@ -1,69 +0,0 @@ - -path to 'directory/subdirectory'. - -$a->path = '$urlpath'; - -// Choose a legal default timezone. If you are unsure, use "America/Los_Angeles". -// It can be changed later and only applies to timestamps for anonymous viewers. - -$default_timezone = '$timezone'; - -// What is your site name? - -$a->config['sitename'] = "La Mia Rete di Amici"; - -// Your choices are REGISTER_OPEN, REGISTER_APPROVE, or REGISTER_CLOSED. -// Be certain to create your own personal account before setting -// REGISTER_CLOSED. 'register_text' (if set) will be displayed prominently on -// the registration page. REGISTER_APPROVE requires you set 'admin_email' -// to the email address of an already registered person who can authorise -// and/or approve/deny the request. - -$a->config['register_policy'] = REGISTER_OPEN; -$a->config['register_text'] = ''; -$a->config['admin_email'] = '$adminmail'; - -// Maximum size of an imported message, 0 is unlimited - -$a->config['max_import_size'] = 200000; - -// maximum size of uploaded photos - -$a->config['system']['maximagesize'] = 800000; - -// Location of PHP command line processor - -$a->config['php_path'] = '$phpath'; - -// Location of global directory submission page. - -$a->config['system']['directory_submit_url'] = 'http://dir.friendica.com/submit'; -$a->config['system']['directory_search_url'] = 'http://dir.friendica.com/directory?search='; - -// PuSH - aka pubsubhubbub URL. This makes delivery of public posts as fast as private posts - -$a->config['system']['huburl'] = '[internal]'; - -// Server-to-server private message encryption (RINO) is allowed by default. -// Encryption will only be provided if this setting is true and the -// PHP mcrypt extension is installed on both systems - -$a->config['system']['rino_encrypt'] = true; - -// default system theme - -$a->config['system']['theme'] = 'duepuntozero'; - diff --git a/view/sv/smarty3/htconfig.tpl b/view/sv/smarty3/htconfig.tpl deleted file mode 100644 index c828bed48..000000000 --- a/view/sv/smarty3/htconfig.tpl +++ /dev/null @@ -1,69 +0,0 @@ - -path to 'directory/subdirectory'. - -$a->path = '{{$urlpath}}'; - -// Choose a legal default timezone. If you are unsure, use "America/Los_Angeles". -// It can be changed later and only applies to timestamps for anonymous viewers. - -$default_timezone = '{{$timezone}}'; - -// What is your site name? - -$a->config['sitename'] = "My Friend Network"; - -// Your choices are REGISTER_OPEN, REGISTER_APPROVE, or REGISTER_CLOSED. -// Be certain to create your own personal account before setting -// REGISTER_CLOSED. 'register_text' (if set) will be displayed prominently on -// the registration page. REGISTER_APPROVE requires you set 'admin_email' -// to the email address of an already registered person who can authorise -// and/or approve/deny the request. - -$a->config['register_policy'] = REGISTER_OPEN; -$a->config['register_text'] = ''; -$a->config['admin_email'] = '{{$adminmail}}'; - -// Maximum size of an imported message, 0 is unlimited - -$a->config['max_import_size'] = 200000; - -// maximum size of uploaded photos - -$a->config['system']['maximagesize'] = 800000; - -// Location of PHP command line processor - -$a->config['php_path'] = '{{$phpath}}'; - -// Location of global directory submission page. - -$a->config['system']['directory_submit_url'] = 'http://dir.friendica.com/submit'; -$a->config['system']['directory_search_url'] = 'http://dir.friendica.com/directory?search='; - -// PuSH - aka pubsubhubbub URL. This makes delivery of public posts as fast as private posts - -$a->config['system']['huburl'] = '[internal]'; - -// Server-to-server private message encryption (RINO) is allowed by default. -// Encryption will only be provided if this setting is true and the -// PHP mcrypt extension is installed on both systems - -$a->config['system']['rino_encrypt'] = true; - -// default system theme - -$a->config['system']['theme'] = 'duepuntozero'; -