Leaderboard
Popular Content
Showing content with the highest reputation on 08/25/2020 in all areas
-
Time for another small update! The Architekturführer Köln is now available in the Google Play Store. One of the major problems with the Progressive Web App approach was that people don't really know about it, and they're disappointed when they don't find it in the App Store / Play Store. The new Trusted Web Activities help solve this problem. We used bubblewrap to generate an app package based on the PWA that can be distributed through the Play Store. As a result, you can now find the Architekturführer in the Play Store! Takeaways: The app is really nothing more than a tiny website launcher that opens a Chrome instance without any UI. For the end user, it's barely distinguishable from the PWA when added to the home screen. But being available in the Play Store does help with visibility (and talking to clients). The Play Store requires a lot of info, screenshots in specific formats and buttons to be clicked before publishing an app there. Also, every change needs to be manually approved, so it takes a while. Don't start the process the evening before. I used appstorescreenshot.com to generate nice looking annotated screenshots for the Play Store page. Trusted Web Activities don't exist on iOS, so for now this only works for Android, not in the App Store.2 points
-
Hi @Roych, I've pushed a fix (v0.2.1). I needed to switch output formatting off before getting the Inputfield, which is used to determine whether it's HTML or not. Thanks for letting me know about this - must set up a multi-language install for testing! Cheers, Chris2 points
-
I hate this behavior, but if you just want it for external links, there is: http://modules.processwire.com/modules/textformatter-mark-external-links/ or my highly modified version attached. I do my best to convince clients not to this, but some just won't listen. Read why it's a bad idea: https://www.smashingmagazine.com/2008/07/should-links-open-in-new-windows/ https://www.w3.org/TR/WCAG20-TECHS/G200.html https://pinksheepmedia.com/2019/05/in-general-hyperlinks-should-open-in-the-same-window/ https://knowbility.org/blog/2019/links-opening-new-windows-no-warning/ TextformatterMarkExternalLinks.module2 points
-
Page View Statistic for ProcessWire is a module to log page views of the CMS. The records including some basic information like IP-address, browser, operating system, requested page and originate page. This module doesn't claim to be the best or most accurate. Advantages One of the biggest advantage is that this module doesn't require any external service like Google Analytics or similar. You don't have to modify your templates either. There is also no Javascript or image required. Disadvantages There is only one disadvantage. This module doesn't record visits if the browser loads the page from its browser cache. To prevent the browser from loading the page from its cache, add the following meta tags to the header of your page: <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" /> <meta http-equiv="Pragma" content="no-cache" /> <meta http-equiv="Expires" content="0" /> How to use The records can be accessed via the Setup-menu of the CMS backend. The first dropdown control changes the view mode. Detailed records View mode "Detailed records" shows all visits of the selected day individually with IP-address, browser, operating system, requested page and originate page. Click the update button to see new added records. Cached visitor records View modes other than "Detailed records" are cached visitor counts. Cached visitor records are collected on a daily basis from the detailed records. This approach is new in version 1.0.8 and ensures fast display even with many records. Another advantage is that the detailed records can be deleted while the cache remains. The cache can be updated manually or automatically in a specified time period. Multiple visits from the same IP address on the same day are counted as a single visitor. Upgrade from older versions Cached visitor counts is new in version 1.0.8. If you just upgraded from an older version you might expire a delay or even an error 500 if you display cached visitor counts. The reason for this is that the cache has to be created from the records. This can take longer if your database contains many records. Sometimes it might hit the maximally execution time. Don't be worry about that and keep reloading the page until the cache is completely created. Upgrades in general It seems that the upgrade function don't get called after an upgrade. This might be a bug in ProcessWire. This can lead to an error message ("Unknown column...") if you try to open the statistic page immediately after an upgrade. There are two ways to avoid this error message. Click the "Continue to module settings" button directly after the upgrade or open the Modules page and click the "Refresh" button. Time of view This module can record the time a visitor viewed the page. This feature is deactivated by default. To activate open the module configuration page and activate "Record view time". If activated you will find a new column (S.) in the records which means the time of view in seconds. With every page request, a Javascript code is added directly after the <body> tag. Every time the visitor switches to another tab or closes the tab, this script reports the number of seconds the tab was visible. The initial page request is recorded only as a hyphen (-). Execution time Starting with version 1.1.9 this module records the PHP execution time from the initialization of the module till the HTML output in seconds. Settings You can access the module settings by clicking the Configuration button at the bottom of the records page. The settings page is also available in the menu: Modules->Configure->ProcessPageViewStat. IP2Location This module uses the IP2Location database from: http://www.ip2location.com. This database is required to obtain the country from the IP address. IP2Location updates this database at the begin of every month. The settings of ProcessPageViewStat offers the ability to automatically download the database monthly. Please note, that automatically download will not work if your webspace doesn't allow allow_url_fopen. Dragscroll This module uses DragScroll, a JavaScript available from: http://github.com/asvd/dragscroll. Dragscroll adds the ability in view mode "Day" to drag the records horizontally with the mouse pointer. PhpUserAgent This module uses PhpUserAgent available from: https://github.com/donatj/PhpUserAgent. PhpUserAgent is required to filter out the browser type and platform from the server request. New in version 1.1.0 A new feature in version 1.1.0 offers the possibility to record user names of logged in visitors. Just activate "Record user names" and "Record loggedin user" in the module settings. New in version 1.1.3 A new feature in version 1.1.3 offers an internal WHOIS function. In the module settings you can switch between internal and external WHOIS. New in version 1.1.4 Detailed records can now be exported as CSV-file. The file contains all data of the specified date regardless of the pagination. The button is located at the bottom of the page. New in version 1.1.8 The UserAgentParser was exchanged with PhpUserAgent due to some complaints.1 point
-
One of the ways you can show support for ProcessWire is to help get the word out by including a small "Powered by ProcessWire CMS" tagline (ideally linking to processwire.com) in the footer of sites that you develop. This is a big help to the ProcessWire project. But I know there are many cases where it just doesn't work to do that because the client thinks of it as gratuitous. I think it's important to communicate to your client that it's not gratuitous at all. It is doing the right thing by showing appreciation and support for a software that is running their site at no cost. Even so, it's not always as simple as that, and I completely understand. We have no requirement or expectation that sites developed in ProcessWire do this. We just encourage and appreciate it when you can. Let your client decide One thing I've been doing lately is to put the control into my clients hands. They really appreciate that I've given them control over it… more so than if I'd left out mention of ProcessWire completely. It also makes them feel good as they are the one showing support, not just their site developer. Here's how to do it in 1 minute: 1. Create a new "checkbox" field in Setup > Fields called "toggle_powered" (or whatever you want to call it), and enter the following for label and description: 2. Add the "toggle_powered" field to your homepage template. 3. Edit the homepage and check the box (if possible in your situation). 4. Edit the template file or include file that contains the site footer and paste in the following: <?php if($pages->get('/')->toggle_powered): ?> <p> <a id='processwire' target='_blank' href='http://processwire.com'>Powered by ProcessWire Open Source CMS/CMF</a> </p> <?php endif; ?> The code above is an example, so adjust the markup, size, wording and placement to suit the site.1 point
-
1 point
-
1 point
-
Ryan's comment in the fixed GitHub issue: Therefore, to include unpublished pages you must get the unformatted value of the field: $items = $page->getUnformatted('your_page_reference_field_name');1 point
-
Hi @dragan sorry for this late answer. Yes the vendor folder need to be uploaded and do not need to be moved elsewhere. As a quick fix, you could try to remove the HookEvent type from line 175 : https://github.com/flydev-fr/OAuth2Login/blob/master/Oauth2Login.module#L175 Let me know if it worked, else I will test it at the end of the day, thanks.1 point
-
Hi @Roych, I've managed to replicate the problem with Multi-language enabled. Once I've figured out the issue I'll push a fix and let you know! Cheers, Chris1 point
-
Heads-up! Wireframe 0.12.0 is now the latest master version. This is a pretty big update (in both lines of code, as well as features), so I'd recommend testing carefully after updating. The biggest parts are implemented as a companion module Wireframe API, but there are quite a few changes and updates for the main module as well: ### Added - Support for named arguments when using `Wireframe::component($component_name, $args)`. - JSON API. See comments in the WireframeAPI module file for more details. - New Page methods Page::getController() and Page::setController(). - Module config screen provides support for creating directories corresponding to configured Wireframe URLs, assuming that they were provided as relative paths. ### Changed - Wireframe::setView() accepts optional view name as an argument. - View::setController() accepts Controller name (string) in addition to Controller class instance or null. - When Controller is instantiated, it no longer overrides the Controller property of the related View instance. ### Fixed - Wireframe::partial() now works as expected for partial names with file ext included (partial_name.php etc.) - Wireframe::partial() prevents 2 or more dots in partial name, just in case (directory traversal is not intended).1 point
-
I really recommend that you do. Sooner or later you will need older versions of something and it will be a pain to rebuild (and various other reasons why one should try and use some versioning system, invariably git). What IDE do you use for you coding? VSCode? The easier way is to using cloning, then push your changes from your local repository. So: Assuming you use VSCode, open the editor and CLONE your repository (using this url https://github.com/techcnet/ProcessPageViewStat.git) It will want to clone to an empty directory. You can temporarily rename the directory where your module files are to ProcessPageViewStat2 Let VSCode clone your empty repo to /site/modules/ProcessPageViewStat. It will copy the files from your project in GitHub and create a .git file. Your files will be ready for tracking. Once that's done, in your file explorer (e.g. windows explorer if on Windows), copy the local module files that you have in ProcessPageViewStat2 to the new ProcessPageViewStat VSCode will tell you that you have added new files. You can then PUSH the CHANGES to your repository. To do that, the first time, VSCode will guide you through authenticating yourself to GitHub as you are the only one with PUSH privileges. Sorry, I am in a bit of a rush. I suggest you have a look at a tutorial about the basics of git or maybe just the basics of GitHub/git and VSCode.1 point
-
Hi @tcnet, welcome to the forum, great first post ?? Do you have any screenshots to share how the statistics look like?1 point
-
@flydev Thanks for this module. Alas, unfortunately it doesn't work here. I have followed your installation steps, changed the JSON to: { "providers": { "google": { "className": "Google", "packageName": "league/oauth2-google", "helpUrl": "https://console.developers.google.com/apis/credentials", "ClientId": "xxxxxxxxxxx-2q54e3b4n232hog8odtk66c7ogj7inl3.apps.googleusercontent.com", "ClientSecret":"xxxxxxxxC0fh1AfF7wwoW" } } } I installed the package via Composer in PW root (vendor folder is next to site/ and wire/). However, I never see a provider screen in the module config after saving. And the frontend example just shows an empty form with just one hidden field. The backend variety throws an error: Fatal Error: Uncaught ArgumentCountError: Too few arguments to function Oauth2Login::hookBackend(), 0 passed in /site/ready.php on line 12 and exactly 1 expected in /site/modules/Oauth2Login/Oauth2Login.module:175 Any idea what I might have missed? edit: I installed the phpleague stuff via Composer locally, and then uploaded the vendor folder via FTP, along with the updated composer.json + composer.lock files. Not sure if that matters. Do I need to move the vendor folder elsewhere, i.e. somewhere in your module's folder maybe?1 point
-
New release for latest stable PW version 3.0.1641 point
-
ProcessWire has language alternate fields, which basically do what you describe out of the box. Unlike multi-language fields, language alternate fields can also be used with image fields.1 point
-
It can be better explained with this: result = ifonething==something ? iftrue : iffalse;1 point