Jump to content

lpa

Members
  • Posts

    209
  • Joined

  • Last visited

Everything posted by lpa

  1. I have tried to find an answer to my problem without luck: How do I set the different page names with api? When trying this: $lalias = "the-name-of-the-page-in-english"; $english = wire("languages")->get("english"); $lalias_name = wire("sanitizer")->pageName($lalias); $page->set("status$english",1); $page->save(); $page->name->setLanguageValue($english,$lalias_name); $page->save(); I get an error like this: Fatal error: Call to a member function setLanguageValue() on a non-object in import.php on line 6 (the second last line) I tried also this: $page->name1013->setLanguageValue($english,$lalias_name); // $english = 1013; but it didn't work either. And do I have to set the status$english = 1 for each page that has a different name as the default name?
  2. There seems to be standard or recommendation from ITU called E.123: Notation for national and international telephone numbers, e-mail addresses and web addresses in http://www.itu.int/rec/T-REC-E.123-200102-I/en. I doubt it is though used in every country.
  3. I know, that linux has difference with words vs WORDS. I think when moving old content from other systems or static html-pages there might be situations where filenames have been written in titlecase or uppercase and then the you can't keep the old url. Now PW forces you to use all lowercase. Links to the old URL's don't work anymore.
  4. By the way, why are uppercase letters not allowed in path names?
  5. Hi Antti! When has the translation file been last updated? If I make more translations, how to contribute those to you?
  6. Soma, how is your Mailchimp module? Is it available somewhere to be seen?
  7. I think PW is also changing the filenames to all lowercase. Could it be possible to only sanitize, but keep the case? Or sometimes it might be even ok to not sanitize umlauts or spaces away, just dangerous chars like /|\. etc. Can I define that the file uploaded is replacing the file with same name instead of renaming it?
  8. Is it possible to define PW to keep the uploaded filenames untouched? We have pdf:s that have been linked to each other and while uploading the files, PW renames the files. Then the links break. The PDF:s are meant to be used straight from the web-page or downloaded as a zip file to clients computer. In both situations the filenames should be intact and links inside PDF:s should remain valid. What is actually the way PW changes the uploaded files name at the moment?
  9. I could enable debugging on production site for superusers only. If I change config.php $config->debug = true, then it is global for the whole site.
  10. Why couldn't I use this in a template: if ($user->name == 'admin') { $config->debug = true; } or if ($user->isSuperuser()) { $config->debug = true; }
  11. Just hitting my head to a wall with this: I have defined a field like this: $field = $modules->get("InputfieldRadios"); $field->label = "Gender"; $field->addOption('girl', 'Girl'); $field->addOption('boy', 'Boy'); $field->attr("name+id",'gender'); $form->append($field); and try to save the field after submit with this: $form->processInput($input->post); $uploadpage = new Page(); $uploadpage->gender = $form->gender->value; //OR $uploadpage->set($form->gender->name, $form->gender->value); But it doesn't save the field value. With Ryans FormTemplateProcessor module this template works, but trying to do the "dirty work" manually, I just can't get radiobuttons or checkboxes to save. What is it that I don't understand here? EDIT: OK, Soma helped me on IRC: Change $field->addOption('girl','Girl'); to this: $gender = $pages->get("/options/gender/")->children(); foreach ($gender as $p) { $field->addOption($p->id,$p->title); } This is because I am using pages as options. Then save the field like this: $uploadpage->set($form->gender->name, $form->gender->value); Thanks to Soma!
  12. What might be the problem, if I only get 404 error when trying to access some php files outside PW? For example I have made info.php in the root with <?php phpinfo(); just to test and I get 404 page instead of the phpinfo-output. I have the default htaccess file in use. This is happening only with php-files, not with html or jpg etc files.
  13. Found problems moving pages when ProcessPreview is in use: http://processwire.com/talk/topic/3089-moving-pages-hanging/ Could you check it?
  14. Removed ProcessPreview (2.0.6) and the problem is gone! Thanks!
×
×
  • Create New...