Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/28/2020 in all areas

  1. 1.0.4 adds a litte new helper to add all fields of a template as columns: $rockfinder ->find("template=foo") ->addColumnsFromTemplate("foo"); 1.0.5: add getJSON() method
    3 points
  2. Here is a nice alternative: https://kenwheeler.github.io/cash/
    3 points
  3. This week I’ve been doing some work on the core, but it’s been a short week with the holidays, so I’m holding off on committing the updates till I can test and tweak them a little more next week. I’ve been working on some upgrades to the core Fields editor (Setup > Fields), as well as some improvements to our Inputfields system, among other things. Next week I’m also planning on working through some of the GitHub issue reports and some other parts of the core as well. With it being Christmas today, I’ve barely been at the computer and I’m guessing not many of you are either, so I’ll keep this short and wish you and your family a Merry Christmas and/or Happy Holidays!
    2 points
  4. Sure, just posted it here: https://github.com/processwire/processwire-issues/issues/1297
    2 points
  5. ok, well at the risk of hijacking this thread and turning it my dev process (hey, it is dev-talk anyway) ... I've created an app on Cloudways which is a skeleton project with the settings I nearly always end up using on a project. These are (more or less): Modules: AIOM TfaTopt Tracy Debugger TextformatterVideoEmbed TextformatterVideoEmbedOptions TextformatterTableWrapper there are more that probably could go on that list but I think pretty much every site I've done has those. Config tweaks: adding Markup Regions and webp, and disabling session fingerprinting when the site's in debug cos otherwise I keep getting logged out when testing in responsive design mode ... Templates: Basic site layout and then various things like pulling in meta tags / CSP etc, generating a nonce for inline scripts, password protecting the site whilst it's in debug mode. CSS gets pulled in either via AIOM or directly if the site is in debug. For CSS I generally have half a dozen files (definitions / grid / nav / typography and so on) that I've built up over the years but are mostly based on bits of other libraries eg we pretty much have the Bootstrap grid then there's adding a humans.txt file and tweaks to .htaccess (things like Strict-Transport-Security and ahem, X-Clacks-Overhead ). And there's a few application settings like disabling Varnish which never seems to work well for me on dynamic sites. What else ... oh yeah, a .vscode folder in the root of the project set to 400 so I don't accidently upload project settings (yeah that's happened). Now I can just clone that skeleton app in Cloudways and I'm off to a great start for a new project. Looks like cron jobs aren't cloned which is a shame because I have a cron job I normally use to dump database backups (which are easier to roll back than the default Cloudways backups) but that's easy enough to add. And it would be nice to be able to prompt me to change the PW admin user login as well when I log into the cloned site so I don't end up resusing passwords. I'll have a think about that. I'm sure this will save me time going forward - best get on with the sites I was supposed to be building today though....
    2 points
  6. З Різдвом Христовим!
    1 point
  7. Since others are getting into localsied greetings, Meri Kirihimete! (Although we're actually already a day ahead and Christmas was yesterday in my part of the world.)
    1 point
  8. Merry Christmas everyone! I hope you have some peaceful and calm days! ? If you've been keeping an eye on the commits in the meantime, you'll have seen some progress for the upcoming version 1.1.0. The current status in the develop branch should be as good as finished in terms of programming. Only the readme has not yet been adapted. I want to move large parts of it to the repository wiki and then add more examples. If you have some time, I would be very happy if you could test the new features (develop-branch). What's new: Improved AppApi-dashboard Allow multiple levels to routing config (by @David Lumm, thanks for PR ?) Allow requests without an api-key: You can now mark an application as "default application". If you did so, every request without an apikey will be linked with that application. You can now set a custom response-code in case of success. Simply include your response-code number on key "responseCode" in your result-array. For example my test-function, which is called on a route in Routes.php: <?php class AppApiTest { public static function test($data) { return [ 'success' => true, 'responseCode' => 202 ]; } } Optional access-logging: You can enable access-logging in the module's configuration. After that, every successful request will be logged with it's application-id, apikey-id and token-id. Added hooks to all essential functions - that should enable you to customize the module's behavior even more. E.g. you could add custom logging on a hook, if you need that Database-scheme does not need foreign-key constraints any more. That should fix @thomasaull 's issue with db-backups. After the update, you must remove the constraint manually because I did not find a way to remove the foreign key safely in all database-environments. Multiple other bugfixes What do you think? I look forward to your feedback!
    1 point
  9. Sure thing! Here you go: var gulp = require("gulp"); var sass = require("gulp-sass"); var browserSync = require("browser-sync").create(); var autoprefixer = require("autoprefixer"); var rename = require("gulp-rename"); var cssnano = require("cssnano"); var postcss = require("gulp-postcss"); var minify = require("gulp-minify"); //var bourbon = require("bourbon").includePaths; //var neat = require("bourbon-neat").includePaths; // Put this after including our dependencies var paths = { styles: { // By using styles/**/*.sass we're telling gulp to check all folders for any sass file src: "./src/scss/*.scss", // Compiled files will end up in whichever folder it's found in (partials are not compiled) dest: "./dist/css/" },php: { src: './*.html', }, scripts: { src: "./src/js/*.js", dest: "./dist/js/" } // Easily add additional paths // ,html: { // src: '...', // dest: '...' // } }; function style() { return gulp .src(paths.styles.src) .pipe(sass({ outputStyle: "expanded" })) .pipe(gulp.dest(paths.styles.dest)) .pipe(rename({ suffix: ".min" })) .pipe(postcss([autoprefixer({ browsers: ['> 1%', 'last 3 versions', 'Firefox >= 20', 'iOS >=7'] }), cssnano()])) .pipe(gulp.dest(paths.styles.dest)) .pipe(browserSync.stream()) } exports.style = style; function php() { return gulp .src(paths.php.src) .pipe(browserSync.stream()) } exports.php = php; function script() { return gulp .src(paths.scripts.src) .pipe(minify({noSource: true})) .pipe(gulp.dest(paths.scripts.dest)) .pipe(rename({ suffix: ".min" })) } exports.script = script; function watch() { browserSync.init({ // You can tell browserSync to use this directory and serve it as a mini-server port: 8181, proxy: "http://localhost:8888/project-folder/" // If you are already serving your website locally using something like apache // You can use the proxy setting to proxy that instead // proxy: "yourlocal.dev" }); //I usually run the compile task when the watch task starts as well style(); script(); gulp.watch(paths.styles.src, style); gulp.watch(paths.scripts.src, script); gulp.watch(paths.php.src, php); } exports.watch = watch
    1 point
  10. If you really want to get into JavaScript, I will also advise Nicholas Zakas book Advanced Javascript for Advanced Developers, it teaches about ES6 , classical approach and the true nature of JavaScript, most teach ES6 from the beginning which is wrong to me.
    1 point
×
×
  • Create New...