Jump to content

Jim Bailie

Members
  • Posts

    75
  • Joined

  • Last visited

Everything posted by Jim Bailie

  1. @ryan Understood. I suppose I would rephrase the question with a scenario. Let's say I install the module, will it or could it auto-generate definitions of existing fields? I hope I'm not missing something obvious. And I will read the post in detail, but we have to head out for the evening 🙂
  2. Wow. This is really something. Thanks @ryan! I didn't read the the entire post, but are these or will these Custom Field "maps" be exportable from an existing install?
  3. Alright, I just looked at what I did to address this and it looks like I just renamed the two files to ProcessLogin.js.bk and ProcessLogin.min.js.bk This is, of course, not an elegant solution but it did solve the problem very quickly. I do recall now that I need to go into the server and see how the system time is setup relative to any php/pw settings that may be causing this problem systemically.
  4. I was dealing with this very recently. Below is a link to another thread regarding this. I also made an additional change to the JS file mentioned below, but I don't have access to this code today. Can post tomorrow. This seems like it started happening after US daylight savings last hit...
  5. @Ivan Gretsky As luck would have it, I do have ListerPro, and now the problem is solved. Thanks!
  6. Hello, I need to hide the Admin User row on the /processwire/access/users list from all non-admin site admins. Can someone assist with how to go about accomplishing this? Hook or lister setting? Not making any progress on this...
  7. For 20+ years I've always maintained a Windows box and a Linux box connected via a KVM switch and with a dual monitor setup. I also have a somewhat older Intel IMac I keep for various tasks. I haven't given it much thought as I regularly switch between Linux and Win10 throughout the day. As far as distros go, I'm using Ubuntu 20.04 KDE and will probably upgrade (clean install) after summer sometime. My $0.02...
  8. Some first steps: Have you gotten a working PW instance installed and running in a dev environment? Once that's done, install Ryan's "Skyscrapers" site profile and study that. Maybe add some features or use it to setup an instance for a personal project. And of course, there's PW community which is very helpful.
  9. FWIW -- I have a template called "downloads". When someone goes to https://example.com/downloads/specialfilename.php, the file name is treated as a url segment. From the url segment, I will essentially: Search for the file Make sure it's there Then deliver it via the mime process // Get page ($p) where the file lives // Still here, so lets see if we can get the actual file $file = $p->filesManager->getFile($fileNameSanitized); if(!$file) return 'File not found(3)'; header("Content-Type: application/pdf"); header("Content-Disposition: inline; filename=$fileName"); header("Content-Transfer-Encoding: binary"); header("Accept-Ranges: bytes"); @readfile($file->filename); return true;
  10. @JoseFrasher Update: Not really. It is what it is. If you set your 404 page to a page with a protected template, that page will render for Guest and not redirect to the page that it should redirect to **If you have a url segment in the URL**. My solution was to just create a dedicated 404 page with its own template and handle things there. Probably a better approach than what I had originally.
  11. Thanks. Ok, this is a closed application and there's a 404 redirect in config.php set to go to a page/template with active access control. Therefore if I add a url segment to a protected page/template, it will get 404 redirected to a page/template that should redirect to a login page if there is no active session, but that protected page is rendered instead. I hope this makes sense. It's not the end of the world as I will need to do some checking in the code, but it is unexpected behavior.
  12. I have a page: "example.com/privatepage" that has a template requiring users with a specific role. But if I type in "example.com/privatepage/some-url-segment" then the page renders!! I'm not seeing an obvious solution in the template settings...
  13. @elabx Thanks, yes. On other pages, I believe this is now interfering with a SAML check/authentication process as well. $config->prependTemplateFile = '_init.php'; /** * Append template file * * PHP file in /site/templates/ that will be loaded after each page's template file. * Example: _main.php * * @var string * */ $config->useMarkupRegions = true; $config->appendTemplateFile = '_main.php';
  14. Hello - My _init.php file is running twice and it's become urgent. The screenshot below is on the home page of a simple echo 'In Init'. There is nothing fancy going on on the home page that could lead to any path of inquiry. (See thread below AND the github issue referenced therein) Therefore, this is leading me to thing that it has something to do with regions perhaps. // _main.php <div id="main-content"> <footer>Footer content</footer> </div> // template: home.php <div pw-prepend="main-content" class="min-h-full flex flex-col justify-center items-center bg-gray-200"> Some content </div>
  15. Wow. I'm starting to see a pattern here. Thanks again!
  16. Hello. Does anyone have any idea how to get the whole file name to display in the admin?
  17. @da² It certainly is peculiar; disdainful even. But this is that one basis point case where it's simply a convenience to show/format a bunch of legacy content from an old database.
  18. @Robin S Interesting. Looks like another area to brush up on. Thanks again!
  19. This example from https://www.php.net/manual/en/functions.variable-functions.php does not work in PW or any script bootstrapping the same (namespacing?). function foo() { echo "In foo()<br />\n"; } $func = 'foo'; $func(); // This calls foo() I'm sure there is an explanation for this, but I haven't been able to discover that as of yet.
  20. This is terrific. Thank you again! Learning a lot here.
  21. @Robin S When a file is replaced, I need to capture the date of the replacement and put in a page field. I'm not anywhere near your skill level, but starting to get comfortable with the basics all thanks to many of your recent posts and replies. Could you offer some guidance on how I might pursue this either with your module's code or some sort of hook arrangement? Thanks again!
  22. Thank you all for your input. "$"s in PW proper are likely a lost cause for now. But I think I have the right solution. I dug up an old nginx rewrite rule from a while back and it works! rewrite ^/concepts/(.*)$ /downloads/?q=$1 last; So the filename in "/concepts/My_Test_File4$$$.pdf/" can now be captured via $input->get('q') unmolested.
  23. Hmm. I'm using nginx and "/concepts/?fileName=My_Test_File4$$$.pdf" does print correctly. I had to work with nginx rewrites a while back and it was sort of a PITA, but this might be the way to go. Yeah, I'll try to get it to work. Thanks!
  24. @da² Thanks, but the problem is that these full links need to be preserved because they're widely published inside this organization and among their clients and customers sales materials, so they have to be the same. I was hoping to have PW "fully" manage the files because it would be such a relief to the admins and would allow the org to track the viewership to a certain extent. I thought some of the information in this article would help, https://processwire.com/blog/posts/page-name-charset-utf8/ , but I just don't think PW is going to have anything to do with having a "$" anywhere near a url. ?‍♂️
×
×
  • Create New...