Jump to content


Popular Content

Showing content with the highest reputation on 11/24/2020 in all areas

  1. 1 point
    @Davis Harrison Dion Hello, whilst there has been sporadic chat in the forums regarding sqlite over the years, I don't think we are any closer to seeing core support for it. I'm also unaware of any third party integration that's using it. I'd be delighted if I were wrong about that though; perhaps someone lurking in here does know how it can be done.
  2. 1 point
    Thank you very much for taking the time to reply. I used your suggestion for a CSV file uploaded to a page field and it works perfectly!
  3. 1 point
    Thanks very much for your example, I'll give it a go tomorrow and let you know. 🙂
  4. 1 point
    I don't think you can do counts aggregated columns with ProcessWire selectors. There's Pages::count of course, but that only returns a single count. This isn't the most efficient solution, but should be fine for a couple hundred or thousand pages: $results = $pages->find('template=your_template'); $years = array_filter(array_map(function ($p) { $year = $p->getUnformatted('your_date_field'); return $year ? wire('datetime')->date('Y', $year) : null; }, $results->getArray())); $pagesPerYear = array_count_values($years); Below that you'll have to use raw SQL I think. Might also be possible with RockFinder3, not sure (@bernhard?)
  5. 1 point
    The reason it's not working is that you're giving fopen a relative path. This works fine with your test file if it's placed in the webroot, since the path is relative to that. But inside a template file, the relative path does not resolve correctly. For a static file, you can use $config->paths to retrieve an absolute base path that will always work: $f = fopen($config->paths->files . "1619/dundee.csv", "r"); If you want to read a CSV file uploaded to a page field, you can use Pagefile::filename instead: $filename = $page->your_csv_field->filename(); $f = fopen($filename, "r"); Make sure your CSV field is set to single file output. If your field allows multiple files, use $page->your_csv_field->first()->filename() instead.
  6. 1 point
    Hi Joshua, just an idea. If there were a counter for all closes of all finished user decisions and a separate one only for the "accept all" decisions, it would give me a perfect idea of the accept ratio of the specific site. Either generally (probably enough), or even per month in a table (to monitor changes in behaviour). In the module, or in logfiles or a CSV file with a row limit? Basically, sort of mini-statistics. I have guesswork right now regarding Analytics' / Matomo's result changes and of how many users (in percent) those analytics results represent?
  7. 1 point
    Does this help? https://github.com/fusonic/opengraph#retrieve-open-graph-data-from-a-url You could try without a library, but something like: https://stackoverflow.com/questions/7454644/how-to-get-open-graph-protocol-of-a-webpage-by-php may not not be very reliable. There is also this: https://www.opengraph.io/examples/php-open-graph-example/ / https://github.com/primeobsession/opengraph-io-php but it hasn't been updated in years so not sure this is a great way to go but might be a useful resource nonetheless.
  • Create New...