Jump to content

ryan

Administrators
  • Posts

    16,784
  • Joined

  • Last visited

  • Days Won

    1,537

Everything posted by ryan

  1. Last week we looked at progress on a new admin theme framework for ProcessWire. This week we’ll do the same, as development continues to move forward and we have a lot more screenshots to share (though keep in mind this is largely un-themed/stock). https://processwire.com/blog/posts/continuing-work-on-new-admin-theme-framework/
  2. This week we’ve started developing a new admin theme for ProcessWire that aims to be a community collaboration. We’ve now got some good momentum with lots to share in this post. We also get into some technical details and have screenshots as well. https://processwire.com/blog/posts/working-towards-a-new-admin-theme/
  3. This week we give extensive coverage on how to optimize 404 requests in ProcessWire. In this post you’ll learn about why 404s are significant issue, and then we’ll look at what you can do to optimize and ensure your site doesn’t waste valuable time and resources serving irrelevant crawlers and bots. This post also briefly covers this week’s core version 3.0.52. https://processwire.com/blog/posts/optimizing-404s-in-processwire/
  4. http://duckisland.com/GreekMachine.php
  5. Consistent with the plans of introducing new site profiles this year, we’ve started work on the new site profile, and have the first version ready this week. This profile contains a blog component and uses the new Uikit 3 front-end framework: https://processwire.com/blog/posts/introducing-a-new-processwire-site-profile/
  6. This week's version of ProcessWire expands upon our markup regions support introduced last week, and also contains various minor fixes and tweaks. In addition, it adds a $urls API variable which is simply a shortcut to $config->urls. But since this is so commonly called upon, the shortcut can be useful in reducing verbosity in some template files. Meaning, if you want the URL to /site/templates/, you can now use the shorter $urls->templates rather than $config->urls->templates, if you'd like. This also adds consistency with our recently introduced urls() function that's part of the optional Functions API. https://processwire.com/blog/posts/processwire-3.0.50-core-updates/
  7. It's such a small simple module that I think your best bet is just to edit it directly, and perhaps rename it (to avoid it potentially getting overwritten in the future). Remember to rename both the filename i.e. TextformatterMyVideoEmbed.module, and the class name to match. Then do a Modules > Refresh, and install it.
  8. This week we take a look at a new template file output strategy available in ProcessWire 3.0.49+. (Not to be confused with a “template system” like Twig or the like, as our template system is PHP). This strategy is an experimental but super-simple new alternative to direct output and delayed output, and in some ways a combination of both. Yet it’s likely to be more accessible for front-end developers and newcomers to ProcessWire, without sacrifices. Have a read and let us know what you think. https://processwire.com/blog/posts/processwire-3.0.49-introduces-a-new-template-file-strategy/
  9. This post includes coverage of the latest weekly core dev version, an update on ProDrafts, and more. It's a bit of a short post this week due to a change in schedule today, so some of the planned content for this week will be in next week's post. https://processwire.com/blog/posts/processwire-3.0.48-core-updates/
  10. Sounds like you found a good solution. Other potential solutions are reading and re-writing the options from your render() method, or override the renderOptions() method, or just modify the protected properties inherited from InputfieldSelect (like $this->options or $this->optionAttributes).
  11. If you use a renderReady() method, here's what the definition looks like: https://github.com/processwire/processwire/blob/master/wire/core/Inputfield.php#L1009 Remember to end by calling the parent::renderReady() method as well: public function renderReady(Inputfield $parent = null, $renderValueMode = false) { // perform any needed initialization here return parent::renderReady($parent, $renderValueMode); }
  12. The thing you quoted from the API reference is specific to Module configuration. Configuration data for the module (that which is configured in Modules > InputfieldSomething) would be populated after __construct(), and before init(). But you are attempting to access configuration for a Field rather than a Module. The method you are using (getConfigInputfields) is what is used by Fieldtype and Inputfield modules for configuration of a Field. This is unrelated to Module configuration, because a single Fieldtype/Inputfield module can be used for multiple fields. Further, an Inputfield module can be used independently of ProcessWire's Fields system (like in other forms that aren't connected with PW fields) where a getConfigInputfields() method wouldn't even apply. For these reasons, you can't have field/instance-specific configuration data populated to Fieldtype or Inputfield modules as part of the usual Module boot process. For an Inputfield module, you would want to move whatever field-specific initialization you need into the ___render() method, or renderReady() method instead if you need it to happen before.
  13. It would just depend on what's being worked on. I generally don't push stuff to GitHub until I know it's solid. If working on something that's going to take a couple weeks to get to that point, then I'll avoid having it appear on GitHub because it wouldn't be ready. Since plans for 2017 include a focus on some things that may go beyond the usual weekly timeline focus, I'd say that weekly activity on the GH repo would reduce a lot when these things are being developed. Of course, activity on the core code wouldn't be reduced at all (likely increased), but the frequency of commits that appear on GitHub would be reduced. Plans are to keep it roughly as-is. But since it's now ~130 posts, it's time to add a few more things like categories, related posts, next/prev post links, etc. I also want to upgrade it to be more guest-author friendly, so that it includes authorship information like we have in the tutorials (example).
  14. Happy New Year! Looking back over the last year, it's been a really great year for the project, and wow has it gone fast! In this post we'll look back at some of what we've accomplished over the last year, and–more importantly–introduce and review our 2017 roadmap. Today we've also released version 3.0.47 dev, which doesn't add anything new feature wise, but does contain several optimization and bug fix comments. https://processwire.com/blog/posts/roadmap-2017/
  15. Historically w3techs has been tracking this stuff the longest as far as I can tell, and their information is updated often. They show ProcessWire nearing in on the 0.1% market share threshold (only 2 spots away from the 0.1%+ table). The info on this page below is interesting. The entire page is sorted by market share (highest to lowest). It shows a lot of CMSs ahead of us, but a lot more below us in market share, including some fairly recognizable ones. https://w3techs.com/technologies/overview/content_management/all
  16. Christmas stockings are where you find the small gifts, while the big stuff goes wrapped up under the tree. Yet, looking back, it often seems like some of the most useful stuff ends up in those stockings… Swiss army knifes, digital tire gauges, flash drives, and so on. This week, the big stuff is between you and Santa, but what we do have are lots of useful stocking stuffers for you to enjoy in ProcessWire 3.0.46! https://processwire.com/blog/posts/pw-3.0.46-stocking-stuffers/
  17. This latest version on the dev branch includes several tweaks, fixes, upgrades and some nice optimizations. This post covers them all, plus a look at our new Page field configuration. Then we conclude with some fun API tips and tricks. https://processwire.com/blog/posts/pw-3.0.45/
  18. Lots of fun new upgrades to our Repeater and Repeater Matrix fields this week. In this post we cover all the details along with a couple of screenshots. You can start using these now in ProcessWire 3.0.44 (dev branch): https://processwire.com/blog/posts/pw-3.0.44-repeaters/
  19. This is the $input->url() method. Without a "./" before it, PHP could feasibly load that file from anywhere in the php include path, and this is why we always say not to do that in your PW templates (unless you really need to have it load from a undefined location). I've not coded FileCompiler to try and track down files from the include path, because FileCompiler can only work with files in /site/. So it does require that a directory be part of the include, even if it's the current "./" directory. It may still work in some cases without it, but I wouldn't recommend it. Also, per the blog post, the /*NoCompile*/ has to be within parenthesis. Or to state it differently, it means you have to use include/require/etc. as a function call like include("./test_include.php" /*NoCompile*/); Thanks, yes it looks like I had an error there that could be triggered in certain cases. I've pushed a fix that is now on the dev branch.
  20. Hope you all are having a great week. In this post we cover ProcessWire 3.0.43 (dev) which includes a lot of updates and a newly upgraded $page->url() method. Also a bit on the FileCompiler and revisiting last week’s ProcessWire Weekly recipe. http://processwire.com/blog/posts/processwire-3.0.43-core-updates/
  21. Makes sense, thanks. While I think PW core needs to remain kind of independent of a specific theming system, I do agree more options here would be helpful if we had some ways for the audiences you mentioned to be able to get up and running without delving into development. It's not just a matter of those audiences, but also could be helpful to us on projects where we don't really have much of a budget to work with, but just need to get something up and running without having to resort to WP, SquareSpace, etc. So I definitely support the idea of community profiles like this. But of course the foundation of PW's core is that it doesn't produce front-end markup. Site profiles are independent of the core, so it works well that way. The core shouldn't adopt a particular front-end theme strategy, but if one evolves on its own through the community I think it'd be beneficial for sure. What I was alluding to in the blog post is that in the short term, PW would benefit from having a few more site profile installation options from the get-go. The current "beginner", "intermediate" and "languages" profiles are focused more on developer skill level rather than "what kind of site do I want". And the "classic" profile is so old it needs to be dropped. I think we'd be better off with options like these: basic beginner site(s) for learning (like the current profiles) business/corporate site multi-language site (business/corporate?) blog site brochure site (single page on the front-end?) Maybe some other options would be worthwhile too, these are just the first that come to mind. But the point would be to have more starting points that are closer to what someone's looking for in terms of their actual needs. Rather than being bare bones like the current site profiles, these would be attractive sites in their own right (hopefully as a result of the great designers we've got in this community). Maybe a community profile would even evolve as a part of this process. I've always done it with just one page and template file as the controller utilizing $input->urlSegmentStr (or individually) for specifying actions and query strings for specific key/value things. This keeps it simple. Of course it may pull in lots of other pages, but as for the service itself it usually needs nothing but a single page and template. Usually when people are building a web service, they are trying to accommodate some specific need. So a lot of these details become irrelevant when building something to answer to the need. If building a full blown REST API, then yes it gets complicated because you have to account for anything that anyone wants to do. But this doesn't change the reality that building a web service for a specific purpose in PW is incredibly simple, and probably more often simpler than even configuring a full flown REST API, if it existed. Showing the right content type when an error occurs is a given, so yes one shouldn't leave uncaught exceptions, of course. I might not have understood what you meant on that. Using PW's $input var does not override using PHP's $_GET or $_POST vars. Honestly I use whatever is more convenient in a specific instance. Most of the time I prefer $input, but if need something outside the scope of $input then of course I go to PHP's superglobals. There isn't really a major benefit to using $input unless you are chaining it with a sanitizer method at the same time. Years ago, portable coding around these superglobals was annoying because you had to determine if PHP was messing with the data, like adding slashes to input. You don't really come across this anymore. PW's $input is not meant to replace the superglobals, it's meant to provide an alternative to them that may be more convenient in many cases. This is again a reason why I like the simplicity of building services to fit the need. I fully support a REST API in PW, but am just not convinced it would save anyone time except maybe non-developers. Like you mentioned above, PW has quite a diversity of possible data types, and always will (since Fieldtypes are modules, and anything can be installed). So a REST API that accommodates anything could become quite complicated. All the while, web services for specific needs remain one of the simplest things to build in PW. The biggest benefit of a full REST API in PW as I see it would be for marketing, for having a box to check, etc. And I can't argue with that.
  22. What you are describing is already what PW is for the most part. Though maybe there's additional helpers that could be added to support the front-end developer as you mentioned, I'm not sure. But what simpler context for a REST API could you have than what PW already provides? My experience has been that this kind of module is counterproductive – I deleted the web services module I'd built awhile back because I thought it costed people time rather than saving it. Maybe what's needed is a guide showing you how to implement a simple REST API on your own, without any module, since PW already makes it easy. But I appreciate your comments and will certainly look further into both options. That's basically a theme – what WordPress, Drupal, etc. are for. I'm not against the idea as something for us to collaborate on as a community, but from the core standpoint, it's the opposite of what the core aims to provide. Great ideas regarding the "community" profile, and I think it makes a great community thing, just not a core thing. I don't want to blur the line between PW and platforms like WP, Drupal, etc. Though I do think it's good to show that PW can do these things too. But if we had community efforts like this (and more diversity of profiles separate from it) the core really wouldn't need anything other than a blank profile. Though until that time, I do still think it's good for the core to demonstrate the diversity of output possibilities at the simplest level. These are still on the roadmap and have been for awhile. What gets implemented depends on resources, but front-end image resizing seems like it's got good potential for the near future, while front-end $pages API may take longer (but I still hope to accomplish that for 2017). Chances are I won't be the one developing the front-end image resizing stuff, as the ideas were brought in by another person, and I know little about it. But it is also one of the features that gets me very excited, so hopefully we can get some momentum going on this soon.
  23. What's in the new master version 3.0.42, and covering the release of the new ProDevTools modules: ProfilerPro and API Explorer. Plus, a look at some of what we'll be focusing on in 2017! https://processwire.com/blog/posts/processwire-3.0.42-is-out-and-prodevtools-is-released/
  24. This week we've got a new master version 3.0.41 and this post covers what's new. We also take a look at the API Explorer module from the ProDevTools set of modules, which will be released next week. https://processwire.com/blog/posts/processwire-3.0.41-and-a-look-at-api-explorer/
  25. While we don't have a new core version for you this week, 3.0.41 will be here next week, with 3.0.40 becoming the new master at the same time. This week, I'll introduce something new I've been working on for awhile here (ProfilerPro), and think some of you might find it as useful as I have. https://processwire.com/blog/posts/a-look-at-the-new-profilerpro-module/
×
×
  • Create New...