Jump to content

DV-JF

Members
  • Posts

    293
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by DV-JF

  1. Hi @joshua, I really like your module, especially the way how scripts are loaded asynchronous. Thank you for sharing! It would be nice if you would use data-type="optin" instead of type="optin" in order to have valid HTML5. Many greets!
  2. ...no ideas? Maybe I should post this into Wishlist & Roadmap ?
  3. Hey all, hope you're feeling well these days! Short question: Under "Setup > Templates" it's possible to sort the templates by last modified. Is this possible for fields view to? Long explanation: Currently I am in the process of programming a reusable template and often have to copy several fields & templates from different PW installations into my "master version". Therefore it would be good to see already in the field list when the last modification has taken place. Stay healthy & don't forget to wash you hands - many greets!
  4. It's an old topic, but I have nearly the same problem: When using condition the conditon "required if" I'll get an error displayed: but it seems to work ? Unfortunately I was wrong, when saving the page PW tells me that all these fields are required : @ryan Could you shortly explain why we can't use "required if" conditions in repeater fields and if this may change in the nearer future? Many greets !
  5. Hey, thank you for the answers and hints. I've solved the problem using "Adminer" from "TracyDebugger". @BitPoet Special thank goes to you ?, I'll have a closer look on your module soon and will test it for sure!
  6. Hi, maybe I'm blind or I'm missing something ? What I'm asking myself: Is there a simple way to tag multiple templates in one step. At the moment I'm restructuring a big ProcessWire site and want to tag all templates in order to get a better overview. Therefore I'd have to edit every single template. Instead it would be nice to select multiple templates and give them a tag them in one step. EDIT: I'm using ProcessWire 3.0.148 © 2020 Many thanks in advance for any hints... DV-JF alias Jens.
  7. @Robin S Thank you works like a charm. Is it possible to add this module to the PW module directory? I've searched for it there but couldn't find it ?
  8. I'm just wonderin because of last point from READE.me say: So I'thought this is already implemented. I know, just wanted to save some time ? I think it would be great to be relative flexible. Perhaps we may have a field (maybe a repeater could do) where you specify what kind of cookies your website serves. On each repeater there should be in my eyes some possibility to explain what the cookie does and why it is used. I also like the "Necessary" checkbox which can't be disabled. BTW: Great module, thanks for @adrian creating and @wbmnfktr for maintaining it!
  9. Hi, is it possible to display the notice as an overlay. I've only the possibility to choose "Fixed Overlay at Bottom of Page" I'm using Version 0.4.12 (dev branch) from @wbmnfktr github repo. Furthermore it would be really nice to have the ability to create more than one checkbox in order to allow users to pick cookies more specifily. See https://developers.deezer.com/ for an example. Many greets!
  10. Hey... I've found this post because I had to accomplish a similar task. @dadish thank you for sharing this code-example. If anybody stumbles up this post again I want to mention that there's a little error inside: Instead of you have to set the new language value like this: //Set the value of the field for to language $p->setLanguageValue($langTo, $field, $fromValue); See https://processwire.com/api/ref/page/#api-setLanguageValue Many greets!
  11. @dragan I don't have the permission to view this forum, could you please post the solution here?
  12. Push... No, ideas? @ryan may I asked you, if you could have a look on this thread and give me a little hint ?? Many greets!
  13. When I do bd(wire('languages')->getLanguage()); in my module, I get an error: Session: Method Languages::getLanguage does not exist or is not callable in this context
  14. Hi @Dzung it depends on how much you want to build on your own or how many conditions you want to have preset. There are many ways how a blog system could be build up. Just search the forum to get an idea. Perhaps this might be a good starting point for you: Many greets...
  15. Hi, I've had the same problem. Have a look here, this helped me out: https://github.com/ryancramerdesign/LoginRegister/pull/4/commits/e678f0d87abf9c8e43028f3636aaedb5ee43359e Many greets!
  16. Hi, maybe I've found a bug, but there's a behavior I can't explain: I'm trying to hook into Pages::saveReady with following code example: https://processwire-recipes.com/recipes/extending-page-save-process/ <?php /** * Hook the saving of pages to add own processes. * * ProcessWire 2.x * Copyright (C) 2014 by Ryan Cramer * Licensed under GNU/GPL v2, see LICENSE.TXT * * http://processwire.com * */ class HookAfterPagesSave extends WireData implements Module { public static function getModuleInfo() { return array( 'title' => 'HookAfterPageSave', 'version' => 1, 'summary' => 'Hook the saving of pages to add own processes.', 'singular' => true, // Limit the module to a single instance 'autoload' => true, // Load the module with every call to ProcessWire ); } public function init() { // init() is called when the module is loaded. // saveReady is a hook after processing the previous changes of the page, // but just before those changes are saved to the database. // It's called for each page that's being saved, no matter if it's in // the backend or in your templates via the api. $this->addHookAfter('Pages::saveReady', $this, 'afterSaveReady'); } In the afterSaveReady() function I'm trying to get the language property of the user who saved that page, but instead of returning the correct user language the default language is always returned. <? public function afterSaveReady($event) { $userLanguage = $this->user->language; bd($userLanguage); $this->message("User Language: ".$userLanguage); }; Here's the output and a test with the console of TracyDebugger Any ideas? Should I open a ticket here: https://github.com/processwire/processwire-issues/issues ? Many greets!
  17. Which tab is initially activated depends on the chosen user language. See \wire\modules\LanguageSupport\LanguageTabs.module line 69: // determine the index of the tab for the user's language $activeTab = 0; foreach($this->languages as $index => $lang) { if($lang->id == $language->id) $activeTab = $index; }
  18. Hey girls and guys, I'll want to open this thread in order to discuss a main problem I've run into with following setup: I'm maintaining a site where different URLs are directed to the same folder. In site/ready.php the $user->language is set based on the $config->httpHost <?php /* Set language based on the domain and user is not logged in */ /* Slovenian */ if( $config->httpHost == "www.domain.si" || $config->httpHost == "domain.si" || $config->httpHost == "domain.si.local") { if (!($user->isSuperuser())) $user->language = $languages->get('si'); } /* German */ elseif( $config->httpHost == "www.domain.at" || $config->httpHost == "domain.at" || $config->httpHost == "domain.at.local" || $config->httpHost == "domain.ch" || $config->httpHost == "www.domain.ch" || $config->httpHost == "domain.de" || $config->httpHost == "www.domain.de") { if (!($user->isSuperuser())) $user->language = $languages->get('default'); } /* Croatian */ elseif( $config->httpHost == "www.domain.hr" || $config->httpHost == "domain.hr" || $config->httpHost == "domain.hr.local") { if (!($user->isSuperuser())) $user->language = $languages->get('hr'); } /* English */ elseif( $config->httpHost == "www.domain.eu" || $config->httpHost == "domain.eu" || $config->httpHost == "domain.eu.local") { if (!($user->isSuperuser())) $user->language = $languages->get('en'); } /* Italian */ elseif( $config->httpHost == "www.domain.it" || $config->httpHost == "domain.it" || $config->httpHost == "domain.it.local") { if (!($user->isSuperuser())) $user->language = $languages->get('it'); } The homepage (id=1) has following settings: As you can see German (Deutsch) is set as default language. Everything is working nice and fine and I'm really happy with this kind of setup but now there are some new requirements, which causes me quite a headache : I've to add some pages only in one or two languages (they should not be present in German) I've to create some editor roles that are allowed to only edit (can be done with https://processwire.com/docs/user-access/permissions/#multi-language-page-edit-permissions) & add pages to their specific language. What I've found out so far: The default language can't be disabled and must always be present (though this would be in my eyes the easiest solution) Creating my own "language select field" - example here: won't work in this case because I've to rely on the native languages in order to setup the right permissions for editors. There seems to be some solutionsbut I think these won't match for me because I've to think about handling editors and permissions, too. After searching and searching, scratching my head and searching and searching again, the only possibility that comes to my mind is to add another language for German and assign this language to the specific URL's instead of the default language. The advantages with this solution for me: I could activate or deactivate any language on any page Editors which are allowed to add pages can get the permission page-edit-lang-default without affecting the German pages. The disadvantages: All multi-language-fields will have an empty tab for the default language - this may irritate editors a lot Seems to me like a lot of work to do because I've to copy the language field nearly for 1000 pages/repeaters (maybe I'll find an SQL query) My questions: How would you handle this task? Could my setup be optimized in a completely different way? If I go for my solution (adding another language for German) would it be possible to hide the language tab for default language in any way? If some points aren't clear enough please don't hesitate to ask. Many greets...
  19. Hi, I'm using this kind of setup (https://processwire.com/blog/posts/language-access-control-and-more-special-permissions/#language-page-edit-permissions) in order to control the page edit permissions. Now I'm wondering if it's possible to hide the "none-ediable" language-tabs instead of striking them through. Many greets...
  20. Hi, I've found this topic due a hint from @Robin S here: One question is open to me: I'm wondering if it's possible to "manually create" an error in order to test if the code is running fine and everything works as expected? Could someone please give me a hint how to force the LoginRegister module to throw an error. Many greets!
  21. @Robin S Thank you for your advice, somehow I've missed that topic during my research! I'll post other questions there. Many greets.
  22. Hi all... after looking into the I've recognized some errors caused by this module. Error: Exception: Login not attempted due to overflow. Please wait at least 5 seconds before attempting another login. (in /***/public_html/wire/modules/Session/SessionLoginThrottle/SessionLoginThrottle.module line 150) Error: Exception: Login not attempted due to overflow. Please wait at least 20 seconds before attempting another login. (in /***/public_html/wire/modules/Session/SessionLoginThrottle/SessionLoginThrottle.module line 150) Error: Exception: This request was aborted because it appears to be forged. (in /***/public_html/wire/core/SessionCSRF.php line 191) Is there a way to output these errors in a user friendly way, without throwing an "Internal Server Error" on the Frontpage (see attached video)? Many greets! IMG_3955.MOV
  23. I'd run into the same issue. Everything worked well, but then I've added a PageReferenceField to the user template. Since then I can't complete the register process. Unable to complete confirmation, please re-register and try again @Dadswell96 Did you find a workround? Many greets!
×
×
  • Create New...