Jump to content

Beluga

Members
  • Posts

    523
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Beluga

  1. Here is my Caddy 2 config for a PW site: mysite.fi, www.mysite.fi { encode gzip tls my@email.com root * /var/www/mysite/pw file_server php_fastcgi unix//var/run/php-fpm/php-fpm.sock { health_timeout 10000s } @deny_hidden path_regexp /\. @deny_root path_regexp /(CONTRIBUTING|COPYRIGHT|LICENSE|README|htaccess)\.txt @deny_assets path_regexp ^/site(-[^/]+)?/assets/(.*\.php|backups|cache|config|install|logs|sessions) @deny_install path_regexp ^/site(-[^/]+)?/install @deny_config path_regexp ^/(site(-[^/]+)?|wire)/(config(-dev)?|index\.config)\.php @deny_modules path_regexp ^/((site(-[^/]+)?|wire)/modules|wire/core)/.*\.(inc|module|php|tpl) @deny_templates path_regexp ^/(site(-[^/]+)?|wire)/templates(-admin)?/.*\.(inc|html?|php|tpl) rewrite @deny_hidden /denyaccess rewrite @deny_root /denyaccess rewrite @deny_assets /denyaccess rewrite @deny_install /denyaccess rewrite @deny_config /denyaccess rewrite @deny_modules /denyaccess rewrite @deny_templates /denyaccess # global rule try_files {path} {path}/ /index.php?it={path}&{query} log { format single_field common_log output file /var/log/www/access.log { roll_size 50MiB roll_keep 5 roll_keep_for 168h } } }
  2. You can join the channel via #processwire:libera.chat Btw. I posted another IRC news summary: https://www.ilmarilauhakangas.fi/irc_technology_news_from_the_first_half_of_2021/ Remember that Discord free offering is subsidised by venture capital money and that comes with strings attached and is finite.
  3. I wrote an article about IRC tech news (publication was delayed): https://www.ilmarilauhakangas.fi/irc_technology_news_from_the_second_half_of_2020/
  4. I thought this would be a nice job for a PW dev, so decided to advertise it to all of you: https://blog.documentfoundation.org/blog/2021/05/26/tender-to-implement-the-new-tdf-membership-committees-web-based-tooling-202105-01/ Deadline for applications is June 23, 2021. I was not involved in writing the specifications, but I will be reviewing the applications. The spec has some unfortunate language discrimination, but you can ignore it: "we strongly prefer Python/Django or Ruby on Rails over PHP". The spec also has very detailed definitions for database tables and configuration options, but I would treat them as inspiration rather than dogma. Plugging into our single sign on service would preferably be done with SAML 2.0 and fortunately there is a module for that. I have also been in the Membership Committee, so am able to answer questions about how it works.
  5. Check that you are loading jQuery in the frontend.
  6. Nothing integrates with PW, so you have to do the work 🙂 Use Flarum, if you want a Discourse-like experience, but with PHP. phpBB is still kicking and they use Symfony now. A new default theme is being built. Vanilla is actively developed as well. If you want to use Node.js, there is NodeBB. If you want blazing speed, you can use AsmBB. SimpleMachines and MyBB have grown stale, development is super slow.
  7. Beluga

    COVID-19

    There is a cool hack for getting immunity safely. It is called a vaccine.
  8. A bit confused - your examples seem to support my own philosophy of keeping things simple and avoiding bells and whistles such as autoplaying carousels?? Carousels were exactly the shiny thing that people were applying ten years ago without thinking. The Cambrian explosion of jQuery plugins etc... Customers care about sites not being assaults to their senses. This is an accessibility issue as well like I mentioned and can very well land people in trouble in the future. I also find it weird that you would categorise the work of researchers like Nielsen Norman Group as "group-think" (or is it just the "Group" in the name as a trigger? :)).
  9. The main page has three carousels, which are autoplaying to make it worse and one of them you can even interact with. The big image section at the top of the page The quotes section below it (can't interact) The collections section Related quote as I was just researching a different topic (SVGs): I think the main source of confusion and why people do not interact with carousels much is the typical "meatball" navigation, which is not intuitive. I am planning to implement a non-autoplaying carousel for a site and I will probably replace the mystery meatballs simply with descriptive text elements so you know what will happen on click. @cb2004 I put some trust into professional UX research groups as I do not have the resources to conduct this science myself.
  10. Site looks nice, BUT: "Should I use a carousel?"
  11. Yep, IRC is still alive 🙂 For a few months I have been testing this next generation bouncer: https://github.com/kiwiirc/kiwibnc It is starting to reach beta quality. The web client that comes with it (optionally) is very modern. Other modern setups that give you message history: https://github.com/Nordaaker/convos/ https://github.com/thelounge/thelounge
  12. Composer only allows it, if the current folder is not empty. Check that you do not have any files, even hidden ones, in the folder.
  13. @teppo has to interview them for ProcessWire Weekly.
  14. Perrrkele. Sehän on hieno:
  15. There is also Flarum, which is somewhat similar to Discourse (which uses Ruby on Rails). Incidentally, phpBB announced a new major release yesterday (3.3). Their next major release (4.0) will feature a new default theme. They use Symfony components now and Twig for templates.
  16. The database will be the bottleneck. Use InnoDB and transactions. Find all items with the text "transaction" on this page: https://processwire.com/api/ref/wire-database-p-d-o/ https://processwire.com/blog/posts/using-innodb-with-processwire/ For an example of how they are used, find "transaction" in this: https://github.com/adrianbj/BatchChildEditor/blob/master/BatchChildEditor.module.php (BCE includes the copied supportsTransaction function, so it will work with older PW versions as well)
  17. In the hot topic of "View source", the CKEditor folks recently commented that they will support version 4 until 2023.
  18. The repos say they are unmaintained. For the Python lib they recommend https://github.com/mbloch/mapshaper as an alternative. For the JS lib they recommend https://d3js.org/ for the mapping and https://github.com/topojson/topojson instead of SVG as the data format.
  19. Do you want to keep it strictly backend-only or would you be willing to allow frontend as well?
  20. If using InnoDB, use transactions to batch the page creation and deletion. With Batch Child Editor and transactions, I am able to create 35,5k pages (with over a dozen fields) in 2min 44s on my local machine. So much faster than Bernhard's result.
  21. Yep, caching might be nice going forward. Anyway, I can solve this right now with the static JS (well, in theory - have not tried yet what the effect on load time is). It is great to hear you have a plan for RockTabulator regarding this!
  22. I am wondering how to optimise a query. It is taking 23 seconds on a server with 4GB of memory. It is live here: https://mattikuusiproverbtypology.fi/references/ I have considered moving to static JS data as the data in the db does not change very often. The query is: $finder1 = new RockFinder('template=A-T', ['code', 'nb', 'variation', 'name', 'page1', 'page2', 'page3', 'runningnb', 'additnb', 'abbrevat']); $finder2 = new RockFinder('template=M6books', ['abbrev', 'author_editor', 'booktitle']); $at = $finder1->getSQL(); $m6books = $finder2->getSQL(); $sql = "SELECT * FROM ($at) AS at LEFT JOIN ($m6books) as m6books ON (at.abbrevat = m6books.abbrev)"; $this->setData($sql); I temporarily enabled slow_query_log like so in my.cnf: long_query_time=1 slow_query_log=1 slow_query_log_file=/var/log/mysql/slow-query.log (with /var/log/mysql owned by mysql user) Below is the slow query log - for some reason it contains two identical queries, each taking over 9 seconds. I wonder why that is? Due to ajax? Does this happen to others? My MySQL settings on the server are: Results from mysqltuner:
  23. I got ajax working, it was pretty simple in the end. In RockGridItem.js: xhr.onreadystatechange = function() { if (xhr.readyState == 4 && xhr.status == 200) { var httpResult = JSON.parse(xhr.responseText); // Tabulator change var table = RockGrid.table; table.setData(httpResult); grid.getDOM().dispatchEvent(new Event('RockGridAjaxDone', {bubbles:true})); } };
  24. Woooaw - with your query and renaming the fields of the other template, I got a perfect result!! (You were right that the column names have to be different) Thanks a lot. This is using my old hacky Tabulator grid 🙂
  25. I am trying to figure out how to join pages from two templates into a grid. I will attach a picture of an incorrect result just as a talking point: The goal would be to plonk the data from unive into the grid, with rows filled only when code and number match the ones in the main (A-T) grid. The incorrectly repeating result in the screenshot was reached with this: $finder1 = new RockFinder('template=A-T', ['code', 'nb', 'variation', 'name']); $finder2 = new RockFinder('template=unive3', ['code', 'nb', 'proverbtype']); // join finder $finder1->join($finder2, 'unive', ['code' => 'code']); $this->setData($finder1); So how can I match by two fields to get what I want?
×
×
  • Create New...