-
Posts
701 -
Joined
-
Last visited
Everything posted by Christophe
-
Hello Macrura, It's the only case where I'm using the hanna code. I'm going to use a .php template file like I wanted at first and like on other websites. On 2 other websites, that are at the same hosting company, one only receives it once when the other twice. I have to update the code everywhere and compare other things to test. On some other websites, I will try to use Simple Contact Form by justb3a, or the "system" that can be found in the Blue-VR ProcessWire Site Profile by Gayan Virajith (if someone can find a solution to the "issue" that I mentioned at https://processwire.com/talk/topic/925-german-de-de/?p=87848, and more than once at https://processwire.com/talk/topic/6647-blue-vr-processwire-site-profile/page-2#entry93155). NB: and now I've found again that I have saved an alternative simple form also taken from the forums... with similar and different parts... so it's a little confusing. EDIT: updated the form on 2 websites, it seems ok now. Will see how it is/will be when I go back from hanna code to a .php template file with the last one.
-
Blue-VR ProcessWire Site Profile
Christophe replied to Gayan Virajith's topic in Themes and Profiles
@triples When you edit a page, go to the "Settings" tab and under "Templates" change "Home page" for whatever other option there is. The following pages are using these templates: About -> "Basic page" Features -> "Basic page" Services -> "Basic Page with Sidebar items" Contact us -> "Contact us page" You can of course also still use "Home page" and replace the content of the home.php template file with the content of another template file, if you want the homepage to be a little different for exemple. This profile uses a "delegate approach".- 75 replies
-
- 1
-
-
- site profile
- responsive
-
(and 2 more)
Tagged with:
-
Hello justb3a, I'm just looking at page http://modules.processwire.com/modules/simple-contact-form/ and seeing that "The Guides" links are not updated to the github versions (404 Page Not Found).
-
Blue-VR ProcessWire Site Profile
Christophe replied to Gayan Virajith's topic in Themes and Profiles
Don't tell me it's not possible ...- 75 replies
-
- site profile
- responsive
-
(and 2 more)
Tagged with:
-
Hello cstevensjr, Hope you're fine. In this case, enough secure not to risk compromising the website via it I suppose. I thought about this form again yesterday. I've just tried to comment out if(empty($emailTo)) $emailTo = $users->get($config->superUserPageID)->email; but it doesn't change anything apparently. EDIT: online debuggers say I have a problem (starting) at the following line: 'Nom' => $sanitizer->text($input->post->fullname), Ex.: PHP Notice: Undefined variable: sanitizer... PHP Fatal error: Call to a member function text() on null in... Or Fatal error: Call to a member function text() on a non-object on line... I don't know if it's related in some way to the issue I have.
-
Anyone ?
-
Blue-VR ProcessWire Site Profile
Christophe replied to Gayan Virajith's topic in Themes and Profiles
Thank you for these details Gayan. I'll look at them. But do you have an idea about the translation of the "missing required field" error message. Can we translate it elsewhere than in the core file where it is?- 75 replies
-
- site profile
- responsive
-
(and 2 more)
Tagged with:
-
Hi, I think I'll put back this code in a .php file. But the HannaCode module has enabled me to be aware of some errors. And apparently, I can't use a dash or a whitespace with $form. I've modified the code to be: <?php /** * Example of a simple contact form in ProcessWire * */ // set this to the email address you want to send to (or pull from a PW field) $emailTo = 'whatever@gmail.com'; // or if not set, we'll just email the default superuser if(empty($emailTo)) $emailTo = $users->get($config->superUserPageID)->email; // set and sanitize our form field values $form = array( 'Nom' => $sanitizer->text($input->post->fullname), 'Courriel' => $sanitizer->email($input->post->email), 'Message' => $sanitizer->textarea($input->post->comments), ); // initialize runtime vars $sent = false; $error = ''; // check if the form was submitted if($input->post->submit) { // determine if any fields were ommitted or didn't validate foreach($form as $key => $value) { if(empty($value)) $error = "<h4 class='error'>Veuillez vérifier que vous avez complété tous les champs.</h4>"; } // if no errors, email the form results if(!$error) { $subject = "Formulaire de contact"; $message = ''; foreach($form as $key => $value) $message .= "$key : $value\n"; mail($emailTo, $subject, $message, "From: {$form[Courriel]}"); $sent = true; } } if($sent) { echo "<h3>Merci, votre message a été envoyé.</h3>"; // or pull from a PW field } else { // encode values for placement in markup foreach($form as $key => $value) { $form[$key] = htmlentities($value, ENT_QUOTES, "UTF-8"); } // output the form echo <<<_OUT $error <form action="./" method="post"> <p> <label for="fullname">Vos Prénom et Nom</label><br /> <input type="text" id="fullname" name="fullname" size="46" value="$form[Nom]" /> </p> <p> <label for="email">Votre e-mail</label><br /> <input type="email" name="email" id="email" size="46" value="$form[Courriel]" /> </p> <p> <label for="comments">Message</label><br /> <textarea id="comments" name="comments" rows="5" cols="60">$form[Message]</textarea> </p> <p><input type="submit" name="submit" value="Envoyer" /></p> </form> _OUT; } But I still receive the message twice when completing the form in Firefox, and Chrome. But only once from Opera (a recent version also). EDIT: Opera twice also... Does someone have an idea? I'm doing some research... Also, does this form seem secure? Thanks in advance NB: @Jan Romero -> Thank you for the curly braces...
-
Hi, Did you find a solution to your problem, and what was it? Have a nice weekend!
-
Blue-VR ProcessWire Site Profile
Christophe replied to Gayan Virajith's topic in Themes and Profiles
Hello, In the _functions.inc file, I've tried with : $form->email = ('name@exampledomain.com'); -> it works well; //$form->parent = wire('page'); // optional, saves form as page -> it works well. But I wonder why it doesn't work by default with the following line as my admin email address is the same in this case : $form->email = wire('config')->adminEmail; // optional, sends form as emailOtherwise, I had posted something about the translation of the "missing required field" error message (but had no answer) here: https://processwire.com/talk/topic/925-german-de-de/page-8#entry87848 Does someone have an answer(s)? Thanks. Have a nice weekend!- 75 replies
-
- site profile
- responsive
-
(and 2 more)
Tagged with:
-
Hello, Not sure I can help, and I don't know what you've already tried, but: Have you read, for example, https://github.com/ryancramerdesign/ProcessWire#resolving-an-apache-500-error and/or http://processwire.com/docs/tutorials/troubleshooting-guide/ In site/config.php, have you customized this: /** * Installer: HTTP Hosts Whitelist * */ $config->httpHosts = array('localhost', 'subdomain.name.tld/subdirectory/', 'othersubdomain.name.tld/'); Or this in .htaccess: # ----------------------------------------------------------------------------------------------- # OPTIONAL: Set a rewrite base if rewrites aren't working properly on your server. # And if your site directory starts with a "~" you will most likely have to use this. # ----------------------------------------------------------------------------------------------- # RewriteBase / # RewriteBase /pw/ # RewriteBase /~user/
-
So, Processwire is on Twitter, Google+, Facebook... Should it be mentioned on the official website (elsewhere than in the Forums)? That is the question. Twitter is already present in the footer of the website, except for "Store" and "Forums" (if I'm not forgetting one).
-
Blue-VR ProcessWire Site Profile
Christophe replied to Gayan Virajith's topic in Themes and Profiles
Hi again, In FormTemplateProcessor.module, I've precised an email address (not this one of course...): // Optional E-Mail address that form will get submitted to $this->set('email', 'name@domain.tld'); I still receive the messages as pages, but not as emails. How can I receive them as pages and as emails, or just as emails? NB: I've seen commented code(s) related to all this at the top of the file, but I don't want to mess things up.- 75 replies
-
- 1
-
-
- site profile
- responsive
-
(and 2 more)
Tagged with:
-
Hi, And thank you for your help. I'll look at your message closely again. I'm just starting to use PHP a bit more with Processwire, and I just deduce/"hack"/tweak some things whenever I can. I didn't change the form a lot. I had tried 'email' but it hadn't changed anything, if I remember well. Perhaps I have to do it for every "input". I added the spaces because of the following ":". In French, a space is also needed before it. (Also, perhaps I should put a special character for the "é" of "Prénom".) On the other website, not using Hanna Code but a template, I hadn't noticed this problem. Also I don't remember receiving twice the message* at the same gmail account used for testing purposes. (For another case, perhaps I'll need to have a real "Subject", or "Formulaire de contact" : a real "Subject", instead of just "Formulaire de contact".) I'd like to have the real "From" and not "Unknown sender", if possible. In gmail, it's a bit like this*:
-
German (de-DE) not maintained
Christophe replied to Nico Knoll's topic in ProcessWire Language Packs
Hi, My post has nothing to do with German (de-DE), but I've just found this from Ryan on page 3: Is this error message translatable elsewhere now? I've found the following commented code from wire/config.php and have uncommented it after copying it to site/config.php: /*** 9. MISC ************************************************************************************/ /** * Settings specific to InputfieldWrapper class * * Setting useDependencies to false may enable to use depencencies in some places where * they aren't currently supported, like files/images and repeaters. Note that setting it * to false only disables it server-side. The javascript dependencies work either way. * * Uncomment and paste into /site/config.php if you want to use this * */ $config->InputfieldWrapper = array( 'useDependencies' => true, 'requiredLabel' => 'Valeur requise manquante', ); I've changed the value, but it doesn't seem to work. Perhaps it's not meant to be used for what I want: translating the value for the site on which I'm testing the Blue VR Site Profile. The (default) contact form uses FormTemplateProcessor.module. Thank you in advance -
Someone ?
-
@Mont Hello, In Firebug, the rule is: body { background: url("images/bg.gif") repeat scroll 0 0 #e4ebee; } In the css file, it's different. Wouldn't it be "better" to precise repeat-x? Otherwise, it can also repeat itself on several lines under the footer.
-
I'm a beginner at PHP5, but I wonder if naming the file(s) header.inc.php (footer.inc.php) or _header.php (_footer.php) wouldn't have resolved the problem. And/or (just) adding this at the beginning (like in the site-classic profile for example) - with or without comments - (for the footer it may be different): <?php /** * Demo site header include file (HTML5) * * Note that this file has nothing to do with ProcessWire. We just split our common * header and footer markup into separate files (head.inc and foot.inc) like this, * since it was common to all of our templates. * */ ?>
-
Hi, I've arrived again on this topic. The link here doesn't seem to be valid anymore: "The topic discussing the migrator is roughly here: https://processwire....migrator/page-6". This link appears 3 times. I've just sent the link to this topic to someone I've been trying to convince, from time to time, to migrate to Processwire. He uses WordPress, but also CakePHP at his work.
-
Hello, I'm not sure it's the right place to post this topic. I've just converted a Joomla! 1.5 website to Processwire 2.5.3. I didn't want to do some training for Joomla! for someone for whom I had made it years ago and who hasn't really edited/managed it since then. As I'm going to start some training tomorrow, I wanted to use Processwire. I have used a basic form based on some code found in an old topic of this forum on 1-2 websites already. They use the "Direct Output with Includes" approach. But for this one that I've put online today, I'm using the default intermediate profile as a base. (For another website in development, the multilingual profile is used.) So I've tried to insert the form in several ways in a Contact page, but due to the "Delayed output" approach it's more difficult than with the other approach. So I've finally installed the Hanna Code module that I'm using for the first time. I had to uninstall it once as I had a "Hello World" text appearing on the bottom of each page. I wasn't sure why, but apparently installing the Hanna Code module also installed the Hello World module and made this text appear. So, to come back to the reason I'm posting this, I have a hanna code named "contact_form" (that is inserted in the sidebar textarea editor of a Contact page - not sure for the moment if I'm going to use the basic-page template or the contact (contact.php) one): <?php /** * Example of a simple contact form in ProcessWire * */ // set this to the email address you want to send to (or pull from a PW field) $emailTo = 'whatever@gmail.com'; // or if not set, we'll just email the default superuser if(empty($emailTo)) $emailTo = $users->get($config->superUserPageID)->email; // set and sanitize our form field values $form = array( 'Nom complet ' => $sanitizer->text($input->post->fullname), 'E-mail ' => $sanitizer->email($input->post->email), 'Message ' => $sanitizer->textarea($input->post->comments), ); // initialize runtime vars $sent = false; $error = ''; // check if the form was submitted if($input->post->submit) { // determine if any fields were ommitted or didn't validate foreach($form as $key => $value) { if(empty($value)) $error = "<h3 class='error'>Veuillez vérifier que vous avez complété tous les champs.</h3>"; } // if no errors, email the form results if(!$error) { $subject = "Formulaire de contact"; $message = ''; foreach($form as $key => $value) $message .= "$key: $value\n"; mail($emailTo, $subject, $message, "From: $form[email]"); $sent = true; } } if($sent) { echo "<h3>Merci, votre message a été envoyé.</h3>"; // or pull from a PW field } else { // encode values for placement in markup foreach($form as $key => $value) { $form[$key] = htmlentities($value, ENT_QUOTES, "UTF-8"); } // output the form echo <<< _OUT $error <form action="./" method="post"> <p> <label for="fullname">Vos Prénom et Nom</label><br /> <input type="text" id="fullname" name="fullname" size="46" value="$form[fullname]" /> </p> <p> <label for="email">Votre e-mail</label><br /> <input type="email" name="email" id="email" size="46" value="$form[email]" /> </p> <p> <label for="comments">Message</label><br /> <textarea id="comments" name="comments" rows="5" cols="60">$form[comments]</textarea> </p> <p><input type="submit" name="submit" value="Envoyer" /></p> </form> _OUT; } (I also tried with a small php code with "include" in it and the previous code in a php file. I don't remember if it worked at least the same. Perhaps it was better for security reasons (?).) So, I have several questions/issues . # Is this form still "secure" with Processwire 2.5.3? And enough "secure" inserted from a Hanna code? # In the "Code" tab of the hanna code, I'm having an error message when hovering the cross next to line 38 : mail($emailTo, $subject, $message, "From: $form[email]"); The message is: "syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING". I've tried some things but it hasn't made the cross disappear. # Also, in the "Test Results" tab I have this: Notice: Undefined index: fullname in /home/cyberbodw/www/site/assets/cache/HannaCode/contact_form.php on line 62 Notice: Undefined index: email in /home/cyberbodw/www/site/assets/cache/HannaCode/contact_form.php on line 67 Notice: Undefined index: comments in /home/cyberbodw/www/site/assets/cache/HannaCode/contact_form.php on line 72 # The email message is well received but seems to be received 2 times in an interval of a few seconds. # The sender's email address doesn't appear in the "From" field (but it does appear in the message itself). Something like "(Unknown sender)" is written instead. (Perhaps related to the line of code next to the cross.) If it's not possible to have the sender's email address, is it possible to have something like "Contact form" in the "From" field, and how? (It's what appears in the "Subject" field currently.) # There is this: // set this to the email address you want to send to (or pull from a PW field) $emailTo = 'whatever@gmail.com'; // or if not set, we'll just email the default superuser if(empty($emailTo)) $emailTo = $users->get($config->superUserPageID)->email; How can I pull it from a second user (only view and edit rights for the moment) that is not the superuser? From a PW Field, and how? Is there a "superUserPageID" "equivalent" for the second user? Is "superUserPageID" used directly (it seems) or does it have to be replaced by the real ID? Can we find the second user('s) page ID, and, if yes, how? # Perhaps I'm forgetting one... NB: I know why I don't write often , it takes me too much time. I wonder how much time it takes (in general of course and more or less) for other people for average to large posts. Thank you in advance
-
Updates: a "Forever Free Plan" and affordable "Small Business Plans" now -> www.mailerlite.com/pricing And tinyletter.com and sendy.co
-
Hello, To complete adrian's link : http://www.git-scm.com/downloads/guis Linux, Mac, Windows Edit: I'm perhaps going to try "How to Use Git and GitHub - Version Control for Code" -> https://www.udacity.com/course/ud775 (If I need private code repositories, I'll perhaps use Bitbucket.)
-
Hello, Not sure I understand what you want. I'm a php beginner but, you could perhaps use an if/else statement(s) (if your <title></title> code is in a separate head/header .php or .inc file) in order to only display "about" - statically or dynamically -when the "about" page is accessed (different template or not (*)). I often use three fields instead of only two: "third_field|headline|title". The third field being for the browser's Page Title. Perhaps (haven't tried yet if I remember well) you could create a (page?) field that contains and adds "Marinus de Beer - Spatial Design" dynamically on all pages but "about" (different template - in the Admin - that doesn't have this field (*) and/or different template file...). Just some "ideas".
-
I saw this topic yesterday but pwired was quicker . I often use XCloner Standalone as Akeeba Solos didn't already exist at the moment I had to choose for a standalone version, between Akeeba Backup standalone and XCloner standalone. (I usually have to adjust some "paths" and after that it works well.) You can exclude chosen directories and files from the backup, and also "Store you backups on the Amazon S3 cloud", for example. I don't know if Akeeba Solos (which seems to be the new name for the standalone version) can exclude directories and files...
-
Hello, I was going to post this monday when the forum took a rest : You're "talking" in euros or in pounds ? So, the BenQ BL3200PT won't fit in the middle... I couldn't decide on choosing one so I've just taken this one. It's the first time I really invest in a good (and - very - big) monitor. Now I need to find projects. I have to reorganize my desk and change from laptop to desktop for my main computer to use it with a DVI-D Dual Link cable (with a DVI-I Dual Link connector). On my laptop I have hdmi <= 1.4 (so "only" a maximum resolution of 1920x1080 - and it seems neat enough only on GNU/Linux). You can find it sometimes for around 550 euros. There are also BenQ 27 inches monitor like BL2710PT (or BL2700HT) for example. Or good asus or other brand monitors, depending on several factors and what you want from a monitor, of course.