Jump to content

Christophe

Members
  • Posts

    688
  • Joined

  • Last visited

Everything posted by Christophe

  1. Hello, How is it that the message displays /site\templates\homepage.php instead of /site/templates/homepage.php? Is your localhost on Windows (if so, which version is it)? Are you using Wamp, Xampp, easyPHP...? It seems it doesn't find the file(s) because the path is incorrect.
  2. Hi, (It's not a multilingual website.) The mistery is solved. It's quite logical. The language for Guest was Default. It had to be French to display the description when not logged in. And the language for the superuser had to be French to display the description when logged in. I often changed the language for the superuser but I didn't notice the difference until now. The multilingual description is deactivated by default so I hadn't realized that I had completed the "Description" (same label) only when logged in as the superuser with the French language. I guess that if I had done the opposite it wouldn't have bothered, as the (empty) French description would have inherited from the Default one. Thanks to both of you for helping me go more precisely in the right direction.
  3. No clues? I tried different things but it didn't change anything. It could be a permission issue of course, but why? I could just hard code it, but I'd like to understand why this happens.
  4. Hello palacios000, I had the same problem while developing the last website I made and connecting to the admin (PW 2.5.3 too). In my case, it was certainly due to a "config" file where "development" (and not "production") "mode" was activated, and so there was probably no server-side cache enabled. Is the website in development or in production phase, and installed locally or online? What hosting do you have? Can you give more information?
  5. On wordpress.com, it is claimed that "WordPress powers 23% of the internet". We can't know for sure if this figure/percentage is real/realistic. But it's so easy to claim this when a lot in fact only exist because they are created via this website, and probably cannot be said to be "professional" and/or of professional quality. And they are perhaps not "active" anymore. One question is if it powers them efficiently. And now also, the Joomla! website proposes this: demo.joomla.org "Try Joomla! Fall in love! Get a 90-day free Joomla! demo account"... And "Keep your site after 90 days!", "Quick Joomla! Test Drive" (that doesn't seem to work currently) and "Multilingual websites in Joomla!". So the figures/percentages... Another question is if these CMSes empower the developers to create websites efficiently. Because I made 2 websites with ImpressPages CMS (in fact I wanted to create the second with ProcessWire but was a total beginner at that time), I know that there is also "ImpressPages Cloud". "Use ImpressPages cloud to gain maximum simplicity. Add your own HTML, CSS or even PHP code. It is free in development mode. Pay just $4.99 when you ready to go live." "Register" "Try without registration" ("Try on The Cloud" link on the homepage). And we know it also exists for other CMSes, for instance Concrete5: www.concrete5.org/trial "You can point a full domain at this demo when you purchase a hosting plan." "Create a concrete5.org Community Account" "My Website Needs I need a website for myself I build many websites for a living."
  6. ProcessWire 2.5.3 © 2015 Default language + French language (for the simple user at least) Site modules installed and activated (for the moment): Email -> Email Obfuscation (EMO) 1.0.3 Fieldtype -> Map Marker 2.0.6 Inputfield -> Map Marker 2.0.7 Markup -> Map Markup (Google Maps) 1.0.1 Process -> Redirects 1.0.0
  7. Hello LostKobrakai, In this case at least, I've also looked at the source code. As the image and its width and height are displayed without include=hidden, I was just curious to see if it could change something. $config->debug is already enabled, but I haven't really looked at the information it displays in the backend. So, I've replaced alt="<?=$logo->description?>" with alt="<?=var_dump($logo->description)?>" and I have: <img width="98" height="129" "="" alt="string(0) " src="/site/assets/files/1036/psi_alphabet_grec_ipsyus-1.png"> in Firebug; <img src="/site/assets/files/1036/psi_alphabet_grec_ipsyus-1.png" width="98" height="129" alt="string(0) "" " /> in the source code. Where did I have to put var_dump($logo->description);? # When logged in as superadmin, or as the simple user, there is <img width="98" height="129" "="" ipsyus"="" -="" grec="" alphabet="" en="" psi="" alt="string(29) " src="/site/assets/files/1036/psi_alphabet_grec_ipsyus-1.png"> in Firebug, and <img src="/site/assets/files/1036/psi_alphabet_grec_ipsyus-1.png" width="98" height="129" alt="string(29) "psi en alphabet grec - ipsyus" " /> in the source code.
  8. Hello everyone, I've just finished building a small website based on the default profile's structure but with this as a "profile": http://purecss.io/layouts/side-menu/ Logo ("/header/") is a hidden page with just a "PageTitle" field, an "Image" field and a "Text" field. So, I have this in _init.php: $logo = $pages->get('/header/')->images->first(); And this in _main.php: <img src="<?=$logo->url?>" width="<?=$logo->width?>" height="<?=$logo->height?>" alt="<?=$logo->description?>" /> But, via Firebug or the default web developer tools of different browsers, the "description" part doesn't appear in alt: In Firefox: <img width="98" height="129" alt="" src="/site/assets/files/1036/psi_alphabet_grec_ipsyus-1.png"> In Chromium/Chrome and Opera: <img src="/site/assets/files/1036/psi_alphabet_grec_ipsyus-1.png" width="98" height="129" alt=""> I've also tried with the following variation in _init.php, but it doesn't change anything: $logo = $pages->get('/header/, include=hidden')->images->first(); The content of the alt attribute (that is to say the content of "Description" in the "Image" type field) is only displayed when I am logged in as a superuser or as a simple user with less permissions/rights. I have some "intuitions", but not more for the moment. Any ideas ?
  9. Hi, Affinity Photo (Mac) is available in Beta version now. For Windows users, Serif also has more or less equivalent applications. If you create a free account and download (or not. I don't remember if it's necessary. Perhaps you just don't need to install it.) the free version (normally an older version), some time later you can go on the application page, and click on the button to upgrade to the pro version. You then have a reduced price. And some moments during the year there are special offers for the current version, and you can also have the previous version for almost nothing (email offers).
  10. Hello Macrura, It stays on the same page with a thank you message replacing the form. The form is submitted to a specified email address, and I commented out the following code as I don't need it: // or if not set, we'll just email the default superuser // if(empty($emailTo)) $emailTo = $users->get($config->superUserPageID)->email; I will avoid using hanna code(s) for forms now. I'm currently building a small website based on the default profile's structure but with this: http://purecss.io/layouts/side-menu/ So, in _main.php, I've got: <div class="content"> <?php echo $content; ?> <?php if($page->template == 'contact') { include('./_form.php'); echo $map->render($page, 'map'); echo $page->child('name=informations, include=hidden')->body; } ?> </div> (The indentation was not kept as is by the forum text editor.) And, in contact.php, just this: <?php // contact.php (contact page) template file // Primary content is the page body copy $content = $page->body; $map = $modules->get('MarkupGoogleMap'); The form works well, but with this above the thank you message (but only in debug mode): "Notice: Use of undefined constant Courriel - assumed 'Courriel' in /home/website_name/www/site/templates/_form.php on line 38" So, I guess it's ok.
  11. Hello Gayan, I'll look at this later. Thank you. I'm thinking that perhaps it would be solved if I installed another language. I'll have to check.
  12. 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.
  13. @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".
  14. 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).
  15. 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.
  16. 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?
  17. 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...
  18. Hi, Did you find a solution to your problem, and what was it? Have a nice weekend!
  19. 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!
  20. 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/
  21. 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).
  22. 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.
×
×
  • Create New...