Jump to content

fbg13

Members
  • Posts

    344
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by fbg13

  1. You can do it per template, by going to the template edit page and click the title field. Everything you set there is gonna affect that template only.
  2. The option was hard coded to 'relative' instead of using the user set option. I submitted a pull request. Did you do anything else beside adding the comment field? It works for me on pw version 3.0.42 and php 5.5 on the intermediate profile. Make sure you don't have any typos in your code. Also when sharing code use the code button <> and add the code that way.
  3. @JimSee The date part is a bug with PW. No idea about the error, works for me (copied your code and just replaced the comments field name). What pw, php versions are you using? Is your server able to send emails? Ask your host if you don't know.
  4. You're missing a lot of quotes, fix those first.
  5. @JimSee it would help if you'd show us your code.
  6. On the edit page of the title field, go to input tab, open the pattern field, there you can add a regular expression pattern ( [-+]?[0-9]*[.,]?[0-9]+ (for numbers with or without decimals)). Or you can add a hook and check the title before saving. https://processwire.com/api/hooks/
  7. Saying that without understanding how PW works is a little rash, don't you think? Just compare PW's selectors with WP's WP Query.
  8. @Dinodog probably something in the form is not valid data so the form returns an error, the problem is the form shows the same message no matter what the problem is (at least when javascript is on). Your form sends data to reeflodge.com.au/php/mail.php, probably that mail.php file is where the error occurs, you can post the code here and someone might be able to figure out what the problem is.
  9. @MrSnoozles Why not put the code in _func.php and use if statements? if($page->name == "page-name" && $input->post->submit) { // code to run on a specific page when form is submited } if($page->template->name == "template-name" && $input->post->submit) { // code to run on a specific template when form is submited } if($page->template->name == "template-name") { // code to run on a specific template }
  10. Did you look at the error log? Might tell you something more.
  11. https://processwire.com/api/ref/session/redirect/ https://stackoverflow.com/questions/3923904/preventing-form-resubmission https://stackoverflow.com/questions/6320113/how-to-prevent-form-resubmission-when-page-is-refreshed-via-php
  12. @modifiedcontent From /wire/config.php file, to change it you add the config option to /site/config.php /** * Use session fingerprint? * * Should login sessions be tied to IP and user agent? * IP fingerprinting may be problematic on dynamic IPs. * Below are the possible values: * * 0 or false: Fingerprint off * 1 or true: Fingerprint on with default/recommended setting (currently 10). * 2: Fingerprint only the remote IP * 4: Fingerprint only the forwarded/client IP (can be spoofed) * 8: Fingerprint only the useragent * 10: Fingerprint the remote IP and useragent (default) * 12: Fingerprint the forwarded/client IP and useragent * 14: Fingerprint the remote IP, forwarded/client IP and useragent (all). * * If using fingerprint in an environment where the user’s * IP address may change during the session, you should * fingerprint only the useragent, or disable fingerprinting. * * If using fingerprint with an AWS load balancer, you should * use one of the options that uses the “client IP” rather than * the “remote IP”, fingerprint only the useragent, or disable * fingerprinting. * * @var int * */ $config->sessionFingerprint = 1; Session Handler Database, in your PW admin go to modules, install tab and there it is.
  13. For each filter you have, you create a field and add it to the product template. You also add the filters page field. Now you set up each filter field to only show if it was selected in the filters page field. http://processwire.com/api/selectors/inputfield-dependencies/#example-page You can automated the creation of the fields by hooking the page save and creating a filter field when a filter page is added.
  14. This is just an idea, haven't put it to practice. You would add the filters to the category pages the same way you add the categories to the product pages. And when you view products from category X you get the filters from that category page and maybe it's children, if any. Product A is in category X, which has the following filters: color, size, weight. View category X, available filters color, size, weight.
  15. The field I tested was also on the user template. Check if you mistyped the field name when you created it.
  16. I just tried it and it works both with 0/1 and true/false. Have you tried the code as is without any conditions?
  17. @Chamche No, the first screenshot is the error log, but you only show a part of it (notice the scroll bar). Just copy everything on that page and use pastebin to share it. Or on cpanel's file manager download the error log file, zip it and attach it to your post here on the forum.
  18. @Chamche I have seen the screenshot the first time, but it is useless. If you look at it you'll see the errors are from 25 May and it's the error caused by the php version, which was fixed by upgrading php. We need to see the rest of the error log where the new errors should be.
  19. @Chamche post the error log, either pastebin or attach it here.
  20. @Chamche show the end of the error log, or just copy paste it to pastebin or similar. LE: also php 5.4 is pretty old too http://php.net/supported-versions.php
  21. You probably are using php 5.3 or lower. Change hosts or ask the current one to upgrade.
  22. Are you sure you are logged in? If you're not logged in it saves to the guest user. $u = $users->get("username"); username should be the name of the user you want to edit/save. If this are not the problem I don't know. If you test this on a server I could take a look, if you're ok with giving me access.
  23. @Thor that's because $u is empty , unless you assign an user object to it. $u = $pages->get("template=user, name=username"); // or $u = $users->get("username"); And with your other example above. Are you logged in while running that code? Did you add the my_planet field to the user template?
  24. I gave you an example in my second reply.
×
×
  • Create New...