Jump to content

dragan

Members
  • Posts

    2,007
  • Joined

  • Last visited

  • Days Won

    21

Posts posted by dragan

  1. Hi @kunago and welcome to the PW forum.

    I am not sure if you refer to the actual "page-edit" / backend-GUI scenario, but I guess you do.

    What you can do is to duplicate the original image, and then crop that duplicated image, and save it as a variation.

    Or do you want to have a custom preview of all images in the page-edit instance to be always "aspect ratio 1:2"? (thumbnails)

  2. Well, I just found processInputErrorAction() in ProcessPageEdit.module, but that is a non-hookable method. A related function seems to be

         * // Disable change tracking
         * $page->setTrackChanges(false);

    which is in wire/core/Wire.php

    I would maybe try to work with "Required only if custom PHP returns true" and add some logic like "required only if data is edited in the frontend", but I'm not even sure that's possible.

    A quick test with

    $isAdmin = $this->page->rootParent->id == 2;
    return !$isAdmin;

    seems to work... (thanks to @LostKobrakai's post here)

    • Like 1
  3. Well, frankly speaking, I don't quite see the issue here. Required is required, so some warning messages make sense. Why do you define certain fields as required in the first place?

    You can try to be creative with other kinds of setups / workflow, e.g. nothing is required initially (on save). But you could define some fields as required only once the page gets published. There are probably methods and hooks that let you do that, e.g. https://processwire.com/api/ref/pages/publish-ready/

    You could also "fake" a required field in the backend, e.g. use labels like "Phone*" and / or use a yellow background (UIKit field settings). In other words - make them look super-important for the users visually.

    Here's a rather old thread that is somewhat related: https://processwire.com/talk/topic/4476-validating-field-before-page-save/

     

  4. 30 minutes ago, neophron said:

    I know this link, but it doesn't exist right now 

    Well, that error message is unfortunately misleading. It should say something like "This board is only accessible if you have a paid Pro support license". When you buy a Pro module, you have access to the VIP forum for one year. After that, you have to sign up for a support plan (the module itself doesn't have an expiry date, of course), which is something like $25 / year, last time I checked.

  5. On a related note: Does anybody know what these random strings like 6450242531912981c3683cae88a32a66 are used for?

    {
        "file": "site\/modules\/FormBuilder\/ProcessFormBuilder.module",
        "textdomain": "site--modules--formbuilder--processformbuilder-module",
        "translations": {
            "6450242531912981c3683cae88a32a66": {
                "text": "Formulare"
            },
            "c9cc8cce247e49bae79f15173ce97354": {
                "text": "Speichern"
            },

    (This short excerpt is from a generated translation file for Form Builder)

    Is this just for making sure you get a valid JSON and keeping key/values intact when you switch between PHP arrays and JSON? (keys)

  6. 1 hour ago, neophron said:

    I couldn't find in the ProField support a subsection for the Formbuilder).

    The FB board is here.

    1 hour ago, neophron said:

    but it's not for PW 3

    Often, a module is v3-compatible even though it's not officially marked as such. Try to install it and see if it works. Sometimes all you (maybe) need to add, is PW namespace in the .module file(s).

    There's also this module that might do what you want: http://modules.processwire.com/modules/guid-generator/

    • Like 1
  7. I once asked Ryan if he plans to add language files to his Pro modules. He doesn't plan to do so. His reply was (more or less) that most people using these modules were developers, not authors (clients), and a developer surely understands English. Fact is, many of the Pro modules are not only being used by superusers, so that's kind of a weak excuse. It's a lot of work translating e.g. a Lister Pro language file. Of course, for German, I only did it once, and then copy files over. Other eco-systems have solved this way better imho...

    On a side-note: Ryan is maybe missing out on marketing arguments here... it would be easy for him to aggregate at least a dozen translations for his modules from existing developers / agencies who bought a license and translated everything on their own. In return, he could give away licenses or free access to the VIP support boards to those ppl who translate Pro module JSON files ( A classical win-win situation ?).
    For some ppl, it makes a difference if a module is already translated in x languages or just English. That's a robust sales argument right there.

    • Like 5
  8. Apparently, that's an old question:

    https://processwire.com/talk/topic/15367-translating-module/

    https://processwire.com/talk/topic/2583-delivering-module-translations/

    Seems like nothing has changed in that regard in the last years ?

    I'm sure there would be workarounds, but then every module developer would have to create such a "install multi-language files" routine for himself, and that's hardly efficient (e.g. a menu in your module config screen where you could map JSON file A to PW-language C, and then the file(s) would be moved to the right folder. It would indeed be nice to have that functionality in the core.

    • Like 2
  9. On one particular site, CKEditor behaves rather weird:

    When I copy and paste "normally", i.e. CTRL + V, there is an alert popping up "do you really want to leave this page?". If you cancel, the text is pasted into the field. If not, you get redirected to the frontend of the page you just edited, and the changes are lost.

    The "paste from Word" button doesn't work. CTRL + SHIFT + V works, but all formatting is lost (apart from paragraphs).

    I'm using inline editor mode, ACF + Purifier are activated. I know that if I disable those two, CTRL + V works, but I won't do that, since CKE then saves all the garbage code from MS-Office.

    Has anyone ever come across this issue? I tried with Chrome + FF. No JS errors.

  10. 1 hour ago, Flashmaster82 said:

    The example link above is jquery

    Nope. One uses React, the other plain vanilla JS (ES6).

    You are actually asking more than one question.

    1. How to display such stuff in the frontend? (to some degree answered by your CodePen examples... but I doubt you want to use React just for one single widget like that)
    2. How to display such stuff in the frontend with contents that come from PW?
    3. How to save the user's combinations / choices (result lists) in PW?

    How familiar are you with ProcessWire? How familiar are you with JS?

    • Like 1
  11. 32 minutes ago, rash said:

    clickable on the admin page

    Where exactly? "on the admin page" is a bit vague...

    1. In the top menu?
    2. In a particular page when in page-edit mode?
    3. In the page-tree?
    4. elsewhere?

    For use-case 2, you could try https://modules.processwire.com/modules/fieldtype-runtime-markup/

    Another very useful module is https://modules.processwire.com/modules/page-field-info/ - especially if you need to provide contextual information based on your selection (checkboxes, radio buttons, page fields, options...).

    • Like 2
    • Thanks 1
  12. That's just the way it works. Once a page is saved, you have to manually edit the page-name. Only when you first create it, it takes the title string and creates the name from that.

    I guess the reasoning for this is that you shouldn't change page names too often, to avoid too many 403 errors.

    There's a module, however, which probably does exactly what you want: https://modules.processwire.com/modules/page-rename-options/

×
×
  • Create New...