Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

11 Good

About Sten

  • Rank
    Jr. Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi MoritzLost, That is just for the interface (menus, formulas...) the body field contains each post in any language. I have a default language and an URL segment to get the chosen language. The translators complete the files once only per language.
  2. Hello MoritzLost, Thank you for your answer. I found an other solution and I'll tell you my system. I got rid of TwigExtension and replace its function inside twig by using fuction in my php files. In my system, I find useful and simple. I have translations files : fr.php, de.php... Inside them I have the translations strings with constants. I call them in my init file after getting the language from the url, the transform the constant into variables for commodity. At last each varialbe is in the twig files. I have 8 languages and so translators just write in the file, I feel it simple. Ask me if you're interested and want precisions. Have a nice sunday.
  3. Hello Till now I hacked something with the twig template but it works no more with new PW versions so I look forward to create a module. I am working on a site in multiple languages : French, English, Italian, German, Spanish, Portuguese, Hebrew, Russian. The new posts are entered in any language with a field for language. Till now, I got twig files to get the translations with constants defined for each part of the pages. So I'd like to create a module to include theses files added according to the url /fr/en/... Have you some observations to do before I begin about the direction to take ? Thank you
  4. Thank you Kongondo, this a bug from me, I am testing my site on another server, removing my templates engine extensions that cause problems when upgrading. This is definitely not a PW bug. I found my file template had a remnants of the twig template engine.
  5. Hi Kongondo, Yes sure 3.0.156 version and I have not any save button. The file was the template file permission. Thank you
  6. I can't explain it as I just transfered everything on an other server for a test. I used an other way through the database directly.
  7. Sorry I can't find any submit button to save my configuration on a template in the admin interface. The file is fine.
  8. Hi, I change my server with the same debian version, moving my site to it. I have now a Undefined variable: view in the site. Thank you. You could save me some time. RESOLVED
  9. Hi Regesh, Do you have the latest version of ProcessWire ? Did you try to install a previous version ?
  10. Thank you Tarkvsg, I will try. Eventually I reinstalled my PW.
  11. In fact my root page has a server error and my others are blank.
  12. Hell, Although I use a config on an other of my sites that works well. An error 500 is driving me nuts. Coul someone have a look on my config server { listen 80; server_name attente.xyz; rewrite ^ https://$server_name$request_uri? permanent; } server { listen 443 ssl; server_name attente.xyz; ssl_certificate /etc/letsencrypt/live/krouus.company/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/krouus.company/privkey.pem; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Activer le ciphers et mettre ceux autorisés (je vous laisse faire de plus amples recherches pour ça ;) ) ssl_prefer_server_ciphers on; ssl_ciphers 'DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-CAMELLIA256-SHA:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-CAMELLIA128-SHA:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES128-SHA256'; ssl_session_cache shared:SSL:10m; ssl_session_timeout 10m; # La fameuse clé générée en dernier ssl_dhparam /etc/nginx/dhparam.pem; # Ajout d'une règle http add_header Strict-Transport-Security "max-age=31536000;"; root /var/www/attente.xyz/html; index index.php index.html index.htm; location / { # try_files $uri $uri/ /index.php?it=$uri&$args; try_files $uri /index.php$is_args$args; fastcgi_pass unix:/run/php/php7.0-fpm.sock; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_intercept_errors on; fastcgi_ignore_client_abort off; fastcgi_connect_timeout 60; fastcgi_send_timeout 180; fastcgi_read_timeout 180; fastcgi_buffers 4 256k; fastcgi_buffer_size 128k; fastcgi_busy_buffers_size 256k; fastcgi_temp_file_write_size 256k; } location ~ \.php$ { #try_files $uri =404; include snippets/fastcgi-php.conf; include /etc/nginx/fastcgi_params; fastcgi_pass unix:/run/php/php7.0-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; # .htaccess 10. fastcgi_param HTTP_MOD_REWRITE On; fastcgi_param X-Real-IP $remote_addr; fastcgi_param X-Forwarded-For $remote_addr; fastcgi_param Host $host; } location ~* \.(?:css|gif|htc|ico|js|jpe?g|png|swf|svg|ttf|eot|woff|less|pdf)$ { #expires max; log_not_found off; ## No need to bleed constant updates. Send the all shebang in one ## fell swoop. tcp_nodelay off; ## Set the OS file cache. open_file_cache max=1000 inactive=120s; open_file_cache_valid 45s; open_file_cache_min_uses 2; open_file_cache_errors off; valid_referers attente.xyz; ##ajout ProcessWire expires 24h; #log_not_found off; access_log off; try_files $uri /index.php?it=$uri&$args; } # .htaccess 8.1 charset utf-8; # .htaccess 3. location = /favicon.ico { log_not_found off; access_log off; } location = /robots.txt { log_not_found off; access_log off; } # .htaccess 4. # add_header X-Frame-Options SAMEORIGIN always; # Set by ProcessWire core add_header X-XSS-Protection "1; mode=block"; # add_header X-Content-Type-Options "nosniff"; # ----------------------------------------------------------------------------------------------- # .htaccess 5. # ----------------------------------------------------------------------------------------------- # Block access to ProcessWire system files location ~ \.(inc|info|info\.json|module|sh|sql)$ { deny all; } # Block access to composer files location ~ composer\.(json|lock)$ { deny all; } # Block access to any file or directory that begins with a period (except well-known) location ~ (^|/)\.(?!well-known)|^\..*$ { deny all; } # ----------------------------------------------------------------------------------------------- # .htaccess 15. # ----------------------------------------------------------------------------------------------- # Block access to protected assets directories location ~ ^/(site|site-[^/]+)/assets/(cache|logs|backups|sessions|config|install|tmp)($|/.*$) { deny all; } # Block acceess to the /site/install/ directory location ~ ^/(site|site-[^/]+)/install($|/.*$) { deny all; } # Block dirs in /site/assets/ dirs that start with a hyphen location ~ ^/(site|site-[^/]+)/assets.*/-.+/.* { deny all; } # Block access to /wire/config.php, /site/config.php, /site/config-dev.php, and /wire/index.config.php location ~ ^/(wire|site|site-[^/]+)/(config|index\.config|config-dev)\.php$ { deny all; } # Block access to any PHP-based files in /templates-admin/ location ~ ^/(wire|site|site-[^/]+)/templates-admin($|/|/.*\.(php|html?|tpl|inc))$ { deny all; } # Block access to any PHP or markup files in /site/templates/ location ~ ^/(site|site-[^/]+)/templates($|/|/.*\.(php|html?|tpl|inc))$ { deny all; } # Block access to any PHP files in /site/assets/ location ~ ^/(site|site-[^/]+)/assets($|/|/.*\.php)$ { deny all; } # Block access to any PHP files in core or core module directories location ~ ^/wire/(core|modules)/.*\.(php|inc|tpl|module)$ { deny all; } # Block access to any PHP files in /site/modules/ location ~ ^/(site|site-[^/]+)/modules/.*\.(php|inc|tpl|module)$ { deny all; } # Block access to any software identifying txt files location ~ ^/(COPYRIGHT|INSTALL|README|htaccess)\.(txt|md)$ { deny all; } # Block all http access to the default/uninstalled site-default directory location ~ ^/site-default/ { deny all; } } Thank you for any hunch.
  13. Thank you very Much BitPoet for your help, I was able to solve adding check_access=0 in my selector. Great!
  14. What I don't understand is that the field is displayed anyway with the right data (each language has a number) but displaying the b tag.
  15. Hi BitPoet, Here is my code $texte=""; $leslangues=array(1=>"fr", 2=>"de",3=>"en",4=>"es",5=>"he",6=>"it",7=>"pt",8=>"ru"); foreach ($leslangues as $langue => $langue_str){ $element = $pages->find("template=clef, langue=$langue, limit=1, sort=-id")->first()->title; $nombre=(int) filter_var($element, FILTER_SANITIZE_NUMBER_INT); if (!$nombre){ $nombre=1; } $texte.="<b>$langue_str</b> : $nombre, "; unset($nombre); } $texte=rtrim(rtrim($texte),","); return $texte; Thank you for your help.
  • Create New...