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

431 Excellent

About Beluga

  • Rank
    Hero Member

Recent Profile Visitors

7,597 profile views
  1. 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!
  2. 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:
  3. 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})); } };
  4. 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
  5. 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?
  6. 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.
  7. "Anti-snobbery" resulted in my boss recently sending me an email with a link to javascript:void(0);
  8. I assume this would be for the admin. I have never used the other modules, but if you have experienced the need for something more, I'm sure it is sensible to build it
  9. According to the instructions in this thread, you should be able to run it from the command line with "sublime"
  10. This is supposed to be pretty lean, but I have no idea of how well it works with modern web pages: https://www.netsurf-browser.org/
  11. Latest docs: http://tabulator.info/docs/4.2/clipboard
  12. I am willing to work on it I was just about to come back to this as I recently completed a couple of unrelated website rebuilds. I also want to resume my JavaScript studies (halfway through Eloquent JS at the moment). I haven't ran into any downsides or lacking features yet, but the issue tracker might be an enlightening place in that regard.
  13. The module is working otherwise great (thanks a lot!), but when visiting www. subdomain, the URLs of the rootParent children lack the domain. $siteRoot = $page->rootParent; $nav = ""; foreach ($siteRoot->children as $child) { $nav .= "<a href='$child->url'>$child->title</a>\n"; } This produces urls like https://pagename I can use <a href='/$child->name'> instead to make them work as relative URLs, but it would be nice to know what is going wrong. Setup: - Home - mysite.com - myothersite.com $config->MultisiteDomains = array( "mysite.com" => array( "root" => "mysite.com", "http404" => 27 ), "www.mysite.com" => array( "root" => "mysite.com", "http404" => 27 ), "myothersite.com" => array( "root" => "myothersite.com", "http404" => 1017 ), "www.myothersite.com" => array( "root" => "myothersite.com", "http404" => 1017 ) ); $config->httpHosts = array('mysite.com','www.mysite.com','myothersite.com','www.myothersite.com'); If I don't have the separate www. entries in MultisiteDomains, it does not work. It just throws me to the "Home" page, if I try to navigate to www. subdomain.
  14. Why didn't you call me? That's what everyone else I know does when they get printer trouble. Besides, a PW contributor like you gets free lifetime phone support from me. Regarding trying new distros, it should be possible to install the printer-related packages to a live system running from a USB stick and thus test without the hurdle of an actual OS installation. Anyway, that pink bug sounds fascinating!
  15. While the forum is getting some attention, how about disabling the quote tooltip that drives everyone crazy with its evil span insertion ways?
  • Create New...