Jump to content

dragan

Members
  • Posts

    2,007
  • Joined

  • Last visited

  • Days Won

    21

Everything posted by dragan

  1. @strandoo Why don't you create one dedicated page + template for this special use-case? A page that can only be accessed by the sales reps, and then instead of using the LR module you build your own form and with a few lines of code create your new users via API? Of course, this has the downside that those new users won't be getting automatically generated confirmation emails. But maybe you don't need that feature in your case?
  2. Weird. I was already puzzled because the module is listed as a pro module, but at the same time it's filed as core... surely it can't be both (?).
  3. I wonder if this theme ships out PW Pro modules as well? I have seen this in the demo backend: ?
  4. Did you try it with another browser? Does the JS console show any errors? I'm not sure what data-lang means, but I guess it's the current language... Did you try to switch to another language version? Perhaps make sure the page is published (I'm not sure if that has any impact, but it's worth a try). Did you use the default method A, or did you insert the FEE markup yourself? I never had any issues with FEE so far. Maybe there's some browser extension that is blocking some JS...
  5. There's a recent thread with a somewhat similar topic here.
  6. The most simple is probably a Paypal button. sorry, missed the Mollie part...
  7. Just to clarify: I didn't use the ZIP file, I took the generated folder (Server Directory method), since I was only working locally.
  8. Dobro vece, You can try this in your template or _init.php: $cookieFile = $_SERVER['DOCUMENT_ROOT'] . "/pw-boilerplate/site/assets/cookies/cookies.txt"; // adjust this if(!file_exists($cookieFile)) { $fh = fopen($cookieFile, "w"); fwrite($fh, ""); fclose($fh); } $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'http://localhost/pw-boilerplate/session.php'); // more about this below curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); curl_setopt($ch, CURLOPT_COOKIEFILE, $cookieFile); // Cookie aware curl_setopt($ch, CURLOPT_COOKIEJAR, $cookieFile); // Cookie aware $result = curl_exec($ch); curl_close($ch); $result will now show the value of your outside session. pw-root/session.php does really only this: <?php session_start(); if(isset($_SESSION["outsidepw"])) { echo $_SESSION["outsidepw"]; } This means that if your non-PW site creates a session named "outsidepw", you just output it to the browser, in a page that sits in the PW root (not inside site/templates). Since such PHP files at root-level know nothing about PW, you can do anything you want (they're not bootstrapping PW). CURL will mimick a browser request, and that way you can get the external session var back into PW. Just tested it out quickly. Instead of a full-fledged PHP app in root, I just created a PHP file that instantiates a session and declares a session value. But the main logic should still work, as long as you know the external session var...
  9. Well, feel free to write your own module then. It ain't so hard, really.
  10. Today I exported a site profile. After installing a new PW instance and put my site-boilerplate folder in the root, and deleted the default site-profiles, PW just outputs an error on the install screen "no profiles found". I'm puzzled. When I put the default site profiles back in, it recognizes them all - except my own. Is this module even maintained anymore? After reading this thread, I also checked for any special characters in the profile name, there's nothing like that. I also compared the .json and .sql files in the install-folder: they look identical to me in structure.
  11. Is it by design that a site/ready.php is not included when creating a new site profile? Is it possible to include it with a hook? Or are there any security thoughts? (I don't want to redistribute it in public, it's just so I have my own boilerplate)
  12. https://processwire.com/talk/topic/14112-general-site-settings-module/ https://processwire.com/talk/topic/17536-settings-factory/ https://modules.processwire.com/modules/textformatter-multi-value/ https://processwire.com/store/pro-fields/textareas/
  13. No, because Atom is just a text-editor. An IDE is much more than that: https://en.wikipedia.org/wiki/Integrated_development_environment Some infos about how refactoring is made really easy e.g. in PHPStorm: https://www.jetbrains.com/help/phpstorm/refactoring-source-code.html https://www.youtube.com/watch?v=78ILII27MeY https://www.youtube.com/watch?v=6EMM7HSc_2E
  14. And that $filter comes from where? From a select option (thread title) value? You should try to solve this puzzle with Tracy Debugger. See what value exactly is taken from the select option and what is actually passed to find(). Perhaps you need to do something like using unformatted value, or PW is somehow doing sanitation and wipes out some characters. Just wild guesses, but maybe TD will show you what happens, and where.
  15. That's where a good IDE is a big help. Whenever you rename stuff (files or variables etc.) it cleans up for you and searches for usages everywhere in your project.
  16. There are coding guidelines for the core, but not specifically for filenaming (apart from modules, maybe). Yes.
  17. What do you mean? ? If you only have this: instead of Then of course you'll get much more results. Omit the limit parameter to really see how many results you'd get. But in any case, it's not logical that you get ALL properties listed (e.g. even property types 1 or 3). Care to explain a bit better?
  18. Not even in their spam folder? Try to send an automated email to yourself, then compare the mail headers (manual vs. automated). Perhaps you'll spot a difference there (maybe automated mails are lacking SPF records).
  19. How are you using it? Maybe try with output formatting set to false?
  20. Direct upload in the frontend via drag-and-drop never worked for me, and afaik it's not supposed to work (same as copy and paste an image, which works in BE, but not FE).
  21. What the f*ck JavaScript? A list of funny and tricky JavaScript examples Some really odd stuff there... worth scanning through. I chuckled more than once... "b" + "a" + +"a" + "a"; // -> 'baNaNa' NaN === NaN; // -> false (![] + [])[+[]] + (![] + [])[+!+[]] + ([![]] + [][[]])[+!+[] + [+[]]] + (![] + [])[!+[] + !+[]]; // -> 'fail' typeof NaN; // -> 'number' (It ain't new, so sorry if this has been posted previously here)
  22. define "bloat". In your CSS or HTML? Because this surely looks ugly to me: <a href="#" class="no-underline text-black flex items-center cursor-pointer font-mono bg-blue-grey-50 block p-1 pl-2 rounded-tl rounded-tr border border-blue-100 border-b"><span class="inline-block text-lg font-bold mr-1 text-grey-800"> ^ straight from the Tailwind cheatsheet source code. If this isn't bloat, I don't know what is.
  23. it's probably because add() just adds, it doesn't save().
  24. After digging through several PW forum threads, I think the following approach might work: Create each of the 200 pages via API as the user it will be later assigned to (or create as superuser, and later change the owner) Install this module
  25. A neat new Github feature: https://help.github.com/en/articles/navigating-code-on-github And while I'm at it: If you're frequently navigating through GH repos, I can highly recommend this browser add-on: https://www.octotree.io/
×
×
  • Create New...