Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/29/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
    2 points
  2. 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!
    1 point
  3. I use a combination of gulp and BrowserSync for live reloading. Maybe take a look at my setup repo jmartsch/acegulp4: A set of gulp tasks with JS transpilation, webpack, SVG Sprites and minification (github.com) It has the following features: Gulp 4 Webpack 5 with Babel SVG Sprites with minification Browsersync with proxy for existing webservers File revving JavaScript transpilation with Babel and minification SCSS compilation with minification and sourcemaps If you like it, leave a star, or ask me questions. Edit: If you didn't manage to get BrowserSync working, the cause could be, that you have to proxy your already existing webserver.
    1 point
  4. I have user Serverpilot back when they had a free tier and was very happy with it. For my local development I used Vagrant and was able to install Serverpilot in my Vagrant machine so my development and production environments were 100% identical. That's a big plus!
    1 point
  5. "Весела Коледа" with a bit of delay. I can tell some languages are well understood ? ( @Ivan Gretsky & @Zeka )
    1 point
  6. 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
  7. I'm not sure if this requirement is common enough it that will be considered for the core, but you can easily extend those Fieldtypes by yourself. These are untested, but they should work. It should even be possible to switch an existing FieldtypeText or FieldtypeTextarea to a non-indexed type.: FieldtypeTextNoindex <?php namespace ProcessWire; /** * ProcessWire Text Fieldtype without Index * * Fieldtype equivalent to FieldtypeText but * without creating an index on its text content * to preserve storage. * * Only use this Fieldtype if you will never search * through the contents of the field. * */ class FieldtypeTextNoindex extends FieldtypeText { public static function getModuleInfo() { return array( 'title' => 'Text Noindex', 'version' => "0.0.1", 'summary' => 'Field that stores a single line of text, not indexed' ); } /** * Return the database schema in specified format * * @param Field $field * @return array * */ public function getDatabaseSchema(Field $field) { $schema = parent::getDatabaseSchema($field); unset($schema['keys']['data_exact']); unset($schema['keys']['data']); return $schema; } } FieldtypeTextareaNoindex <?php namespace ProcessWire; /** * ProcessWire Textarea Fieldtype without Index * * Stores a large block of multi-line text like * FieldtypeTextarea but without an index on its * text content to save storage space. * * Only use this Fieldtype if you will never search * through the contents of the field. * */ class FieldtypeTextareaNoindex extends FieldtypeTextarea { public static function getModuleInfo() { return array( 'title' => 'Textarea Noindex', 'version' => "0.0.1", 'summary' => 'Filed that stores multiple lines of text, not indexed', 'permanent' => true, ); } /** * Get database schema used by the Field * * @param Field $field * @return array * */ public function getDatabaseSchema(Field $field) { $schema = parent::getDatabaseSchema($field); unset($schema['keys']['data_exact']); unset($schema['keys']['data']); return $schema; } }
    1 point
  8. Is it only slow when changing the parent to trash, or slow in general? Instead of that approach to trashing pages, have you tried: $page->trash(); https://processwire.com/api/ref/page/trash/
    1 point
  9. Kirby 3.5 is now released and the Blocks + Layout feature looks awesome. Something I still miss in ProcessWire. I know for Blocks we have the Repeater Matrix and you could use it for layouts too, but its not that intuitive in the back-end in my opinion. A module like the Layout feature of Kirby would be really awesome. ? By the way, they have a really good marketing strategy in promoting their features. At least it is working for me. ?
    1 point
  10. Hi @Sebi I'm pretty new to ProcessWire and I've started using your module to add an API. I'm really appreciating all the work from you and @thomasaull as it's making my life much easier! I've spotted a couple of issues around HTTP statuses, one of them I've managed to do a PR for, it was pretty straightforward. The other issue is potentially a bit more complicated, or at least requires a bit of careful thought. Currently you can't set the response code, it's just hard-coded to 200, but I'd like to send a 201 on create. I can think of at least two ways of doing it, one is quick but messy: return the status as part of the handler response; the other is probably neater but needs choices to be made: add a function (but where? AppApiHelper?) that stores the status and then retrieve it in the router. Any thoughts?
    1 point
  11. OK - pretty sure this is broken since processwire 3.0.160 when a "Major refactor/rewrite of ProcessWire's Database classes" was implemented: https://github.com/processwire/processwire/commit/06acbe57a32e18625248382499bb31527484c315#diff-83091c78a3273da557616affcb670296, specifically, the use of $sanitizer->wordsArray was used to clean the BOOLEAN query value (https://github.com/processwire/processwire/commit/1f293cc4f4092883b4eaf915950ba3c7c5430a7a#diff-83091c78a3273da557616affcb670296R633). The use of this words array function means that "Jul/2021" in the underlying DB query changes to: MATCH(field_event_dates.data) AGAINST('+Jul/2021' IN BOOLEAN MODE)) ) )) (which previously return results) to: MATCH(field_event_dates.data) AGAINST('+Jul* +2021' IN BOOLEAN MODE)) ) )) (which does not find any matches). I'm not sure if the issue of stripping out "\" from ~= searches (and other sanitization via the wordsArray) is a cause for concern generally - or a good thing from a security standpoint? Looking at the use of "~=" in the recurrme module, I'm somewhat convinced that this can be switched to %= without loss of functionality or unwanted side effects (also, performance?) but need to do more testing to tell if this is the case or not.
    1 point
×
×
  • Create New...