Jump to content

Stefanowitsch

Members
  • Posts

    334
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by Stefanowitsch

  1. 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?
  2. 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.
  3. 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/
  4. That's it! Thank you very much. Now I can make my settings page without the trouble of frontend accessibility.
  5. Okay I am wondering if you can actually hide a page so that it cannot be reached from the frontend at all.
  6. So settings is basically just another page with custom fields. Which means that it also would be accessable from like www.mypage.com/settings ?
  7. 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.
  8. 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?
  9. 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.
  10. 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.
  11. 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.
  12. 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.
  13. 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?
  14. Yeah, but I don't use HTML minifying at all. So for me it's ok that way.
  15. 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/...); ?>"/> <? }
  16. That works perfectly! I did not know that I have to use the getValues() method to get the indices. Thank you very much. I am just curious because when I iterate over an array based of the "Page" fieldtype (for example), it is already keyed with integers.
  17. I want to display a gallery and have an array which consists of image fields. I am iterating through the array which works perfectly fine but I want to have access to the key of the items too. <? foreach ($data->img_gallery as $key=>$image) { ?> // some code But the $key variable in my array returns the filenames (image1.jpg), not the index key (0, 1, 2, ....). Why is that so? Does it have something to to with the fieldtype (in my case: Image)? When I am using the same functionality for other fieldtypes (Page or Repater) the key delivers the index as supposed.
  18. Hmmm after installing the new Version I have a problem: When clicking on "Wow that looks great / Accept" the modal window does not close anymore. It does not close, when I click on the "X" in the upper right corner either. Plus, there are a few Javascript errors: InputfieldCroppableImage3.js:31 Uncaught TypeError: Cannot read property 'width' of undefined I testet in on my Mac with Chrome and Firefox. Same behaviour in both browsers.
  19. Just installed and played a little with it. WOW. That's exactly what I was looking for. Thumbs up!
  20. To everyone that has encountered the same problem, here is the simple solution: You have to block the Adaptive Images access to the image folder when working in the PW backend. Go to your htacess file and edit this line of code in the Adaptive Images block like this: # don't apply the AI behaviour to images inside AI's cache folder: RewriteCond %{REQUEST_URI} !ai-cache RewriteCond %{QUERY_STRING} !nc Background: I noticed that whenever an image is displayed in the backend, PW add's a parameter called "nc" to the file. I use this parameter to identfy when i DO NOT want Adaptive Images to scale the image
  21. To everyone that has encountered the same problem, here is the simple solution: You have to block the Adaptive Images access to the image folder when working in the PW backend. Go to your htacess file and edit this line of code in the Adaptive Images block like this: # don't apply the AI behaviour to images inside AI's cache folder: RewriteCond %{REQUEST_URI} !ai-cache RewriteCond %{QUERY_STRING} !nc Background: I noticed that whenever an image is displayed in the backend, PW add's a parameter called "nc" to the file. I use this parameter to identfy when i DO NOT want Adaptive Images to scale the image.
  22. Too bad that's not possible... I have tried several other responsive image plugins but since they all work in the same way I always get problems when copping an image.
  23. Is there away to configure the cropping plugin that the cropped images get saved to a specific "cropped" folder, neither than using the same folder as the other images? My problem is that I am using Adaptive Images and this plugin needs to have access to the assets folder. Thus when cropping an image in the backend it results in an error because the cropped image gets affacted by Adaptive Images.
  24. When using the Adaptive Images Plugin the cropping tool in the Backend does not work correctly. When selecting an area in the image and "save crop" the result kind of weird. The Picture gets cropped but the cropped image does not contain my selection. See Picture 1: Selection Picture 2: The crop result. Since Adaptive Images is very popular maybe some of you have encountered this problem, too....
  25. Where does this code snippet go? Right now I am using this code in my header which is not very professional but it works ;-) <? if ($config->debug) { ?> <link rel="stylesheet" type="text/css" href="<?php echo $config->urls->templates?>styles/styles.css" /> <? } else { ?> <link rel="stylesheet" type="text/css" href="<?php echo AIOM::CSS('styles/styles.css'); ?>" /> <? } ?>
×
×
  • Create New...