Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/04/2020 in all areas

  1. For whatever reason, the power was out for our neighborhood for one day this week. As a result, I’m running a day behind schedule here and haven’t yet finished some of the updates I’ve started in the core, so no core updates to report just yet. Instead, I’ve been focused on finishing up the newest FormBuilder version, which has taken nearly the whole week to finish, but I did manage to get the new version out today (available in the FormBuilder board), and I’m really happy with what it adds. Here’s what's new in version 44 of FormBuilder: This version makes significant improvements to FormBuilder's entries listing features and API. You can now find submitted form entries with selector strings just like you can with pages in ProcessWire. It’s like using $pages->find() except for form entries. You can perform queries on any field in the form and use several different operators. This also includes some of the new text matching operators new to the most recent PW master version. The entries screen for any form now gives you option to search and/or filter based on any field in the form. You can also create multiple filters on top of one another, matching multiple fields or even multiple values for the same field. You can dynamically select what columns appear in the entries list, and in what order. This is very much like the “Columns” tab in Lister or ListerPro. You can also search, filter, display and export field values from nested forms, which was not supported in earlier versions of FormBuilder. You can stack multiple search filters on top of one another for AND conditions. When it comes to keyword searches, in addition to searching individual fields in an entry, you can also search all fields in the entry at once (something you can't easily do with pages). You can now sort by any form field in the entries list by clicking the column headings. Also supports reverse order. In earlier versions of FormBuilder, you could only sort by ID or created date. The CSV export has been improved with options to export based on your filters/columns selection, or export all rows/columns. In addition there are now options for letting you specify what type of column headings to use and whether or not to include a UTF-8 byte order mark (which some MS Office apps apparently prefer). In addition to all of the above, there have been numerous other minor optimizations, bug fixes and other improvements throughout FormBuilder. A few new hooks have also been added in FormBuilderProcessor. Note that versions 41, 42, and 43 were all minor-update versions that were only released casually in the FormBuilder board for specific cases. Version 44 of course also includes the updates from those 3 versions as well. FormBuilder v44 requires ProcessWire 3.0.164 or newer. To support the new search/filter/sort functions in the entries list, you must have MySQL 5.7 or newer. For earlier versions of MySQL, these features are disabled except for the “search all fields” option. Next week: back to core updates, and hopefully the newest ProCache version will be ready as well. Thanks for reading and have a great weekend!
    8 points
  2. If you're content using just the template cache instead of ProCache, you could do this with my Cacheable Placeholders module, which is designed for exactly this purpose: Having a fully cached site with just some dynamic placeholders which are dynamically replaced. You can add a placeholder wherever you want to output some content with Du / Sie variations and use the callback to server the correct output depending on the cookie value (or whatever). Won't work for ProCache though, as it can't modify the static HTML pages. But if you want to use ProCache, yeah, JavaScript probably. I recently had a similar problem on schwarzdesign.de. The dynamic options there include the theme switch (light / dark theme), as well as the Fridays for Future theme, which is only displayed on friday (use this link to view the theme even if it's not friday ?). Previously, this was done server side by reading a session value which stored the theme preference as well as checking if it's friday and serving the corresponding stylesheets / body classes. In order to be able to use ProCache, I have rewritten that functionality in JavaScript. Now both scripts are included as preloads, and the correct theme is toggled active with JavaScript depending on the stored preference (now using localStorage instead of the session). Maybe you can do something similar, but with JSON files containing translations, and then replacing the texts with JavaScript? You can check out the source code on schwarzdesign.de, it's an inline script in the <head> section, pretty simple in this case. As for SEO, I would definitely serve one version by default (maybe the formal language version) and then just replace it with the information version with JavaScript, if selected ... this way it shouldn't impact your ratings negatively.
    2 points
  3. JavaScript ? The easy way out would be to include both phrases (possibly one as a default and other as data-attributes or something similar), and then switch those as needed. You could also fetch entire blocks based on user selections, but that would result in some overhead. Alternative would be to set a variable in .htaccess based on cookie value, and then modify the ProCache rules to serve files from another directory. In this case, though, you'd likely need to use hooks in order to make ProCache store (and clear etc.) two different versions. This approach seems a bit over-complicated for my taste ?
    2 points
  4. ProDrafts is working good with repeaters. In rare occasions there are some quirks, but you could customize your ProDrafts settings in that case. Another solution would be to have a staging website and a production website, which I would recommend in any case. The client could prepare new pages on the staging website and you could export and import them to the production website with the import/export feature. For small changes that would be overkill, but for large changes to the website this is also a good way. Regards, Andreas
    2 points
  5. Good idea but still won't work though (or rather will be malformed, ending up with beginning of time dates) as date field is a datetime field. It requires dates in the format 2015-04-25 09:15:00. Probably easiest if you edit the CSV, e.g. in Excel. Do a search and replace, then tell Excel that column has date values and tell it to change the format to what datetime expects.
    2 points
  6. Relative to version 3.0.164, this latest version on the master and dev branch (3.0.165) contains 16 commits with various minor fixes, improvements and optimizations, and it resolves 6 reported issues. Version 3.0.164 has been very stable, and this version should be even more so. Both the dev branch and master branch are identical at this moment. As mentioned last week, new versions of both FormBuilder and ProCache are in development, and I’ve been working on both of them quite a bit this week. I mentioned some of the updates being made in FormBuilder last week. Another new feature to mention is the addition of reCAPTCHA to the spam prevention tools. While our built in honeypot is just as effective (when setup properly), it does its work silently, behind the scenes, never visible to anyone. Whereas reCAPTCHA is hard to miss, which is a benefit for clients that want to to be able to literally see spam prevention measures in place. No doubt, it brings a certain level of comfort, and adds another level of authority to your forms. So I’m really glad to add it to our set of form tools. Rather than building it into the form “actions” I’ve instead built it as an Inputfield module (InputfieldFormBuilderRecaptcha), as this gives you a little more flexibility with regard to placement and customization. It is ready for download now in the FormBuilder board Download thread (login required). It can be used with any version of FormBuilder 0.3.9 or newer; meaning it’s ready to use now. If you download it, be sure to read the pinned reCAPTCHA thread in there for detailed instructions (it's very easy to setup). I’ve been talking about it for a long time, but it seems like it may finally be a good time to re-do the modules.processwire.com site. It all works just fine, but just needs an update, consistent with the rest of processwire.com. So we’ll likely slow the pace of core updates for 2-3 weeks to work on that, sometime between now and the end of the year. Thanks for reading and have a great weekend!
    1 point
  7. This is a textformatter module that will automatically replace titles of other pages on your site with links to those pages. For example, if you have a template glossary-term, and mention the exact title of one page using that template in a textfield, the title will be automatically linked to that page (if the textfield uses that formatter). This is good for SEO, and saves you some manual labour. You can configure which templates should get automatically linked, and of course the formatter is only active for the fields you add this formatter to. Note that if you need more manual control over when and where titles are automatically linked, you're probably better of using Autolink from a Glossary by @mr-fan. Features Allows you to limit the automatic links by template. Only includes published & visible pages by default, with an option to include hidden pages. Automatically excludes the current page, with an option to change that behaviour. Allows you to configure the minimum title length for linked pages. Doesn't overwrite existing links, and detects most edge cases (titles inside other tag's attributes, titles inside existing links et c.). Supports multi-language sites. Titles will only be linked if a title in the current language is set. Can add configurable attributes to all automatically created links. This includes the ability to use page fields as replacement patterns for attributes. For example, you can create CSS classes that include the name of the template of the linked page. Extensive options and hooks to change the generated markup completely. Need <mark> elements with a title attribute based on a page field instead of a link? No problem. See the example project below. Prefer oldest or newest page in the case of duplicate titles. Queries the database directly for improved performance. Has options to switch between case sensitive and case insensitive modes, and force case sensitive behaviour even for case insensitive database collations. Allows you to overwrite the module configuration via the API to call the module with different settings for different requirements on the same site. Download & Documentation The module is now available in the modules directory: https://modules.processwire.com/modules/textformatter-page-title-links/ You can download & install it through the backend using the classname TextformatterPageTitleLinks. To install it manually, download or clone the module from the Github repository into your site/modules folder and install through the backend. The complete documentation can be found in the README in the repository. Make sure to check out the module configuration page after installing the module. Requirements PHP 7.1 or higher ProcessWire 3+ (it will probably work in older versions, I haven't tested those though). This is my first module, I hope it may become useful to some of you ? If you find any errors or have some other suggestions or feedback, let me know!
    1 point
  8. I actually was working on something similar to import/exporting using the Rest API module here at work. I have a cron job set up targeting a specific page (on the live site) with some jquery checking the api endpoint (local dev server with an external locked ip). I then post that to the targeted page and run some php to update fields on the live site with the content.. It's overkill, but I like it as it allows new content/changes to be uploaded if in case I wasnt able to get to it.
    1 point
  9. The new version 4.1.0 includes an important bug fix: The module will now exclude pages in the trash from being linked!
    1 point
  10. http://tabulator.info/docs/4.7/download#pdf
    1 point
  11. 1 point
  12. As far as I remember ProDrafts got an update at some point to work with RepeaterMatrix. Could be wrong but I feel it was in a blog post. Edit: here's the post, with caveats about auto-save https://processwire.com/blog/posts/processwire-3.0.75-and-a-new-version-of-prodrafts/
    1 point
  13. The date field has HTML markup wrapped around the date. Can you make a csv file that has the blank datefield? Like with the PHP function strip_tags(), so that you only have the 22/10/2012 as values.
    1 point
  14. Don't forget that Tracy has a PHPInfo panel that you can use ?
    1 point
  15. @dab - are you sure you're actually running PHP 7.2? That error is coming from a return type declaration (https://www.php.net/manual/en/functions.returning-values.php#functions.returning-values.type-declaration) which was available since PHP 7. That said, I didn't mean to exclude < 7 and I don't need the declaration, so the new version just committed should work for you.
    1 point
  16. As number? As chart? As PDF? For that part (when using ProcessWire), I'd have a look at RockFinder3 and http://tabulator.info/ (and definitely go with a one-page-per-question/answer route!)
    1 point
  17. If you have highly variable load I'd suggest going with something like heroku for manual scaling (if planable) or even solutions, which can automatically scale. No need to run a super beefy server for a whole month if only a single day has actual load. 25k/hour is around 7req/s (likely higher for varying load over the duration of the hour), so either requests must be served in <1/7s or you need more server instances.
    1 point
  18. I just published version 4.0.0 of this module, a large update that makes it possible to completely customize the markup created for detected page titles. For example, let's say you have a glossary and want glossary terms that appear anywhere on your site to display a popover with the term's definition. This update allows you to do that! Previously, the module always created an <a> tag with an href attribute, and always checked if the page was viewable before doing anything. This update comes with configuration options to change the HTML tag, disable the automatic href attribute and disable the visibility check. This allows you to use the module for a wider range of use-cases. If you need even more control, the methods the module uses to create markup are now hookable, so you can customize the output format even further! Here are some additional links to help you get started: There's a new step-by-step guide for a setup with glossary terms with inline definitions. Both new hooks are documented with usage examples in the hooks documentation, learn how to customize the markup generated for titles and how to add attributes to the generated link / HTML tag dynamically. All the new options are available for manual usage, find the list of options here. Check out the CHANGELOG for version 4.0.0
    1 point
  19. Alerting the user when their session expires is one of the features of pro UserActivity module.
    1 point
  20. I think the question should be what type of application are you looking to build that requires MVC ? because I find PW appropriate for making proper CMS sites, anything other than that, then you should be using a proper MVC for such, there will be scenarios you will encounter, I doubt you would want to tweak PW to fit uncovered scenario.
    1 point
  21. Actually i mostly use Linux too. Just using a Xubuntu as it is lacking most the cool and modern desktop effects i not really like. Libre Office as it often is more "compatible" for opening office documents than Microsoft office itself. In addition it has far better support for CSV data files. Gimp for grafiks, Imagemagick for scripted image processing./creation. In addition Scribus and Inkscape for other tasks Vim, Mousepad, Atom, Jedit, PHP-Storm as editor/development environment. Firefox / Thunderbird for web and communication. On the server side i almost never used anything else than Linux/BSD. Apache, NGINX, MariaDB, MySQL, PostgreSQL, PHP, Perl, Python, Bash .... What else do i need ? ?
    1 point
×
×
  • Create New...