Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by msavard

  1. Is it possible to have a thumbnail for the buttons instead of the name with the + icon?
  2. Thanks for the feedback. I agree on the slider criticism. I designed the internal pages first and then was struggling on what to do on the homepage. The slider was more of a 'fill the space' decision than anything else and I was never happy with it. I will revisit that soon and see what improvements can be made. Feel free to suggest anything if you have any ideas.
  3. Interesting. I know IT blocks our office from getting out to foreign addresses, but I didn't know it went the other way. Thanks for trying to visit anyway. 🙂
  4. You all are such professional designers that I hesitate sharing my site here, but it might show what Processwire can do even for 'average' users. I created this site with Processwire for the County of Ventura's Assessor's Office. It is a redo of the previous site done in ASP that was showing it's age. The goal was to provide a more modern design that would work with desktop or mobile while at the same time providing more features for the taxpayers to access data and communicate with us. While most of the County Government sites use WordPress (or similar) they graciously allowed me to give Processwire a try. I think it performs admirably, is easy to maintain, very fast, and actually fun to work with (most of the time....🙂). http://assessor.countyofventura.org Most of the site is handled by two main templates, one for the summary pages, and one for the detail pages. I also created a 'dummy' template to act as a folder to hold the pages for each category (to make a manageable hierarchy) . This made it easier for me to find things on the back end and mimics the front end nicely. On the back end there are several templates that hold things like forms (pdf downloads), links, glossary terms, frequently asked questions, form responses, and more. All of these are dynamically included into the front facing pages based on their content and how they relate to the individual pages. Fillable forms were the hardest part for me. I tried working with some of the free modules for this sort of thing but I could never wrap my head around them. In the end, I just did it by hand with standard PHP forms combined with using the Processwire API to save the results to the database. It works fairly well but I'm sure there is a better way. A big thank you to everyone on this forum for their help and tips both directly and indirectly, and to Ryan who makes this fabulous software available to us. Any suggestions on the site are welcome.
  5. I just upgraded to the new master and TinyMCE wasn't installed. Isn't it supposed to be part of the master now? I looked in the modules directory on my server and it isn't there. Any suggestions? NEVERMIND: its working now. I had to hit refresh several times in various places. Strange. I never had to do that before.
  6. Ok, good to know. It's probably just easier to use a 'normal' method (CSS & radio buttons or the like). Thanks for the info.
  7. Could you give a more complete example of how to use this on the front end? Do I have to format the input field in a certain way? Does it have to be of type text? number? Do I have to put certain classes on the field to make it do it's magic? Matt
  8. Thank you. That is very helpful. I can see there is a lot of power in using hooks. I'll have to look into those more. I think I will eventually do this as a batch (find all the ones that aren't checked, process them, send an email, etc) but I want to make sure everything is working before I set it loose on it's own (and what type of errors might crop up). I trust processwire, but I don't trust me driving processwire! ☺️ Thanks again.
  9. Oops...I just came across an answer in this post. I spent all day yesterday trying to figure this out and then I find the answer a couple minutes after finally asking the question. 🤦‍♂️ If I use the $page->setAndSave() method then it works. I would still be interested to hear if there is a better way to accomplish this task.
  10. I've spent way too much time trying to figure this out so now I just have to ask. I added an option to the save button when editing a page. What I want it to do is, when clicked, send an email out to the appropriate person, change a field on the page, then save. I have everything working up until the change a value on the page and save. I can't seem to figure out how to do this. I really don't understand what I'm doing. So far the email part works because I just smashed together various bits and pieces from the forums. Here is the hook that adds the button $wire->addHookAfter('ProcessPageEdit::getSubmitActions', function($event) { $actions = $event->return; // array of actions indexed by name $page = $event->object->getPage(); // page being edited // add a new action to process the Change of Address request if // this page uses the change of address template if ($page->template == 'Change_Of_Address' && $page->yes_no == false){ $actions['Process Form'] = [ 'value' => 'process', 'icon' => 'address-card', 'label' => '%s + Process', 'class' => '', ]; $event->return = $actions; } }); And here is the modified code that attempts to change a field value and save the page. I removed all the part that creates/sends the email. $wire->addHookAfter('ProcessPageEdit::processSubmitAction', function($event) { $action = $event->arguments(0); // action name, i.e. 'hello' $page = $event->object->getPage(); // Page that was edited/saved if($action === 'process') { $page->yes_no = true; $pages->saveField($page, 'yes_no'); $notice = new NoticeWarning("This address change has been sent to the appropriate crew."); $notice->icon = 'address-card'; $event->notices->add($notice); $event->object->setRedirectUrl('../'); } }); I get an error on the $pages->saveField line saying: Call to a member function saveField() on null Can anyone offer some help on this? If there is an easier way to do this other than using hooks and adding buttons I would welcome that as well.
  11. Both great ideas. Thank you for pointing me in the right direction. I have so much to learn in the processwire universe!
  12. Is it possible to hide the URL to the various files in the site/assets/files directory from being indexed? For example, say I have a site at somesite.com. I have a PDF file that someone can download at somesite.com/site/assets/files/1376/mypdf.pdf. Is there a way to hide all that and just have the link be something like somesite.com/pdfs/mypdf.pdf? I guess it doesn't really matter, it just looks messy having all those site/assets/files/1075/etc/etc in there.
  13. Thank you for that. It was the perfect solution and very easy.
  14. I attempted to upgrade to the newest master version and once it did so there were a bunch of errors at the bottom of the screen regarding renaming folders (I believe it said access denied errors). It looks like the upgrade was done in a folder called wire-3.0.210 and then it was trying to rename folders to make that the 'real' wire folder. Needless to say, the folder never got renamed and when I go and check for upgrades, it still says an upgrade to 3.0.210 is available. Should I be concerned about this? I've never had this trouble before. It was on my local box.
  15. I'm trying to do something I thought was really simple but I'm obviously having a brain freeze on it. I have a form defined using HannaCode. I want the user to be able to fill out the form and have it be submitted to a PHP processing page for emailing results, etc. I had to put that response page in the root directory of the web server for this to work as Processwire won't let you use any PHP file without getting an error. The processing page is very simple, just for testing. No matter what I use on that page ($mail, WireMail, $pages->find, etc, etc). I get an error about an undefined variable. Am I doing something wrong here? The method for the form is post, the action is the processing PHP page.
  16. Thank you, I was trying this but I was having a hard time giving it a $path that worked. If I give it a path from the root of the server (c:/temp in the case of running on my local machine) it seems to work. I don't want that though as I can't serve that up for someone to download. How can I get a accessible path? Something like /site/templates/files/maps/etc/?
  17. I have a need for users to be able to put in a search term and for Processwire to return a PDF file matching that term. It isn't complicated, if they put in 088 then I need to return a PDF named 088.pdf. My question is, how do I do that in Processwire without having to make a page for every PDF? There will be hundreds of them and they will all be updated each year. Ideally I would like for the file to be served from the file system, not the database. Do I just bypass Processwire for this and use straight PHP? If so, how do I use a processwire template for the look of the site, but use PHP for filesystem access and returning file paths? Thanks.
  18. I may be misunderstanding how CKEdit fields are supposed to be used in processwire, but maybe someone can clear this up. I have a standard CKEdit field used for typing in body copy for the pages of the website. Doing headings, paragraphs, bold, table, etc is fine. But what if I want something a little different? For example, what if I want to be able to choose whether I wanted a standard bulleted list, or one that uses an image as the bullet points? Or maybe I want to be able to insert a 2 column CSS grid with items in it making it look like a two column bulleted list. Do I just dip into the CKEdit fields source dialog at that point? Do I use multiple fields almost like a page builder type of approach (rich text block, then a special list block, then another rich text block, etc)? I'm wondering what you all do. (Not just for bulleted lists, that was just an example) The image shows three types of bullet points I may want to be able to choose from depending on the situation.
  19. Nevermind.... I shouldn't have any textformatters on the field, then it works.
  20. I'm trying to do a simple task of rendering pagetable fields. Everything works fine except it won't render HTML from one of those fields. Here is what I have set up. I want to have a section where I can create custom list items (using a SVG for the bullet instead of the normal one). I created a text area field where I type in one line for each bullet point. I then have this rendered on the back end with all the other HTML included to give me my nice list. If I put HTML in any of the list items (like <strong></strong>) it doesn't not get rendered as HTML, just plain text. I would like it rendered as HTML. The text area field has the HTML Entity Encoder set and the Markup/HTML option set (I've tried it with Unknown/Text as well). The code on the pagetable item rendering template is: <?php echo '<div class="grid grid-cols-2 gap-3 mt-6">'; $array = preg_split("/[\n\r]+/", $page->pt_list); foreach ($array as $listitem){ echo '<span class="list-none text-blue-600 ml-4 pl-10"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="w-5 h-5 inline align-text-bottom -ml-10 mr-4"> <path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd" /></svg>'.$listitem.'</span>'; } echo '</div>'; ?> On the main template I am rendering the item with a simple <?php foreach($page->listsection as $section) echo $section->render(); ?> Does anyone have any ideas why the HTML would not be rendering correctly? Thanks.
  21. This might be an obvious one but I can't find it. How can I limit, or expand, the number of results that are pulled back in the find portion of the admin interface (the lister?)? Right now it seems limited to 25 records at a time. I would like to increase this. Is there any way to do that? I'm not talking about the hierarchal list of pages but the list you can get if you go to the Pages>Find menu option. Thanks.
  22. I have created a small library site. Each book in the library is entered using a book template. I have the need to keep track of when these books were checked out. In the future I would need to be able to find out how often the various books have been checked out. Would the best way to do this be to create a separate document for each time the book is checked out? Or is there a field type that would store a list of dates that could later be queried? I haven't been able to come up with a good solution yet so any help would be appreciated.
  23. I never figured out the problem. I ended up just installing Processwire again then restoring everything back to where it was. Hopefully it doesn't happen again.
  24. Well, dang. I checked that this morning and, after enabling the ctype extension, a sample page I created in php that uses those functions work, but Processwire still doesn't work. In fact, nothing is getting written to the error log now either. I'm assuming there is no trouble running it with PHP 7.4. I tried upgrading the site by copying a new wire directory over but the same problem persists. Without any more entries into the error log I'm not sure what else to try. All I get is this: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. This site has been up since July with no problems and no changes and then bang, out like a light!
  • Create New...