Jump to content

LAPS

Members
  • Posts

    258
  • Joined

  • Last visited

Everything posted by LAPS

  1. About the $paths in the code you linked: echo wire("config")->paths->siteModules . "**/configs/IconPicker.*.php"; // output is: /..../site/modules/**/configs/IconPicker.*.php // (manual :)) matching is: // // ftp://.../site/modules/FieldtypeFontIconPicker/configs/IconPicker.fontawesome.php // ftp://.../site/modules/FieldtypeFontIconPicker/configs/IconPicker.ionicicons.php // ftp://.../site/modules/FieldtypeFontIconPicker/configs/IconPicker.uikit.php echo wire("config")->paths->templates . "configs/IconPicker.*.php"; // output is: /.../site/templates/configs/IconPicker.*.php // no matching: // // "No such file or directory" ? @ukyo please consider refactoring $pathss definition ASAP. ? $path = $this->wire("config")->paths->siteModules . "**/configs/Mystique.*.php"; $path .= "," . $this->wire("config")->paths->templates . "configs/Mystique.*.php";
  2. @adrian I deleted the MarkupFontIconPicker folder and I no longer get the error. Thank you! ? It was my fault in trying to solve things ? as of the original issue: in the Edit Field > Input > Icon library, the libraries (IconPicker.*.php) are not loaded. Is there any reason for having no loaded libraries (note: I haven't added any new libraries, I'm just using the default ones)?
  3. Yes, I did. I just come up that the folders /site/modules/FieldtypeFontIconPicker and /site/modules/MarkupFontIconPicker have the same content (same file structure and same files): Maybe the problem is this. If so, what should really be the content in those two folders?
  4. @adrian It doesn't work even clearing the caches database table. I get the same error: Compile Error: Cannot declare class MarkupFontIconPicker, because the name is already in use (line 10 of /.../home/site/assets/cache/FileCompiler/site/modules/FieldtypeFontIconPicker/MarkupFontIconPicker.module)
  5. @adrian In the /site/modules/ folder I have subfolders FieldtypeFontIconPicker and MarkupFontIconPicker. Following is the content of the modules database table relating FontIconPicker and the default PW icon field: And here is the result of the SQL search SELECT * FROM `database_name`.`caches` WHERE ( CONVERT( `name` USING utf8 ) LIKE '%FontIconPicker%' OR CONVERT( `data` USING utf8 ) LIKE '%FontIconPicker%' OR CONVERT( `expires` USING utf8 ) LIKE '%FontIconPicker%'): In the caches database table, can I safely delete the resulting rows to check if this resolves the problem?
  6. @adrian I made the modules refresh, then in the admin I get: To temporarily solve the problem, I renamed the module directory from /.../site/modules/FieldtypeFontIconPicker to /.../site/modules/.FieldtypeFontIconPicker (note: the point). I also tried to clear compiled files in Admin > Modules > Site, even manually with a file manager software, but this didn't solved the problem. I'd like to reinstall FieldtypeFontIconPicker but how to unistall a module that is currently used (PW doesn't allow this)? @ukyo Linux OS - PHP v7.2 - PW v3.0.148
  7. Hi @ukyo, I've upgraded to ProcessWire 3.0.148. Now, in the Edit Field > Input > Icon library select field the libraries (IconPicker.*.php) are not more loaded. In the error logs, similarly to @MilenKo, I get: Compile Error: Cannot declare class MarkupFontIconPicker, because the name is already in use (line 10 of /.../home/site/assets/cache/FileCompiler/site/modules/FieldtypeFontIconPicker/MarkupFontIconPicker.module) I tried to re-install the module without success: things do not work anymore. So, I had to disable the module. Any help? Any news?
  8. Hi there, I've been using Wire Mail for a while and now I would like to change its signature settings to send a signature along the email message "only when explicitly called via the API" (currently I have "automatically with every Message"). My questions are: How and where to call the signature API? That is, which code should I use and in which file should I add this code to have a "signature on demand"? I'm also using Form Builder and other PW modules that send emails with Wire Mail. How and where to set the signature via API for them, in particular for Form Builder? How to customise the signature if you don't want to use (and send) the Sender Signature set in Wire Mail module settings?
  9. I mean that in the Description and Notes of fields you may link pages of your PW-based website. So, in the Settings tab of the linked pages it may be useful to have info on fields that are referencing such pages.
  10. I'd like to see in ProcessWire something similar to What pages link to this page? in editing page Settings but for fields (text, textarea, etc.). I just found me in the need of this while experimenting. ⚡
  11. Hi @ryan, I purchased many PW "Pro" modules in the Single version and I'm considering purchasing the ProMailer module too. As I see in the PW shop, there are many "Pro" modules having different versions e.g. Form Builder has versions Single, Pro, Dev and Agency but the ProMailer doesn't. Why ProMailer has only the Dev and Agency versions?
  12. Hi @ryan, I'm considering purchasing the LoginRegisterPro module and I'm asking: will you develop support for viewing and/or editing ProFields fields on the front-end (files, repeaters, richtext, combination fields, etc.)? If so, when can we expect it to be developed?
  13. Hi, I have a suggestions box that appears when the home page is loaded. I would like to allow users to hide this box by clicking the inner close button and make this box stay hidden for a predefined amount of time e.g. 24 hours. Is there a PW module or approach to make this?
  14. I have a similar problem too: sending the email sometime does work and sometime it doesn't. In Admin > Setup > Logs > Wiremailsmtp_errors I get: Error in hnsmtp::send : 550 5.1.0 lpSZ2001L2kwbrt01pSZZZ invalid domain But in Admin > Modules > Wire Mail SMTP the test settings appear to work correctly. What could the problem be?
  15. SOLVED: // Attempt X $result = $pages->find("template=template_children_name, field_children_name=$page->id, parent=[field_parent_name=1], sort=-parent.field_parent_sort_name"); A minus sign to put in front of parent at the first attempt: sort=-parent.field_parent_sort_name
  16. Hi, I find pages by using something as like the following: $result = $pages->find("template=template_children_name, field_children_name=$page->id, parent=[field_parent_name=1]"); I would like to sort the result by a parent field, say field_parent_sort_name, to output an ordered list. I tried the following without success: // Attempt 1 $result = $pages->find("template=template_children_name, field_children_name=$page->id, parent=[field_parent_name=1], sort=parent.-field_parent_sort_name"); // Attempt 2 $result = $pages->find("template=template_children_name, field_children_name=$page->id, parent=[field_parent_name=1], sort=-field_parent_sort_name"); // Attempt 3 $result = $pages->find("template=template_children_name, field_children_name=$page->id, parent=[field_parent_name=1, sort=-field_parent_sort_name]"); // Attempt 4 $parents = $pages->find("template=template_parent_name, template_children_name.field_children_name=$page->id, field_parent_name=1, sort=-field_parent_sort_name"); // $parents are sorted // Attempt 4.1 $result = $pages->find("template=template_children_name, parent=$parents"); // Not sorted as $parents // Attempt 4.2 $result = $pages->find("template=template_children_name, parent=$parents, sort=parent.-field_parent_sort_name"); // Not sorted as $parents // And some other attempts ... What's the issue? How can I sort result by the parent field?
  17. Any news on the @dragan approach? I also created a dedicated topic.
  18. Hi, I'm using $config->pagefileSecure = true and I'm still looking for the best solution to allow guests to access protected page's assets (in my case some images) since the @BitPoet solution/approach seems to cause a lot of loading when rendering the front-end. So, based on the @dragan answer, I would like to try his solution/approach to temporarily add permission to access protected page's images. The question is: how to temporarily add permission to access protected page's images?
  19. Hi, in my template file I state the following code: // File: template_name.php $files->include('path/to/filename', array( 'key1' => "Some text value 1", // e.g. $page->title 'key2' => "Some text value 2", // e.g. $page->getLanguageValue('default', 'title') 'keyN' => "Some text value N" )); In path/to/file_name.php I state the following code: // File: path/to/file_name.php $key1 = $vars['key1'] | "Default1"; $key2 = $vars['key2'] | "Default2"; $keyN = $vars['keyN'] | "DefaultN"; // ... echo $key1 . "<br>"; echo $key2 . "<br>"; echo $keyN . "<br>"; // ... When I render the above code in the front-end then I get the text values changed! That is, it outputs something like the following: Rdfs~{{ value1 GDdfgsd value2 dfd]~df value3 Am I doing something wrong? Update In path/to/file_name.php just use ?: instead of |, this way: // File: path/to/file_name.php $key1 = $vars['key1'] ?: "Default1"; $key2 = $vars['key2'] ?: "Default2"; $keyN = $vars['keyN'] ?: "DefaultN"; // ... echo $key1 . "<br>"; echo $key2 . "<br>"; echo $keyN . "<br>"; // ... PHP matters...
  20. First of all, thank you for your module. I'm using the PW FormBuilder module embedding forms in <iframe> HTML tags. When a user accesses for the first time the page that has an "iframed" form then the user sees two EU-Cookie-Law messages, one under the page (BTW I set the EU-Cookie-Law message position to bottom) and one under the form (BTW This causes the message to override the submit button). I'd like to do not show the EU-Cookie-Law message under the "iframed" form but only under the page. How can I make that (e.g. by using selectors for the "iframed" form-page)? Update Perhaps I found a solution: I think the first solution is better than the second one... but how will this affect the performance of the web site (if it will do)?
  21. Hi, I've a multi-language text field which label is overridden in the template to "Label English" and "Label Italian". I'd like to output the overridden Italian version when accessing the link http://www.website.com/it/. I tried the following without success: // output a blank value $page->text_field_name->label; $page->get('text_field_name')->label; // get the error: "Error: Call to a member function getLabel() on string" $page->text_field_name->getLabel(); $page->get('text_field_name')->getLabel(); // output the not overridden, translated value $page->fields->text_field_name->label; $page->fields->text_field_name->getLabel(); $page->fields->get('text_field_name')->label; $page->fields->get('text_field_name')->getLabel(); How can I output the label overridden in the template? Update I ended up using: $page->fields->getFieldContext('text_field_name')->getLabel(); Is it the correct way to get the overridden, translated label? Or is there some better?
  22. Hi, I've the function: function functionName(Page $item) { // function code } If in templates I use the code functionName($pages->get($id)); then in the logs I get the error "Argument 1 passed to functionName() must be an instance of Page, instance of ProcessWire\Page given, called in ...". However I don't get the error by removing the Page type from the function statement. Why does it happen?
  23. I enabled multi-language support in my website and I am looking for a easy way to output page values (e.g. throughout an entire .php file) in a desired language without using $page->getLanguageValue('default', 'title')everytime I need to output a page value. I thought of finding a page in a given language by using something like $pages->findOne($id, ['language' => 'italian']) or setting someway a "language context". What do you thing about? How can I make that?
  24. Hi, I'm translating my website (in particular, FormBuilder template files) using Code Internationalization (i18n). When I use this code: <?php echo sprintf(__('Some text and <a href="%1$s">link</a>'), 'http://www.link.com'; ?> then it outputs plain text: Some text and <a href="http://www.link.com">link</a> How can I output the above string this way (no plain text): Some text and link? Update I will use html_entity_decode(). What do you thing about?
  25. How do you translate the string? That is, where do you put English and (in my case) Italian strings (I see only the English one in file /site/translations.php)? What do you think about this solution?
×
×
  • Create New...