Jump to content

flydev

Members
  • Posts

    1,360
  • Joined

  • Last visited

  • Days Won

    49

Everything posted by flydev

  1. Check @abdus's answer and the comment from @Macrura just before :
  2. Hi, Is your webiste files placed under the `/usr/local/apache/htdocs` folder ? If yes, change the directive `AllowOverride None` to `AllowOverride All` from the Apache config file then restart Apache service: `sudo service apache2 restart` DocumentRoot "/usr/local/apache/htdocs" <Directory "/usr/local/apache/htdocs"> # # Possible values for the Options directive are "None", "All", # or any combination of: # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn't give it to you. # # The Options directive is both complicated and important. Please see # http://httpd.apache.org/docs/2.4/mod/core.html#options # for more information. # Options Indexes FollowSymLinks # # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords: # AllowOverride FileInfo AuthConfig Limit # # AllowOverride None AllowOverride All # # Controls who can get stuff from this server. # Require all granted </Directory> Edit: make sure you load the `rewrite` apache module : `sudo a2enmod rewrite`
  3. Hi, I don't know if this question is ironically made for your self or if is a real one. Anyway just incase, the answer is easy: Simply add a single character. Always use === instead of == (or !== instead of !=) when comparing so if the types differs PHP will not attempt conversions and will return FALSE. Do not use the == until is really required, knowing what you are doing. Charts: https://github.com/sentientmachine/php_equality_charts
  4. he haven't been able to find one. What about using the built-in user management ? Users could be customer, sellers or admins, you can do what you want. What specificity are you talking about this "membership" related module ?
  5. Hi, sorry not too much time, I think you could use/play with the in-built export/import feature : by @horst Code to read: https://github.com/processwire/processwire/blob/dev/wire/core/PagesExportImport.php Have fun !
  6. Hi and welcome to the forum. Your question is pretty vague. But yes, it will allow it if you write the code for it. The API will help you interacting with the backend easily. Also if the given external service has an API to fetch content from, then the process is more than easy (following their documentation). There is an idea for interacting with another ProcessWire site with the API :
  7. I was exactly thinking about that some days ago but I still can't find the time to do tests.
  8. Hi, look at join-monster (Stem) or DataLoader (Facebook) to solve the N+1 query problem.
  9. Welcome to the forum @PTRRR If you run `heroku logs --tails|grep "code="` and navigate with your browser inside your backend to trigger the error, is there an output ? How do you manage your sessions (session handler like MemCachier) ?
  10. Hi, instead of `$sanitizer->pageName()` use `$this->sanitizer->pageName()` inside your hooks.
  11. I fully understand, same thing here and I still don't know how it really work.. I can use, modify or compile it but not write a single SCSS, LESS or whatever file.. ! I first put my hand into theses things recently with the AdminThemeUikit and AdminThemeBoss. But once you get it, I must admit that they are usefull. A small advice to get started with theses things, take a look there from @Noel Boss : https://github.com/noelboss/AdminThemeBoss#modify-yourself Anyway, great addition, thanks again ?
  12. You should install TracyDebugger asap and then replace all your `echo` with `bd($your_var)` call, it will be easily for us to help you and for you to debug your code. Your hook is working fine on my side. Comment this line `// if($event->object->name == 'job_titel_und_nummer') {` and try again.
  13. Really great ! Thanks for sharing ! Is there a SCSS version of it ?
  14. Do you have installed TracyDebugger ? What's your ProcessWire version ? $jobID = 0; $jobID = wire()->input->get->job; bd("wire() : $jobID"); $jobID = 0; $jobID = $wire->input->get->job; bd("$wire : $jobID"); $jobID = 0; $jobID = $input->get->job; bd("$input : $jobID");
  15. What say the line FILE in the module's information ? If it say nothing then rename the folder `GoodNews` to `ProcessGoodNews` and click on `Submit` on your module page, if still nothing, take a look at your database if there is any trace, on table `modules` and remove the corresponding entry of the module.
  16. lol so easy @adrian I missed this feature ? edit-ot: really.. what a crazzy job with tracy...
  17. In admin.php file : /** * Hook : * Add FieldtypeDecimal to compatible fieldtypes of * a FieldtypeFloat when a superuser need to change the type * of a float field. * * https://modules.processwire.com/modules/fieldtype-decimal/ * https://processwire.com/talk/topic/7542-development-fieldtypefloat-fieldtypedecimal/ * */ $wire->addHookAfter('FieldtypeFloat::getCompatibleFieldtypes', function($event) { if(!$this->modules->isInstalled('FieldtypeDecimal') || !$this->user->isSuperuser()) return; $return = $event->return; $return->set('FieldtypeDecimal', $this->modules->get('FieldtypeDecimal')); $event->return = $return; });
  18. $jobID = $wire->input->get->job; More infos : @BitPoet I think he is outside template
  19. I understand now what you are trying to achieve. try that : $mypage= $pages->get(1036); $wire->addHookBefore('InputfieldPage::render', function($event) use(&$mypage) { if($event->object->name !== 'job_waehlen') return; $inputfield = $event->object; $selectfield = $inputfield->getInputField(); $selectfield->addOption($mypage->id, $mypage->title, array('selected' => 'selected')); });
  20. BitPoet is right but there is a subtlety. Actually you do not need to implement ConfigurableModule because when you use a MyModuleConfig.php along the module file, this new class extend the ModuleConfig class and thus you don't need to implements the ConfigurableModule or other configuration-specific code ! Your module IS configurable at that point. So regarding your fields configuration, it should work and if is not loading, I bet that a uninstall of the module and a Modules > Refresh and/or removing File Compiled/cache then re-installing the module will do the trick. Enjoy ?‍? !
  21. Hi, you have to assign a page. $wire->addHookAfter('InputfieldPage::processInput', function($event) { if($event->object->name == 'job_waehlen') { bd($event->return->value); // return 1019 (my test id page) $event->return->value = $this->pages->get(1); // will set you parent tree bd($event->return->value); // return 1 (root page) } }); PS: bd() call come from TracyDebugger
  22. Hi, without a loop, you could use selector subfields to find your options like the following: $page->repeater->find("sub_repeater.field=value"); So for you code : $option_name = $p->shop_product_options->find("shop_product_options_option.global_text={$option['name']}"); if(is_null($option_name) || !count($option_name)) { continue; } else { // do stuff }
  23. Amazing.. ?‍? I just asked to my boss if he still has something, telling me that all the things came to the trash some time ago, but he told me that he still have a Sinclair ZX-81 with 1KB of RAM and an 16KB RAM extension (http://oldcomputers.net/zx81.html). I will have an answer tomorrow. If you're interested, just tell me. For the C64, it look like we can find some machines here in France. After the hardware part ?
×
×
  • Create New...