Jump to content

Laegnur

Members
  • Posts

    11
  • Joined

  • Last visited

Laegnur's Achievements

Jr. Member

Jr. Member (3/6)

6

Reputation

  1. Hi I'm trying to do the same thing, but it doesn't seem to work anymore. The ReCaptcha appears, but when I submit the login, the page reloads, but the session does not start. I'm using the invisible ReCaptcha, I don't know if that affects it
  2. Hello Many thanks. Now it works correctly.
  3. Hello I maintain a website where we give access to employers from other companies to place orders. Therefore, every year we delete old users and register new ones. To do this, we have the ProcessAdminActions module installed to manipulate pages in bulk. We add these selectors to the Page manipulator, so we filter the pages to only the users, with role employee. It says it will touch 10518 pages, that is the number of users we want to delete. The past year we upgrade the Processwire to latest version after doing this process, and now, it tries to delete home page (/). Any idea why this don't work anymore? Any other way to workaround to delete the 10k users?
  4. Hello I am trying to use this module on a site. And I am getting the following error when trying to add a video to a page. - Param given by constructor is not valid gd resource Any clue what this is? [UPDATE] I replace the content of the folder ffmpeg-php inside the module, for a recent version of this library, and this solve that issue. And edit the line 114 of the file InputfieldVideo.module.php to prevent a PHP error about Implicit conversion from float to int From this $duration = gmdate("H:i:s", $media->getDuration()); To this $duration = gmdate("H:i:s", intval($media->getDuration()));
  5. Hello I'm building a tag system for my personal page. I added a Page reference field to the posts template. This field allow create new pages from field. I'm using multi-language support and multi-language page names. So when creating a new tag into a post, it creates a page with that tag name value for all languages page names, but only activates the default one. Searching for a solution I found an issue on GitHub from 2015 multi-language on page reference field This suggest to edit the wire/modules/Inputfield/InputfieldPage/InputfieldPage.module to force the activation of all languages page names. I don't like to edit wire things. So, I ask, it's possible to do this same as module or another solution, other that manually edit the tag page after creation?
  6. Hello. In a client website, they have a form with all the Spanish provinces as Select options. The client want that when there is an address saved on client's profile, the form preloads it. The province is saved as text string on profile. So, I explode it, and get and an array with all the address parts. Now I'm trying to set the Select's selected value to the option with same name as the province part of the address but I'm getting an error: "Method InputfieldSelect::addOptionAttributes does not exist or is not callable in this context" What I'm doing wrong? $field = $modules->get("InputfieldSelect"); $field->label = "Provincia"; $field->attr('id+name','provincia'); $field->addOptions([ "Alava" => "Álava/Araba", "Albacete" => "Albacete", "Alicante" => "Alicante", ..... ]); $field->required = 1; $field->addOptionAttributes($direccion[3], array("selected"));
  7. Hello @bernhard thanks for your answer. Now I understand how to set the locale for each language in the module and was able to achieve what I wanted. Finally my date code would look like this $data = strtotime($publicacion->data_publicacion); $dateFormatter = \IntlDateFormatter::create( $languages->getLocale(), \IntlDateFormatter::NONE, \IntlDateFormatter::NONE, \date_default_timezone_get(), \IntlDateFormatter::GREGORIAN ); $contido .= '<time datetime="' . $publicacion->data_publicacion . '">' ."\n"; $dateFormatter->setPattern('EEEE'); $contido .= '<em>' . datefmt_format($dateFormatter, $data) . '</em>' . "\n"; $dateFormatter->setPattern('MMMM'); $contido .= '<strong>' . datefmt_format($dateFormatter, $data) . '</strong>' . "\n"; $dateFormatter->setPattern('dd'); $contido .= '<span>' . datefmt_format($dateFormatter, $data) . '</span>' . "\n"; $contido .= '</time>' . "\n"; And the final result:
  8. Hello On my project, I'm using the multi-language module to translate the site to 3 languages. Now I want to format the posts datetime on a custom way, and I found this method using date() to output weekday name, month name, and day number. But the output names are on English. What is the best way to set the locale for each language added in the multi-language module? $data = strtotime($publicacion->data_publicacion); $contido .= '<em>' . date('l', $data) . '</em>' . "\n"; $contido .= '<strong>' . date('F', $data) . '</strong>' . "\n"; $contido .= '<span>' . date('d', $data) . '</span>' . "\n";
  9. Hello That's what I get for not reading all the documentation. Thank you very much for clarifying this point.
  10. Hello. I'm almost a new user in Processwire. Now I'm adventuring myself into make a new website with this CMS, and adding multi-language support to it. I installed the site using the blank profile, and install later the language support modules. Configure 3 languages, and add fields, templates and pages with translated labels, all correct. But now, I have 5 strings across multiple template files that I need to translate. When I go to one of the languages, and build the phrase index it appears to find all the strings but when search for translatable files, it only find 4 string. The problematic string is the "_x('Developed by', 'developer')". What I'm doing wrong with this string?
×
×
  • Create New...