Jump to content

olafgleba

Members
  • Posts

    102
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by olafgleba

  1. Hi @adrian, while multilingual internal links works quite well, if i add an anchor to the url, the url remains on the default language. I tried to adapt the module in my local playground (hoping to be able to give some input), but til now no luck. Internal page link (when on DE site): /kontakt/ Internal page link (when on EN site): /en/contact/ Internal page link (when on DE site): /kontakt/#anchor Internal page link (when on EN site): /kontakt/#anchor Should be: /en/contact/#anchor
  2. Meanwhile luckely i could solve this by deleting/reinstall the module (same version). Thx.
  3. Hi @adrian, i use your fork quite a lot (always wondering why this isn't a core feature). Latest version installed. Now i stumble across a strange behaviour which left me a bit confused: When i insert a mail link in the modal window URL field one particular E-Mail address is truncated after saving (s.below) constantly. While this addresses are get saved flawlessly : - info@olafgleba.de - info@olaf-gleba.de - info@olaf-gleba-nature.de - info@olaf-for-nature.de - info@gourmetsfor-nature.de - info@gourmets-fornature.de - info@nature-for-gourmets.de - and many other tested addresses... This E-Mail address (and only this one) will not: - info@gourmets-for-nature.de It gets truncated to info@ I have not much hope you can help me with that (especially because simular address patterns (s. above) has no problem at all). But, mabye you or someone sees something i don't 😉 Thx and regards, Olaf
  4. @bernhard Good point. Although for my use case the scenario isn't critical i will consider this.
  5. Regarding to @Markus Thomas. Working example. $wire->addHookAfter('Session::loginSuccess', null, function ($event) { $session = $event->object; if ($this->wire('user')->hasRole("<role>")) { $session->redirect($this->wire('config')->urls->root."/<path-to-page>/"); } });
  6. @Robin S I wasn't aware of this config setting, thank you.
  7. @Markus Thomas Thanks a lot, that indeed is simple with no overhead 😉
  8. @bernhard sorry, if i was a bit short here. Use case: I have a live site and a local instance (identical status/content). Now i (locally) like to add some small, but database changing stuff. When i am done i simply want to swap the live database with the local one. Without concerning about maybe different content status. Not appropriate in every situation/client, but nice to have for some.
  9. If i get it right, this module is rather meant for frontend maintanance.
  10. Hi, is there a easy way to temporarily prevent users (with a specific role) from backend login? The frontend has still to be untouched, e.g. stay visible. A configurable screen while blocking time would be great. I couldn't find any suitable in the module directory or hints in forum posts. regards Olaf
  11. As both fields may be populated and wanting the behavior nonetheless, the "if one is empty, than..." doesn't fit anyway. But you gave a good hint with that hidden field approach. Thats the way to go, i think. Many thanks!
  12. Hi, maybe i am too simple minded today, but my guess is that the following task is not possible(?): I have two datetime fields in a template, lets say Date_1 and Date_2. The template output ($pages->find()) is sorted by Date_1 in descending order. Now, if Date_2 is populated it should join the result output chronological. Example: I have 3 Pages Page => Date_1: 08.2.2023, Date_2: Ø Page => Date_1: 06.2.2023, Date_2: Ø Page => Date_1: 05.2.2023, Date_2: 07.2.2023 The default sorting gives me this: 1. Page 2. Page 3. Page Desired result: 1. Page 3. Page 2. Page Please, i would be delighted if you proof me wrong. 😉 Many thanks in advance Olaf
  13. Hi, for a client project i am evaluating whether to implement this with Processwire (preferred of course ;-)) or if something else fits better. I have no experience with Payment Workflows in conjunction with Processwire so far. Project summary: There are large number of (small) Children Art Schools. They all offers workshops on there Websites (online/offline). These websites are built with partly unknown CM-Systems. To date some of them has a simple registration form (payment offline per invoice only), while some only even have a Registration PDF to Download. Billing and chargeback issues bothers them a lot because the lack of staff ressources. Planned is a stand-alone Registration Portal for all Art Schools. While the offers still being part of their websites (some kind of, s. below), the registration process should be delegated to the Portal. Therefore every offer just has a correponding link to the Registration Portal. Payment is a obligatory part of the registration process. __ Portal features: Backend: - Each Art School has a separate, isolated Account to maintain their offers, invoices and customer records - Each Account (e.g. each Art School) creates their offers in the backend, these entries are shown in the Frontend of the Registration Portal (kind of duplication as offers also exists within the Clients Websites, but required to not interfere with the Art School Websites' CM-Systems, reason s. above) Frontend: - Nothing fancy: Listing of workshops, filter by Art Schools, categories, search form Process: - Each registration record have to be bounded to the corresponding Account(s. above) - In conjunction with sending some mails, each registration record must be saved in a customer tree/table/page to hold the customer data, provided by the registration form. Payment: - A Payment Provider must be integrated to provide digital payment options (credit card, debit a.s.o.) and secure transactions __ So at first sight these are not any very complex needs. But while i try to collect as much infos as possible, i am increasingly unsure which way is a reliable way to do it. I heard from Padloper. And read the (work in progress) documentation. I am not sure the project requires a full store with cart though. And there is the Stripe Payment Processor for FormBuilder/Stripe payments Inputfield for FormBuilder, for example. I understand the difference between the padloper and FomBuilder approach, still i speculate which approach is suitable for the project needs. Most of the time i have rather strong opinions how to do things. But here i get a bit lost. Because i didn't have those requirements in a project so far. So, any hint, suggestion or insight surely will help me a lot to make appropriate decisions. Many thanks in advance, Olaf
  14. Could be helpful for someone,- this is how it turns out... Note: The code examples only represent the relevant snippets related to the topic. They are not illustrating a complete search form. regards, Olaf /** * PHP section */ // Init vars $selector = ''; $selected = ''; /** * Build selector string for the search query (`$pages->find(...)`) * * 1. `$input->get('type_of_audience')` is a array (s. HTML section below) * 2. Input gets sanitized into a unique variable (because in the real form * there are multiple filter groups (not included in this bare example)) * 3. The `field` variable is just a prefix for the selector string * 4. Join array elements to a string, Delimiter `|` * 5. Whitelist the sanitized value */ if($input->get('type_of_audience')) { $value_type_of_audience = $sanitizer->intArray($input->get('type_of_audience')); $field = "combo_productions_attributes.type_of_audience="; $selector .= $field.join('|', $value_type_of_audience).", "; $input->whitelist('type_of_audience', $value_type_of_audience); } /** * HTML form section * * Implies surrounding `<ul>` and `</ul>` element */ /** * Build the HTML element (Grouped Checkboxes) * * 1. The foreach array is populated by hand in this case * 2. If input exists in the delivered array, set `checked` attribute */ <?php foreach(array( '1' => 'Adults', '2' => 'Children') as $val => $label) { echo "<li>"; $selected = in_array($val, $input->whitelist->type_of_audience) ? "checked='checked'" : ''; echo "<input type='checkbox' id='$label' name='type_of_audience[$label]' $selected value='$val' />"; echo "<label for='$label'>$label</label>"; echo "</li>"; } ?>
  15. Thank you, @Robin S , for your answer. Yes, i am using the MarkupPagerNav. And have no idea why i didn't consider the MarkupPagerNav Docs... Instead i was focusing on the sanitizer class (s. below). However, with setting the arrayToCSV option to false, the arrays are kept in the original format indeed, but still looses their keys. http://<local-path>/?type_of_audience[]=1&type_of_audience[]=2 To keep the OP short, i didn't mentioned that i already use sanitizing and the whitelist to build the selector string for $page->find(). But didn't consider using it to set the values/states you suggested (and is shown in @ryan's examples). That's a neat idea. I think this is the way to go... Thx again, Olaf
  16. Hi, it would be nice, if someone has a hint for me. I try to put it short (and hopefully the issue is more PW than PHP related ;-)). I have a search form which has several (named, multidimensional) filter groups to narrow down the results. Form method is GET. Bare, example filter group, limited to only 2 filter options: <ul> <li> <input type="checkbox" name="type_of_audience[adults]" id="adults" value="1" <?php if(isset($_GET['type_of_audience']['adults']){ echo "checked"; } ?> /> <label for="adults" class="label-checkbox"> Adults </label> </li> <li> <input type="checkbox" name="type_of_audience[children]" id="children" value="2" <?php if(isset($_GET['type_of_audience']['children']){ echo "checked"; } ?> /> <label for="adults" class="label-checkbox"> Children </label> </li> ... other options ... </ul> After submitting the form, the results are fine and the activated checkboxes remains being checked. The query string looks like this: http://<local-path>/?type_of_audience[adults]=1&type_of_audience[children]=2 If the result is bigger than the query limit, so that the pagination is shown, the pagination query string differs from the above. It then looks like this: http://<local-path>/page2?type_of_audience=1,2 The pagination result pages are valid/correct, however. But as i have lost the keys of the filtergroup, the condition within the checkboxes markup (s. above), to keep the activated checkboxes being checked, of course doesn't fit anymore. So, my question is: Is there anything i can do about the query string building for the pagination? Or do i miss something other essential? Thx in advance, regards Olaf
  17. Brilliant! Since i am involved in multilanguage projects most of the time, this will become very handy. And i use/like the combo fieldtype a lot. So it would be great to see the module supports this fieldtype!
  18. Same here. 1. When System in debug mode is checked with $config->debug = true, the hidden pages do not show up in the page list. Switching to $config->debug = false the hidden pages are shown in page list. 2. When Current user is superuser is checked being logged in as a superuser, the hidden pages do not show up in the page list. Except i misunderstand the feature, i guess the except condition just has to be swapped/needs a little adjustment. Apart from that, thank you @ryan. This really is a very helpful new setting!
  19. And installing less in addition. Really no big deal, but just saying ?
  20. Hi @bernhard, thanks for answering. I know this as well while working for agencies (freelance),- adapting to their environment. But if i have the choice, i stick with my current dev environment that all is build around Gulp and its ecosystem. And browersync intergrates here very smoothly. I guess thats one reason i stick for it for quite a time yet.
  21. Thx. The latest ProField Repeater Matrix has the option (input tab) to define the method for adding items. When you choose Images you get the overlay. By default, the image of the matrix type have the same name and is placed along with the type file location (for example: /site/templates/fields/modules_page/matrix_type.php => site/templates/fields/modules_page/matrix_type.svg). Preparing a good looking Image is just up to you then ?
  22. Just because there is no need for this extra. The client is happy what he got. Coming from Typo3...
  23. A week ago the new website of the wuppermann group went online. The Wupperman group is a EU-wide operating company with several locations in different countries. Their portfolio is all about steel fabrication. This includes flat producs, tubes & profiles. The technical production is developed by me, Olaf Gleba. The grafic design is supplied by C&G: Strategische Kommunikation GmbH. Homepage: https://www.wuppermann.com Some Impressions: (Secured) Shareholder portal, only available in german language Former screens deleted on behalf of the client. Technical notes: 1. All contents are populated by provided (i name them) content modules (e.g. Repeater Matrix Types) which gets the client what he needs and either prevent him from doing weird stuff. In nearly all textareas formatting is limited to a absolute minimum. For example, image insertion in CKEditor is generally prohibited. Instead there are dedicated fields for modules which holds media contents. 2. This and that.. - vCards are build on the fly with a admin hook on page save. - PrivacyWire as CCM (just a few cookies to handle Matomo and external movie content) - Uses the SearchEngine Module to handle (multilanguage) site search - Email Obfuscation Module for frontend e-mail addresses - Wire Mail Smtp to deliver automated e-mails - Multilingual (german, english, hungerian, polish, dutch) - Ajax driven content (for example on the contact page) - Heavy use of Fieldtype AssistedURL (Fork by @adrian) to provide language dependend, local file linking (fieldname_[de|en] approach) - Login area (closed shareholder portal) with secured file downloads ($config->pagefileSecure = true) - Email New User, Admin Action (create users batcher), Force Password Change for functionality like adding new users with specific roles, Password reset, Change Passwort a.s.o. - Distribution of concatenate/minified css and javascript is cachebusted (happens within my developement environment,- no modules (like AIOM etc.) involved). - Thanks to @ryan* all images are delivered in WEBP format (with fallback). *) s. https://github.com/processwire/processwire-issues/issues/1497 - The site uses a bunch of modules provided by the ProFields Package (for example Repeater Matrix and Table Fieldtypes).
  24. Hi @bernhard, just being curious ;-). My current dev environment (i am afraid the github version is not quite up-to-date ?) for PW projects is based on Gulp as task runner, the PHP internal server and (beside many other things) Browser Sync ( https://browsersync.io/ ) for live injection or reloading (depending on file type) on several devices. Works fine. The problem you describe above never occured to me. As i follow your posts here in the forum quit frequently, i guess you are familiar with different approaches for dev environments. I, for example, never used webpack so far. But i am always keep my eyes(and mind) open... In your point of view,- are there some outstanding pros using webpack (and his eco system)? I know, not very precise, but just wanted to take the chance...
×
×
  • Create New...