Jump to content

Stefanowitsch

Members
  • Posts

    344
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by Stefanowitsch

  1. Hello! I am trying to set up a contact form using the API. Everything is working fine. I have just one problem with the InputfieldDatetime. I want to use a Datepicker in different languages. My languages are: default - Deutsch english - Englisch My Problem is: When switching between the contact form in both languages the Datepicker only shows english translations for days, etc. Here's how I set it up via API: $f = $modules->get('InputfieldDatetime'); $f->label = $field->form_label; $f->attr('id+name',$field->form_name); $f->addClass('form-control'); $f->required = $field->form_required; $f->wrapClass = 'form-goup row'; $f->dateInputFormat = 'd.m.Y'; $f->datepicker = 1; $f->timeInputSelect = 0; $form->append($f); // append the field to the form Notice: I found this thread here but the solution there does not work for me: I included these files to make the Datepicker work in Frontend: '../../wire/modules/Inputfield/InputfieldDatetime/InputfieldDatetime.js', '../../wire/modules/Inputfield/InputfieldDatetime/timepicker/jquery-ui-timepicker-addon.js' When I add the following translation file in my header it WORKS in german. But it does not translate back to english when switching languages... ../../wire/modules/Jquery/JqueryUI/i18n/jquery.ui.datepicker-deutsch.js' So how does the language configuration for the Datepicker work? Is there an attribute for the API configuration? I found nothing in the documentation: https://processwire.com/api/ref/inputfield-datetime/
  2. Thank you very much! That did the trick: Include the "multipart/form-data" as enctype. That gives me access to the $_FILES array to grab some information about path and sizes.
  3. Hello! I want to include file attachments to my mails. It is not so clear to me how to achieve this. The docs say this: So I can get the filename as value from the input field. Thats basically the name of the file itself (like "mytextfile.txt"). So then I say for example: $mail->attachment('myfile.txt'); But this does nothing. The file is never send as an attachment. Can somebody help me how this is supposed to work? If I need not the filename but an absolute path to the file, where can I get it? It's not included in the form POST data, isn't it?
  4. I got it! Forgot to include HIDDEN pages in the query. Typically my menu templates are hidden pages. So this is the correct solution: $page->rootParent()->children('include=hidden')->get('template=menu_submenus');
  5. Hello! This might be an easy one but I can't figure out the selector. My head is spinning. I am using the Multisite plugin and want to display custom footer menus based on multiple "submenu" templates. What I want to achieve: Get the page with the template "menu_submenus" that is located under the root page of the current page. My attempt does not work: $menus = $page->rootParent()->get('template=menu_submenus'); $footerNav = $menus->footer_menu; foreach ($footerNav as $item) { ?> <li><a href="<?= $item->url; ?>"><?= $item->title; ?></a></li> For visualisation heres the page tree:
  6. Hello there! I wanted to share my new proect with you. It's a small online shop for a local wine dealer: https://www.weinmarkt21.de/ Beware, the site is in german language. I used PW 3, Bootstrap 4 and a very few modules for this site. For the whole shop system I used the Processwire shop module Padloper exclusively. Developing in Processwire was a breeze as always. However I had to put some work into the Padloper stuff to make it fit to the needs of my client. It's a vey good base to start with but you should bring a bit of developing experience with you.
  7. Okay I found it. The problem was that i was searching for "Page Clone" but I am using a german language pack in the backend. Since the module is already included in the core it was translated into german. So instead of "Page Clone" I had to look for "Seite klonen". ?
  8. Hello! I want to install the PageClone Module. The description says that it is already included in PW and only needs to be installed. I am running PW 3.0.98 but can't find this module anywhere! It appears nowhere in the modules section. Plus, manually downloading does not work either. When using the class name to download, i get an error message "no url, has to be installed manually". Where can I download the module file itself? Regards, Stefan
  9. Cool. Using this instead of $modules works. wire('modules')
  10. Hello! I am using the _init.php file to place different php functions to render something on the page. For example a gallery, or a teaser group. I can then just call the function within a page template and the function renders the HTML code with the data given. Right now I want to render some teasers but I need to have access to the $modules variable which is not working right now. I get an undefined variable error. How can I use the $module variable in a different environment than a template file?
  11. I get this error when completing the checkout process. Everything seems to work, though: Warning: Invalid argument supplied for foreach() in /Applications/XAMPP/xamppfiles/htdocs/processwire-shop/wire/core/Modules.php on line 1764 EDIT: Got it. I did not install the module for the downloads. Thought I did not need this.
  12. Putting Now that's a good way to do it, too! You can reach to the root page from everywhere with the get Method and render the Menu that way. But can you explain how the custom API variable works? I mean how can I define it and use it across the website? I know about the default API variables only : https://processwire.com/api/variables/
  13. That's it! Thank you very much. Now I can make my settings page without the trouble of frontend accessibility.
  14. Okay I am wondering if you can actually hide a page so that it cannot be reached from the frontend at all.
  15. So settings is basically just another page with custom fields. Which means that it also would be accessable from like www.mypage.com/settings ?
  16. I dont fully understand this point. What is a settings template? I know how page reference fields work but I am using them only on single pages right now.
  17. Hello! I am wondering - what is the best way to create a footer menu? Right now I have build a footer menu myself but I am wondering if this is correct. It works but there's something I'm not very happy about. Let me explain: I created a page called "footer-menu". Under this page there are my footer menu pages (direct children) Now in the frontend I typically want a list of my pages of the footer menu. So i render the children of the footer-menu page. That works fine: $footerNav = $pages->get('/footer-menu/')->children; foreach ($footerNav as $item) { <li><a href="<?= $item->url; ?>"><?= $item->title; ?></a></li> } The footer-menu page is set HIDDEN in the backend. So it does not appear anywhere. The downside is: The footer-menu page itself is still accessible! You can enter www.mypage.com/footer-menu/ and all you see is a blank page. This makes me think that google might index this page from time to time and maybe show it in the search results which is something that i don't want. Also the URLs of the pages inside the footer navigation go like this: www.mypage.com/footer-menu/page1 www.mypage.com/footer-menu/page2 etc. This is perfectly correct but not what you want from a footer menu if you know what I mean. How do you solve this?
  18. Problem solved. My bad. In my source code I had commented out the following line: $numSent = $mail->send(); That was the case because a little time ago when I was developing the submit form, I must have tried to test something. What made me so confused was the fact that the activity log still said "mail send" so I never looked into this part of the code again. Now that's a really stupid thing, sorry that I bothered you with it.
  19. That's good point to start with! I have already contacted my provider becaouse I think there could be a firewall issue, too. Otherwise I have no explanation for this. However, I will definetly test out the native WireMail variant.
  20. I tried both. Sending from mail accounts of my hosting provider to the same accounts. Or third party mail providers. Nothing gets delivered. I think I'll ask the support of my hosting provider.
  21. Sending e-mails from one acccount to another works fine. I just can't get wiremail to do it. I even tried it with different mail accounts.
  22. I have a little problem: I installed the plugin, set up my form submit PHP file and when I do a connection check - everything is ok! There is no error at all. When sending the mail it is logged and everything seems fine. Except one thing: The message is never delivered! Of course I tried to look into the spam folder - but no. The email just seems to disappear when hitting the submit button. To make sure that my server is running correctly i tried the native mail() PHP method with the form - that is working! So what might be the error in this case? Any ideas?
  23. Yeah, but I don't use HTML minifying at all. So for me it's ok that way.
  24. Not directly, but I had the same "problem" and now I do it this way: // when debug mode is ON -> do not compress the styles if ($config->debug) { ?> <link rel="stylesheet" type="text/css" href="/path/to/css/..."/> <? } else { ?> <link rel="stylesheet" type="text/css" href="<?php echo AIOM::CSS(/path/to/css/...); ?>"/> <? }
×
×
  • Create New...