Jump to content

elabx

Members
  • Posts

    1,248
  • Joined

  • Last visited

  • Days Won

    16

Posts posted by elabx

  1. On 4/4/2024 at 9:54 AM, Jonathan Lahijani said:

    What makes ProcessWire unique to you that you just haven't seen elsewhere and how deep does ProcessWire go with certain decisions or features that other systems don't from your experience?

    I haven't really digged into the admin customizations of PW-like CMSs I've used like Statmic/CraftCMS but the way you can modify view/behaviour of Inputfield and it's derived classes in ProcessWire is really nice imho. 

    • Like 2
  2. With ChatGPTs API I've built a small module that renders a small button sitting next to image's description field that when clicked does image recognition of the image, and spits out a small text for alt purposes. The irony? The real value of this would be the actual automation which I haven't had time to do hahaha.

    Also I have to mention it works fairly well, but would like to make it more "on brand" when doing the prompts, so I gotta work on an interface to kinda make this presets?? So that the final description is based on something related not just purely descriptive (in come cases). I haven't had time to do some trial/error. But for now it kinda works like the site you pasted! 

    • Like 2
  3. Hi! I've made an experiment to support nested repeaters updating a little bit the previous update. Not sure how common this is, but I have a lot of scenarios where I have at least one extra level of repeaters, and I'd benefit from this dependency update to change the fields of nested repeaters.

    https://github.com/elabx/processwire/pull/1/commits/bdf7e4fc21961712abf7ee3e1e6910de32683725

    Not sure if you are in the possibility of testing this @adrian? Thanks!

     

  4. Hi everyone! I built this module trying to solve the following issue.  Most of the time I use Repeater Matrix types with a few fields wrapped in a fieldset that are for configuring the behaviour/rendering of  a specific repeater type, and are not really content related so I had always wanted to have them kind of hidden, but with a small preview of that the options are set (which I've yet to do).

    https://github.com/elabx/FieldtypeFieldsetPanel

     

    • Like 13
  5. 21 hours ago, Violet said:

    Even if you don't have a specific solution to this exact question, I'd love to hear any comments/input that you might have surrounding this overall topic.

    They way I've sort of done this is with New Relic, you install agents for php/apache/mysql in the server and does it's magic to monitor the relevant processes.

    And I say "sort of done this" is because I didn't really plan for anything, just wanted to test it out and got easily overwhelmed by all the features it has and concepts I don't really understand. I did manage to get alerts on spikes in memory and load, but that's about it and I'd say thats like 0.01% of what newrelic does, but kinda solved what I needed at that moment. 

    • Like 2
  6. Hi @Focksbot! It would depend on how your site is rendering it's frontend output. Check output strategies.

    From most common to less common is:

    So first I'd check if there exists a home.php file in /site/templates and start from there to see if direct output is implemented. Also if  you read the docs above its a good place to start too. If you still feel lost, maybe a screenshot of how your filesystem looks would help too, to see the organization of the template files. But almost 100% sure that what you're looking for is in /site/templates

    This is sort of ProcessWire's blessing and curse (for people unfamiliar with ProcessWire) as it doesn't have an output strategy tightly coupled with a specific set of data such as posts/pages like in Wordpress,  in ProcessWire those would have to be built with templates/fields  and eventually Page(s), the main building blocks of data in ProcessWire.

    • Like 2
  7. On 11/19/2021 at 9:54 AM, DV-JF said:

    Maybe someone else has an idea about this?

    It's not exactly the same technique, but I have just got into this rabbit hole and after a bit of blood sweat and tears and help from a pal, this is working for me while using ProCache and using the nonce attribute on scripts.

    This configuration assumes you have mod_substitute and mod_cspnonce installed.

    <If "%{THE_REQUEST} !~ m# /processwire/?#">
      Options +Includes
      AddOutputFilterByType SUBSTITUTE;INCLUDES text/html
      Substitute "s|--CSP-NONCE--|<!--#echo var=\"CSP_NONCE\" -->|i"
      # Customize to your needs
      Header add Content-Security-Policy "default-src 'self' 'nonce-%{CSP_NONCE}e';
    </If>

    Place this at the end of the ProcessWire htaccess directives. 

    This should swap on the fly the Apache response and replace any --CSP-NONCE-- script.

    Then on Apache you can also set the nonce headers like this: 

     

    I do not use this because my server setup uses nginx as reverse proxy.

    For example:

    <script nonce="--CSP-NONCE--" src="https://totally-safe-website.com"></script>

    Will end up as:

    <!-- nonce swapped on every request! -->
    <script nonce="0O4I3O5nNFG/MVpqormzyIuH" src="https://totally-safe-website.com"></script>

    @ryan fyi 

    In theory, this would be A LOT simpler in Apache 2.5, since you could put an expression within the Substitute directive instead of the server side includes to substitute the "--CSP-NONCE--" script, but right now I'm limited to Apache 2.4 in the setup where I need this since I don't have control of the stack versions. So this should work in Apache 2.4+

    • Like 3
    • Thanks 1
×
×
  • Create New...