Jump to content

Sergio

Members
  • Posts

    530
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by Sergio

  1. Hi Moritz, I see. Without seeing your _init file, I wonder why did you set the default regions there opposed to set them in _main.php or other template that's appended and not prepended? As _init.php is prepended (as set in the default PW config file) the region's content will appear on all page before they are rendered, unless you replace that region on the 404 template file (basic-page), like: //basic-page.php <div pw-replace="footerinfo"> <!-- nothing --> </div> Using the debug, I can see it at the bottom of my 404 page. See that the first line shows the region I set on _init.php (copied from yours) and it being replaced on the third line.
  2. The 404 page uses the basic-page.php template file unless you have changed it on admin. Take a look at how Ryan implemented a PW region debug on the Uikit "Regular" site profile, it may help you figure it out: <?php if(config()->debug && user()->isSuperuser()): // display region debugging info ?> <section id='debug' class='uk-section uk-section-muted'> <div class='uk-container'> <!--PW-REGION-DEBUG--> </div> </section> <?php endif; ?>
  3. Thanks, my friend! Will test and let you know!
  4. Hey, @tpr did you have the time to check out this? Thank you!
  5. I think the problem is the strpos function. It will return true for "pdf" in "report_pdf" for instance. But we need to return true only if it's an exact match. So, what about this: foreach ($ignoredTemplates as $t) { if (preg_match('/\b'.trim($t).'\b/',$templateFile->filename)) { return; } } I tested it here and it works.
  6. Hey @tpr, I think I've found a bug. One of my pages was returning a black page and no error on debug/tracy. Data was passing fine. After 10 min trying several things here, like removing the template php file to test the error etc and nothing happened. The file was named pdf_report_pdf.latte and it was loaded by another template via viewFile method. I then went back to the module config and remove a "pdf" (just "pdf) from the list of templates to ignore as I have another template called pdf.php and voilà, the error was gone. So, I'm guessing you do a regex on the ignore list entries? Was that the problem?
  7. Check your .htaccess file. It may be wrong or not existing. Check also if the /processwire path is valid. It's the name of the page of ID = 2 on the pages table on the website database.
  8. Today's setup for multi-browser / OS testing. Chrome and IE11 on Windows and Safari on the Mac. (Beer not in the frame) ??
  9. WOW!! Jaw dropped here... I'm really impressed, David! This module and the admin settings you built look incredible. Dumb question: how did you create those matrix thumbnails?
  10. WOW! Way easier than I thought! Fantastic job! Thanks!
  11. I agree with you @bernhard, but I said so because it seems the specs are for a simple page (more like a read-only executive report), as far as I understand it. But for the case you mentioned, the admin page is the way to go! And thank you for the article, I'll be using its lessons to build a dashboard in the near future. ?
  12. I agree with Autofahrn, it seems that the logic should stay in the frontend as it will be easier to control and maintain.
  13. As you may not know the user name, create a file called "change_pass.php" on /site/templates. Put this on it: <?php namespace ProcessWire; require "./index.php"; $admin = $users->get(41); $admin->setAndSave('name', 'youNewUserName'); $admin->setAndSave('pass', 'yo123456'); Now, using a terminal, go the project directory and run the php file: cd myproject/ cd site/templates php change_pass.php Et voilà
  14. I would: Download the files and the database Run the site locally Reset the admin user Upgrade the site to PW 3+ Work on it
  15. Fear not! Reset it: https://processwire-recipes.com/recipes/resetting-admin-password-via-api/
  16. Yes: https://guidetodrawing.com/admin/ Hello and welcome to the forums! Once you access it, take a look on the page structure, see the templates and fields used and after that, the php files inside templates/.
  17. This module looks AWESOME, @Wanze !! Thank you, thank you, thank you! I'll test it on a new project ASAP to give feedback.
  18. Hello @Sebi2020 , welcome to the forums! Could you explain a little further? How your module differs from the standard way of creating tags as pages and using a page field to link the tags to other pages?
  19. <div id="result">Ajax</div> <script type="text/javascript"> $('#result').click(function () { var ajaxUrl = "https://example.com/ajax-page-name"; //not template path $.ajax({ type: "GET", url: ajaxUrl, success : function(data){ var markup = $(data).find('#result'); $('#result').html(markup); } }); }); </script> You need to call the URL of the page itself, not its template path. ?
  20. Mailgun is really great, I love it. But if you want something to install on your server, try Sendy https://sendy.co/ with which you can use Amazon SES to send thousands of emails a year for pennies. But beware that you need to pay attention to your reputation on Amazon SES as Sendy do not track that, otherwise you can get your account disabled. It happened with a client, but it was Amazon's mistake and after a couple of emails explaining the situation, they enabled it back.
  21. I did a quick test here. I created the cache and a loop to show all 3k users emails on a local installation with 7k+ users and it took around 3.5s (measured with TracyDebugger) and half of that after the cache was created. You can use the module ClearCacheAdmin to see all the caches created by PW on a nice list on admin. Actually, it seems findMany is not implemented on $users. Does anybody confirm that?
  22. Give $users->findMany a try and see what happens. https://processwire.com/api/ref/pages/find-many/
  23. @wbmnfktr (had to copy the username ? ) pointed up important questions. The other questions I may think are crucial to the developing effort are: 1 - Are the content updates very frequent and on all sites to justify a single database? 2 - Will be the content of the website entered in parallel? Or maybe one site is fully edited and can be copied to the other ones before people start working on them.
  24. Awesome! Good luck with the project!
×
×
  • Create New...