Jump to content

BigRed

Members
  • Posts

    61
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by BigRed

  1. Both great ideas. Thank you for pointing me in the right direction. I have so much to learn in the processwire universe!
  2. 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.
  3. Thank you for that. It was the perfect solution and very easy.
  4. 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.
  5. 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.
  6. 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/?
  7. 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.
  8. 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.
  9. Nevermind.... I shouldn't have any textformatters on the field, then it works.
  10. 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.
  11. That was perfect. Thank you!
  12. 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.
  13. 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.
  14. 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.
  15. 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!
  16. My processwire site was working one day and down the next. In the logs, it's giving the error: 2021-04-01 20:21:21 ? http://achev.ipage.com/library/librarytour/ Fatal Error: Uncaught Error: Call to undefined function ProcessWire\ctype_digit() in /hermes/bosnacweb01/bosnacweb01bc/b2628/ipg.achev/library/wire/core/Modules.php:2480 Stack trace: #0 /hermes/bosnacweb01/bosnacweb01bc/b2628/ipg.achev/library/wire/core/Modules.php(2735): ProcessWire\Modules->getModuleClass('AdminThemeDefau...') #1 /hermes/bosnacweb01/bosnacweb01bc/b2628/ipg.achev/library/wire/core/Modules.php(982): ProcessWire\Modules- >getModuleInfo('AdminThemeDefau...') #2 /hermes/bosnacweb01/bosnacweb01bc/b2628/ipg.achev/library/wire/core/Modules.php(853): ProcessWire\Modules->loadModule('/hermes/bosnacw...', '/hermes/bosnacw...', Array, Array) #3 /hermes/bosnacweb01/bosnacweb01bc/b2628/ipg.achev/library/wire/core/Modules.php(374): ProcessWire\Modules->load('/hermes/bosnacw...') #4 /hermes/bosnacweb01/bosnacweb01bc/b2628/ipg.achev/library/wire/core/ProcessWire.php(509): ProcessWire\Modules->init() #5 /hermes/bosnacweb01/bosnacweb01bc/b2628/ipg.achev/library/wire/core/ProcessWire.php(302): ProcessWire\ProcessWire->load( (line 2480 of /hermes/bosnacweb01/bosnacweb01bc/b2628/ipg.achev/library/wire/core/Modules.php) The server also has a WordPress site on it and the user who manages that may have upgraded PHP right before my processwire site stopped working. Would that have caused this type of error? Any ideas?
  17. Good grief! I knew I shouldn't have been working on this at night! How did I miss that? Thanks for your help.
  18. I feel stupid asking this but when I am trying to output a 'rich text' field (like the body field or any other field with HTML) it is outputting the raw HTML, it isn't rendering it. So if I have a CKEdit field and just type in "This is a test", when it is output it will display "</p>This is a test</p>". Has anyone ever heard of this happening? It hasn't happened on any other sites I've built.
  19. @Robin S, your solution worked perfectly! Thank you.
  20. That is very helpful, thank you! I didn't even know about that function. I will try it out tomorrow.
  21. I have HannaCode that generates a message box. The user is allowed to make some words bold in the 'test' field of the message box: [[MessageBox type="warning" icon="yes" text="Claims filed between <strong>February 16 - December 10</strong> will receive a partial exemption for that year."]] The HannaCodeDialog won't recognize this as a valid HannaCode tag though. It just leaves it as is and doesn't convert it to a widget. The same happens if there is a link definition (<a href.....). Is there any remedy to this?
  22. Wow, that works great, thank you! I didn't realize I could just check for the reference field=current page. That does make it really easy though.
  23. I have a bunch of FAQ pages that each have a page reference field on them. When I go to a page on the site I would like to pull back a list of all the FAQs that include the current page in it's page reference field. Is that possible? matt
  24. Thanks all. I cleared and refreshed browser cache and it didn't make a difference. But, it did make me check my browser version and realized it needed an update (I was using Vivaldi). Once I did that everything is great. Thanks!
  25. Is the UIKit admin theme supposed to look like this when editing fields and templates? It seems like I did something wrong.
×
×
  • Create New...