Jump to content

louisstephens

Members
  • Posts

    516
  • Joined

  • Last visited

Everything posted by louisstephens

  1. Just wondering, is this supposed to be commented out in the template? <!-- echo "<li class='item'><a href='#' data-featherlight='#mylightbox" . $childIndex . "'><img id='mylightbox" . $childIndex . "' src='{$image->url}' class='image'></a><p class='worktitle' alt='worktitle'>$child->title</p><p class='omschrijving' alt='omschrijving'>$child->image_description</p><p class='formaat' alt='formaat'>$child->formaat</p></li>"; --> I am not too familiar with the featherlight gallery, but I noticed an error in the console as well that "prototype" was undedefined in the .js file.
  2. Sorry @Robin S, I was using WireMailSMPT to extend wiremail. I have edited my post to reflect this.
  3. I believe I have hit a roadblock on this one. I am trying to pass an array to a "cc" in wiremail (using wiremailsmpt to extend). Everything else is working, but I am getting an "invalid email address" for $cc_recipient[0]. I looked in wiremail, and it is checking to see if it is a valid email address before sending (which my variable is not). Is there a way around this by chance?
  4. I have a foreach loop on a dashboard page where I sorting the pages titles to different columns based on a date field. Unfortunately, I am doing it with multiple different if statements for the sorting (with multiple foreach loops), as I needed something quickly for testing. I thought it would be nice to implement wireSMTP to send an email out to alert the users that created the pages, which I got working in no time. However, now I have hit a roadblock. The dashboard page has a javascript function that refreshes the page every few hours to get the changes in the date, which then triggers the $mail to fire the email out. I guess my question is there a way to limit the emails to be sent out only once the date/time has changed once instead of it firing every time the page refreshes?
  5. In addition, you might want to check out phpmailer. I have been using it for a while, and have not had any issues with it (knock on wood). It was really easy to set up as well.
  6. Well this was what I was missing... However, this just confuses me way more. Getting used to php was tough enough.
  7. I was working on a simple "to-do" style template that has a form on a page. Once the form is submitted, I use the API to create a new subpage under a pre-existing page, but I notice that it does resubmit the form data (as to be expected) if a user were to refresh the page. Is there a way to prevent this behavior so duplicate content will not be posted by using something like exit(), or is this not proper due to usability? I guess I am curious as to how other developers handle the same hurdle.
  8. Couldn't you create a new "Fieldset in Tab" and place the desired fields within the tab when editing the template?
  9. I have been wanting to set up a quick "dashboard" for a recent project, and was considering using ajax to get a "real time" update/refresh on the page (some of my output depends on the datetime field). I know how to get the desired output using php with some if statements comparing todays date to the date stored in the field, however, I am a bit at a lose of how to interact with the ProcessWire API using ajax to get the desired effect. I found the following and know that I need to start off with: <?php if($config->ajax) { // page was requested from ajax } Unfortunately, as I mentioned earlier, how would one actual find pages using a template and get the field contents from them using AJAX? I apologize if this seems bit broad, but I am stil getting a grasp of using AJAX to deliver content to get a real time update on a page without refresh.
  10. Duh, once again overcomplicating things. Thanks @LostKobrakai, I missed the forest for the trees.
  11. I have been scratching my head on this one for a while, so I thought maybe someone could shed some light on this issue. I am using a grid layout (that I have created over the years) with a class for responsive images (very similar to bootstrap, but very stripped down). Using this, I created a gallery using a foreach loop, and included a "print button" to print each image. I got the classes and everything worked out, but I ran into a small problem with the print functionality. My images (which are around 2400px wide to fill the space) are just fine in the grid and on resize, but when I print, they "run off" the page. I understand that they are just too big to be printed in portrait mode, which led to me think that I could use $image->size(); to print a scaled down version of the image (which adds a bit more load time as now the site needs to load the image large scale and the scaled down version). However, I can't seem to wrap my head around serving just the scaled down version for print only (obviously display:none; doesn't do the trick). Has anyone tackled this before, or does anyone know of a more elegant solution to the conundrum that I have found myself in? The Foreachloop: $printclass = 1; foreach($page->galleries as $gallery) { $printclass++; $printimage = $gallery->gallery_image->width(600)->url; $out = ""; $out .= "<div class=\"row\">"; $out .= "<div class=\"grid-12\">"; $out .= "<img src=\"{$gallery->gallery_image->url}\" class=\"reimage\"/>"; $out .= "</div>"; $out .= "</div>"; $out .= "<div class=\"row\">"; $out .= "<div class=\"grid-12\">"; $out .= "<a href=\"#\" onClick=\"printCoupon('printable{$printclass}');\">Print</a>"; $out .= "</div> "; $out .= "</div> "; $out .="<div id=\"printable{$printclass}\"><img src=\"{$printimage}\"/></div>"; echo $out; }
  12. Have you looked at the template in the backend of processwire and checked to make sure that the checkbox for "Disable automatic prepend of file: _init.php" is unchecked? I believe by default processwire appends this file to all templates (unless you uncheck it) giving access to what is defined in init (someone please correct me if I am wrong).
  13. Yeah, this is really weird, it is installed in php 5.6.10, but not for php 7 . Perhaps there is a reason (that I am not aware of yet) that php 7 doesnt have the extension in MAMP.
  14. In going through the errors in the console (Attached to MAMP Pro 3), it appears that there is no file for imagick.so, so I assume Ill need to find this .so file somewhere
  15. Thanks @BitPoet for the help, I checked phpinfo(), and found which php.ini was being used and noted that extension=imagick.so was not commented out. I also checked the template, which also had it set to "on". I am pretty baffled with this right now.
  16. Not sure if anyone out there has successfully solved this yet (nor if this is the correct place to post this), but I am kind of stuck on this. I normally use MAMP pro 3 for setting up my dev work flow, and wanted to play around with ImageMagick. I knew I had to enable the extension in MAMP, which I simply just removed the ";" in front of extension=imagick.so in the php.ini and restarted the servers. However when I tried to install the module, i get the following error: Unable to install module (ImageSizerEngineIMagick): This module requires that you have PHP's IMagick (Image Magick) extension installed From what I have read, the extension should be installed and activated after I followed the simple steps, but processwire doesn't seem to recognize that it is activated. Has someone encountered this issue yet? I am using php v7 with an install of processwire 2.8.35.
  17. I don't believe it is a core module in processwire. However, if you go to Modules->New and paste in "TracyDebugger", you can add it to your processwire install.
  18. I was confused at first of why the test I just made worked (with the same file name being uploaded), but quickly realized why. If you dont have "overwrite existing files" checked in the settings for the two fields, it will allow you to have the same file (appends a -number to the end of the file name). I don't know if having the -number on the file messes how you are calling them in a template, but it is a possible quick workaround. But as adrian said, you could just download from the images field.
  19. I believe @LostKobrakai had something about this here: $field->collapsed = Inputfield::collapsedNever; However, someone please correct me if I am wrong.
  20. I am not sure what is going on in your case (I am sorry I dont have an answer). However, $page->BackgroundImage->url should return the pull path to the image.
  21. @Robin S, you are correct about that. I was just editing my response as I copied the wrong links out of text file when I was posting my response. My apologies, I am going to go back and edit my response.
  22. As everyone else has stated, The repeater Matrix has a much better UX than page tables. You can rearrange sections and add multiple "blocks" of the same template to the table. I have just started testing it, and so far I am enjoying it.
  23. PHPmailer is a great library that I have been using to handle all my emails. I simply "drop in" my email credentials and it is basically good to go, albeit with a bit of minimum set up.
  24. Yeah, that is what I ended up doing after digging around and looking at everything I could find in the forums. I mean, why make things harder on myself? I appreciate all the help and guidance kongondo!
  25. I can't believe I had never installed TracyDebugger, it is amazing. I did notice via the module, that all the variables I had declared in the _init.php file are now undefined (if I have my function called on the home template (I had $title = $page->get('headline|title'); and a few others). Removing the call removes the error, but at least I have a starting point and start trying to whittle down to the core issue.
×
×
  • Create New...