From f862d73f49d5d1e4b65bb9d62eb1fc02703f32b9 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sat, 15 Oct 2022 09:25:11 +0200 Subject: [PATCH 1/7] added PHP GMP module to the installation section of the Vagrant VM provision --- bin/dev/vagrant_provision.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/dev/vagrant_provision.sh b/bin/dev/vagrant_provision.sh index 3992550ee..d82ed2823 100755 --- a/bin/dev/vagrant_provision.sh +++ b/bin/dev/vagrant_provision.sh @@ -51,7 +51,7 @@ service apache2 restart #Install php echo ">>> Installing PHP7" -apt-get install -qq php libapache2-mod-php php-cli php-mysql php-curl php-gd php-mbstring php-xml imagemagick php-imagick php-zip +apt-get install -qq php libapache2-mod-php php-cli php-mysql php-curl php-gd php-mbstring php-xml imagemagick php-imagick php-zip php-gmp systemctl restart apache2 echo ">>> Installing PHP8" @@ -59,7 +59,7 @@ apt-get install -qq -y lsb-release ca-certificates apt-transport-https software- echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/sury-php.list wget -qO - https://packages.sury.org/php/apt.gpg | sudo apt-key add - apt update -apt-get install -qq php8.0 php8.0-cli php8.0-mysql php8.0-curl php8.0-gd php8.0-mbstring php8.0-xml php8.0-imagick php8.0-zip +apt-get install -qq php8.0 php8.0-cli php8.0-mysql php8.0-curl php8.0-gd php8.0-mbstring php8.0-xml php8.0-imagick php8.0-zip php8.0-gmp systemctl restart apache2 #Install mysql From 49ed627aedb39f0d627d919daf5470c884bdba81 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sat, 15 Oct 2022 17:31:57 +0200 Subject: [PATCH 2/7] change IP of Vagrant VM --- Vagrantfile | 2 +- bin/dev/vagrant_provision.sh | 2 +- mods/local.config.vagrant.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index 4684d9f09..168735123 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -1,5 +1,5 @@ -server_ip = "192.168.22.10" +server_ip = "192.168.56.10" server_memory = "2048" # MB server_timezone = "UTC" diff --git a/bin/dev/vagrant_provision.sh b/bin/dev/vagrant_provision.sh index d82ed2823..40d08cedb 100755 --- a/bin/dev/vagrant_provision.sh +++ b/bin/dev/vagrant_provision.sh @@ -45,7 +45,7 @@ apt-get install -qq apache2 a2enmod rewrite actions ssl cp /vagrant/bin/dev/vagrant_vhost.sh /usr/local/bin/vhost chmod guo+x /usr/local/bin/vhost -vhost -s 192.168.22.10.xip.io -d /var/www -p /etc/ssl/xip.io -c xip.io -a friendica.local +vhost -s 192.168.56.10.xip.io -d /var/www -p /etc/ssl/xip.io -c xip.io -a friendica.local a2dissite 000-default service apache2 restart diff --git a/mods/local.config.vagrant.php b/mods/local.config.vagrant.php index 98e9a42e7..da873116d 100644 --- a/mods/local.config.vagrant.php +++ b/mods/local.config.vagrant.php @@ -29,7 +29,7 @@ return [ // **************************************************************** 'config' => [ - 'hostname' => 'friendica.local', + 'hostname' => '192.168.56.10', 'admin_email' => 'admin@friendica.local', 'sitename' => 'Friendica Social Network', 'register_policy' => \Friendica\Module\Register::OPEN, From 9383d7849b9a3518dd7aa1476e43539387bf54f9 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sat, 15 Oct 2022 17:33:47 +0200 Subject: [PATCH 3/7] adopt IP change in the Vagrant docs --- doc/Vagrant.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/Vagrant.md b/doc/Vagrant.md index 3751b7bc0..ea098e3fb 100644 --- a/doc/Vagrant.md +++ b/doc/Vagrant.md @@ -10,7 +10,7 @@ Getting started No need to setup up a webserver, database etc. before actually starting. Vagrant creates a virtual machine for you that you can just run inside VirtualBox and start to work directly on Friendica. -It brings an Debian Bullseye with PHP 7.4 and MariaDB 10.5.11. +It brings an Debian Bullseye with PHP 8.0 and MariaDB 10.5.11. What you need to do: @@ -24,7 +24,7 @@ This will start the virtual machine. Be patient: When it runs for the first time, it downloads a Debian Server image and installs Friendica. 4. Run `vagrant ssh` to log into the virtual machine to log in to the VM in case you need to debug something on the server. 5. Open you test installation in a browser. -Go to friendica.local (or 192.168.22.10). +Go to friendica.local (or 192.168.56.10). friendica.local is using a self-signed TLS certificate, so you will need to add an exception to trust the certificate the first time you are visiting the page. The mysql database is called "friendica", the mysql user and password both are "friendica". 6. Work on Friendica's code in your git clone on your machine (not in the VM). @@ -66,4 +66,4 @@ On the next Vagrant up, the version problem should be fixed. If `friendica.local` is not resolved, you may need to add an entry to the `/etc/hosts` file (or similar configuration depending on the OS you are using). -For further documentation of vagrant, please see [the vagrant*docs*](https://docs.vagrantup.com/v2/). \ No newline at end of file +For further documentation of vagrant, please see [the vagrant*docs*](https://docs.vagrantup.com/v2/). From a192e099abb66f003cfa487fc0d52921a7a99180 Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Sun, 16 Oct 2022 10:14:18 +0200 Subject: [PATCH 4/7] [docs] note the preference of MariaDB over other MySQL implementation in the install docs --- doc/Install.md | 2 +- doc/de/Install.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/Install.md b/doc/Install.md index b109113ef..d0c3576ac 100644 --- a/doc/Install.md +++ b/doc/Install.md @@ -34,7 +34,7 @@ Due to the large variety of operating systems and PHP platforms in existence we * The POSIX module of PHP needs to be activated (e.g. [RHEL, CentOS](http://www.bigsoft.co.uk/blog/index.php/2014/12/08/posix-php-commands-not-working-under-centos-7) have disabled it) * Some form of email server or email gateway such that PHP mail() works. If you cannot set up your own email server, you can use the [phpmailer](https://github.com/friendica/friendica-addons/tree/develop/phpmailer) addon and use a remote SMTP server. -* MySQL 5.6+ or an equivalent alternative for MySQL (MariaDB, Percona Server etc.) +* MySQL with support of InnoDB and Barracuda (we suggest a MariaDB server as all development is done using these, but alternatives like MySQL or Percona Server etc. might work as well) * ability to schedule jobs with cron (Linux/Mac) or Scheduled Tasks (Windows) * installation into a top-level domain or sub-domain (without a directory/path component in the URL) is RECOMMENDED. Directory paths will not be as convenient to use and have not been thoroughly tested. This is REQUIRED if you wish to communicate with the Diaspora network. diff --git a/doc/de/Install.md b/doc/de/Install.md index 03a46f615..94ca08a2b 100644 --- a/doc/de/Install.md +++ b/doc/de/Install.md @@ -31,7 +31,7 @@ Requirements * Das POSIX Modul muss aktiviert sein ([CentOS, RHEL](http://www.bigsoft.co.uk/blog/index.php/2014/12/08/posix-php-commands-not-working-under-centos-7http://www.bigsoft.co.uk/blog/index.php/2014/12/08/posix-php-commands-not-working-under-centos-7) haben dies z.B. deaktiviert) * Einen E-Mail Server, so dass PHP `mail()` funktioniert. Wenn kein eigener E-Mail Server zur Verfügung steht, kann alternativ das [phpmailer](https://github.com/friendica/friendica-addons/tree/develop/phpmailer) Addon mit einem externen SMTP Account verwendet werden. -* Mysql 5.6+ (oder eine äquivalente Alternative: MariaDB, Percona Server etc.) +* Mysql Server mit Unterstützung vom InnoDB und Barracuda (wir empfehlen MariaDB da die Entwicklung mit solchen Server erfolgt, aber Alternativen wie MySQL, Percona Server etc. sollten auch funktionieren) * die Möglichkeit, wiederkehrende Aufgaben mit cron (Linux/Mac) oder "Scheduled Tasks" einzustellen (Windows) [Beachte: andere Optionen sind in Abschnitt 7 dieser Dokumentation zu finden] * Installation in einer Top-Level-Domain oder Subdomain (ohne eine Verzeichnis/Pfad-Komponente in der URL) wird bevorzugt. Verzeichnispfade sind für diesen Zweck nicht so günstig und wurden auch nicht ausführlich getestet. From d826fe0a3bccca8d8fd7fdee567a81994b6bde5a Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 16 Oct 2022 11:24:50 -0400 Subject: [PATCH 5/7] Refactor files related to the Compose page and frio theme settings - Use dependencies instead of most DI calls in Module\Item\Compose - Group translation strings in a subkey of the template variables array - Rewrite array initializations in theme/frio/config --- src/Content/Conversation.php | 2 +- src/Module/Item/Compose.php | 114 ++++++++++++++++++++------------ view/templates/item/compose.tpl | 46 ++++++------- view/theme/frio/config.php | 73 ++++++++++---------- 4 files changed, 134 insertions(+), 101 deletions(-) diff --git a/src/Content/Conversation.php b/src/Content/Conversation.php index 744e9ed18..237d192fd 100644 --- a/src/Content/Conversation.php +++ b/src/Content/Conversation.php @@ -328,7 +328,7 @@ class Conversation $created_at = ''; } - $tpl = Renderer::getMarkupTemplate("jot.tpl"); + $tpl = Renderer::getMarkupTemplate('jot.tpl'); $o .= Renderer::replaceMacros($tpl, [ '$new_post' => $this->l10n->t('New Post'), diff --git a/src/Module/Item/Compose.php b/src/Module/Item/Compose.php index a3ca4296a..895a548e4 100644 --- a/src/Module/Item/Compose.php +++ b/src/Module/Item/Compose.php @@ -22,10 +22,13 @@ namespace Friendica\Module\Item; use DateTime; +use Friendica\App; use Friendica\BaseModule; use Friendica\Content\Feature; use Friendica\Core\ACL; use Friendica\Core\Hook; +use Friendica\Core\L10n; +use Friendica\Core\PConfig\Capability\IManagePersonalConfigValues; use Friendica\Core\Renderer; use Friendica\Core\Theme; use Friendica\Database\DBA; @@ -33,13 +36,40 @@ use Friendica\DI; use Friendica\Model\Contact; use Friendica\Model\Item; use Friendica\Model\User; +use Friendica\Module\Response; use Friendica\Module\Security\Login; +use Friendica\Navigation\SystemMessages; use Friendica\Network\HTTPException\NotImplementedException; +use Friendica\Util\ACLFormatter; use Friendica\Util\Crypto; +use Friendica\Util\Profiler; use Friendica\Util\Temporal; +use Psr\Log\LoggerInterface; class Compose extends BaseModule { + /** @var SystemMessages */ + private $systemMessages; + + /** @var ACLFormatter */ + private $ACLFormatter; + + /** @var App\Page */ + private $page; + + /** @var IManagePersonalConfigValues */ + private $pConfig; + + public function __construct(IManagePersonalConfigValues $pConfig, App\Page $page, ACLFormatter $ACLFormatter, SystemMessages $systemMessages, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) + { + parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); + + $this->systemMessages = $systemMessages; + $this->ACLFormatter = $ACLFormatter; + $this->page = $page; + $this->pConfig = $pConfig; + } + protected function post(array $request = []) { if (!empty($_REQUEST['body'])) { @@ -47,23 +77,22 @@ class Compose extends BaseModule require_once 'mod/item.php'; item_post(DI::app()); } else { - notice(DI::l10n()->t('Please enter a post body.')); + $this->systemMessages->addNotice($this->l10n->t('Please enter a post body.')); } } protected function content(array $request = []): string { if (!local_user()) { - return Login::form('compose', false); + return Login::form('compose'); } $a = DI::app(); if ($a->getCurrentTheme() !== 'frio') { - throw new NotImplementedException(DI::l10n()->t('This feature is only available with the frio theme.')); + throw new NotImplementedException($this->l10n->t('This feature is only available with the frio theme.')); } - /// @TODO Retrieve parameter from router $posttype = $this->parameters['type'] ?? Item::PT_ARTICLE; if (!in_array($posttype, [Item::PT_ARTICLE, Item::PT_PERSONAL_NOTE])) { switch ($posttype) { @@ -78,16 +107,14 @@ class Compose extends BaseModule $user = User::getById(local_user(), ['allow_cid', 'allow_gid', 'deny_cid', 'deny_gid', 'default-location']); - $aclFormatter = DI::aclFormatter(); - - $contact_allow_list = $aclFormatter->expand($user['allow_cid']); - $group_allow_list = $aclFormatter->expand($user['allow_gid']); - $contact_deny_list = $aclFormatter->expand($user['deny_cid']); - $group_deny_list = $aclFormatter->expand($user['deny_gid']); + $contact_allow_list = $this->ACLFormatter->expand($user['allow_cid']); + $group_allow_list = $this->ACLFormatter->expand($user['allow_gid']); + $contact_deny_list = $this->ACLFormatter->expand($user['deny_cid']); + $group_deny_list = $this->ACLFormatter->expand($user['deny_gid']); switch ($posttype) { case Item::PT_PERSONAL_NOTE: - $compose_title = DI::l10n()->t('Compose new personal note'); + $compose_title = $this->l10n->t('Compose new personal note'); $type = 'note'; $doesFederate = false; $contact_allow_list = [$a->getContactId()]; @@ -96,7 +123,7 @@ class Compose extends BaseModule $group_deny_list = []; break; default: - $compose_title = DI::l10n()->t('Compose new post'); + $compose_title = $this->l10n->t('Compose new post'); $type = 'post'; $doesFederate = true; @@ -129,13 +156,13 @@ class Compose extends BaseModule Hook::callAll('jot_tool', $jotplugins); // Output - DI::page()->registerFooterScript(Theme::getPathForFile('js/ajaxupload.js')); - DI::page()->registerFooterScript(Theme::getPathForFile('js/linkPreview.js')); - DI::page()->registerFooterScript(Theme::getPathForFile('js/compose.js')); + $this->page->registerFooterScript(Theme::getPathForFile('js/ajaxupload.js')); + $this->page->registerFooterScript(Theme::getPathForFile('js/linkPreview.js')); + $this->page->registerFooterScript(Theme::getPathForFile('js/compose.js')); $contact = Contact::getById($a->getContactId()); - if (DI::config()->get(local_user(), 'system', 'set_creation_date')) { + if ($this->pConfig->get(local_user(), 'system', 'set_creation_date')) { $created_at = Temporal::getDateTimeField( new \DateTime(DBA::NULL_DATETIME), new \DateTime('now'), @@ -149,39 +176,42 @@ class Compose extends BaseModule $tpl = Renderer::getMarkupTemplate('item/compose.tpl'); return Renderer::replaceMacros($tpl, [ - '$compose_title'=> $compose_title, - '$visibility_title'=> DI::l10n()->t('Visibility'), + '$l10n' => [ + 'compose_title' => $compose_title, + 'default' => '', + 'visibility_title' => $this->l10n->t('Visibility'), + 'mytitle' => $this->l10n->t('This is you'), + 'submit' => $this->l10n->t('Submit'), + 'edbold' => $this->l10n->t('Bold'), + 'editalic' => $this->l10n->t('Italic'), + 'eduline' => $this->l10n->t('Underline'), + 'edquote' => $this->l10n->t('Quote'), + 'edcode' => $this->l10n->t('Code'), + 'edimg' => $this->l10n->t('Image'), + 'edurl' => $this->l10n->t('Link'), + 'edattach' => $this->l10n->t('Link or Media'), + 'prompttext' => $this->l10n->t('Please enter a image/video/audio/webpage URL:'), + 'preview' => $this->l10n->t('Preview'), + 'location_set' => $this->l10n->t('Set your location'), + 'location_clear' => $this->l10n->t('Clear the location'), + 'location_unavailable' => $this->l10n->t('Location services are unavailable on your device'), + 'location_disabled' => $this->l10n->t('Location services are disabled. Please check the website\'s permissions on your device'), + 'wait' => $this->l10n->t('Please wait'), + 'placeholdertitle' => $this->l10n->t('Set title'), + 'placeholdercategory' => Feature::isEnabled(local_user(),'categories') ? $this->l10n->t('Categories (comma-separated list)') : '', + ], + '$id' => 0, '$posttype' => $posttype, '$type' => $type, '$wall' => $wall, - '$default' => '', - '$mylink' => DI::baseUrl()->remove($contact['url']), - '$mytitle' => DI::l10n()->t('This is you'), - '$myphoto' => DI::baseUrl()->remove($contact['thumb']), - '$submit' => DI::l10n()->t('Submit'), - '$edbold' => DI::l10n()->t('Bold'), - '$editalic' => DI::l10n()->t('Italic'), - '$eduline' => DI::l10n()->t('Underline'), - '$edquote' => DI::l10n()->t('Quote'), - '$edcode' => DI::l10n()->t('Code'), - '$edimg' => DI::l10n()->t('Image'), - '$edurl' => DI::l10n()->t('Link'), - '$edattach' => DI::l10n()->t('Link or Media'), - '$prompttext' => DI::l10n()->t('Please enter a image/video/audio/webpage URL:'), - '$preview' => DI::l10n()->t('Preview'), - '$location_set' => DI::l10n()->t('Set your location'), - '$location_clear' => DI::l10n()->t('Clear the location'), - '$location_unavailable' => DI::l10n()->t('Location services are unavailable on your device'), - '$location_disabled' => DI::l10n()->t('Location services are disabled. Please check the website\'s permissions on your device'), - '$wait' => DI::l10n()->t('Please wait'), - '$placeholdertitle' => DI::l10n()->t('Set title'), - '$placeholdercategory' => (Feature::isEnabled(local_user(),'categories') ? DI::l10n()->t('Categories (comma-separated list)') : ''), + '$mylink' => $this->baseUrl->remove($contact['url']), + '$myphoto' => $this->baseUrl->remove($contact['thumb']), '$scheduled_at' => Temporal::getDateTimeField( new DateTime(), new DateTime('now + 6 months'), null, - DI::l10n()->t('Scheduled at'), + $this->l10n->t('Scheduled at'), 'scheduled_at' ), '$created_at' => $created_at, @@ -197,7 +227,7 @@ class Compose extends BaseModule '$jotplugins' => $jotplugins, '$rand_num' => Crypto::randomDigits(12), - '$acl_selector' => ACL::getFullSelectorHTML(DI::page(), $a->getLoggedInUserId(), $doesFederate, [ + '$acl_selector' => ACL::getFullSelectorHTML($this->page, $a->getLoggedInUserId(), $doesFederate, [ 'allow_cid' => $contact_allow_list, 'allow_gid' => $group_allow_list, 'deny_cid' => $contact_deny_list, diff --git a/view/templates/item/compose.tpl b/view/templates/item/compose.tpl index cbab655d2..a01ea95a0 100644 --- a/view/templates/item/compose.tpl +++ b/view/templates/item/compose.tpl @@ -1,5 +1,5 @@
-

{{$compose_title}}

+

{{$l10n.compose_title}}

{{**}} @@ -8,74 +8,72 @@
- +
- {{if $placeholdercategory}} + {{if $l10n.placeholdercategory}}
- +
{{/if}}

- - - - - - -

- +

{{if $type == 'post'}} - + {{/if}} - + - {{if $preview}} - - {{/if}} - + +

{{if $type == 'post'}} -

{{$visibility_title}}

+

{{$l10n.visibility_title}}

{{$acl_selector nofilter}}
diff --git a/view/theme/frio/config.php b/view/theme/frio/config.php index 7445155f9..1ee67db3d 100644 --- a/view/theme/frio/config.php +++ b/view/theme/frio/config.php @@ -43,7 +43,7 @@ function theme_post(App $a) 'background_image', 'bg_image_option', 'login_bg_image', - 'login_bg_color' + 'login_bg_color', ] as $field) { if (isset($_POST['frio_' . $field])) { DI::pConfig()->set(local_user(), 'frio', $field, $_POST['frio_' . $field]); @@ -73,7 +73,7 @@ function theme_admin_post(App $a) 'background_image', 'bg_image_option', 'login_bg_image', - 'login_bg_color' + 'login_bg_color', ] as $field) { if (isset($_POST['frio_' . $field])) { DI::config()->set('frio', $field, $_POST['frio_' . $field]); @@ -84,48 +84,55 @@ function theme_admin_post(App $a) } } -function theme_content(App $a) +function theme_content(): string { if (!local_user()) { - return; + return ''; } - $arr = []; - $node_scheme = DI::config()->get('frio', 'scheme', DI::config()->get('frio', 'scheme')); + $arr = [ + 'scheme' => DI::pConfig()->get(local_user(), 'frio', 'scheme', + DI::pConfig()->get(local_user(), 'frio', 'schema', + DI::config()->get('frio', 'scheme', + DI::config()->get('frio', 'schema') + ) + ) + ), - $arr['scheme'] = DI::pConfig()->get(local_user(), 'frio', 'scheme', DI::pConfig()->get(local_user(), 'frio', 'schema', $node_scheme)); - $arr['scheme_accent'] = DI::pConfig()->get(local_user(), 'frio', 'scheme_accent' , DI::config()->get('frio', 'scheme_accent')); - $arr['share_string'] = ''; - $arr['nav_bg'] = DI::pConfig()->get(local_user(), 'frio', 'nav_bg' , DI::config()->get('frio', 'nav_bg')); - $arr['nav_icon_color'] = DI::pConfig()->get(local_user(), 'frio', 'nav_icon_color' , DI::config()->get('frio', 'nav_icon_color')); - $arr['link_color'] = DI::pConfig()->get(local_user(), 'frio', 'link_color' , DI::config()->get('frio', 'link_color')); - $arr['background_color'] = DI::pConfig()->get(local_user(), 'frio', 'background_color', DI::config()->get('frio', 'background_color')); - $arr['contentbg_transp'] = DI::pConfig()->get(local_user(), 'frio', 'contentbg_transp', DI::config()->get('frio', 'contentbg_transp')); - $arr['background_image'] = DI::pConfig()->get(local_user(), 'frio', 'background_image', DI::config()->get('frio', 'background_image')); - $arr['bg_image_option'] = DI::pConfig()->get(local_user(), 'frio', 'bg_image_option' , DI::config()->get('frio', 'bg_image_option')); + 'share_string' => '', + 'scheme_accent' => DI::pConfig()->get(local_user(), 'frio', 'scheme_accent' , DI::config()->get('frio', 'scheme_accent')), + 'nav_bg' => DI::pConfig()->get(local_user(), 'frio', 'nav_bg' , DI::config()->get('frio', 'nav_bg')), + 'nav_icon_color' => DI::pConfig()->get(local_user(), 'frio', 'nav_icon_color' , DI::config()->get('frio', 'nav_icon_color')), + 'link_color' => DI::pConfig()->get(local_user(), 'frio', 'link_color' , DI::config()->get('frio', 'link_color')), + 'background_color' => DI::pConfig()->get(local_user(), 'frio', 'background_color' , DI::config()->get('frio', 'background_color')), + 'contentbg_transp' => DI::pConfig()->get(local_user(), 'frio', 'contentbg_transp' , DI::config()->get('frio', 'contentbg_transp')), + 'background_image' => DI::pConfig()->get(local_user(), 'frio', 'background_image' , DI::config()->get('frio', 'background_image')), + 'bg_image_option' => DI::pConfig()->get(local_user(), 'frio', 'bg_image_option' , DI::config()->get('frio', 'bg_image_option')), + ]; return frio_form($arr); } -function theme_admin(App $a) +function theme_admin(): string { if (!local_user()) { - return; + return ''; } - $arr = []; - $arr['scheme'] = DI::config()->get('frio', 'scheme', DI::config()->get('frio', 'schema')); - $arr['scheme_accent'] = DI::config()->get('frio', 'scheme_accent'); - $arr['share_string'] = ''; - $arr['nav_bg'] = DI::config()->get('frio', 'nav_bg'); - $arr['nav_icon_color'] = DI::config()->get('frio', 'nav_icon_color'); - $arr['link_color'] = DI::config()->get('frio', 'link_color'); - $arr['background_color'] = DI::config()->get('frio', 'background_color'); - $arr['contentbg_transp'] = DI::config()->get('frio', 'contentbg_transp'); - $arr['background_image'] = DI::config()->get('frio', 'background_image'); - $arr['bg_image_option'] = DI::config()->get('frio', 'bg_image_option'); - $arr['login_bg_image'] = DI::config()->get('frio', 'login_bg_image'); - $arr['login_bg_color'] = DI::config()->get('frio', 'login_bg_color'); + $arr = [ + 'scheme' => DI::config()->get('frio', 'scheme', DI::config()->get('frio', 'schema')), + 'scheme_accent' => DI::config()->get('frio', 'scheme_accent'), + 'share_string' => '', + 'nav_bg' => DI::config()->get('frio', 'nav_bg'), + 'nav_icon_color' => DI::config()->get('frio', 'nav_icon_color'), + 'link_color' => DI::config()->get('frio', 'link_color'), + 'background_color' => DI::config()->get('frio', 'background_color'), + 'contentbg_transp' => DI::config()->get('frio', 'contentbg_transp'), + 'background_image' => DI::config()->get('frio', 'background_image'), + 'bg_image_option' => DI::config()->get('frio', 'bg_image_option'), + 'login_bg_image' => DI::config()->get('frio', 'login_bg_image'), + 'login_bg_color' => DI::config()->get('frio', 'login_bg_color'), + ]; return frio_form($arr); } @@ -183,7 +190,5 @@ function frio_form($arr) $ctx['$login_bg_color'] = ['frio_login_bg_color', DI::l10n()->t('Login page background color'), $arr['login_bg_color'], DI::l10n()->t('Leave background image and color empty for theme defaults'), false]; } - $o = Renderer::replaceMacros($t, $ctx); - - return $o; + return Renderer::replaceMacros($t, $ctx); } From e556dc3c31101d880d9bc7a1188bb107fe57a246 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 16 Oct 2022 11:49:27 -0400 Subject: [PATCH 6/7] Add new frio.always_open_compose setting - This setting allows the New Post button to always open the Compose page instead of the modal by default --- src/Content/Conversation.php | 3 ++- src/Module/Item/Compose.php | 10 +++++++++- view/templates/item/compose.tpl | 3 +++ view/theme/frio/config.php | 6 ++++++ view/theme/frio/js/theme.js | 10 ++++++---- view/theme/frio/templates/jot.tpl | 2 +- view/theme/frio/templates/theme_settings.tpl | 2 ++ 7 files changed, 29 insertions(+), 7 deletions(-) diff --git a/src/Content/Conversation.php b/src/Content/Conversation.php index 237d192fd..84f75cff3 100644 --- a/src/Content/Conversation.php +++ b/src/Content/Conversation.php @@ -393,7 +393,8 @@ class Conversation '$message' => $this->l10n->t('Message'), '$browser' => $this->l10n->t('Browser'), - '$compose_link_title' => $this->l10n->t('Open Compose page'), + '$compose_link_title' => $this->l10n->t('Open Compose page'), + '$always_open_compose' => $this->pConfig->get(local_user(), 'frio', 'always_open_compose', false), ]); diff --git a/src/Module/Item/Compose.php b/src/Module/Item/Compose.php index 895a548e4..bd531d484 100644 --- a/src/Module/Item/Compose.php +++ b/src/Module/Item/Compose.php @@ -26,6 +26,7 @@ use Friendica\App; use Friendica\BaseModule; use Friendica\Content\Feature; use Friendica\Core\ACL; +use Friendica\Core\Config\Capability\IManageConfigValues; use Friendica\Core\Hook; use Friendica\Core\L10n; use Friendica\Core\PConfig\Capability\IManagePersonalConfigValues; @@ -60,7 +61,10 @@ class Compose extends BaseModule /** @var IManagePersonalConfigValues */ private $pConfig; - public function __construct(IManagePersonalConfigValues $pConfig, App\Page $page, ACLFormatter $ACLFormatter, SystemMessages $systemMessages, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) + /** @var IManageConfigValues */ + private $config; + + public function __construct(IManageConfigValues $config, IManagePersonalConfigValues $pConfig, App\Page $page, ACLFormatter $ACLFormatter, SystemMessages $systemMessages, L10n $l10n, App\BaseURL $baseUrl, App\Arguments $args, LoggerInterface $logger, Profiler $profiler, Response $response, array $server, array $parameters = []) { parent::__construct($l10n, $baseUrl, $args, $logger, $profiler, $response, $server, $parameters); @@ -68,6 +72,7 @@ class Compose extends BaseModule $this->ACLFormatter = $ACLFormatter; $this->page = $page; $this->pConfig = $pConfig; + $this->config = $config; } protected function post(array $request = []) @@ -199,6 +204,9 @@ class Compose extends BaseModule 'wait' => $this->l10n->t('Please wait'), 'placeholdertitle' => $this->l10n->t('Set title'), 'placeholdercategory' => Feature::isEnabled(local_user(),'categories') ? $this->l10n->t('Categories (comma-separated list)') : '', + 'always_open_compose' => $this->pConfig->get(local_user(), 'frio', 'always_open_compose', + $this->config->get('frio', 'always_open_compose', false)) ? '' : + $this->l10n->t('You can make this page always open when you use the New Post button in the Theme Customization settings.'), ], '$id' => 0, diff --git a/view/templates/item/compose.tpl b/view/templates/item/compose.tpl index a01ea95a0..5583650e0 100644 --- a/view/templates/item/compose.tpl +++ b/view/templates/item/compose.tpl @@ -1,5 +1,8 @@

{{$l10n.compose_title}}

+ {{if $l10n.always_open_compose}} +

{{$l10n.always_open_compose nofilter}}

+ {{/if}}
{{**}} diff --git a/view/theme/frio/config.php b/view/theme/frio/config.php index 1ee67db3d..2dcf00204 100644 --- a/view/theme/frio/config.php +++ b/view/theme/frio/config.php @@ -44,6 +44,7 @@ function theme_post(App $a) 'bg_image_option', 'login_bg_image', 'login_bg_color', + 'always_open_compose', ] as $field) { if (isset($_POST['frio_' . $field])) { DI::pConfig()->set(local_user(), 'frio', $field, $_POST['frio_' . $field]); @@ -74,6 +75,7 @@ function theme_admin_post(App $a) 'bg_image_option', 'login_bg_image', 'login_bg_color', + 'always_open_compose', ] as $field) { if (isset($_POST['frio_' . $field])) { DI::config()->set('frio', $field, $_POST['frio_' . $field]); @@ -108,6 +110,7 @@ function theme_content(): string 'contentbg_transp' => DI::pConfig()->get(local_user(), 'frio', 'contentbg_transp' , DI::config()->get('frio', 'contentbg_transp')), 'background_image' => DI::pConfig()->get(local_user(), 'frio', 'background_image' , DI::config()->get('frio', 'background_image')), 'bg_image_option' => DI::pConfig()->get(local_user(), 'frio', 'bg_image_option' , DI::config()->get('frio', 'bg_image_option')), + 'always_open_compose' => DI::pConfig()->get(local_user(), 'frio', 'always_open_compose', DI::config()->get('frio', 'always_open_compose', false)), ]; return frio_form($arr); @@ -132,6 +135,7 @@ function theme_admin(): string 'bg_image_option' => DI::config()->get('frio', 'bg_image_option'), 'login_bg_image' => DI::config()->get('frio', 'login_bg_image'), 'login_bg_color' => DI::config()->get('frio', 'login_bg_color'), + 'always_open_compose' => DI::config()->get('frio', 'always_open_compose', false), ]; return frio_form($arr); @@ -180,6 +184,8 @@ function frio_form($arr) '$background_image' => array_key_exists('background_image', $disable) ? '' : ['frio_background_image', DI::l10n()->t('Set the background image'), $arr['background_image'], $background_image_help, false], '$bg_image_options_title' => DI::l10n()->t('Background image style'), '$bg_image_options' => Image::get_options($arr), + + '$always_open_compose' => ['frio_always_open_compose', DI::l10n()->t('Always open Compose page'), $arr['always_open_compose'], DI::l10n()->t('The New Post button always open the Compose page instead of the modal form. When this is disabled, the Compose page can be accessed with a middle click on the link or from the modal.')], ]; if (array_key_exists('login_bg_image', $arr) && !array_key_exists('login_bg_image', $disable)) { diff --git a/view/theme/frio/js/theme.js b/view/theme/frio/js/theme.js index edd7282f7..60aa88ba5 100644 --- a/view/theme/frio/js/theme.js +++ b/view/theme/frio/js/theme.js @@ -87,10 +87,12 @@ $(document).ready(function () { if ($("#jot-popup").is(":hidden")) { $jotButton.hide(); } - $jotButton.on("click", function (e) { - e.preventDefault(); - jotShow(); - }); + if ($jotButton.hasClass('modal-open')) { + $jotButton.on("click", function (e) { + e.preventDefault(); + jotShow(); + }); + } } let $body = $("body"); diff --git a/view/theme/frio/templates/jot.tpl b/view/theme/frio/templates/jot.tpl index 0f878d4c5..c38e8531c 100644 --- a/view/theme/frio/templates/jot.tpl +++ b/view/theme/frio/templates/jot.tpl @@ -1,5 +1,5 @@ {{* The button to open the jot - in This theme we move the button with js to the second nav bar *}} - +
diff --git a/view/theme/frio/templates/theme_settings.tpl b/view/theme/frio/templates/theme_settings.tpl index 7dfc49719..3c3c9cc2e 100644 --- a/view/theme/frio/templates/theme_settings.tpl +++ b/view/theme/frio/templates/theme_settings.tpl @@ -209,6 +209,8 @@ }); +{{include file="field_checkbox.tpl" field=$always_open_compose}} +
From bcc1350f1d905ff162deb26605a02dbc640928aa Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 16 Oct 2022 13:21:43 -0400 Subject: [PATCH 7/7] Updated main translation file after adding strings --- view/lang/C/messages.po | 205 ++++++++++++++++++++++------------------ 1 file changed, 111 insertions(+), 94 deletions(-) diff --git a/view/lang/C/messages.po b/view/lang/C/messages.po index 1552d9cf3..eed528689 100644 --- a/view/lang/C/messages.po +++ b/view/lang/C/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: 2022.12-dev\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-10-14 22:46+0000\n" +"POT-Creation-Date: 2022-10-16 12:38-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -212,7 +212,7 @@ msgid "audio link" msgstr "" #: mod/editpost.php:103 src/Content/Conversation.php:352 -#: src/Module/Item/Compose.php:173 +#: src/Module/Item/Compose.php:200 msgid "Set your location" msgstr "" @@ -230,7 +230,7 @@ msgstr "" #: mod/editpost.php:107 mod/message.php:200 mod/message.php:358 #: mod/photos.php:1489 mod/wallmessage.php:142 src/Content/Conversation.php:368 -#: src/Content/Conversation.php:713 src/Module/Item/Compose.php:177 +#: src/Content/Conversation.php:714 src/Module/Item/Compose.php:204 #: src/Object/Post.php:538 msgid "Please wait" msgstr "" @@ -248,12 +248,12 @@ msgid "Public post" msgstr "" #: mod/editpost.php:120 src/Content/Conversation.php:357 -#: src/Module/Item/Compose.php:178 +#: src/Module/Item/Compose.php:205 msgid "Set title" msgstr "" #: mod/editpost.php:122 src/Content/Conversation.php:359 -#: src/Module/Item/Compose.php:179 +#: src/Module/Item/Compose.php:206 msgid "Categories (comma-separated list)" msgstr "" @@ -263,7 +263,7 @@ msgstr "" #: mod/editpost.php:128 mod/events.php:513 mod/photos.php:1337 #: mod/photos.php:1393 mod/photos.php:1467 src/Content/Conversation.php:383 -#: src/Module/Item/Compose.php:172 src/Object/Post.php:1003 +#: src/Module/Item/Compose.php:199 src/Object/Post.php:1003 msgid "Preview" msgstr "" @@ -276,37 +276,37 @@ msgid "Cancel" msgstr "" #: mod/editpost.php:134 src/Content/Conversation.php:343 -#: src/Module/Item/Compose.php:163 src/Object/Post.php:994 +#: src/Module/Item/Compose.php:190 src/Object/Post.php:994 msgid "Bold" msgstr "" #: mod/editpost.php:135 src/Content/Conversation.php:344 -#: src/Module/Item/Compose.php:164 src/Object/Post.php:995 +#: src/Module/Item/Compose.php:191 src/Object/Post.php:995 msgid "Italic" msgstr "" #: mod/editpost.php:136 src/Content/Conversation.php:345 -#: src/Module/Item/Compose.php:165 src/Object/Post.php:996 +#: src/Module/Item/Compose.php:192 src/Object/Post.php:996 msgid "Underline" msgstr "" #: mod/editpost.php:137 src/Content/Conversation.php:346 -#: src/Module/Item/Compose.php:166 src/Object/Post.php:997 +#: src/Module/Item/Compose.php:193 src/Object/Post.php:997 msgid "Quote" msgstr "" #: mod/editpost.php:138 src/Content/Conversation.php:347 -#: src/Module/Item/Compose.php:167 src/Object/Post.php:998 +#: src/Module/Item/Compose.php:194 src/Object/Post.php:998 msgid "Code" msgstr "" #: mod/editpost.php:139 src/Content/Conversation.php:349 -#: src/Module/Item/Compose.php:169 src/Object/Post.php:1000 +#: src/Module/Item/Compose.php:196 src/Object/Post.php:1000 msgid "Link" msgstr "" #: mod/editpost.php:140 src/Content/Conversation.php:350 -#: src/Module/Item/Compose.php:170 src/Object/Post.php:1001 +#: src/Module/Item/Compose.php:197 src/Object/Post.php:1001 msgid "Link or Media" msgstr "" @@ -415,9 +415,9 @@ msgstr "" #: src/Module/Delegation.php:148 src/Module/FriendSuggest.php:144 #: src/Module/Install.php:252 src/Module/Install.php:294 #: src/Module/Install.php:331 src/Module/Invite.php:178 -#: src/Module/Item/Compose.php:162 src/Module/Profile/Profile.php:247 +#: src/Module/Item/Compose.php:189 src/Module/Profile/Profile.php:247 #: src/Module/Settings/Profile/Index.php:222 src/Object/Post.php:992 -#: view/theme/duepuntozero/config.php:69 view/theme/frio/config.php:160 +#: view/theme/duepuntozero/config.php:69 view/theme/frio/config.php:171 #: view/theme/quattro/config.php:71 view/theme/vier/config.php:119 msgid "Submit" msgstr "" @@ -1070,7 +1070,7 @@ msgid "Rotate CCW (left)" msgstr "" #: mod/photos.php:1333 mod/photos.php:1389 mod/photos.php:1463 -#: src/Module/Contact.php:547 src/Module/Item/Compose.php:160 +#: src/Module/Contact.php:547 src/Module/Item/Compose.php:188 #: src/Object/Post.php:989 msgid "This is you" msgstr "" @@ -1080,11 +1080,11 @@ msgstr "" msgid "Comment" msgstr "" -#: mod/photos.php:1424 src/Content/Conversation.php:629 src/Object/Post.php:256 +#: mod/photos.php:1424 src/Content/Conversation.php:630 src/Object/Post.php:256 msgid "Select" msgstr "" -#: mod/photos.php:1425 mod/settings.php:350 src/Content/Conversation.php:630 +#: mod/photos.php:1425 mod/settings.php:350 src/Content/Conversation.php:631 #: src/Module/Admin/Users/Active.php:139 src/Module/Admin/Users/Blocked.php:140 #: src/Module/Admin/Users/Index.php:153 msgid "Delete" @@ -1947,7 +1947,7 @@ msgid "%s attends maybe." msgstr "" #: src/Content/Conversation.php:222 src/Content/Conversation.php:260 -#: src/Content/Conversation.php:873 +#: src/Content/Conversation.php:874 #, php-format msgid "%s reshared this." msgstr "" @@ -2020,7 +2020,7 @@ msgstr "" msgid "Visible to everybody" msgstr "" -#: src/Content/Conversation.php:308 src/Module/Item/Compose.php:171 +#: src/Content/Conversation.php:308 src/Module/Item/Compose.php:198 #: src/Object/Post.php:1002 msgid "Please enter a image/video/audio/webpage URL:" msgstr "" @@ -2041,7 +2041,7 @@ msgstr "" msgid "Delete item(s)?" msgstr "" -#: src/Content/Conversation.php:324 src/Module/Item/Compose.php:143 +#: src/Content/Conversation.php:324 src/Module/Item/Compose.php:175 msgid "Created at" msgstr "" @@ -2053,7 +2053,7 @@ msgstr "" msgid "Share" msgstr "" -#: src/Content/Conversation.php:348 src/Module/Item/Compose.php:168 +#: src/Content/Conversation.php:348 src/Module/Item/Compose.php:195 #: src/Object/Post.php:999 msgid "Image" msgstr "" @@ -2062,117 +2062,117 @@ msgstr "" msgid "Video" msgstr "" -#: src/Content/Conversation.php:364 src/Module/Item/Compose.php:184 +#: src/Content/Conversation.php:364 src/Module/Item/Compose.php:222 msgid "Scheduled at" msgstr "" -#: src/Content/Conversation.php:657 src/Object/Post.php:244 +#: src/Content/Conversation.php:658 src/Object/Post.php:244 msgid "Pinned item" msgstr "" -#: src/Content/Conversation.php:673 src/Object/Post.php:486 +#: src/Content/Conversation.php:674 src/Object/Post.php:486 #: src/Object/Post.php:487 #, php-format msgid "View %s's profile @ %s" msgstr "" -#: src/Content/Conversation.php:686 src/Object/Post.php:474 +#: src/Content/Conversation.php:687 src/Object/Post.php:474 msgid "Categories:" msgstr "" -#: src/Content/Conversation.php:687 src/Object/Post.php:475 +#: src/Content/Conversation.php:688 src/Object/Post.php:475 msgid "Filed under:" msgstr "" -#: src/Content/Conversation.php:695 src/Object/Post.php:500 +#: src/Content/Conversation.php:696 src/Object/Post.php:500 #, php-format msgid "%s from %s" msgstr "" -#: src/Content/Conversation.php:711 +#: src/Content/Conversation.php:712 msgid "View in context" msgstr "" -#: src/Content/Conversation.php:776 +#: src/Content/Conversation.php:777 msgid "remove" msgstr "" -#: src/Content/Conversation.php:780 +#: src/Content/Conversation.php:781 msgid "Delete Selected Items" msgstr "" -#: src/Content/Conversation.php:845 src/Content/Conversation.php:848 -#: src/Content/Conversation.php:851 src/Content/Conversation.php:854 +#: src/Content/Conversation.php:846 src/Content/Conversation.php:849 +#: src/Content/Conversation.php:852 src/Content/Conversation.php:855 #, php-format msgid "You had been addressed (%s)." msgstr "" -#: src/Content/Conversation.php:857 +#: src/Content/Conversation.php:858 #, php-format msgid "You are following %s." msgstr "" -#: src/Content/Conversation.php:860 +#: src/Content/Conversation.php:861 msgid "You subscribed to one or more tags in this post." msgstr "" -#: src/Content/Conversation.php:875 +#: src/Content/Conversation.php:876 msgid "Reshared" msgstr "" -#: src/Content/Conversation.php:875 +#: src/Content/Conversation.php:876 #, php-format msgid "Reshared by %s <%s>" msgstr "" -#: src/Content/Conversation.php:878 +#: src/Content/Conversation.php:879 #, php-format msgid "%s is participating in this thread." msgstr "" -#: src/Content/Conversation.php:881 +#: src/Content/Conversation.php:882 msgid "Stored for general reasons" msgstr "" -#: src/Content/Conversation.php:884 +#: src/Content/Conversation.php:885 msgid "Global post" msgstr "" -#: src/Content/Conversation.php:887 +#: src/Content/Conversation.php:888 msgid "Sent via an relay server" msgstr "" -#: src/Content/Conversation.php:887 +#: src/Content/Conversation.php:888 #, php-format msgid "Sent via the relay server %s <%s>" msgstr "" -#: src/Content/Conversation.php:890 +#: src/Content/Conversation.php:891 msgid "Fetched" msgstr "" -#: src/Content/Conversation.php:890 +#: src/Content/Conversation.php:891 #, php-format msgid "Fetched because of %s <%s>" msgstr "" -#: src/Content/Conversation.php:893 +#: src/Content/Conversation.php:894 msgid "Stored because of a child post to complete this thread." msgstr "" -#: src/Content/Conversation.php:896 +#: src/Content/Conversation.php:897 msgid "Local delivery" msgstr "" -#: src/Content/Conversation.php:899 +#: src/Content/Conversation.php:900 msgid "Stored because of your activity (like, comment, star, ...)" msgstr "" -#: src/Content/Conversation.php:902 +#: src/Content/Conversation.php:903 msgid "Distributed" msgstr "" -#: src/Content/Conversation.php:905 +#: src/Content/Conversation.php:906 msgid "Pushed to us" msgstr "" @@ -2628,39 +2628,39 @@ msgstr "" msgid "last" msgstr "" -#: src/Content/Text/BBCode.php:1002 src/Content/Text/BBCode.php:1867 -#: src/Content/Text/BBCode.php:1868 +#: src/Content/Text/BBCode.php:1002 src/Content/Text/BBCode.php:1883 +#: src/Content/Text/BBCode.php:1884 msgid "Image/photo" msgstr "" -#: src/Content/Text/BBCode.php:1222 +#: src/Content/Text/BBCode.php:1238 #, php-format msgid "" "%2$s %3$s" msgstr "" -#: src/Content/Text/BBCode.php:1247 src/Model/Item.php:3429 +#: src/Content/Text/BBCode.php:1263 src/Model/Item.php:3429 #: src/Model/Item.php:3435 src/Model/Item.php:3436 msgid "Link to source" msgstr "" -#: src/Content/Text/BBCode.php:1785 src/Content/Text/HTML.php:940 +#: src/Content/Text/BBCode.php:1801 src/Content/Text/HTML.php:940 msgid "Click to open/close" msgstr "" -#: src/Content/Text/BBCode.php:1816 +#: src/Content/Text/BBCode.php:1832 msgid "$1 wrote:" msgstr "" -#: src/Content/Text/BBCode.php:1872 src/Content/Text/BBCode.php:1873 +#: src/Content/Text/BBCode.php:1888 src/Content/Text/BBCode.php:1889 msgid "Encrypted content" msgstr "" -#: src/Content/Text/BBCode.php:2093 +#: src/Content/Text/BBCode.php:2109 msgid "Invalid source protocol" msgstr "" -#: src/Content/Text/BBCode.php:2108 +#: src/Content/Text/BBCode.php:2124 msgid "Invalid link protocol" msgstr "" @@ -8094,40 +8094,46 @@ msgid "" "important, please visit http://friendi.ca" msgstr "" -#: src/Module/Item/Compose.php:50 +#: src/Module/Item/Compose.php:85 msgid "Please enter a post body." msgstr "" -#: src/Module/Item/Compose.php:63 +#: src/Module/Item/Compose.php:98 msgid "This feature is only available with the frio theme." msgstr "" -#: src/Module/Item/Compose.php:90 +#: src/Module/Item/Compose.php:122 msgid "Compose new personal note" msgstr "" -#: src/Module/Item/Compose.php:99 +#: src/Module/Item/Compose.php:131 msgid "Compose new post" msgstr "" -#: src/Module/Item/Compose.php:153 +#: src/Module/Item/Compose.php:187 msgid "Visibility" msgstr "" -#: src/Module/Item/Compose.php:174 +#: src/Module/Item/Compose.php:201 msgid "Clear the location" msgstr "" -#: src/Module/Item/Compose.php:175 +#: src/Module/Item/Compose.php:202 msgid "Location services are unavailable on your device" msgstr "" -#: src/Module/Item/Compose.php:176 +#: src/Module/Item/Compose.php:203 msgid "" "Location services are disabled. Please check the website's permissions on " "your device" msgstr "" +#: src/Module/Item/Compose.php:209 +msgid "" +"You can make this page always open when you use the New Post button in the " +"Theme Customization settings." +msgstr "" + #: src/Module/Item/Follow.php:52 msgid "Unable to follow this item." msgstr "" @@ -9456,7 +9462,7 @@ msgid "Content Settings" msgstr "" #: src/Module/Settings/Display.php:205 view/theme/duepuntozero/config.php:70 -#: view/theme/frio/config.php:161 view/theme/quattro/config.php:72 +#: view/theme/frio/config.php:172 view/theme/quattro/config.php:72 #: view/theme/vier/config.php:120 msgid "Theme settings" msgstr "" @@ -11119,113 +11125,124 @@ msgstr "" msgid "Variations" msgstr "" -#: view/theme/frio/config.php:142 +#: view/theme/frio/config.php:153 msgid "Light (Accented)" msgstr "" -#: view/theme/frio/config.php:143 +#: view/theme/frio/config.php:154 msgid "Dark (Accented)" msgstr "" -#: view/theme/frio/config.php:144 +#: view/theme/frio/config.php:155 msgid "Black (Accented)" msgstr "" -#: view/theme/frio/config.php:156 +#: view/theme/frio/config.php:167 msgid "Note" msgstr "" -#: view/theme/frio/config.php:156 +#: view/theme/frio/config.php:167 msgid "Check image permissions if all users are allowed to see the image" msgstr "" -#: view/theme/frio/config.php:162 +#: view/theme/frio/config.php:173 msgid "Custom" msgstr "" -#: view/theme/frio/config.php:163 +#: view/theme/frio/config.php:174 msgid "Legacy" msgstr "" -#: view/theme/frio/config.php:164 +#: view/theme/frio/config.php:175 msgid "Accented" msgstr "" -#: view/theme/frio/config.php:165 +#: view/theme/frio/config.php:176 msgid "Select color scheme" msgstr "" -#: view/theme/frio/config.php:166 +#: view/theme/frio/config.php:177 msgid "Select scheme accent" msgstr "" -#: view/theme/frio/config.php:166 +#: view/theme/frio/config.php:177 msgid "Blue" msgstr "" -#: view/theme/frio/config.php:166 +#: view/theme/frio/config.php:177 msgid "Red" msgstr "" -#: view/theme/frio/config.php:166 +#: view/theme/frio/config.php:177 msgid "Purple" msgstr "" -#: view/theme/frio/config.php:166 +#: view/theme/frio/config.php:177 msgid "Green" msgstr "" -#: view/theme/frio/config.php:166 +#: view/theme/frio/config.php:177 msgid "Pink" msgstr "" -#: view/theme/frio/config.php:167 +#: view/theme/frio/config.php:178 msgid "Copy or paste schemestring" msgstr "" -#: view/theme/frio/config.php:167 +#: view/theme/frio/config.php:178 msgid "" "You can copy this string to share your theme with others. Pasting here " "applies the schemestring" msgstr "" -#: view/theme/frio/config.php:168 +#: view/theme/frio/config.php:179 msgid "Navigation bar background color" msgstr "" -#: view/theme/frio/config.php:169 +#: view/theme/frio/config.php:180 msgid "Navigation bar icon color " msgstr "" -#: view/theme/frio/config.php:170 +#: view/theme/frio/config.php:181 msgid "Link color" msgstr "" -#: view/theme/frio/config.php:171 +#: view/theme/frio/config.php:182 msgid "Set the background color" msgstr "" -#: view/theme/frio/config.php:172 +#: view/theme/frio/config.php:183 msgid "Content background opacity" msgstr "" -#: view/theme/frio/config.php:173 +#: view/theme/frio/config.php:184 msgid "Set the background image" msgstr "" -#: view/theme/frio/config.php:174 +#: view/theme/frio/config.php:185 msgid "Background image style" msgstr "" -#: view/theme/frio/config.php:179 +#: view/theme/frio/config.php:188 +msgid "Always open Compose page" +msgstr "" + +#: view/theme/frio/config.php:188 +msgid "" +"The New Post button always open the Compose page " +"instead of the modal form. When this is disabled, the Compose page can be " +"accessed with a middle click on the link or from the modal." +msgstr "" + +#: view/theme/frio/config.php:192 msgid "Login page background image" msgstr "" -#: view/theme/frio/config.php:183 +#: view/theme/frio/config.php:196 msgid "Login page background color" msgstr "" -#: view/theme/frio/config.php:183 +#: view/theme/frio/config.php:196 msgid "Leave background image and color empty for theme defaults" msgstr ""