Leaderboard
Popular Content
Showing content with the highest reputation on 04/24/2020 in all areas
-
This post covers a few of the bigger updates in ProcessWire 3.0.154 and 3.0.155 on the dev branch. This includes a new function for live replacement of text in core and modules, a new method for creating canonical URLs, and some major upgrades to our $input->urlSegment() method that I think you’ll like! This continues from last week’s post in the ProcessWire support forum about 3.0.154 core updates and includes several new details— https://processwire.com/blog/posts/pw-3.0.155/8 points
-
@jonatan I appreciate your excitement. As I may have mentioned before, the biggest feature of this module is around making a good page building experience for non-technical people and making it easy to setup as a developer. "Page builders" in my opinion lie on a spectrum: On the right end you have things like Webflow which is 100% visual and infinitely flexible (let's put aside the fact that it's also a CMS and remotely hosted). It's an amazing tool, even though I don't use it because it's not how I develop. It's a great system, but requires design skill and you have to make sure you are consistent across the board, stick to a style guide, etc. On the left end you have what I will call section builders. Perfect examples include RepeaterMatrix and ACF Flexible Content field for WordPress. I made a video comparing the two in my WP vs. PW series. This approach was probably the go-to approach from... 2010 to 2015? It's much less "flexible" in that at it's simplest form, a section like "image left, text right" will always be as such and unless there are other sections to choose from, you are stuck with it. In the middle-right you have things like Gutenberg, Elementor, Brizy, etc. This is where most of the development action is, thanks to reactive JS frameworks (same with Webflow). In the middle-left there are tools like N1ED, Froala Blocks and others. The way I see it, ProcessWire is a tool geared for developers, and developers can customize it perfectly for their clients. A big part of this is a good page building experience and (a) after having built dozens of websites with RepeaterMatrix and (b) experimenting with different approaches and (c) trying to respect ProcessWire's way of doing things, I have concluded that the section builder / repeater matrix approach is the way to go. It just needs to be improved a bit. (also, I'm lazy and would never be able to program a visual page builder like the fancy ones out there because my JS skills are embarrassing) First, why do I say it's the way to go? Because it's regular ProcessWire, you can do multi-lingual, while not a big deal for me, PW seems to be a favorite for multi-lingual websites. So that's important. Because they are normal template files, a matrix-type that has been used multiple times can easily be modified by editing the template file (requires the developer obviously). Because it's regular ProcessWire, you can SWITCH from one matrix-type to another and retain your data. This is pretty important. Because they are normal template files, you can technically load them directly on other pages that don't even utilize repeater matrix and just inject your own content. YOU CAN DO DYNAMIC CONTENT!!! Well other page builders are doing this more and more, but with ProcessWire, you can do it much better (I'll elaborate on this another day and how my module will do it). I just don't trust non-technical people to create a good looking page from a bunch of sections by dragging and dropping and having too much flexibility. Fonts being mis-matched, colors all over the place, responsive thrown off. This is why I don't like page builders like Gutenberg, Elementor and the like. They look very sexy in the beginning and might be OK for people with web page creation experience, but it gives too much flexibility and web pages are complicated when you consider responsive design, image sizes, etc. I can use my CSS framework of choice (UIkit of course) instead of whatever internal CSS framework each of those builders relies on. So, what problems do section builders currently have (like RepeaterMatrix)? You cannot "preview" a section in a slick way before you add it. Sure, the matrix-type might be named "text left, image right" among a sea of 20+ other matrix types, but this won't stand out, especially in that smashed together list of matrix-types that you get with RepeaterMatrix. Non-technical people are VISUAL, so getting a preview of what they are about to insert goes a long way. My module has solved that problem as I posted in that above video (it's changed a bit from that video in a much better way). You don't page the benefit of instant feedback of what a section (and overall page) looks like as you populate the content. Again, this goes back to the visual nature of people and the soaring popularity of page builders like the ones I mentioned. Given ProcessWire's strict separation between frontend and backend this also gets complicated because ProcessWire's philosophy is about keeping the two separate. However, the true way around this is to use something like ProDraft's Live Preview feature. At this moment in time, it doesn't autosave + live preview changes to repeater/repeatermatrix items, but I've asked Ryan if he could add this (post is here; not viewable if you haven't purchased ProDrafts). He said it's possible and hopefully one day it will be there. When it does get developed, this in my opinion solves the visual feedback aspect of section builders. As a developer, it's annoying to have to continually re-setup repeater matrix for every site. It's not easy to share the template files across various sites which would be ideal. Also, you have to code your own matrix templates and add all the fields accordingly. As a content editor, you want flexibility in the types of layouts... what if you want your "text left, image right" instead of "image right, text left"? Because you can't physically drag-and-drop those elements, then we are forced in having more section templates that address the most common cases. Therefore my module solves this problem by providing 200+ section templates out of the box (and growing). It also provides an alternative (more visual) interface by which you can register those templates into the repeatermatrix section builder fields all from the admin (none are registered in a fresh installation... you choose what you want, so this avoid bloat). And it feels very to the ProcessWire admin interface (a pet-peeve of mine are plugins in WordPress that have their own garrish, bloaty graphics... example: https://wordpress.org/plugins/wordpress-seo/). The important point here is this: content editors / non-technical people / whatever you want to call them therefore no longer have to worry about dragging-and-dropping layouts, potentially messing things up. My belief is if you provide them with a good set of options, they will find what they need, choose the matrix type and then just focus on the content. ProcessWire's backend is all about having a good content entry experience and the ideas I've played around with have evolved around that concept. We want non-technical people to focus on their content and we as developers should not have to worry if they uploaded a 20mb image, because the matrix template will take care of that. Give me a couple weeks and I'll make a video.4 points
-
Yaaaay! Horray! That's my first! ???? And thanks so much for such instant and helpful reply @kongondo! Still continiusly amazed by this great forum and the amazing people behind the PW community! I'll go file it ? Take care! And have a great weekend! All the best, Jonatan4 points
-
At least this seems to be solved already: https://modules.processwire.com/modules/process-email-to-page/ I have never developed a browser extension myself, but I guess it should not be too hard. The extension could send the URL to your PW and there you could do anything with that request. You just need to make sure to do proper sanitization of the data and that only allowed users can post data to your system (eg. via a secret token).4 points
-
I use the classLoader in my TrelloWire module, you can look at the source code here. As you can see, this adds the src directory inside the module files to the WireClassLoader as the location to look for classes inside the namespace ProcessWire\TrelloWire. Almost; it doesn't preload the classes, but only on demand. This way, once I instantiate the class ProcessWire\TrelloWire\TrelloWireApi, the WireClassLoader looks for the PHP file for this class inside the src directory (the one registered for that namespace through addNamespace). If it couldn't find it, an error would be thrown. (If you're wondering why I don't use the fully qualified namespace, note the use statement at the top). Two main advantages: Using an autoloader, you can map classes to directories. The exact mapping (how namespaces are resolved to file paths) is defined in the PSR-4 standard. As far as I know, the WireClassLoader loosely complies with that. Composer mostly does the same thing (although a bit more elaborate, with optimizations for production usage etc.). Basically, you have a root directory mapped to a root namespace (in this case ProcessWire\TrelloWire -> src/ directory), and from there resolve sub-namespaces to sub-directories and the class name to a file name (so ProcessWire\TrelloWire\TrelloWireApi -> src/TrelloWireApi.php). The advantage is that you add namespaces wholesale. So you only need to add the mapping for the root namespace, and can then add as many classes and nested namespaces and classes without having to worry about including any class files manually because they will be autoloaded. Because class files are only included on-demand, only the classes you actually need for a request will be loaded. This of course cuts down on processing time, since otherwise you'd usually include all classes at the top for every request. Hope this clears up some of the confusion!3 points
-
I can confirm this. Congratulations! you've found a bug :-). Please file a bug report here: https://github.com/processwire/processwire-issues/issues Read this first: https://github.com/processwire/processwire/issues/82 points
-
Yes, in general all autoloaders work this way. Composer just generates a file that registers an autoloader function through spl_autoload_register. This function is then called whenever a class is used that is not loaded yet, as a last chance to load the class before an error is thrown. Composer has a few different ways of locating the class files though. You can even generate an optimized autoloader that includes a class map which will speed up autoloading a bit. You can also test if a class is loaded already or autoloaded with class_exists: // using class_exists with false as the second argument, the autoloader will not be called // this return false for all classes that have not been manually included or autoloaded yet var_dump(class_exists('Some\Vendor\Class', false)); // this will trigger the autoloader, so even if the previous call returned false this will return true if the class exists var_dump(class_exists('Some\Vendor\Class')); I have a bit more information on Composer usage in my Composer for ProcessWire tutorial ? Personal preference! I do believe that the .module files themselves need to be inside the ProcessWire namespace in order for ProcessWire to correctly load them in all situations. But ProcessWire doesn't know about the files in the src directory, so I could use any namespace I wanted (for Composer libraries, you'd usually use the developer / organization name as the top-level namespace, so I might have used something like MoritzLost\TrelloWire). It just felt wrong to me to have the main module files inside the ProcessWire namespace and the API in an entirely different namespace, this is why I used ProcessWire\TrelloWire.2 points
-
Set this up for the first time tonight, works really well over here. Just to save someone else some head-scratching, if you do this: Consider adding include=all to your selector to also iterate through unpublished and hidden pages when synchronizing your relationships.. // Get all pages where page_field_a is not empty, including hidden and unpublished pages $pgs = $pages->find("page_field_a.count>0, include=all"); ... Great work on the module @Robin S, coming in very handy ?2 points
-
2 points
-
I've just fallen in love with Hubspot (small team so the bundle for more features just for 2 users is worth it, especially since it's discounted for 12 months at the mo). Looking at all the API possibilities - we use RingCentral - that plugs in with a few clicks, can hook Formbuilder form submissions in with very little work, all the social media channels we're setting up right now get linked in including Facebook chat for our new page etc etc. Actually quite excited. But yeah the pricing gets out of hand quickly for larger teams or more contacts when you need over 1,000 on one of the paid plans. It's not without its costs (I want to say hidden costs, but they just require some reading to find) but the way I'm looking at it at the moment when I need to go above the starter packages I should be able to afford it. Hopefully ?2 points
-
Given that your field is named images, I am guessing it is a multi image field. This means the field can contain more than one image. This depends on how you set up the field (see its settings when editing the field. Assuming this is a multi image field, you code above won't work. Speaking in very general terms, there are two types of fields: Ones that return only a single value and ones that return multiple values. For instance, an email field will return only one value; the@email.tld. For the fields that can return multiple items, think about it this way... Imagine you have a basket. The basket can contain several fruits. If someone asked you to "give me the fruit"? Your natural response (assuming you are willing to give;-)) would be "which one"? This is because there are multiple fruits in the basket. By requesting the fruit, it implies they want not just any fruit but a particular fruit. That is the same thing you are asking in your code above; "Give me the URL" and ProcessWire is responding with which one? There are several images here, which one do you want? Back to the images, you will need to either specify which image's URL you want or have ProcessWire return the URLs of all the images in the collection (the field on that page). The latter means you have to loop through the images field (collection) as well. Some code.. foreach ($entries as $entry) { $images = $entry->name_of_your_image_field;// e.g. $entry->logo // we want all images so we loop through the image field foreach($images as $image) { // just an example echo $image->url; } } Edit You access a field of a page using its (the field's) name. @see my edit above ($entry->logo). If the image field is of type single, you don't need to loop through it. Just echo its content, e.g. echo $entry->logo;. In other words, there is no API variable called images in ProcessWire.2 points
-
To make a long story short... the last few weeks I asked myself... "What kinds of ProcessWire Profiles are missing or could be interesting for new/existing users?" The answers were... feature rich - with the full glory/monty of ProcessWire's features basic default profiles - Agency, Portfolio, CV, kind-of-niche (Photographers, Musicians, ...) verbose and detailed for starters Premium Theme - kind of... like WordPress has So I wanted to ask you... what could be interesting for you and maybe others out there. I already created Sublime (theme based), pwRecipes (super basic starter) and PWBrecipes (advanced starter based on pwRecipes) but still... I want to create and offer more options for new and existing users of ProcessWire. I teamed up with my colleague and friend from Muskaat to create a nice multi-purpose theme/design to provide a nice entry-point for everyone in regards of ProcessWire but this will take time as it will be highly customized and art-directed. There is a side-project of mine (some of you may know about it) where I want to provide all kinds of ProcessWire Barebones like an Agency-Theme-themed starter profile and such. But... to be honest... right now I'm a bit lost. I don't know what could be interesting or what might be needed. And yes... I don't know where to start. ? Is there anything YOU wanted to have being around as a site profile or theme or anything like this? Every answer, idea and recommendation is highly appreciated.1 point
-
Wow @Jonathan Lahijani, just wow! ? That's what I call an elaborative answer! ?? I think your analysis is simply just so great! I almost couldn't agree more upon what you're saying! Your spectrumfication of page builders as well as your pros and current-issues overview of the "leftwing" section builders approach is really great! – YES! I personally adore Webflow! I actually came from the Webflow community a while before joining PW. I'm also myself much more of a visual designer ? than I'm actually a developer ?. And also.. Wf is pricy, PW is free & open source! ? I've mostly taught myself HTML & CSS and copy pasting JS back in primary school, which is enough for Webflow, and then since recently joining PW also basic PHP ("necessity is the mother of invention"). Webflow is truly an amazing tool I agree, but as you mention, on the other hand it does require more design skills (though I believe, not having updated myself on Wf that much recently though, that they're constantly improving their CMS experience and templating experience...) HEAR, HEAR!!! AGREE!!! ?? This is what I meant with : – It's great to let the editors gain some creative freedom, but on the other hand, if they're not designwise nor technically skilled, whichever beautiful design you've created, you'll see them make it fu***** ugly!... Before PW, before Wf, I was using the very basic (though it had CSS and HTML editing...) site builder Weebly. This problem you describe would exactly be the case. Because whatever you'd have designed, the editor (not being neither designer nor technically skilled) would simply (with good intentions though) make it ugly! Because they are simply given too much freedom, more than what's good. Then talking about the kind of slightly (only just slightly) more sophisticated solutions , you have Elementor, as you also mention. Recently I built a site in Elementor. And what a pain!.... Building slightly more advanced templates and custom functionality and design features directly in the Elementor editor is way much more "hacking" and so so so much "fixing" (in general applies to all of WP) more than it's actually developing or designing. The idea is good. The reality is.. not so good. Talking about this... Would the amazing module that you're building also be interchangeable in regards to CSS framework wise, say able to – easily – use Bootstrap instead of UIkit? Perhaps even somehow built in? All in all though I just can't wait to see this! I'm very much looking forward for your video. And again, any kind of sneak peeks or even some beta demo would be highly highly appreciated! All the best, Jonatan1 point
-
That seems to be a game changer. Congrats on this effort. Keep it up!1 point
-
You can get the last item in a WireArray (a PageArray is a type of a WireArray, i.e. your subpages) using the method last(). https://processwire.com/api/ref/wire-array/last/ An example using last() // get some parent page // OR if this page: $page->children; $parent = $pages->get("id=1234"); $children = $parent->children; foreach($children as $child) { if($child->id === $children->last()->id){ // this is the last child // e.g, echo its title field echo $child->title; } } This is just one way to do it. Depending on your use case, you could also use a counter in the loop. Note though that if your 01 child is moved, it will obviously no longer be the last child :-).1 point
-
I highly recommend everybody to do that stuff in the backend. Creating an admin page is easy and there you can to exactly the same as you would do on the frontend: Write PHP, HTML, JS + CSS. The benefit you get is huge: You can use all the power of the PW admin framework, eg, MarkupAdminDatatable, InputfieldSelect etc.; You'll also learn a lot about ProcessWire. I'd not say what you plan is piece of cake, but it's for sure doable with PW ?1 point
-
Hi @kongondo I did not find a solution to this until now. I think there is none in general. InputfieldCkeditor has a custom implementation for that need var editor; if(typeof ProcessWire.config[configName] != "undefined") { var editor = CKEDITOR.replace(editorID, ProcessWire.config[configName]); } else if(typeof $editor.attr('data-configdata') != "undefined") { // allow for alternate option of config data being passed through a data attribute // useful for some dynamic/ajax situations var configData = JSON.parse($editor.attr('data-configdata')); ProcessWire.config[configName] = configData; var editor = CKEDITOR.replace(editorID, configData); } if(editor) { ckeInitEvents(editor); $editor.addClass('InputfieldCKEditorLoaded'); } So with CKEditor you can pass through custom settings via data-configdata. But that's also only related to the display part of the Inputfield. Regarding ajax processing on the backend I have not found any other way than setting the values directly in the DB (meaning to create a dedicated field for every different setting). I have not looked into how the template overriding feature for fields works. Maybe there is some hookable method that could be used to modify the settings based on the template just via code? https://processwire.com/blog/posts/pw-3.0.145/#field-template-context-override-settings If you find anything please let me know ?1 point
-
I have a question concerning the documentation which I use pretty much always when doing some work with ProcessWire. Fantastic progress is being made with every update but I just ran into some information in forums or in blog posts and often only by coincidence. What I can think of right now includes these: in selectors there can be used words like "today" and "tomorrow" (I found the tomorrow in one forum post) in selectors and for repeaters I can use "owner" to find the parent node for image fields there are possibilities to create any field types to be used along, instead of the previous description fields only I can imagine these are just a few examples and some things may not be well known to normal users like myself. Is there a list of such "news" that have not made it into the documentation yet? Or am I missing some pages where this is already documented?1 point
-
Awesome module, I'm testing it right away for a small project I'm working on, keep rocking!1 point
-
I see you put TrelloWire within the namespace of ProcessWire. Is there any benefit or is that just a matter of taste?1 point
-
1 point
-
I only have one kid, so in some ways that keeps things easier, although she's in the office with me on the other PC which can make things interesting at times. We are allowed out walking as long as we keep to our neighbourhood and stay a safe distance from other people. Things have been pretty relaxed up until Sunday when the oven died, which made things a bit more inconvenient as we've been doing a lot of home baking, but that is out of the question now until I can get someone to repair it, or buy a replacement, which either way looks like at least a week away. At least there's a good chance of eliminating the virus completely here within the next few weeks, which will allow life to return to some semblance of normal, but the borders will likely be closed well beyond the end of the year.1 point
-
@Pete From this side, my wife's job is one that requires her to be on phone/video meetings most of the day, so she's got to lock herself away from us to focus on that, and the kids are mostly with me during the day. I'm good at focused attention, but not great at changing gears, so I'm still learning. My days used to be just coffee and code. Now things are much more diverse, here's a typical day: wakeup, breakfast, coffee, code, kids wakeup, resolve dispute, make breakfast, coffee, code, hear that TV is on, check in to make sure kids are doing school work, turn off TV, say “get back to school work”, try to figure out something with google classroom, worry about whether I'm doing enough to keep kids focused on school, code, get icloud request to approve download of some game on iPad, tell kids to “get back to work”, explain why several times, answer questions about school work, hear music from some game and decide to let it slide, 1 email, cycle power on router because wife says she can't connect to important video call, code, resolve kids dispute, put 1 kid in timeout, legos, clean up spill, 1 email, slack message, cook lunch, coffee, code, worry about whether kids are spending too much time on screens, phone call, reset wifi because daughter says Roblox won't connect, then work a little more, click the "snooze" button on a dozen emails so they return tomorrow, take kids outside to play while I work on house or yard, ride bikes, cook dinner, eat, netflix, cleanup dinner, go to bed, feel thankful to be healthy, sleep well. I'm definitely still adapting here, but I can't complain about the new normal because having everyone under one roof is comforting, especially at times like this. And while it's harder to get work done, it's mostly still getting done and I just feel thankful to be staying busy. Also, knowing there's nowhere to go but home, life is simpler in many ways.1 point
-
My module is going through quite a bit of evolution, almost on a daily basis, as I build more sites with it. It will probably be ready sometime this summer, including documentation and a website. It's quite complex, but very thorough. I've built about 10 sites with it so far, with each site providing various insights and feature ideas that make it into the module.1 point
-
Hi @ All, I am Miljan and I've spent 10 years in various Joomla! teams and I love Joomla. Saw a lot of things, roads, milestones, changes, decisions and participated but my voice was not loud enough sometimes. Sometimes things went in the wrong direction. There is various CMSs - WordPress (brrr), Joomla!, Drupal, Typo etc etc. Ecommerce: Magento, Os etc etc... There is various frameworks: YII etc etc. So, PLEASE guys, do not change much ProcessWire, especially in those directions, it is excellent as it is. It is fantastic!!! DO NOT make media manager, do not make CMS features you can find everywhere. One thing will lead another and at the end PW would be just as any s*** we all escaped from. Please, improving core and adding here and there certain features would be fantastic. The only thing, maybe, my suggestion, is to gather team (not suggesting myself because for a longer time I am not good programmer) to control modules quality attached to this web and check out the code for malicious things. That's all.1 point
-
Probably I don't have any rights to comment how far PW came since I started using it from the version 2.x. Of course it is hard to balance and I perfectly know what is mixing MVC and framework and CMS. If they ever listened me (in that time I came from the country which had bad reputation for leading the war against neighbors) Joomla! would stay on top of WordPress. For years Joomla! didn't do anything about SEF URLs and it costed that CMS so much. And it was so small effort and thing to do. Please, think about it. Now, for two years I didn't touch any other CMS except PW and I am very very happy like never before and I am not developer.1 point
-
1 point
-
Woah... Well... I don't use this word that often but... this is insane. In a very good and positive way.1 point
-
It will be free, open-source, like other starter tools out there.1 point
-
For the last couple months, I've been working on a module that does exactly this. It's not a site profile, it's not a theme. I don't know what term would accurately describe it, but its a ProcessWire module that's an opinionated, update-able starting point, oriented towards developers, and brings in a bunch of boilerplate like: an installer that will create fields, templates, pages, hannacodes; it runs through a thorough check before doing anything that may result in an error (module installation errors are aggravating; i'm testing it very thoroughly) the installer will rename your 'templates' dir to something temporary, and then copy a starting 'templates' folder that's prepped for the module (you should only do this on dev) if you try to add it to an existing site with a bunch of data, it will work as long as there are not collisions in some fields and templates; if there are, the module won't install and tell you what you need to change around to allow it to install establishes some new $config variables ('env', 'disableTemplateCache', a few others) built with UIkit 3 in mind, but not hardcoded to it a menu builder based on Repeaters with its own Process Module has its own seo+og+twitter+sitemap metadata fields and uses Profields FieldGroup since that is the best module for handling such a grouping has it's own templates inside the module which can be used, or overridden in /site/templates/; this includes blog sitemap.xml maintenance search in addition to template files being able to be overridden, partial files can be overridden too! some module configuration fields (site_name, maintenance, etc.) the module has documentation and other statistics built into it for easy reference takes full advantage of setting() and markup regions; applies attributes like UIkit 'uk-grid' and other data attributes without "touching" the html; keeps the module flexible and easily allows you to rip out UIkit and swap it for another CSS framework (Bootstrap 4); you'll never need to touch edit the _main.php file because of how regions has been set up has it's on RepeaterMatrix fields with boilerplate matrix-types (headline, text, slideshow, etc. etc.); if the user makes new custom matrix types and a later version of my module brings in a new matrix-type, it will update the RepeaterMatrix field and merge it correctly (tricky to do!); the matrix types use many of the same base fields, thereby allowing you to switch from one matrix type to another without data being destroyed (this was only possible as of 2 weeks ago with the new matrix update) to avoid creating a bunch of 1-off fields for the matrix field for block configuration, it uses the new and quite amazing Mystique fieldtype in a unique way (this was tricky to do); this module is critical to establishing a page-builder that is clean (this was only possible as of April 2019 since the module is brand new) brings in PW's debugger to the frontend (brings in jQuery UI); can be disabled all field and template names don't use any prefixes; this would allow you to dump the module one day in the future if you don't like it, without having a bunch of field and template names that sound too specific to the module Laravel Mix based asset compiler pre-configured with UIkit works with FormBuilder and other modules I often use; works and may require certain Pro modules; eliminates the need for any modules that do blogging, menu building, sitemap, maintenance or seo since this module does it using native ProcessWire login/logout/account/register templates it may include a 'collection' generator for common things like events, products, people, properties, along with some templates for those. don't like the templates my module provides? then just create your own template file in /site/templates/the-template-file.php which will override /site/modules/my-module-name/templates/the-template-file.php Right now I just started building a few sites with it (spent the last 2 months developing it) which will hammer it out further. I will release it late summer, early fall.1 point
-
Just a note, better to update the recipe code to: if($page->template=="admin" && $page->parent->id==2 && $page->name=="settings") $input->get->id = $pages->get("/settings/")->id;1 point
-
In case anyone should need it, this still works with the latest UiKit Theme, just replace the jQuery selector with: $(document).ready(function(){ $('#pw-masthead .pw-primary-nav').append('<li><a href="https://example.com/" target="_blank">Example</a></li>'); }); Or @Jonathan Lahijani's recipe for a less quick & dirty approach: https://processwire-recipes.com/recipes/create-custom-admin-settings-page-link-in-admin-menu/1 point
-
Go to Modules > Core > AdminThemeUiKit. You can choose the Gravatar option or you can edit the user template to add an images field which can be used for manually added images. Remember that the user template is a system template so you need to go to Setup > Templates > Filters > Show System Templates.1 point
-
I would also like sqlite for reasons of easier local development and portability.1 point
-
You can change label field globally in the setting of ProcessPageList module - {title} | {template.name}1 point
-
Although I don't believe this is would be coming any time soon, I'd just like to leave a note here that I would really really really enjoy sqlite for processwire very much. It would be so much easier to handle and synchronise smaller sites just by version controlling the files of the project. *sigh* ... could the FileCompiler offer a new approach on creating a universal compatibility especially for 3rd party modules?1 point
-
as there is really no difference between those two modules it's definitely better to stay with robin's version. thank you @Robin S for your hint to ->add()1 point
-
I also hate empty paragraphs so gave this a try. Works well for me. This is an interesting one. There is a setting, but it doesn't work as intended. With the help of Tracy Debugger I did a bit of investigating as to why but haven't got to the bottom of it yet. The line intended to replace empty paragraphs in InputfieldCKEditor is this: $value = str_replace(array('<p><br /></p>', '<p> </p>', '<p></p>', '<p> </p>'), '', $value); But it doesn't match the empty paragraphs because $value has already passed through HTML Purifier where gets replaced with some mystery space character. So neither 'nbsp;' nor ' ' match the space character between the paragraph tags. I haven't been able to work out what this space character is because it's rendered like a normal space in the variable dump. --- Update: the mystery character is a UTF-8 encoded non-breaking space character. So the code above should instead be: $value = str_replace(array('<p><br /></p>', '<p> </p>', "<p>\xc2\xa0</p>", '<p></p>', '<p> </p>'), '', $value); Double quotes are needed around the string with the UTF-8 non-breaking space. I'll submit a pull request for this fix.1 point
-
Hi JoshoB I think you need to escape your '/' characters. Could you try this and let us know if it works; $pattern = '#<p[^>]*>(\s| |<\/?\s?br\s?\/?>)*<\/?p>#';1 point
-
Oh yes! This would be downright amazing. Because convenience.1 point
-
Uh, yeah... I'm really interested in what we will end here Btw: There's a good readup about its implementation limits https://www.sqlite.org/limits.html1 point
-
I think there's no problem with shared hosting involved here. But: - A big advantage using SQLite is moving/replicating a site to a different server/domain (you name it). - Also updating to new contents is a matter of replacing one file (the .db file itself, without the need of messing with a server). - And last, not least, it's pretty convenient in a development environment, since you can run your dev-tools without cluttering your local backend with databases. just my 0.021 point
-
I have to say, I have not had a problem with MySQL/MariaDB on proper business shared hosting, which is very cheap these days. It is worth using caching where you can and I bung most sites through Cloud Flare (just the free version) and that helps a bit. I can't see me using SQLite in a hurry. Strangely, where I have had the odd MySQL slowdown, it has turned out to be me ... (Embarrassed cough)1 point
-
This sounds a bit shizophren to me: clients want to have a powerful and great website but are not willing to pay 10$ per month for a good working shared host? This is similar to people that buy a big windows machine for 2.000+ with viodeoadapter(s) that cost 500 per unit. Buy games that cost (I don't know) but want to save 29,95 for a commercial Antivirus-App. --- And also with this sluggish shared hosts you will run into other serious problems like not enough memory for php (when it comes to image manipulation), very restrictive settings or using a not well configured apache with php as fastcgi (wath is in fact the opposite of fast), etc. etc. It doesn't depend on the DB alone, so what will be next that would be great to build into PW to _help_ the clients save 5$ per month?1 point
-
+1 Using SQLite would be the killer for PW (at least for me). Any info *IF* this will ever happen? thx andy1 point
-
I think a sqlite compatibility would be fantastic for smaller sites. It is so common to be working on a client's shared host to find mysql running painfully slow. In contrast, sqlite will respond instantly. Drop http://getcockpit.com/ into a sluggish shared hosting environment and watch what happens.1 point
-
I'm new to PW and just creating my first website using it, but was courious if I could use SQLite. The reason is deploying websites would be much easier and faster (no database setup required). For small websites it would be perfect, just copy & paste and you are ready. It would then compete with ie GetSimple CMS with simplicity of deployment (that I found about from this forum) but would be much more powerful. And great for having very fast to deploy templates. I believe a lot of people that are creating html templates, having no PHP/MySQL skills, could use it, as it would be so easy and fast to do. Some slogans from other CMSs that could apply to PW then: "add content management to any site in five minutes" "just copy to server and start using" I see that WolfCMS had support for SQLite as a plugin and now it has been bundled with the core. I am not knowledgable about PDO, just read little bit about it, but maybe it would be good idea if it was possible? It would support many databases and be more future proof?1 point
-
I would like PW to run with MongoDB. Just kidding1 point
-
SQLite has some advantages over MySQL, such as: 1. Lower memory footprint 2. No need to have a dedicated server process running. 3. Easier deployment: no need to install additional software besides PHP and Apache. 4. Great for local development (easier setup). 5. Easier to migrate content from the local machine / staging server to the production server and vice-versa (you only have to FTP one file, no need for data migration tools and SSH tunnels). 6. Easier to backup/restore. 7. Easier to configure and maintain (less knobs and dials to finetune). 8. More flexible schema (columns are not statically bound to a specific type) and simpler data types. 9. Has good read concurrency (enough for small/medium websites). And SQLite does support triggers, foreign keys, multi-column and multi-datatype (per column) indexes, constraints, cascade updates/deletions, transactions, and other features (much more than people usually assume). It also has decent performance, if the database is correctly indexed and if the SQL queries follow some optimization rules. Weak points: 1. It's not good for write-heavy applications, as tables are locked when writing. (note 1: most websites are usually read-heavy, and write to the database much less frequently). (note 2: there is a new operational mode for SQLite that allows for simultaneous read and write but I'm not sure if it can be enabled in PHP). 2. Join performance is not as good as with other, more powerful, databases. As for the level of demand for SQLite support, let's see what the community has to say ;-) I just wanted to bring this possibility (of SQLite as an alternative) to your awareness, so that if the community starts asking for SQLite, you will be able to reply "Perhaps" instead of "Not possible". Regards1 point
-
I'm using SQLite for my own programming, it's a very nice little tool. Wouldn't hurt to have it as an option, in fact I've been wondering for long why we have to use such a monster as MySQL when 95% and more of the time, something like SQLite would be enough. But that's an extra-work and PW probably a lots of more important stuff to do before thinking to convert to SQLite... What would be nice though is that you keep PW "as compatible as possible" so that one day - when the list of priority improvements my be empty - it will be "easily" possible to adapt.1 point