Harmen

Members
  • Content count

    104
  • Joined

  • Last visited

Community Reputation

58 Excellent

About Harmen

  • Rank
    Sr. Member

Profile Information

  • Gender
    Male
  • Location
    The Netherlands

Recent Profile Visitors

836 profile views
  1. First of all, this module is great! Unfortunately I'm having some issues. Yesterday most of the SEO data was filled in for the website. We're running a multi-lingual website, so I've changed the fieldtypes and everything worked as expected except for the homepage. For example: when I am searching the company name on google (NL), the website shows up with the link to the dutch homepage which is alright, but the seo description hasn't changed while the field isn't empty in the SEO tab on the Homepage. I can see that the meta data is in the page but google doesn't use it. Is this a known issue and can it be solved or is it something different? Thanks in advance!
  2. Harmen

    Hello all, Was wondering if any of you tried to include the Exact PHP client by Picqer in Processwire (URL)? I am trying to at the moment but I am stuck at the Authorization process. Building it inside a module file to execute a certain function every 6 hours to update something on the website. For the authorization process the file has to execute the following piece of code: header('Location:'. $urlThatRedirectsMeToTheLoginOfExact); But each time I am trying to do so, I get the following error: Cannot modify header information - headers already sent by (output started at /processwire/index.php:55). I am out of options so that's why I am trying to find someone who used this library and could get it to work or someone who knows how I can fix it. Tips are highly appreciated (if they work ;)) Cheers, Harmen
  3. Harmen

    Just discovered this topic, and it's great! Bit late, but hey better later than never Below some of the music I listen to while coding besides Epic music: https://www.youtube.com/watch?v=z4nKOzk8qbw&index=64&list=WL https://www.youtube.com/watch?v=1GkYZH7AoS4&index=53&list=WL If the music has a decent beat, the singer a nice voice then I'm in!
  4. Glad it works now! Good luck with the further development of your website!
  5. Sure! See the snippet below if ($input->post->submit) { // === When submit button is clicked if ($v->validate()) { // === Validate the data if ($captcha->verifyResponse() === true) { // === Verify Captcha $subject = 'Contact Form'; // === Subject $messageHTML = include_once('partials/contact/_email.php'); // === Get the message, is in HTML $mail = wireMail() // === Set up the mail data ->to($contactFormRecipient) ->header('Reply-To', $email) ->subject($subject) ->bodyHTML($messageHTML); if ($mail->send()) { // === If mail is sent, while sending e-mail $session->flashMessage = __('Thank you for your message! We will get back to you.'); $session->sent = true; $session->redirect($page->url); } else { // === If mail isn't sent $session->flashMessage = __('Mail not sent. Error occured.'); } } else { // === Captcha error $session->flashMessage = __('Recaptcha Validation Error'); } } else { // === Validation errors $session->flashMessage = __('Please correct the errors and try again.'); } }
  6. Hi, I think if you replace this: $m->to($contactFormRecipient) ->from($email) ->subject('Contact form submission') ->bodyHTML($message) ->send(); with the following: $m->to($contactFormRecipient) ->from($email) ->subject('Contact form submission') ->bodyHTML($message); that it will work and the email will be send one time, that's how my contact form works , I hope this helps you ~ Harmen
  7. Harmen

    One thing to make your foreach loop a bit smaller and faster is to move these lines of code (below). Just set them before the foreach loop. As far as I can see you are checking the date for each ad, but it's always the same so it's faster to define it once. $todaysdate = date("F j, Y H:i"); $today = strtotime($todaysdate); So that results in this: $ads = $pages->find("parent.template=client, sort=expiration_date"); // === Get $ads $alert_count = 0; // === Set alert count $todaysdate = date("F j, Y H:i"); // === Get the date $today = strtotime($todaysdate); // === Make a string from the date foreach ($ads as $ad) { // === Start foreach $expireson = $ad->expiration_date; $expires = strtotime($expireson); // === I think you can also shorten this to $expires = strtotime($ad->expiration_date); Maybe you can even try $fiveaway = strtotime($ad->expiration_date) - 432000; $fiveaway = $expires - 432000; if ($today > $expires) { $alert_count += 1; } } // === End Foreach echo $alert_count; // === Echo the counter result Hope this helps...
  8. Harmen

    @fbg13, you're a real hero! EDIT: Uh, I meant also @flydev, your code did the trick. Now it looks like it should look! Thanks! I think the space between the ' ' did the trick, I am not sure but I will spend this evening to figure out what I did wrong. I am building this module to make the process for handling RMA's in my company easier. So I am creating a module and $this->GeneralfieldsSelector grabs all the fields that are selected in the module settings to show them on the frontend. I didn't want to build the form itself because maybe I will also release this module here on PW and than is this a bit better than a custom made HTML-form XD
  9. Harmen

    Yep, these are modules like Batch Child Editor, Tracy Debugger, ReCaptcha and some custom made modules. But I don't think any of these modules conflict with the module I am working on now.
  10. Harmen

    @fbg13: // === The render method that links to the render form method public function ___render(){ return $this->renderForm(); } // === The renderForm() method protected function renderForm() { $form = $this->BuildForm(); $form->setMarkup(self::$markup); // === Pressed submit? if ($this->input->post->submit){ $form->processInput($this->input->post); if (!$form->getErrors()){ if ($this->sendEmail == true){ $text = 'Configure Email options' //to do } } } return isset($text) ? $text : $form->render(); } // === Build Form Method protected function BuildForm(){ $form = $this->modules->get('InputfieldForm'); $form->method = 'post'; $form->attr('id+name', 'rma-form'); // === Add the fields to the form if (is_array($this->GeneralfieldsSelector)) { foreach($this->GeneralfieldsSelector as $fieldName){ if ($field = $this->fields->get($fieldName)){ $input = $field->getInputfield($this->page); $input->attr('class', 'form-control'); $input->skipLabel = true; $form->append($input); } } } // === Submit button $submit = $this->modules->get('InputfieldSubmit'); $submit->name = 'submit'; $submit->attr('class', 'btn btn_default'); $submit->attr('value', 'Send RMA request'); $form->append($submit); return $form; } I don't think the problem is in this piece of code, but maybe I've done something wrong...... // ====== @OLSA: I've tried that mate, but it doesn't work... Thanks for your comment though!
  11. Harmen

    No problem! Unfortunately, this works neither
  12. Harmen

    Yep, the text is gone now, and the icon too....
  13. Glad you fixed it. Good luck with the development of your website
  14. Hi, If you go to a page that doesn't show up, and you go to the settings of that page, is the checkbox checked to activate the english URL? See image below, the checkbox should be checked
  15. Harmen

    That's an option, but I think it's better to fix this issue in the markup itself.