-
Posts
2,007 -
Joined
-
Last visited
-
Days Won
21
Everything posted by dragan
-
Lots of infos here: https://processwire.com/blog/posts/composer-google-calendars-and-processwire/
-
You have a lot of weird invisible characters in your code - this happens sometimes when you copy-and-paste from forums. Luckily, good text editors / IDEs spot such stuff and give warnings. I cleaned up your code and attached it here (together with two minor hints re: code) kalimati.zip
-
CKEditor Inputfield and multiple content stylesheets
dragan replied to Juergen's topic in General Support
You probably need to tell PW that it should look in that folder instead of wire/modules/. Did you clone the entire module folder to site/modules/ ? -
CKEditor Inputfield and multiple content stylesheets
dragan replied to Juergen's topic in General Support
Strange. According to the official docs, this should work. Maybe a caching issue? Can't you just use @import ? Try adding a Custom Editor JS Styles Set, and then follow these steps: https://processwire.com/docs/fields/ckeditor/#custom-editor-js-styles-set -
Yeah, I was thinking the same. tl;dr: there's probably something broken with my server, rather than PW. In my several tests, I had to shut down Laragon (and Apache manually via Task Manager) and restart the server. I also found an Apache error, same as reported here, (installing a new Apache didn't help) + a PHP error: #8 C:\laragon\www\pwdev\wire\core\ProcessWire.php(444): ProcessWire\Session->__construct(Obj in C:\laragon\www\pwdev\index.php on line 64 [13-Jul-2019 19:00:41 Europe/Zurich] PHP Fatal error: Exception: SQLSTATE[70100]: <<Unknown error>>: 1317 Query execution was interrupted (in C:\laragon\www\pwdev\wire\core\WireDatabasePDO.php line 480) I also switched to InnoDB in the meantime... So most likely there's something broken now with my LAMP setup ? But I'll disable every hook now and also some modules, and see how it goes. Does anyone know if it's safe to delete DB-sessions manually in mySQL?
-
@gunter I guess it's the last block of code of @bernhard's post from 4th October:
-
You're on a roll! Thanks for all these tutorials, and a very good weekend to you, too! ???
-
I've never tried, but a quick search suggests you can do this:
-
Well, instead of creating 8 InputfieldFile fields with maxFiles=1, why not just create one InputfieldImage field? Not sure about customizing your special file path for storing though - usually PW stores files/images under site/assets/files/page-id/ ...
-
Wow, PW (backend) became absolutely unusable after I created some 14k pages. Absurd long loading times. Something like discussed here? Interesting. Gotta try it out too...
-
There's also https://modules.processwire.com/modules/duplicator/
- 2 replies
-
- migrations
- sync
-
(and 2 more)
Tagged with:
-
@Jim Bailie You'll find plenty of examples in the dedicated pro forum threads, once you buy it. And people are happy to share their own code-snippets / advices in those forums. "site sample": not sure if you think of it as a special installable site-profile. If so, then I would guess no.
-
How to properly structure a complex membership system?
dragan replied to Pixrael's topic in General Support
I guess I would try option 3, but of course some more information about these "tasks" and "tools" would be needed. Maybe I'd use JSON storage only for settings. This module would perhaps be useful. -
ProcessWireUpgrade Not Showing Core Upgrade Options
dragan replied to vwatson's topic in General Support
Did you try to manually delete all the contents of site/assets/cache/FileCompiler/ ? -
re: Composer It's like npm for PHP, and super-easy to use. Some scripts out there require lots of dependencies, and they also check if your system meets all requirements. Downloading all dependent libraries yourself manually can be time-consuming. You can install Composer locally, install your spreadsheet stuff, and then copy / FTP the generated vendor folder to site/wherever/. From there on, just make sure your include_once() points to the proper path, and follow the docs. tl;dr: Composer is certainly not overkill ?
- 9 replies
-
- 5
-
- include
- phpspreadsheet
-
(and 1 more)
Tagged with:
-
Just get it from Github: https://github.com/PHPOffice/PhpSpreadsheet Then include() or require() it wherever you want.
- 9 replies
-
- include
- phpspreadsheet
-
(and 1 more)
Tagged with:
-
MOD_REWRITE to deceive the browser's image caching
dragan replied to Pixrael's topic in General Support
You could use a simple PHP script that serves the image with readfile() and set appropriate headers in that script. Maybe setup a dummy PW page with URL-segments enabled (or use a plain old query string) that will act as a "gateway" to those images. If you don't need to have the exact same filename on each request (download), then you you could even create the filename dynamically each time with adding / injecting time() or microtime() to the filename PHP will create for you: header('Content-Disposition: attachment; filename="'.basename($file).'"'); -
MOD_REWRITE to deceive the browser's image caching
dragan replied to Pixrael's topic in General Support
On a sidenote: You can also disable caching while Chrome inspector is open inside the settings: (of course, if you're testing with several other browsers plus mobile devices at the same time, the query-string approach is better) -
Change how many page numbers to show between ellipses in pager
dragan replied to thetuningspoon's topic in API & Templates
You could try using a pure client-side pagination that turns in-the-middle-ellipsis into a dropdown, like http://flaviusmatis.github.io/simplePagination.js/ -
Do you know what they used before?
-
Nice one! I never realized the comments field type is language-agnostic (because... I have never really used it, d'oh). Maybe @ryan would be interested in making it language-aware in the core?
-
If you have 5 cars, then you'd have 5 rows of data (1 row = 1 record-set), not 2. use a classic foreach loop or for debugging purposes print_r($cars)
-
I just installed mySQL 5.7.26 and switched to that version - everything works just fine (Laragon, Windows).