Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/18/2020 in all areas

  1. I’ve just released the first version of the ProFields Combo field and it’s now available for download in the ProFields support board download thread! Rather than writing a long post today, I’ve instead focused on writing the Combo field documentation. The documentation page includes a lot that you may already know from previous posts, but it also includes a lot of new details that haven’t yet been posted. Please consider this version to be a development/beta version. It’s the first release and hasn’t had a lot of testing yet, so consider it not yet ready for full production use. Though if you get a chance to test it out, please let me know how it works for you. I appreciate any feedback you have. A couple things I haven’t yet tested thoroughly enough yet are exporting/importing of Combo fields or pages using combo fields. I also haven’t done enough testing in FormBuilder yet. So I’d recommend avoiding use of PW’s field or page export/import functions with this, or using in FormBuilder, at least for a few days. By next week I will have tested those things and made any necessary updates. Thanks for reading and have a great weekend!
    7 points
  2. v0.2.0 released, which is a fairly major refactoring of the module with some new features. There are now dropdowns in ProcessTemplate and ProcessField that allow you to quickly jump from editing one template/field to another. There are config options to disable these new dropdowns if you don't want them for some reason, and options to exclude system templates/fields from the dropdowns. The update is available directly from GitHub but unfortunately I am locked out from editing this module in the directory (I've emailed @ryan about it) so v0.2.0 won't show up there until the next automatic update runs.
    7 points
  3. Thanks @Robin S - fantastic as always. I wonder if I can ask a little favour and have it support languages as well? And while you're at it, is there any reason not to also support Setup > Logs and have you thought about Access > Users / Roles / Permissions? I think these would also be useful if you can't see any downsides.
    2 points
  4. An inputfield module that brings EasyMDE Markdown editor to ProcessWire. EasyMDE is a fork of SimpleMDE, for which there is an existing PW module. Inputfield EasyMDE has a few advantages though: EasyMDE seems to be more actively developed than SimpleMDE, which hasn't seen any updates for several years. You can define options for Inputfield EasyMDE. Inputfield EasyMDE can be used in Repeater fields and in custom fields for File/Image fields. Inputfield EasyMDE EasyMDE (Easy Markdown Editor) as an inputfield for ProcessWire. EasyMDE is a Markdown editor with some nice features, allowing users who may be less experienced with Markdown to use familiar toolbar buttons and shortcuts. More information is at the EasyMDE website. Installation Install the Inputfield EasyMDE module. Usage Create a new textarea field, and in the "Inputfield Type" dropdown choose "EasyMDE". Save the field and if you like you can then configure the EasyMDE options for the field as described below. To convert Markdown to HTML you can install the core TextformatterMarkdownExtra module and apply the textformatter to the field. Alternatively you can use $sanitizer->entitiesMarkdown() on the field value, e.g. echo $sanitizer->entitiesMarkdown($page->your_field_name, ['fullMarkdown' => true]); Configuration On the "Input" tab of the field settings you can define EasyMDE options for the field in JSON format. Refer to the EasyMDE documentation for the available options. Keys in the JSON must be surrounded with double quotes. Example: "toolbar": ["bold", "italic", "heading", "|", "side-by-side"], "sideBySideFullscreen": false https://github.com/Toutouwai/InputfieldEasyMDE https://processwire.com/modules/inputfield-easy-mde/
    1 point
  5. @androbey Just tested it on a fresh install. it is indeed broken ? I assume some update has changed how the admin stuff works? I will try and fix it over the weekend for you guys
    1 point
  6. @BitPoet Fantastic, thank you. I guess you mean the flushing of a namespace regarding the SCAN with DEL/UNLINK operations? Hmm, I wonder if we could keep either a hash or set for all the keys within a namespace, then flushing the namespace could become something like a lua EVAL that iterates the hash/set doing the deletes and then empties the hash/set as one atomic operation without a load of network traffic. Will have a think about it, it's been years since I did any Lua scripting in Redis.
    1 point
  7. Built into the dev branch at https://github.com/BitPoet/CacheRedis/tree/dev are storeFor() / fetchFor() / deleteFor(). I'm not a thousand percent sure how reliable this is in large environments, since this uses SCAN and UNLINK to iterate with a wildcard over all keys in the namespace and deletes them asynchronously. You can pass TRUE as the third parameter to deleteFor to force synchronous deletion, but SCAN may at (rare) times return incomplete results anyway. Needs at least redis 2.8.0.
    1 point
  8. I think they don't. ProCache bypasses PHP. @B3ta Why don't use cookies for that?
    1 point
  9. @netcarver Here's details direct from PHP manual: https://www.php.net/manual/en/intro.pcntl.php It certainly doesn't recommend PCNTL be enabled for a web server environment. In the user contributed notes, there is a comment about undefined functions which matches what I was experiencing.
    1 point
  10. @Kiwi Chris I think it may be the file compiler as it seems to be translating the module so that PHP is looking for pcntl_signal() in the processwire namespace, hence the line from tracy: "ProcessWire\pcntl_signal()". It's also telling you where that line occurs. I've not used Tasker before, but I'm guessing you can edit that line and wherever you see "pcntl_signal()" being called, just prepend it with a backslash "\" character to put it in the global namespace. Doing so may reveal more errors about pcntl functions - but if that's the case, we know we are on the right track and you can do the same to them as they appear.
    1 point
  11. Access > Users is already supported as a variation of Page Edit. For the other ones you mentioned if they were to be supported I'd want to do that as some generic method that uses the flyout menu JSON. I'll take a look at that in the new year.
    1 point
  12. Well, hello somebody! Look at what I've stumbled upon ?. Tailwind Starter Kit A beautiful extension for TailwindCSS. Tailwind Starter Kit is Free and Open Source. It does not change or add any CSS to the already one from TailwindCSS. It features multiple HTML elements and it comes with dynamic components for ReactJS, Vue and Angular. Yes and vanilla JS as well! (currently, 16 dynamic components.). License: MIT GitHub: https://github.com/creativetimofficial/tailwind-starter-kit Site + Demos: https://www.creative-tim.com/learning-lab/tailwind-starter-kit/ A tutorial on YouTube. I haven't dug in deep yet (e.g. purge/tree shaking, etc). @Jonathan Lahijani. What do you think? ?
    1 point
  13. FYI, there is an open issue on this topic: https://github.com/processwire/processwire-issues/issues/1116 Here is a hook you can try in /site/init.php: $wire->addHookAfter('ProcessPageView::pageNotFound', function(HookEvent $event) { $url = $event->arguments(1); $pages = $event->wire()->pages; // Explode the URL to pieces, with an upper limit of 10 $pieces = explode('/', trim($url, '/'), 10); $redirect_page = $pages->newNullPage(); $segments = []; // Find closest real page, utilising PagePathHistory while($pieces && !$redirect_page->id) { $segments[] = array_pop($pieces); $path = '/' . implode('/', $pieces) . '/'; $redirect_page = $pages->getByPath($path, ['useHistory' => true]); } // If a page is found and the page's template allows URL segments // then redirect to it, adding back the potential URL segments if($redirect_page->id && $redirect_page->template->urlSegments) { $redirect_path = $redirect_page->url . implode('/', $segments) . '/'; $event->wire()->session->redirect($redirect_path); } });
    1 point
  14. I was thinking: "Ideally you would be able to drop all images in a repeater field, and it would a repeater page for each image, and upload each of them to a predefined field in that repeater"... then I just decided to google for it, and found this https://processwire.com/modules/repeater-images/ I'm surprised that I never came across this module by @Robin S, but it looks just awesome ?
    1 point
  15. ServerPilot is a cool service and deserve a word here. I know this service because of @Macrura and I never get out. Thanks dude ! You buy a dedicated server, attach it to ServerPilot and you get your server up in minutes, he will get updated without any intervention. You will get the right stuff, updated with every last software and dependencies version, patched, without "any" security hole. I even some at the start tried to hack the server with no luck, I had to make a vulnerability myself to get into ? no really you get all needed architecture, like app isolation and more with security in mind. And if you know what your are doing, you can install any software you want, do any ninja command or add any config through SSH. You will also like their support lol, full of experienced geeks veterans. That's all, this was my 10$ spam for today ?
    1 point
  16. For anyone who is interested in integrating tailwind inside a processwire project here is a little walktrough based on my workflow. This little guide is based on Tailwind 1.9.6 (latest before 2.0 release) because some PostCSS library I use are still not compatible with 2.0 version (not a big deal, really). You can find the necessary files here. - Place package.json, tailwind.config.js, postcss.config.js inside your template folder. - Create a "pcss" folder, and make a structure like this: pcss ├── inc │ ├── colors.pcss │ ├── fonts.pcss │ ├── media_queries │ │ ├── lg.pcss │ │ ├── md.pcss │ │ ├── sm.pcss │ │ └── xl.pcss │ └── sitewide.pcss └── kickstart.pcss Now you got everything to get started, let's have a look at the files: package.json Inside "package.json" you have different dependencies I've installed to mimick my "old" scss workflow (importing, nesting, etc..), the important part however is the script section: "start": "npx tailwindcss build pcss/kickstart.pcss -o css/dist.css", "watch": "npx postcss pcss/kickstart.pcss -o css/dist.css --watch", "build": "cross-env NODE_ENV=production npx postcss pcss/kickstart.pcss -o css/dist.css" "start" is the bootstrap script you have to run at first, to let node compile tailwind as a whole. Do it at the beginning of the project or everytime you make some changes to "tailwind.config.js" Change the name of your pcss files accordingly (I've used pcss as an extension, but css would work perfectly fine) "watch" is the next script you have to run in order to have live reload of your stylesheets. "build" is the script you have to invoke once you are ready to deploy to production (you need to specify your purge rules inside postcss.config.js, keep reading.) tailwind.config.js Here you can specify your tailwind configurations, read the docs here. One thing to notice inside mine is that I've set purge: false because I prefer to configure the purge part inside a dedicated file, which is: postcss.config.js This file is responsible to handle postcss options, and purge is one of them. The paths you declare inside the content array are the ones whom will be scanned and purged eventually. Mine could be different than yours, so pay attention. The whitelistPattern array is useful when you want to exclude some classes from the purge phase, below I'm excluding the ones whom starts with "fff-". ... content: [ './*.php', './inc/*.php', './fields/*/*.php' // etc. ], whitelistPatterns: [ // Pattern to exclude during extraction /^(fff-)/ ], ... The other settings are pretty explanatory (cssnano is used in production for minification). As a final note you'll notice that every pcss file I use starts (and ends) with: /* purgecss start ignore */ css... /* purgecss end ignore */ Those tell purgecss to ignore completely the file, since I know I want to retain every rule/class I write in there. If you got everything setup correctly you can start having fun ? Run: npm install then: npm run start and finally: npm run watch Hope this little "guide" could enlighten in using Tailwind ?
    1 point
  17. Sounds like your site_header_banner field allows more than one image. That's probably why it's returning directory path instead of image URL -- it doesn't know which image you want to output. Try altering that field to only allow one image (via field settings) or try doing this instead to get URL for first image in that field: <img src="<?php echo $pages->get("/site-settings/")->site_header_banner->eq(0)->url ?>">
    1 point
×
×
  • Create New...