Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/03/2019 in all areas

  1. I loved doing that. Especially with my own projects. No matter how long they have been online. 2 years or 2 weeks. The slightest change and I started a rebuild. I try to stop this behaviour as it costs too much time. In case of a client project there is most of the time neither the money, nor the time for going this way. But... yeah, starting with a fresh copy is always great.
    2 points
  2. Starting fresh and importing the old data might also be an option. When I think of sites that I built 5 years ago I'd definitely build them completely new ? If you have to redo the design anyhow that should not be too much work and you can refactor things easily and improve quality and maintainability.
    2 points
  3. It should be possible. You can use the methods of InputfieldWrapper on the return value of buildFormContent, retrieve the field by name, create the new Inputfield and insert that in the place of the original one with insertBefore()/insertAfter() and remove(). //... $wrap = $event->return; $origFld = $wrap->get('parent_id'); $newFld = wire('modules')->get('InputfieldPageAutocomplete'); $newFld->attr('name', 'parent_id'); $newFld->attr('value', $origFld->attr('value')); // do any other instantiation work, like setting/copying title, label etc. $origFld->parent()->insertAfter($newFld, $origFld)->remove($origFld); // done
    2 points
  4. You can set the title and name after the page was added: // site/ready.php $this->addHookAfter("Pages::added(template=yourtemplate)", function($event) { $page = $event->arguments(0); $page->setAndSave('title', 'foo'); $page->setAndSave('name', 'foo'); }); You might want to make sure that the name is uniqe (https://processwire.com/api/ref/pages-names/unique-page-name/)
    1 point
  5. You wouldn't. Just use $image->description as it's the actual image which has a description. Your thumb and large variations or just that. Variations of the original image.
    1 point
  6. @bernhard would definitely do that if I had the option. The AWOL developer did a fabulous job and the code is beautifully written. I need to do the upgrade first to prove myself to the client. The rebuilt site will use the old data and redesigned to take advantage of the power of today's PW - hopefully mainly template work with a few new modules. Client has used WP in the past and couldn't believe the PW2.3.0 site still worked and hadn't needed one security update in all that time
    1 point
  7. Hi guys, I just released version 0.9.0 of the module which includes some fixes and new additions, you can find all the details in the changelog. What's new? The module offers a new section "Webmaster Tools" when editing a field, allowing you to set verification codes for Google and Bing. If set, these codes are rendered as additional meta tags. I had to refactor the UI in order to separate the webmaster tools from editing the default values. My solution was to separate them via fieldsets: Cheers
    1 point
  8. You will remember it the next time. ? I checked the multilanguage support... that worked as well. As said before... try taking it apart with just a few simple templates to find the real problem.
    1 point
  9. I tried this: fresh 3.0.123 installation multilanguage profile PHP 7.2 latest Pages2PDF module At first I saw no changes at all because I changed the wrong templates in /site/modules/Pages2PDF/default_templates/ and not those in /site/templates/pages2pdf/. Right now... all I can say is: it's working as expected. Sure... there is no custom code in my page templates or anythings. Just the basic stuff. My recommendation: try it with a simple basic template without anything else in it. Maybe even blindtext. Maybe the reason for your errors are at a different place than the module itself. Update: just saw in your post that you ARE in the wrong folder with the wrong templates.
    1 point
  10. Just to get the records straight... ProcessWire version? Multilanguage profile or another profile made multilanguage? How many languages? Does it work in any of the languages? PHP version? Module version? How do you generate the PDFs? Code snippet would be great Where do you create the PDFs - frontend or backend? Templates: page or PDF? Template location? Template strategy - delayed, direct, regions?
    1 point
  11. The better the questions the better the answers. You cannot expect that forum members can remember the exact problem that you have posted several weeks ago. Describe your problem. Try to make it reproducable (eg by providing a site profile of a clean installation that shows the problem) and I'm sure there will be someone who can help you. Sometimes even describing the problem as good as you can brings you to the solution ?
    1 point
  12. I maintain a 2.5 instance of ProcessWire which needs to be upgraded in the future, too. Not only ProcessWire itself but design and functionality as well. 1.) My first test-run showed me that several things changed. The biggest issue so far was a field called limit. It worked in that site but with 3.x it doesn't. Some names are not allowed anymore - or are already pre-defined somewhere but there are easy ways to avoid that. Just rename those fields before upgrading. Which brings us to the next point. 2.) Always use a test instance and have a working backup. ? 3.) Modules are a big roadblock. Some don't work anymore with 3.x, some just say they don't support 3.x and others just need to be updated. By now I downloaded the most recent version of all modules manually. Switched old modules for newer ones and changed the ProcessWire core at the same time. It worked pretty well - after hitting refresh a few times. ? 4.) Compiled files cache, markup cache, sessions... just drop them. At least that's what worked for me. 5.) Crawl the whole site after first upgrades to find 3xx, 4xx, 5xx issues - I use ScreamingFrog and the Jumplinks module. 6.) Namespace... I had to add it to some files. 7.) I created a site profile from my upgraded copy and tried to install it. Just to check if everythings works even after exporting it and such things. It worked. Luckily. So I had a first, clean. updated and working version of that project for the upcoming changes.
    1 point
  13. Just in case - don't activate the auto-accept option. Unless you modified the code to auto-disable cookies.
    1 point
  14. As you allow users to manage their decision/choice change one line in your module and it's done. notice.tpl.php - Line 18 <span class="pwcmb-widget__close js-pwcmb-manage-cookies">Close</span> Instead of accepting cookies the user has to choose now wether he allows or denies cookies.
    1 point
  15. Hello everyone, while building an app-interface for a page, I developed some changes and improvements to this module, which I made available as a pull request. But @thomasaull and I are not quite sure if it makes sense to transfer these basic changes into the main module as well. Therefore we would like to hear your opinion: What do you think of the new module version? Which features would be useful for you? I have developed several new features that allow the administration of Api accesses via the ProcessWire backend. I also revised the authentication and added a new Double-JWT option that works with long-lasting refresh and short-lived access-tokens. New Features: New menu item "Restapi" in the ProcessWire menu under "setup Management of Api accesses (applications) outsourced to the new menu item Apikeys now authorize api-access Creation of multiple applications with different auth types possible Double-JWT Authentication, renewable tokens token-sessions can be viewed and deleted in the backend Improved exception handling: Each endpoint can throw exceptions, which are then output with the appropriate HTTP status header and message.
    1 point
  16. Another advantage of storing the template code in the database is you can attach all php/html, js, css, and images/files, into the one page so it is completely portable. So you could import a component page into your theme folder, and everything that is needed is there. And to uninstall you just delete the one page.
    1 point
  17. You can nest as many regions as you want, so long as they are all defined in _main.php. In other words, the only limitation is that you can't define new regions in a template file that is then included in another template file. So despite the first blog post on Markup Regions saying... ...Ryan later decided to remove this feature. If you are concerned about performance remember to use markup region hints to make the regions parsing more efficient.
    1 point
  18. Hi folks, I published "Simple file downloads with ProcessWire tutorial" today which explains how to make a simple download function with ProcessWire (tested with version 3.0+). Basically this is based on my post here in the forums
    1 point
  19. I think you could check the "last modified date" of the file itself with php: foreach ($file_pages as $file_page) { int modified = filemtime($file_page->filename); echo "last modified" . date('d-m-Y', modified); } Not testet and assuming that ->filename returns the path + the filename itself
    1 point
×
×
  • Create New...