Leaderboard
Popular Content
Showing content with the highest reputation on 05/22/2021 in all areas
-
The UserActivity Pro module in ProDevTools was upgraded this week so that it now uses the Javascript Beacon API, enabling quick and reliable identification of when a user has finished a particular activity. It also now keeps track of when an activity is visible to the user or the window is hidden (like minimized or in a different tab), and it is able to report how many unsaved changes a user has made. All of this is visible from the Access > Activity menu in the admin. On the core side, there have been minor updates, so no version bump this week. But there are still a couple new PRs and useful things to look at in the commit log. The plan for next week: Bernhard Baumrock has been working on a PR that makes it very simple to modify and recompile the CSS of our AdminThemeUikit module... like as simple as placing an admin.less file in /site/templates/ directory. I'll save the details for next week, but after using it a bit here I have to say it's very cool. It also makes it really simple to upgrade the Uikit version. Previously I'd been following the build process as outlined in the Uikit instructions and often found myself in a state of confusion with npm errors and strange dependencies, needing upgrades for unidentifiable tools and producing incoherent warnings that never went away and left me with little confidence in the process. Perhaps it was because I started all this back when Uikit 3 was still beta, but the result was that I didn't much like upgrading Uikit or recompiling our AdminThemeUikit CSS, and I don't think anyone else did either. It made it a little difficult for our AdminThemeUikit module to achieve its original mission of being a simple module that many would extend and build from. Well, Bernhard has found a way to skip over all that nonsense and made it much simpler for all of us, so that AdminThemeUikit can finally be what it set out to be. I look forward to integrating this PR hopefully this coming week and think it means a lot of good things for our admin. Also, huge thanks to Pete for upgrading our forums this week! It's a great upgrade.7 points
-
Good day, @Clarityand welcome to the forums! You necroposting in this ancient thread brought up the pleasant memories of times when there was more random chat here, involving forum gurus and Ryan himself. Nowadays we all seem to be much busier. But I sometimes find time to play with my son. It is some stupid arcade so not worth mentioning next to something as epic as X-com or Jagged Alliance. On a sidenote. X-com was the game that made me learn English better. Those times few games were translated, so I had to spend time with a dictionary to find out what that yellow pixelated thing I collected from an alien corpse really is)))4 points
-
Look at repeaters and Mystique first. And ProFields if you need more.2 points
-
The most simple way to achieve that is to call a detail page (based on a detail template) and specify the news item with a get parameter like so: <p><a href="/newsdetail/?newsid=<?= $item->id; ?>">read more</a></p> In this case, your detail template would contain only the logic to receive an id and render the markup for $item with the given id. If you don’t like get parameters, you could alternatively use form submits instead of <a href> and send the ids as post variables.2 points
-
This site https://cantinetoscane.it/ wants to map the wineries in Tuscany where to make visits and tastings, I state that it is still under development, I did it in my spare time during this strange year, the translations are approximate, a lot of content / images are missing, there is structure and public data of the companies. I just wanted your opinion waiting to finish it. I also have to fix the design as I write css and html for work. Processwire is great!1 point
-
The one obvious downside of ProFields is the cost. $160 is steep, especially if you chose PW because it was free, for example to make sites for organizations like Non-Profits, like I currently am. Mystique doesn't look like my cup of tea mainly because it stores the data in a JSON file (database) and not in MySql, and they admittedly mention that "searching for data is limited" because of that fact. So, repeaters sounds like my best option right now, so I'll definitely play around with them a bit. Thanks again for the suggestions!1 point
-
Yep. Remember loading those on a ZX Spectrum from a tape recorder and playing on a black and white TV screen. Greetings to you, my fellow oldfags)))1 point
-
Similar experience here. For me it was all about adventure games — Space Quest, Kings Quest, Police Quest and Quest for Glory, as well as point-and-click games such as Maniac Mansion, Monkey Island, etc. Especially early adventure games with a text parser were brilliant tools for learning the language: while they didn't necessarily require you to be fluent in English, you had to have a decent vocabulary and at least some idea about how to form sentences ?1 point
-
Good day, @Ivan Gretsky! Yes, also online games with English-writing players can teach some English slang (e.g. "ty" stands for "thank you", "np" stands for "no problem"). Also generally online games can teach how to write messages quickly (as you need to play and communicate at the same time unless you're using voice talk), which can be a good skill for programmer too.1 point
-
1 point
-
A GET parameter is the way to go here, as @rash suggests. You could also use the template name in the get parameter <p><a href="<?= $item->url ?>?template=news-detail">read more</a></p> and then in your news.php template do something like if($input->get->template && $template = $input->get->text('template')) { // check for GET parameter 'template' and sanitize $files->include("{$template}.php") // use $files API to include the template. All API variables (like $page) will be passed } else { // your regular news.php template logic logic goes here }1 point
-
Cool! This thing that you and @bernhard are working on is something many of us are waiting. And it is in line with the plans we've been discussing in the beginning of the year. Great to see them become reality. Another nice thing I spotted looking through the commit log is the ability to define a custom folder for Creditor plugins. In fact there are a lot of things worth mentioning in this log recently, that does not make it to the blog posts or these announcements. In some of his weekly issues @teppo goes through the github commits in detail. I personally really enjoy it.1 point
-
Hey, first thing that I spotted is that you do a check if there are images, what exactly means there can be one or more images. But you also said you need exactly 4 images. So, what should the code do if there are less then 4 images available? You may do a check if it at minimum has 4 images: if (4 <= count($pages->get("/projects/")->images)) So, if you would check that there are more than 3 images available, you should use a for loop instead of the foreach loop. // iterate over first four images for($i = 0; $i < 4; $i++) : $image = $images->eq($i); ... Third thing is to get the variation. You can do it at the point where you copy the $image to the $img variable: $img = $image->width(200); // or $image->height(...) or $image->size(...)1 point
-
1 point
-
@bernhard There isn't really a standard, just a lot of options to find which suits you best. For most modules, just simply doing $this->pages, etc., is likely the simplest route to take. The core has some cases where fuel is turned off, which is rare with modules. But for the core I use $this->wire()->pages; or $this->wire('pages'); because it's one thing that's going to work consistently in all core classes since there will always be a wire() method on all Wire derived classes. If you are using $this->wire->pages that is fine, but just note that $this->wire hits __get(), then returns ProcessWire instance, then does it again to get to the pages part. So if it also works with your IDE, then just $this->pages would likely be preferable to $this->wire->pages. In the end, it's kind of micro optimization so I would use whatever you prefer. @matjazp I think this is going to be the same as $this->wire()->apivar in that regard. The only reason I don't use the string argument so much anymore is because phpstorm seems to understand exactly what's being accessed with wire()->apivar but not wire('apivar'). Plus, it'll know if you've mistyped an API var name so long as it's not in a string.1 point
-
I got a promising response by the Intelephense developer: https://www.jetbrains.com/help/phpstorm/ide-advanced-metadata.html#override Does anybody know how to do that?1 point
-
Thx @teppo that helped a lot already Did you try that? It does not have any effect at all for me... The only way I got that working is changing the return hints of the wire() method in wire.php // from this @return ProcessWire|Wire|Session|Page|Pages|Modules|User|Users|Roles|Permissions|Templates|Fields|Fieldtypes|Sanitizer|Config|Notices|WireDatabasePDO|WireHooks|WireDateTime|WireFileTools|WireMailTools|WireInput|string|mixed // to that @return ProcessWire |mixed But that is really ugly and incorrect of course. @ryan do you have any ideas what ProcessWire could do about that "problem"? Or would it be better to ask the Intelephense developer for help to support multiple return types in the @return hint? Maybe it should just return the first listed class by default or maybe it should list all listed classes and all derived methods? I've created an issue to ask at Intelephense as well: https://github.com/bmewburn/vscode-intelephense/issues/1800 The wire property already returns the ProcessWire class correctly. But if wire() is used as the new standard I'd prefer to make that work on my setup and start using it in my own modules as well.1 point
-
I have to disagree with this, to an extent. If I did client projects of my own I'd very much appreciate the option of off-loading the hosting and day-to-day maintenance of said sites to someone else. Sure, most of the time a "general purpose" hosting plan is good enough and ProcessWire is great in that it has very rarely really "required" updates, but I could imagine a plan dedicated to ProcessWire providing some extra services that a general purpose one won't and can't ? At the same time I don't really see why this wouldn't work for business clients as well. We host the sites we build in-house, and I can say that a lot of time and effort has gone to tweaking that setup, and maintaining the platform and the sites on it is an ongoing process. If hosting wasn't an important part of what we do, or we weren't quite as familiar with the inner workings of ProcessWire, it would make plenty of sense to subcontract that service from someone who actually specializes in it. Many companies that work on other platforms, such as WordPress, choose external hosting — not because they can't do the hosting, but rather because it's not their core business. There are also numerous "developer oriented" hosting platforms out there.1 point