Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Beluga last won the day on September 30 2018

Beluga had the most liked content!

Community Reputation

454 Excellent

About Beluga

Recent Profile Visitors

8,016 profile views
  1. Beluga

    ProcessWire on the web

    @teppo has to interview them for ProcessWire Weekly.
  2. Beluga

    ProcessWire on the web

    Perrrkele. Sehän on hieno:
  3. 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.
  4. 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)
  5. In the hot topic of "View source", the CKEditor folks recently commented that they will support version 4 until 2023.
  6. 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.
  7. Do you want to keep it strictly backend-only or would you be willing to allow frontend as well?
  8. 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.
  9. 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!
  10. 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:
  11. 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})); } };
  12. 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 🙂
  13. 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?
  14. Due to the tooltip problem, the only safe way to copy anything from the forum is to quote the message and then copy from the message composing area.
  15. "Anti-snobbery" resulted in my boss recently sending me an email with a link to javascript:void(0);
  • Create New...