Jump to content

flydev

Members
  • Posts

    1,355
  • Joined

  • Last visited

  • Days Won

    48

Everything posted by flydev

  1. Hi @hellboy Did you mean that you get the content of the msg javascript variable in your console or you just don't have any error output ? If yes, what is the content of msg ?
  2. So to get it working, nothing fancy, all easy. In this example, only the email user field is used. Thanks @daniels for this module ? Assuming the checkbox field is called "subscribe_newsletter" and added to the "Registration form fields" in LoginRegister settings, in ready.php : wire()->addHookAfter('LoginRegister::processRegisterForm', function($event) { $form = $event->arguments[0]; foreach($form->getAll() as $f) { $name = $f->attr('name'); if(strpos($name, 'register_') !== 0) continue; if($name == 'register_subscribe_newsletter' && wire('input')->post->register_subscribe_newsletter == 1) { $mc = wire('modules')->get("SubscribeToMailchimp"); $email = wire('input')->post->register_email; // Do not forget to saninitize the email field $mc->subscribe($email); } } }); Result:
  3. Yes, I dont know why I was looking to hooks to insert the checkbox.. Adding it to the fields list will be a lot easier.
  4. I will install the Mailchimp module to see how it work. From what I already see, we could add a checkbox by hooking into LoginRegister::buildRegisterForm and we can do the newsletter registration stuff in LoginRegister::processRegisterForm stay tuned ?
  5. @MarcoPLY feel free to ask your question in this thread or this , as I am building a companion module for LoginRegister, all feature are welcome.
  6. hey @Wanze I stumbled into an issue after updating the module I ran into some time ago before deploying a site on a Windows 2008 server. The issue is described there And the fix there : Each time I don't remember where the issue come from and I have to google it and re-read my thread. Are willing to accept a PR ?
  7. I am not giving you a checklist but a tool which can be helpful for "managing" the end of your project by writing tasks. Check out https://github.com/deployphp/deployer I personally use it in conjunction with Duplicator - but it can be used in any workflow, like rsync etc... - Once the package is created, you launch your task and the tool configure/deploy everything for you.
  8. @theo The new function is based on the official WireFileTools::zip() function and I didn't saw this check. Nice catch ? It has not do with the issue I remember. I just checked and its a silly mistake I made while updating the module. Thanks again @theo . It will be fixed in Duplicator-1.2.10 I never ran into into this issue but it look like it can happen. I have a site with 600MB stuff and his database size at 1GB+, I have no timeout building the package or downloading issue. To me, it look like a server settings. If you can, please send me the server details so I can try to reproduce it. PS: still didn't found the time to check what is going on GoogleDrive. @szabesz any feedback about Dropbox v2 ? ?
  9. hey @Macrura could you send me your PR about this module ?
  10. Assuming your comments field is called comments then you get the count like that : $count = count($page->comments); or $count = $page->comments->count();
  11. I have a similar setup where around 100k pages per months are created. Even if your setup if more complex due to a lot of door, etc, I hope you will get the idea. You could structure your tree like the following setup : + Root |- - Building (building template) |- - - - 2018 (year template) |- - - - - - April (month template) |- - - - - - - - opened_door_entry (door template) |- - - - - - - - opened_door_entry (door template) |- - - - - - - - [...] |- - - - - - - - Reports |- - - - - - - - - - day_1_report (report template) |- - - - - - - - - - day_2_report (report template) |- - - - - - - - - - day_3_report (report template) |- - [...] another building/year/month/data tree The "door template" will contain the information about an unique entry (user id, dongle id, door id, access time etc). Each night, you generate a report for the current day update the monthly report And to access the data, you will have three options : access a global report for a given date or door_id, user_id... (speed: 1-2seconds) access a report for a given day and/or door_id, user_id... (speed: 1-2seconds) build a custom report from the entries (speed: fast with custom query, see below) With theses options, you can do some COUNT(), SUM(), etc on the fetched pages fields if required. For the option #3, you must go with custom SQL queries. A module is born recently (thanks @bernhard) which will help you to query your data, take a look at this thread: Or you can begin and modify this module for your needs : https://modules.processwire.com/modules/pages-sum/ Do not hesitate to ask precisions or discuss about your interesting project ✌️ Hope it help!
  12. In incognito mode, the websites load correctly ? Also you can try to clear the DNS cache, in a terminal type : 1) ipconfig /flushdns 2) ipconfig /registerdns 3) ipconfig /release 4) ipconfig /renew 5) netsh winsock reset If it doesn't work, you should open a ticket on your ISP. PS: I had problem accessing Github and ProcessWire this last 23 April.
  13. Hi @Wanze I don't know if it's possible in the current state of the module to disable "Global File Template" for a given template file. I needed this feature in order to work with a REST API endpoint. The problem is when I try to get JSON data from http://my.sites.sek/api, the markup of the global template file is sent. I forked your module and added an option to ignore the global template file on given template. If it make sense, I can send a pull request.
  14. Okay, I tried it yesterday, but got this error on the dev3 branch: Exception: Class '\ProcessWire\RockFinderFieldText' not found on line: 58 in /www/sites/kp/wwwroot/site/modules/RockSqlFinder/RockFinder.module.php
  15. Using the module from the dev2 branch, I made a test based on your example but on my side it return an error. $selector = "template=transactions,date>=1522620000,date<=1523051999"; $finder = new RockFinder($selector, ['montant_especes', 'date']); $finder->sort = false; $sql = $finder->getSQL(); $results = $this->database->query("SELECT sum(montant_especes) as especes FROM ($sql) AS rockfinder"); The field exist in the database : PS: copy/pasting the query returned by Finder in PHPMyAdmin throw the same error. Also, the query returned look weird, check the where clause : SELECT `field_montant_especes`.`data`, `field_date`.`data` FROM ( SELECT `field_montant_especes`.`data` AS `montant_especes`, `field_date`.`data` AS `date` FROM `pages` LEFT JOIN `field_montant_especes` as `field_montant_especes` on `field_montant_especes`.`pages_id` = `pages`.`id` LEFT JOIN `field_date` as `field_date` on `field_date`.`pages_id` = `pages`.`id` ) AS `` WHERE ``.`id` IN (...)
  16. I just took a look at the number of pages I got into the system, there is 407446 pages found, expecting around 1.2M pages at the end of the year. I didn't got the time to test your module again deeper but it look promising. The only thing I am scratching my head in, its the calculation of multiple fields on 100K+ pages at one time... Did you tried something already ? Actually, doing some calculation on 119k pages on one go take about 19seconds and rendering a chart from this number of pages take about two or three minutes! ?
  17. Hi @Karl_T sorry for that and thanks for reporting this issue, I think I have an idea why is happening - checking this afternoon.
  18. Hi, Double check that you are not sending the email to a domain out of your control. Double check your SPAM folder If you use a Google account, you have to disable a security option on your account Read this thread and get back to us
  19. Stuck to delayed output for a while before using to a template engine, I really should give a try to markup region with it. A quick ref for myself: https://processwire.com/blog/posts/processwire-3.0.49-introduces-a-new-template-file-strategy/ https://processwire.com/blog/posts/processwire-3.0.62-and-more-on-markup-regions/
  20. you can just put a get variable ?register=1 on the request and it will show the registration form..
  21. If you put namespace ProcessWire; on top of the module file, does it work ?
  22. I finally found my mistake - it was an autoload module. Also another mistake was the selector. I was using the has_parent keyword on a ~360k pages, growing each night. Selecting a direct parent reduced considerably the time of the aggregation. It take ~18 seconds to do some calculation on 112 689 pages fetched, but it take 60 seconds to build and show two charts from theses 112k pages. Still looking to improve it before scratching my head into MySQL stocked procedures. Didn't checked the repo, do you have pushed an update regarding the implementation in RockSqlFinder yet ? okay
×
×
  • Create New...