Jump to content

Kiwi Chris

Members
  • Posts

    301
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Kiwi Chris

  1. I've been building something a bit like this. It's not live yet, but you can have a look here: https://test.peloruspeople.org.nz/ It's built on Processwire 3. You'll see a link to subsites on the menu, and each one has different content. I use the restrict admin branch module so that different users can edit different sub-sites. If this is along the lines of what you want, let me know, as I could always export it as a site profile. I was just wondering the other day if it might be useful to other people. I seriously under-quoted on the project, so if what I've done could be re-used, and I could recover some of my development time I'd be very happy. Let me know if what I've done could be useful, and I'll see what I can do. I still have a bit of work to do. The old site was running on a CMS I started on myself before Wordpress was even a thing, so there was all the content to import and update. Processwire makes working on site functionality so much easier, and it's nice not having to worry about trying to maintain the core CMS.
  2. Thanks. That looks like it's exactly what I need. I'll test it to see how it works with Processwire 3.x, but hopefully it will work fine. It doesn't seem to be in the official modules directory, so that might be why I missed it. I can use the Site Profile Exporter module to set up my own site profile with the module included.
  3. Marlborough Camera Club Originally this was a site built in Concrete 5 that I inherited when the previous webmaster became pregnant. It was horribly slow, and very hard to edit without making mistakes. I kept the existing theme, but converted the whole site to Processwire, resulting in a massive improvement in performance, and the ability to delegate authority for editing parts of the site to other club members. Not publicly visible, but another feature I added was an competition entry form that integrates with Dropbox so instead of having email entries, frequently with errors, they could enter directly via the site.
  4. Thanks, I'll have another look at that module. Last time I tried, I didn't seem to be able to get it to work, but it looks as though it's been updated since. If I'm reading the description correctly, it's not quite what I'm looking for although it's a step in the right direction. Some editors might have responsibility for more than one branch of the tree, so restricting to just a single branch isn't ideal. Rather than restricting a role to a specific branch, it would be more useful to assign a role(s) to a branch, so that a given role can have access to multiple branches if necessary.
  5. I'd really like Processwire to have a robust page based permissions system rather than just template based out of the box. If the page tree is compared to a file system, it would be nice to be able to set owner (user), group (role) and public permissions on a page and have this propagate to sub-pages unless explicitly over-ridden. With a large site, it's quite possible to have multiple sections that use the same templates, but where editing needs to be assigned to different people, for different parts of a site. I've seen some proofs of concept that have never been updated or maintained, so I'm sure it can be done, but this is a bit of a show-stopper for me with an otherwise excellent CMS. I might be able to have a go at something myself, but since this is security related, and I haven't had a go at module development before, it would be really handy to have something robust that just works.
  6. the FormTemplateProcessor module generally works well for what I need it for, but when it comes to FieldTypeOptions, fields, the index is what shows up when emailing a form. I've tried the following, but it doesn't fix it: if($field->type instanceof FieldtypeOptions){ $value = htmlentities($this->contact->get($field->name)->title); }else{ $value = htmlentities($this->contact->get($field->name)); } In documentation for FieldTypeOptions is says that it's possible to assign a value like this: 1=value|label Even if I do, I don't seem to be able to get the value to display, and only the index number is returned in the email whether I use $this->contact->get($field->name)->title or $this->contact->get($field->name)->value Where am I going wrong?
  7. I guess it's testament to how well documented and easy to use Processwire is that I've been using it for a bit over a year without having to ask for help, after I had to use it for some contracting work, but this is the first time I've needed to modify a module so, here's my scenario: The FormTemplateProcessor works well for me in that I can allow set up of fields via the UI, and allow submission by email, but I'm thinking I'd like to make it resistant to spam. After reading up discussion on the evils of captchas and alternative methods, I thought adding a honeypot seemed like the best solution. So far so good. In the template that displays the form, I've got this: //Set notABot when user visits home page, as most normal user would before they go to form. if ($session->notABot) { ... } That works fine, but just in case there's a bad bot that crawls the site, I've also added this in the body of the template: <script type="text/javascript"> $('#wrap_Inputfield_robots').hide(); $('#Inputfield_robots').val('<?= $session->spamCheck ?>'); </script> $session->spamCheck is a random string generated when a visitor visits the site home page. It wouldn't be hard to make #wrap_Inputfield_robots a user selectable field something like $page->honeypotField What I'm trying to work out how to do is to get the FormTemplateProcessor module to check whether the field #Inputfield_robots refers to matches $session->spamCheck either in the ___sendEmail function, or better yet, in the ___render() function so $this->sendEmail($form); never gets called at all. Beyond just getting it to work, I'd like it to be as flexible as possible, so that in the template, when it's possible to do something like: $form->spamCheck = $page->hiddenFieldName $form->email = $recipient->email; so it's possible to specify if you want to have a hidden field or not, and what field should be used. I can probably work it out, but I'm feeling tired, so thought I'd ask, and also make it known how much I appreciate Processwire.
×
×
  • Create New...