Leaderboard
Popular Content
Showing content with the highest reputation on 04/15/2018 in all areas
-
I had the same thought initially when Markup Regions were introduced, but after thinking about it some more I don't know that this amounts a good reason not to use something. Because you could actually say the same thing about most aspects of the PW API and therefore never start with PW in the first place. Take $files->render() for example. If you're coming in cold knowing nothing about PW you're not going to instantly understand how this works, what variables will be in scope, etc. You have to take a bit of time to become familiar with the method, read the documentation, test things out. So really no different to Markup Regions. Once you read the introduction and try out Markup Regions it starts to make sense very quickly. Personally, I think Markup Regions are a fantastic feature and I have used them on every new site since they were introduced.7 points
-
Bit of a bump. Ther Api-Docs are great and it is useful that they are built on the dockblocks but that still really limits how far they can go. A site that allows us to bring the core API-Docs, plus the fantastic blogs, tutorials, guides and forum posts would be perfect. All this information is so spread out at the moment its terrible compared to competing platforms.4 points
-
That's what I'm thinking too. I'd like to add a few neat things though before I actively go for more spotlight on it on the web. Auto save is a neat feature but probably not wanted in all scenarios, so I want to make it optional, and another feature I definitely want to get "wired" in is lool's revision history. Currently, it's far too easy to overwrite a perfectly fine document with no way back.4 points
-
Hi, https://github.com/rolandtoth/AdminOnSteroids/blob/master/CHANGELOG.md Also, you might want to use the "Watch" feature of GitHub.3 points
-
The widths you have defined wouldn't work on any of the core admin themes. When you want a set of fields to all display on a single row, their widths must sum to 100% disregarding show-if conditions. The widths you have defined sum to 134% so they will not display on the same row. When you have show-if conditions where only one of the show-if fields will display at once, divide the remaining width in the row between the show-if fields. So in your row you have two fields that always show, totaling 66% width. That leaves 34% of width to divide between two show-if fields. So give each of those fields a width of 17%. When either of the fields shows its width will be actually be expanded beyond 17% to fill up the row.3 points
-
I really like them and uses them since the first minute. Mostly in the functions style. That's how my _init.php looks like <?php namespace ProcessWire; $homepage = $pages->get('id=1'); $kontakt = $pages->get("template=cfg")->kontaktdaten; // der Seiteninhalt: region('header+', ''); // fixed header region('nav+', ''); // ist im header region('hero+', ''); // heroimage region('main+', ''); // bodycontent region('footer+', ''); // footer // alle JS codes die innerhalb document.ready am body ende ausgeführt werden sollen, // nachdem jQuery u. main.js schon geladen sind: region('JSdocReady+', ""); // DebugAusgaben am Ende der Seite region('debug+', ''); If you wonder why I initially define the regions with a + (plus sign), it's because sometimes one may end up with a site that do multiple calls of template render functions on one page, what results in multiple includes of _init.php in the chain. This is to avoid an override of previous values. Of course one of the rare use cases, but not impossible.3 points
-
I would definitely recommend installing: http://modules.processwire.com/modules/module-release-notes/ so you can see what's changed when using the PW Upgrade module: http://modules.processwire.com/modules/process-wire-upgrade/2 points
-
I'm been using VSCode for the last 9 months or so and I love it. I'm mostly a Javascript developer so it does fit in my alley but I've had success with using it with PW. The little circle/refresh symbol in the bottom left allows you to push your changes to Github/Gitlab etc. Or you can use the command palette to "Git Push". Works a treat with Continuous Interaction. There's also a remote FTP plugin which lets you sync which I've used a couple of times on legacy projects.2 points
-
I'm just glad that one has a choice with ProcessWire. We are not mandated to use a particular way of website building. It's always good to read about the distinctly different uses of the platform.2 points
-
Personally, I also don't think I would ever use PW regions. I just don't like to mix up backend and frontend code. HTML/CSS IDs and classes shouldn't be related to anything else than HTML/CSS/JS.2 points
-
I will not be too popular with this but looking at the example above I won't be happy if I would inherit a project with such code. I have dealt with some unusual template syntax recently and from a team and maintainability POV the best is to stick with tools that most developers know, or is understandable at first sight. Of course it's only my thought but I always felt markup regions is a dead end. There are already lot of tools/languages to learn, why add another one to the stack that you can't use anywhere else? (and when there are many alternatives)2 points
-
2 points
-
An Images field allows you to: Rename images by clicking the filename in the edit panel or in list view. Replace images, keeping metadata and filename (when possible) by dropping a new image on the thumbnail in the edit panel. Introduced here. But neither of these things is possible in File fields, which prompted this module. The way that files are renamed or replaced in this module is not as slick as in the Images field but it gets the job done. The most time-consuming part was dealing with the UI differences of the core admin themes. @tpr, gives me even more respect for the work that must go into AdminOnSteroids. Most of the code to support the rename/replace features is already present in InputfieldFile - there is just no UI for it currently. So hopefully that means these features will be offered in the core soon and this module can become obsolete. Files Rename Replace Allows files to be renamed or replaced in Page Edit. Usage Install the Files Rename Replace module. If you want to limit the module to certain roles only, select the roles in the module config. If no roles are selected then any role may rename/replace files. In Page Edit, click "Rename/Replace" for a file... Rename Use the text input to edit the existing name (excluding file extension). Replace Use the "Replace with" select to choose a replacement file from the same field. On page save the file will be replaced with the file you selected. Metadata (description, tags) will be retained, and the filename also if the file extensions are the same. Tip: newly uploaded files will appear in the "Replace with" select after the page has been saved. https://github.com/Toutouwai/FilesRenameReplace http://modules.processwire.com/modules/files-rename-replace/1 point
-
This is a lightweight alternative to other newsletter & newsletter-subscription modules. You can find the Module in the Modules directory and on Github It can subscribe, update, unsubscribe & delete a user in a list in Mailchimp with MailChimp API 3.0. It does not provide any forms or validation, so you can feel free to use your own. To protect your users, it does not save any user data in logs or sends them to an admin. This module fits your needs if you... ...use Mailchimp as your newsletter / email-automation tool ...want to let users subscribe to your newsletter on your website ...want to use your own form, validation and messages (with or without the wire forms) ...don't want any personal user data saved in any way in your ProcessWire environment (cf. EU data regulation terms) ...like to subscribe, update, unsubscribe or delete users to/from different lists ...like the Mailchimp UI for creating / sending / reviewing email campaigns *I have only tested it with PHP 7.x so far, so use on owners risk EDIT: Since 0.0.4, instructions and changelog can be found in the README only. You can find it here ? If you have questions or like to contribute, just post a reply or create an issue or pr on github, thanks!1 point
-
Hi everyone, In a rush and using selector arrays for the first time and hoping someone can point me to an easy way to convert a mult-value page reference field into an AND selector. This: is getting converted into: "parent=1031, start=1, limit=6, sort=title, category=1111, amenities.title=Kitchen|Laundry, status<1024" but of course I want: "parent=1031, start=1, limit=6, sort=title, category=1111, amenities.title=Kitchen, amenities.title=Laundry, status<1024" with each selected "amenities" option expanded out so it's AND and not OR. Anyone done this with selector array? A little OT, and I probably need to look over some history here as to why it's not available, but sometimes I think it would be nice if we could just do: amenities.title=Kitchen&Laundry Thanks for any help!1 point
-
As threatened in the Pub sub forum in the "What are you currently building?" thread, I've toyed around with Collabora CODE and built file editing capabilities for office documents (Libre-/OpenOffice formats and MS Office as well as a few really old file types) into a PW module. If you are running OwnCloud or NextCloud, you'll perhaps be familiar with the Collabora app for this purpose. LoolEditor Edit office files directly in ProcessWire Edit your docx, odt, pptx, xlsx or whatever office files you have stored in your file fields directly from ProcessWire's page editor. Upload, click the edit icon, make your changes and save. Can be enabled per field, even in template context. Currently supports opening and saving of office documents. Locking functionality is in development. See the README on GitHub for installation instructions. You should be reasonably experienced with configuring HTTPS and running docker images to get things set up quickly. Pull requests are welcome! Here is a short demonstration:1 point
-
For the most part I've been working to wrap up a client project this week, running in ProcessWire of course. At this point I'm using markup regions exclusively on new projects, as they really add an element of fun while also simplifying development, at least in my case. Admittedly, when we first introduced markup regions, I thought they'd be a good alternative for new users (who might otherwise use direct output), and didn't think I'd be using them myself. I was wrong. After I started using them, quite awhile ago, I've found that I rarely want to use anything else. I enjoy using them, whether developing something new, or going back and modifying an existing site that's using markup regions. I'm curious if other people have also taking a liking to them? There have been some commits to the core this week, as well as some other not-yet-committed updates on the dev branch, but not enough to warrant a version bump today. So we'll save the 3.0.99 version for next week. I have been getting lots of good reports on the current PW master version, very few issue reports, and feel we've got a really good solid and stable version on our master branch right now. Just in case there's anyone that's not yet using it, I recommend the upgrade. Thanks for reading, hope you all have a great weekend.1 point
-
As always a fast and efficient reply. I never thought of looking for a release notes module, but it is a great addition. Thanks guys!1 point
-
Since starting my journey to actually learn programming, css is off the menu (but struggling to ignore the PW forum!). So with that in mind, a framework will be very handy indeed. I haven't got time to learn grid right now, nor would I use it anyway, too early days for me.1 point
-
Thx, I know all those options. Don't know exactly what I meant with my comment I think I was talking about some kind of staging/dev setup... Not related to vscode of course1 point
-
The CSS Grid vs Bootstrap (or any other CSS framework/library) question does not make too much sense anyway Just because now we have CSS Grid it does not mean that it provides all the stuff a heavy weight CSS framework gives us. We are comparing apples to oranges... CSS Grid solves one particular – albeit long standing – issue, that's all there is to it.1 point
-
There are so many ways to skin a cat in Javascript, especially considering how far Javascript has came in recent years. You really don't need jQuery at all. It is also good to learn the Javascript core as to expand your skill set as well as remove a dependency on your project. Some of the posts here are way out of date and verbose. Native Fetch is much better than XMLHttpRequest, and there are some polyfills online if you need IE11 support. fetch('../my-url/', { method: 'post', body: JSON.stringify({ test: response.test }) }).then(response => { return response.json(); }).then(json => { document.querySelector('#output').innerHTML = json.test; }); Read more here: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API And there are a bunch of good basic examples here: https://github.com/mdn/fetch-examples/tree/master/fetch-json1 point
-
The example you are referring to was not markup regions, but region() function calls. They are very different things. I think Horst may have thought I was talking about region() functions since the terminology is similar. Though I can also recommend region() / wireRegion() function calls (even if I don't often use them myself), as they are also quite useful, and I would certainly be happy to inherit a project using them. Depending on your code editor used to edit site files, they may be preferable to traditional delayed output. What you've described is not consistent with markup regions. You mentioned you would never use them, but I recommend enjoying some time with them before coming to that conclusion because I think you may view them as something different than what they are. Just like in any other methodology, it's your decision as to how you delegate front-end or back-end code, markup regions dictate nothing about that. Markup regions merely designate the target for markup, and are not really any different than delayed or direct output in that respect, other than that it's a little bit simpler to use, and a little more flexible in practice. Markup regions do not use class attributes. You can use id attributes if you want, but using pw-id attributes is independent of whatever is used in the markup. Of course, everyone prefers different methodologies, not to mention different projects have different needs, so there is no one-size-fits-all. PW supports a lot of different options, use whatever works best for your context.1 point
-
The reason I still use Bootstrap is not only the "Grid" part, but there are many other solutions in it, which are really useful and can save you a lot of time. Latest thing I've found is a way for responsive video embed (doing this "by hand" is not as easy as it may seem). https://getbootstrap.com/docs/4.0/utilities/embed/ Because of things like this, I prefer staying within the Bootstrap Framework.1 point
-
Hello @Robin S Thanks for this information. I have set the width of the last 2 cols to 17% and now it works. It doesn`t seem very logical to me, because I have thought that the width of the non visible col will be automatically set to 0%, but dividing it by two solves the problem. Thousand thanks, you have made my day!! Would be great if this info will be added to the docs.1 point
-
I do see your point, but after inheriting some WordPress sites this year which are absolute horror shows, it has proven to me that any project without code commenting could take some time getting to grips with. So a few small comments in the template files explaining markup regions is what I add.1 point
-
Whether it's currently the only one or not, that would deserve an online article and be good advertising for ProcessWire. As ProcessWire forum topics/posts play well with Google, modifying the topic's title would perhaps be enough or a good start.1 point
-
That also means I don't need to install LibreOffice but use it within PW on localhost? Cool! ?1 point
-
I don't have any listers set up on this site, although I probably will before it is released, so glad I learned about this now1 point
-
Update: LoolEditor now uses its own simple modal without a title bar since the editor's close button also closes the modal. Things feel a lot smoother now. I think PW is currently the only CMS that integrates LibreOffice for free1 point
-
Anyone searching for this problem. Here is the solution: https://github.com/boschni/ProcessDateArchiver/pull/2/commits/dd8e18a750bc537a002ee1aa0f2f8bb06659c7fc1 point
-
so one of the first things i did was change the global to g_settings https://github.com/outflux3/ProcessGeneralSettings/blob/master/GeneralSettings.module#L31 besides that i added support for placeholders, collapsed states, markup, import/export of settings.. +1, i'm super paranoid about global vars now, since i lost all of the listers on one site... not sure if this problem still exists, i may have posted an issue report on the LP thread and Ryan may have changed it, haven't checked though...\ did you encounter any problems with LP? i usually use more verbose globals for that, but on the other hand i have a new module that uses a $meta global, and another one with $theme; sometimes it's nice for the globals to be concise1 point
-
My module (Settings Factory) has no relation to this module (General Settings), it doesn't share or inherit any code. Settings Factory does not set a global var for the settings (that is left to the user and how they interact with the SF api), therefore it does not suffer from the same issue which is that this module by default/upon installation sets a global $wire var for $settings, which is already being used by LP. I don't personally endorse or promote, or recommend this module – i advise that it NOT be used until the $settings problem is fixed; as i stated in earlier posts, i used it on a couple of sites, forked it and fixed all the issues, but for the last 10 months i only use Settings Factory and i don't use this module at all. It is fine with me if this module is deprecated.1 point
-
1 point
-
Why isn’t there any documentation on Markup Regions within the official docs? The only thing I could find was various blog posts. This would surely help beginners.1 point
-
1 point
-
Ok, I ended up looking into it and from what I can tell the only way is to use the "regular arrays" option, rather than the associative approach. This seems to work: foreach($input->get->amenities as $amenity) { $selector[] = ['amenities.title', $amenity]; } It gets converted to: and the final selector ends up having this, which is what I need. amenities.title=Kitchen, amenities.title=Laundry Maybe this is the only way, but if anyone else has another solution, let me know. Otherwise, hope this helps someone else down the road,1 point
-
what does this say when you put it before everything else? var_dump($modules->isInstalled('FormTemplateProcessor'));1 point
-
It works with asmSelect type only (atm). Install AdminOnSteroids module, enable AsmTweaks at the top, then scroll down to its config section (or click the "cog" icon in the AsmTweaks block's bottom-right corner to jump there). Here check "Add limit to AsmSelect" and save AOS. Finally, in your field's Input tab set the max number in the "Max limit of items" input field . https://github.com/rolandtoth/AdminOnSteroids/wiki/AsmTweaks1 point
-
@ocr_b, you get the JSON parse error because the response from the server is some error message rather than the JSON object that is expected. If you search the forum (using Google) you'll find a number of topics that could be useful in tracking down the problem. Here are a couple: Based on comments in the forum some things to look at are: post_max_size, upload_max_filesize, max_execution_time, max_input_time, memory_limit mod_security (disable it) upload_tmp_dir1 point