Leaderboard
Popular Content
Showing content with the highest reputation on 02/20/2018 in all areas
-
Hey all, A while back I was trying to get Processwire working on the Homestead vagrant box - a really handy vagrant box made by Taylor Otwell (Laravel creator). One cool thing about homestead is it has its own config file where you can set 'path maps' which map a folder on your computer to the vagrant box, and then also set up hostnames. So for example you can set up 10 domains pointing to different locations on your machine, making it a nice all in one vagrant development box for your sites. One thing it didn't do was support processwire. The way it works is it uses setup files for each site, and you can specify things like a site to use nginx, a site to use apache, etc. So to get round this I wrote a custom setup script for it to get processwire working, and it works really well. I've put it up on github should anyone else find it handy, it's a pretty simple little script and is based on the Laravel one included in Homestead. Hopefully it'll be useful to someone out there You can grab it here: https://github.com/rickmills/homestead-processwire7 points
-
Hi @Ivan Gretsky Sound good to me, look like I have some work to be done! Tables are simply dropped if they exist.4 points
-
Yes, do not hesitate to share your result, try to make your best and we will try to send a Pull Request on Github ✨ PS: I forgot to send my post. I modified the module to bypass confirmation, if you wanna try and report back, rename your LoginRegister folder to .LoginRegister, then extract the zip in place of the original one in site/modules, refresh modules and check the box in the module's admin. File : LoginRegister.zip4 points
-
Yep, well took a bit longer reading the doco, experimenting etc and my site was already live. Now I know how to do it, will only take 15 minutes next time. Steps: Create your icons. I only had up to 256x256px. That's old hat. Now you need up to 1024x1024px. Decided to go with my existing website/app icon set anyway. Go to http://www.manifoldjs.com/generator and fill in the blanks Generate the files, download the kit, edit the files and/or your PW template(s) required and upload to the root directory, not /site/ directory, of your ProcessWire site Woohoo!!! Works great with a couple of provisos: The online builder does not work for Mac, iOS and Windows 10 devices, only everything else. Found it somewhat ironic it lacks Windows 10 support as this is a Microsoft product. No surprises there! For Mac, iOS and Win10 you have to use the PWABuilder CLI, almost formerly ManifoldJS CLI as it's going through a name change. Would be ever so grateful to anyone who can tell me how to do that. Followed the instructions to the letter, and also multiple variations, and could not get the CLI version to install/work and I definitely have the latest versions of Node and npm. PWABuilder delivers a manifest.json file and a couple of basic service workers, without all the fuss associated with SPAs, REST APIs etc, for small, informational websites. Watched a video recently that amongst other things, stressed PWA != SPA. Took me a while to get that. (Tip: skip the ads) While not yet perfect, PWABuilder was a good introduction for me to PWAs for ProcessWire.3 points
-
Yes it was planned to be done in first instance trough FTP protocol. Horst had give me some code to work with but since 2 months I am so busy with my works that I didn't found the time to try it. But this feature is definitely on the top of the todo list.3 points
-
Good day, @flydev! It's been a while science beta testing phase. Really glad the module is now released and gathering all the attention it deserves! May I propose a little enhancement that seems reasonable to me and just may be of use to others? I am using Duplicator to quickly create a local dev environment for a site (just not to practice cowboy coding straight on the server). When I do so the installer overrides the db settings in config file. It seems like there is not an option to later copy a locally produced package back to production and replace the installation from the admin. One has to remove all the files (and probably drop all the tables in the existing database) and run the installation "from the clean slate". And one has to remember and fill the production db credentials. Bit we could have an option to put the db credentials in the config-dev.php file instead (for local installation) and another one to remove config-dev.php from the installation if needed (for "back-to-production" installation). P.S. While writing this I realized I do not really know what happens to the existing db tables if the db is not empty. Are the being dropped?3 points
-
A few more enhancements: It now handles local links with query string parameters - the stored link is still converted to a page ID with the query string appended. You can now also paste full http(s) links and if these are local links, they will be converted to a page ID and a local link will be returned when the value is requested.3 points
-
I am happy to present you the first processwire powered page i made for a client. Some more in the pipeline, but on hold because of missing content on the client side Big thanks to this helpful and great community!! https://feuerwehr-gimbsheim.de/ my own site webgestaltung.net is online for a while already, but not holding much content yet.2 points
-
Thanks for the feedback @gmclelland - I don't have the need (and therefore the time) to look into the multilanguage side of things right now, but if others want to contribute, I am happy to maintain this fork going forward. Perhaps if we could get @wumbo to chime in to confirm he's no longer to going to support this, I could point the entry in the modules directory to my fork? PS - I just emailed him via the address listed on his Github profile and it bounced and it's the same address he has used in his PW modules directory account. I don't have access to check the email for his forum account, but I am guessing these notifications are probably bouncing too. I don't really feel right switching things out without his permission, but also not sure how to move forward - anyone have any thoughts on this? I think maybe PW needs a policy on this, because it's bound to happen again with other modules. PPS - I found another email address for him, so hopefully I will hear something soon.2 points
-
Hi Jester and welcome to the forum, not sure what could be the issue, but I guess it would help if you provided more infos for us. What steps did you take (sometimes writing down the steps already leads to an "aha" moment )? What is working (I guess the admin works just fine as you say you tried changing settings), what is not? Maybe add some screenshots? Maybe look into the error logs of your site (/site/assets/logs/...). And my #1 developer tip: Install Tracy Debugger and see if it shows you anything helpful2 points
-
Do you see any chance to restore a site from the package from admin, @flydev?2 points
-
Well, I am using this field for the first time and really wanted this functionality, so decided to fork the module here: https://github.com/adrianbj/processwire-fieldtype-assisted-url It doesn't look any different from the users perspective, but on save/sleep it stores the page ID instead of the url and then on wakeup it converts to ID back to the URL. This means that you can now move a page to a different parent, rename it, etc and the link URL will be automatically updated. It doesn't look like @wumbo is still active around here, so not sure if this will make it into the main version of the module, but it's there if others want it.2 points
-
FYI: https://make.wordpress.org/core/2018/02/19/proposed-roadmap-tools-for-gdpr-compliance/ I think It is worth keeping an eye on how the WordPress guys are trying to tackle all this.2 points
-
It's just occurred to me that this opens up a lot of possibilities for getting dependent selects to work in situations where they otherwise wouldn't. Inside repeater items, or doing things like what you are trying to do @Zeka. You can hook before ProcessPageSearch::executeFor and manipulate the values in $input->get to make up whatever selector you want. Or alternatively hook after and manipulate what is returned in the matches array. To only affect requests coming from a dependent select you could look for the presence of limit=999 - not sure if that's used in other calls to the method though.1 point
-
I'm pretty sure this part won't work. The value of the input in a Page Reference inputfield is an ID (or IDs for a multiple Page Reference field). That is what gets passed to the selector to find selectable pages for the dependent Page Reference field. So "page.product_shop_categories.name" is going to translate to something like "1234.name" which isn't going to work. If you want to debug this some more you can hook ProcessPageSearch::executeFor, which is what the dependent selects JS calls via AJAX. For example: $wire->addHookAfter('ProcessPageSearch::executeFor', function(HookEvent $event) { $get_vars = $this->input->get; $return = $event->return; $decoded = wireDecodeJSON($return); bd($get_vars, 'get_vars'); bd($decoded, 'decoded'); });1 point
-
New version: 1) Adds a new option to "Allow Letters in Input" which is to support companies who like to publicize their phone number using letters, like: 1800-CALLNOW - the default is for this to be off so validation still checks that all are digits, but with this on, you can also enter letters. 2) Has some tweaks to prevent a component suffix from displaying if there is no value for the next component.1 point
-
Well, a little code would be useful. Is this in a regular frontend template, or inside your custom module? WIthout seeing some code, it's hard to say why you're not able to do a loop...1 point
-
Try the MathJax CKEditor plugin https://sdk.ckeditor.com/samples/mathjax.html https://docs.ckeditor.com/ckeditor4/latest/guide/dev_mathjax.html it should even be available with AdminOnSteroids (a highly recommended plugin with tons of tools, extras, helpers, customization options etc.)1 point
-
Thanks for doing this @adrian. I use it. To me that was the one main missing feature of this module. I think other people have also asked for multilingual support, but maybe that can be fulfilled with https://github.com/ryancramerdesign/FieldtypeURLLanguage in combination with this module?1 point
-
I just made a quick search and found this one - could be an easier replacement to ftp. But could we make the 1st step even simpler - not care about the uploading side at all. Say we want to restore something already on the server, be it the package created on the server in the 1st place or uploaded via on-server file manager of ftp. And only provide the facility to kill the current installation and launch the new one from the backup?1 point
-
No problem dude, feel free to ask, it will be benefit for other people too. And you was close ? Try this : wire()->addHookBefore('LoginRegister::createdUser', function($event) { $u = $event->arguments[0]; // get user object $mail = WireMail(); // no keyword 'new' $mail->subject('Welcome to our website'); $mail->to($u->email); $body = "<p>" . "Welcome to our website " . $u->name . "</p>"; $mail->body(strip_tags($body)); $mail->bodyHTML($body . "<p><a href='$this->page->url?profile=1'>" . $this->_('Your Account') . "</a></p>"); $mail->send(); });1 point
-
I think that's one of the biggest challenges I face and practically impossible to retrospectively remove data. As an example of the digital footprint user data can have, here's a good example of the headache involed. server backs up a copy of a site. gets uploaded to dropbox which stores multiple archived versions of backups my NAS syncs with my Dropbox account and downloads the same backup. NAS does both snapshots and incremental backups NAS also backs up backups to Amazon S3 and/or amazon glacier My own Mac runs CrashPlan or Syncplicity or Time Machine That's not even considering the backups my host is doing internally :-/ If I had a request from a clients customer to remove their data from the database it'd be a real challenge to perform this thoroughly. I'll probably look at stream lining my backup strategy but we loose a certain amount of redundancy in the process. Reading the GDPR guidelines and the part about anonymising user data I'd love to see this a priority with Processwire. Maybe Formbuilder gets some way of collecting data but that data is only visible to logged in users. Having a compromised database would reveal nothing. Maybe when creating a field called FirstNam there's a new setting which would anonymise the entries to anyone without the proper permissions.1 point
-
Just wanted to say thanks horst for the awesome work on the module! It has truly been a life saver!1 point
-
1 point
-
Unrelated, but I've been struggling with gif screen capture the whole morning, and your post saved my day. Thanks.1 point
-
Hi Netcarver, Currently, I am still unable to break that limit or 2800 repeats of an event. Even so, that is a long time: Example Recurring Time: Daily = approx. 7.5 years Weekly = approx. 53.5 years Monthly = approx. 233 years Yearly = approx. 2800 years I am working on a copy of recurme with a revised interface but it is nowhere near complete. The current exclusion works ok for 99% of the use cases. Although I do agree that it could be GREATLY improved. I would like to focus on fixing the more pressing bugs before releasing any huge changes to the interface.1 point
-
Thanks for sharing. I watched the entire video (no ads though... don't you use ad-blockers?). So... if you say that tool installs a couple of basic service workers. What exactly do they do? Enabling offline mode? Push notifications? "add to homescreen"?1 point
-
When $config->debug is true, you can read all fieldnames when hovering the arrow in the top right of every field. This is possible with plain PW.1 point
-
There is currently a discussion with code examples from @BitPoet going on here in the forums withexact that point. Have a look into the security thread. I'm on mobile and not comfortable enough to find and paste the link. But it is only 1-3 days ago.1 point
-
@godmok and @szabesz - well that took way too much time It's very rough, but please test the new version on the dev branch: https://github.com/adrianbj/FieldtypePhone/tree/dev This new version has lots of breaking changes, so please don't update an existing site. You'll need to uninstall and reinstall to get the new format for the default formats to show. You could I guess copy/paste them in from the module code to that field if you have data already that you can't lose. Format options now have a proper name associated with them, so if you change the pattern for a format, it should update the output everywhere. Also, you can now see exactly how each format will look based on the pattern, rather than you having to enter that in a comment at the end. When defining formats, follow this format. The category headings are optional. The key things is: name | pattern Now you can also call these formats separately from the API regardless of what the selected output format is. You can call like this: $page->phone->australiaWithCountryAreaCodeNoLeadingZero1 point
-
If you are in a function or a loop you can put those negative conditionals first and "return", "continue", or "break" - this can help to reduce nesting.1 point
-
» A more exhaustive version of this article is also available on Medium in English and German « First, we'd like to thank the very helpful community here for the excellent support. In many cases we found guidance or even finished solutions for our problems. So a big THANK YOU!!! We are pleased to introduce you to the new Ladies Lounge 18 website. The next ICF Women’s Conference will take place in Zurich and several satellite locations across Europe. We embarked on bold new directions for the development of the website — in line with the BRAVE theme. Ladies Lounge 18 — ICF Woman’s Conference website on Processwire ICF Church is a European Church Movement that started 20 years ago in Zurich and since experienced tremendous growth. There are already well over 60 ICF churches across Europe and Asia. ICF is a non-denominational church with a biblical foundation that was born out of the vision to build a dynamic, tangible church that is right at the heartbeat of time. With the growth of the Ladies Lounge from a single-site event to a multi-site event, the demands and challenges to the website have also increased. A simple HTML website no longer cuts it. Simplified frontend Our goal with the development of the new site was it to present the different locations — with different languages and partly different content — under once uniform umbrella — while at the same time minimising the administrative effort. In addition to the new bold look and feel, this year’s website is now simpler and easier and the information is accessible with fewer clicks. Some highlights of the new website Thanks to processwire, all contents are maintained in one place only, even if they are displayed several times on the website 100% customised data model for content creators Content can be edited directly inline with a double-click: Multi-language in the frontend and backend Dynamic Rights: Editors can edit their locations in all available languages and the other content only in their own language Easy login with Google account via OAuth2 Plugin Uikit Frontend with SCSS built using PW internal features (find of files…) Custom Frontend Setup with Layout, Components, Partials and Snippets Only about 3 weeks development time from 0 to 100 (never having published a PW before) Despite multi-location multi-language requirement, the site is easy to use for both visitors and editors: The search for a good CMS is over It’s hard to find a system that combines flexibility and scope with simplicity, both in maintainance and development. The search for such a system is difficult. By and large, the open source world offers you the following options: In most cases, the more powerful a CMS, the more complex the maintenance and development It is usually like that; The functionality of a system also increases the training and operating effort — or the system is easy to use, but is powerless, and must be reporposed for high demands beyond its limits. Quite different Processwire : You do not have to learn a new native language, you don’t have to fight plugin hell and mess around with the loop, you don’t have to torment yourself with system-generated front-end code or even learn an entierly new, old PHP framework . All our basic requirements are met: Custom Content Types Flexible and extensible rights-management Multilanguage Intuitive backend Well curated Plugin Directory Actually working front-end editing Simple templating with 100% frontend freedom In addition, Processwire has an exceptionally friendly and helpful community. As a rule of thumb, questions are answered constructively in a few hours . The development progresses in brisk steps , the code is extremely easy to understand and simple. Processwire has a supremely powerful yet simple API , and for important things there are (not 1000) but certainly one module which at least serves as a good starting point for further development. Last but not least, the documentation is easy to understand, extensive and clever . Our experience shows, that you can find a quick and simple solution with Processwire, even for things like extending the rights-management — most of the time a highly complex task with other systems. This is also reflected positively in the user interface. The otherwise so “simple” Wordpress crumbles when coping with more complex tasks. It sumbles over its apparent simplicity and suddenly becomes complex: Old vs. New — Simple and yet complicated vs. easy and hmmm … easy Our experience with Processwire as first-timers Before we found out about Processwire, we found CraftCMS on our hunt for a better CMS. We were frustrated by the likes of Typo3, WP or Drupal like many here. CraftCMS looked very promising but as we were digging deeper into it, we found it did not met our requirements for some big projects in our pipeline that require many different locations, languages and features. Initially we were sceptical about Processwire because; A. CraftCMS Website (and before UiKit also the admin interface) simply locked much nicer and B. because it is built on top of a Framework It was only later, that we found out, that NOT depending on a Framework is actually a very good thing in Processwire's case. Things tend to get big and cumbersome rather then lean and clean. But now we are convinced, that Processwire is far superior to any of the other CMS right now available in most cases. The good Processwire is the first CMS since time immemorial that is really fun to use (almost) from start to finish— whether API, documentation, community, modules or backend interface. Every few hours you will be pleasantly surprised and a sense of achievement is never far away. The learning curve is very flat and you’ll find your way quickly arround the system. Even modules can be created quickly without much experience. Processwire is not over-engineered and uses no-frills PHP code — and that’s where the power steams from: simplicity = easy to understand = less code = save = easy maintanance = faster development … Even complex modules in Processwire usually only consist of a few hundred lines of code — often much less. And if “hooks” cause wordpress-damaged developers a cold shiver, Hooks in Processwire are a powerful tool to expand the core. The main developer Ryan is a child prodigy — active, eloquent and helpful. Processwire modules are stable even across major releases as the code base is so clean, simple and small. There is a GraphQL Plugin — anyone said Headless-CMS?! Image and file handling is a pleasure: echo "<img src='{$speaker->image->size(400, 600)->url}' alt='{$speaker->fullname}' />"; I could go on all day … The not soooo good Separation of Stucture and Data The definition of the fields and templates is stored in the database, so the separation between content and system is not guaranteed. This complicates clean development with separate live- and development-environments. However, there is a migration module that looks promising — another module, which is expected to write these configurations into the file system, unfortunately nuked our system. I'm sure there will be (and maybe we will invest) some clever solutions for this in the future. Some inspiration could also be drawn here, one of the greatest Plugins for WP: https://deliciousbrains.com/wp-migrate-db-pro/ Access rights The Access-Rights where missing some critical features: Editors needed to be able to edit pages in all languages on their own location, and content on the rest of the page only in their respective language. We solved it by a custom field adding a relation between a page the user and a role that we dynamically add to the user to escalate access rights; /** * Initialize the module. * * ProcessWire calls this when the module is loaded. For 'autoload' modules, this will be called * when ProcessWire's API is ready. As a result, this is a good place to attach hooks. */ public function init() { $this->addHookBefore('ProcessPageEdit::execute', $this, 'addDynPermission'); $this->addHookBefore('ProcessPageAdd::execute', $this, 'addDynPermission'); } public function addDynPermission(HookEvent $event) { $message = false; $page = $event->object->getPage(); $root = $page->rootParent; $user = $this->user; if ($user->template->hasField('dynroles')) { if ($message) { $this->message('User has Dynroles: '.$user->dynroles->each('{name} ')); } // for page add hook… if ($page instanceof NullPage) { // click new and it's get, save it's post… $rootid = wire('input')->get->int('parent_id') ? wire('input')->get->int('parent_id') : wire('input')->post->parent_id; if ($message) { $this->message('Searching Root '.$rootid); } $root = wire('pages')->get($rootid)->rootParent; } elseif ($page->template->hasField('dynroles')) { if ($message) { $this->message('Page "'.$page->name.'" has Dynroles: '.$page->dynroles->each('{name} ')); } foreach ($page->get('dynroles') as $role) { if ($role->id && $user->dynroles->has($role)) { if ($message) { $this->message('Add dynamic role "'.$role->name.'" because of page "'.$page->name.'"'); } $user->addRole($role); } } } if (!($root instanceof NullPage) && $root->template->hasField('dynroles')) { if ($message) { $this->message('Root "'.$root->name.'" has dynamic roles: '.$root->dynroles->each('{name} ')); } foreach ($root->get('dynroles') as $role) { if ($role->id && $user->dynroles->has($role)) { if ($message) { $this->message('Add dynamic role "'.$role->name.'" because of root page "'.$root->name.'"'); } $user->addRole($role); } } } } } With the Droles and Access Groups Modules we were not able to find a solution. I thought it was hard to get absolute URLs out of the system — Ha! What a fool I was. So much for the topic of positive surprise. (Maybe you noticed, the point actually belongs to the top.) But while we’re at it — that I thought it would not work, was due to a somewhat incomplete documentation in a few instances. Although it is far better than many others, it still lacks useful hints at one point or another. As in the example above, however, the friendly community quickly helps here. processwire.com looks a bit old-fashioned and could use some marketing love. You notice the high level to moan with Processwire. There is no free Tesla here. Conclusion Processwire is for anyone who is upset about any Typo3, Wordpress and Drupal lunacy — a fresh breeze of air, clear water, a pure joy. It’s great as a CMF and Headless CMS, and we keep asking ourselves — why is it not more widely known? If you value simple but clean code, flexibility, stability, speed, fast development times and maximum freedom, you should definitely take a look at it. You have to like — or at least not hate PHP — and come to terms with the fact that the system is not over-engineerd to excess. If that’s okay with you, everything is possible — with GraphQL you can even build a completely decoupled frontend. We are convinced of the simplicity of Processwire and will implement future sites from now on using it as a foundation. Links & resources we found helpful API documentation and selectors API cheatsheet pretty handy, not quite complete for version 3.0 Captain Hook Overview of Hooks Weekly.PW newsletter a week, exciting Wireshell command line interface for Processwire Nice article about Processwire Plugins & Techniques that we used Custom Frontend Setup with Uikit 3 and SCSS, and Markup Regions Uikit Backend Theme ( github ) Oauth2 login modules In-house development Login with E-Mail Pro Fields for repeater matrix fields (infos, price tables, daily routines) Wire upgrade to update plugins and the core Wire Mail Mandrill to send mails FunctionalFields for translatable front-end texts that are not part of a content type (headings, button labels, etc.) Runtime markup for dynamic backend fields (combination of first and last name) Tracy debugger for fast debugging Textformatter OEmbed to convert Vimeo and Youtube links into embed codes HideUneditablePages thanks to @adrian1 point