-
Posts
1,032 -
Joined
-
Last visited
-
Days Won
15
Everything posted by dotnetic
-
Preview/Discussion: RockDataTables
dotnetic replied to bernhard's topic in Module/Plugin Development
Hey @bernhard any updates on a release date or progress with RockDataTables? RockFinder repo at gitlab even mentions, that you renamed it to RockGrid?! I can't wait to get this module into my hands. -
Hey @renobird, is it possible to get the first date a specific field was changed? How would I do this? Any suggestions?
-
Preview/Discussion: RockDataTables
dotnetic replied to bernhard's topic in Module/Plugin Development
Ok, here you go. It's simple. Create two files in your root directory gulpfile.js var concat = require('gulp-concat'); var uglify = require('gulp-uglify'); var gulp = require('gulp'); var jsFiles = 'lib/**/*.js', jsDest = 'dist/'; gulp.task('scripts', function() { return gulp.src(jsFiles) .pipe(concat('scripts.js')) .pipe(uglify()) .pipe(gulp.dest(jsDest)) }) gulp.task('default', ['scripts']); Please change the paths to your javascript files according to your needs. In my example every .js file under "lib" and its subdirectories are catched. You can also change the jsDest. This is where the concatenated file "scripts.js" will be stored. Create a package.json { "name": "gulp-simple-concat", "version": "1.0.0", "description": "", "main": "gulpfile.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC", "devDependencies": { "gulp": "^3.9.1", "gulp-concat": "^2.6.1", "gulp-uglify": "^3.0.0" } } Then run npm install Node.js has to be installed for this to work. But it is very common now for web-devs to have this installed. When npm is finished, just run `gulp`in your console/terminal. That's it. Now you have a concatenated and minified javascript file. -
Preview/Discussion: RockDataTables
dotnetic replied to bernhard's topic in Module/Plugin Development
Multiple files would be multiple HTTP Requests which would take a longer time, than loading one large file. There are some readings what is "a lot" and if you stay under 14KB you can do the whole file in one roundtrip. Don't know if this is correct, but this is something I remember. Don't know if this still is relevant with HTTP 2. -
Preview/Discussion: RockDataTables
dotnetic replied to bernhard's topic in Module/Plugin Development
Then a simple gulp task or webpack would be the way to go. Are you interested in a simple minification script for gulp? -
Preview/Discussion: RockDataTables
dotnetic replied to bernhard's topic in Module/Plugin Development
@bernhard You could use the AIOM Module for this, it should also work in the backend. Please look at the sections "minify Javascript" and "Conditional loading". You can even parse LESS files with it. But who needs LESS, when you have SASS? Oooops, I didn't say anything -
If you want to do this just for a specific language, find the ID of this language and replace {id}, including the curly braces with this ID in the following code: $pag = $pages->find("has_parent!=2"); foreach($pag as $p) { $p->setAndSave("status{id}", 1); }
- 11 replies
-
- 1
-
This module does not work with ProcessWire 3.0.x. If you try to edit a page "The process returned no content" appears (translated from german). Must have to do with the hooks not returning correctly. Sadly the README on github says, that this module is no longer maintained.
-
Preview/Discussion: RockDataTables
dotnetic replied to bernhard's topic in Module/Plugin Development
-
Preview/Discussion: RockDataTables
dotnetic replied to bernhard's topic in Module/Plugin Development
Wow @bernhard. This looks so good. Can't wait to get my hands on it. Could you give me access to the source so I can play with it? Really looking forward to this module. -
I don't share the opinion that the installer ist the best thing possible. There could be more improvements, for example the locale setting that you mentioned. Or displaying the installer in another language. But as ProcessWire is Open Source everyone can submit ideas or fixes. If you don't speak English so well, use an online translator such as https://www.deepl.com/translator, which is the best one I know and submit your ideas to this forum or on https://github.com/processwire/processwire-requests
-
@fermion As a reaction to your hosters answer: The setlocale() function only has an effect if the locale you are trying to set is installed on the server, and locales do not have the same name on every system. Some linux distros or windows use different names. If for example the "de_DE" locale isn't installed and you call `setlocale(LC_ALL,'de_DE');` then the default locale would be used instead. That's why there are different namings for a language in my code. On linux you can find out which locales are installed with `locale -a.
-
Hey @adrian, thank you for your continous great work and efforts on this module. Is there any way we can support you with a little donation or something else? Would you even want that? Tracy Debugger helped me so many times, and reduces my work and error finding, so I would like to give something back to thank you. I know, that you invest much time in developing this.
-
Hi @fermion, willkommen in der wunderbaren Welt und der hilfreichen Community von ProcessWire. Wir schreiben hier meistens in Englisch, damit es alle verstehen können. Ich hoffe du verstehst was die meisten hier schreiben. Now I will continue in english: Regarding your question about a risk for setting the locale. I would recommend to set the locale and date format to the corresponding language. Here is the code I use on a large website in my _init.php: $lang = $user->language->name; if ($lang == "default") $lang = "de"; $date_lang = array(); switch ($lang) { case 'en': setlocale(LC_ALL, 'english_gbr', 'english_britain', 'english_england', 'english_great britain', 'english_uk', 'english_united kingdom', 'english_united-kingdom'); $date_lang[0] = "%A %B %dth %Y at %I:%M %p"; $date_lang[1] = "%B %dth %Y"; $date_lang[2] = "%I:%M %p"; $date_lang[3] = "%A"; break; case 'nl': setlocale(LC_ALL, 'english_gbr', 'english_britain', 'english_england', 'english_great britain', 'english_uk', 'english_united kingdom', 'english_united-kingdom'); $date_lang[0] = "%A %B %dth %Y at %I:%M %p"; $date_lang[1] = "%B %dth %Y"; $date_lang[2] = "%I:%M %p"; $date_lang[3] = "%A"; break; case 'fr': setlocale(LC_ALL, "fr_FR", "fra", "fr_FR.UTF8", "French_France"); $date_lang[0] = "%A %d %B %Y à %kh%M"; $date_lang[1] = "%d %B %Y"; $date_lang[2] = "%kh%M"; $date_lang[3] = "%A"; break; default: setlocale(LC_ALL, 'de_DE.UTF8', 'de_DE@euro', 'de_DE', 'deu_deu', 'German_Germany.1252'); $date_lang[0] = "%A, den %d. %B %Y um %k.%Mh"; $date_lang[1] = "%d. %B %Y"; $date_lang[2] = "%k.%Mh"; $date_lang[3] = "%A"; break; } Yes, normally your content is embedded in "fields" in ProcessWire. Then in your template file you output the content of the field in a HTML structure you like, for example a div or a metatag. I agree, that there are not much german tutorials that cover ProcessWire, but I think this is because almost the whole developer community is used to speak and understand english. Anyways: Here is a nice tutorial in german (there are more in the same channel) You will find a nice blog post "Warum ProcessWire die beste Wahl für Ihre Website ist (nicht immer, aber in den meisten Fällen)" on my website, which isn't a tutorial, but an explanation, why and when to use ProcessWire.
-
Wow @Zeka. Nice find.
-
Support for progressive JPGs is integrated into the Dev version. I think it is there since 3.0.80, but don't know exactly. To use it put this into your site/config.php $config->imageSizerOptions('interlace', true);
-
This seems to be a problem if I use a subdirectory like http://localhost/pwtest/kickstart.php instead of http://pwtest.localhost/kickstart.php. I will check this.
-
Hi @bernhard. I wanted to test your module, but it does not work on my system. Maybe it's windows related. I am on Windows 10, with latest PHP/APACHE/MYSQL. When I select "Load a Kickstartfile from URL" and enter the URL to your Example Snippet from Gitlab Repo it downloads ProcessWire and after this my directory looks like this: but then the script says: "404 page not found (no site configuration or install.php available)". I would like to test and help you fix this.
-
Just to clarify: The security problem exists if your server is reachable from the internet. No matter if local or housed.
-
I think this unnecessary, because there is not a single installer (of which I know) out there that is password protected (not PW, not WordPress, not Drupal, not NextCloud, etc.). And even if it was so, I think that most guys develop on a local machine and then upload to a live server. I know: People do stuff differently. However: Because of the upload functionality, it is a high security risk if people can upload files, without checking for permission. I think this does not matter on a local server, but on a live server it does.
-
Thank you Bernhard for your efforts. This looks great. Hope I find the time to test it in the next days.
-
Hey @arjen. This is a list I published in my blog article Why ProcessWire is the best choice for your website (not always, but in most cases) to convince people, that ProcessWire is not so unknown.
-
Thanks, I added a few to the list. But I was looking for really BIG brands (like Nike, Porsche, etc.)