Jump to content

Pixrael

Members
  • Posts

    336
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Pixrael

  1. You can use the urlSegments to choose which html code to output in the template file, it can be with the code directly or with file include. https://processwire.com/docs/front-end/how-to-use-url-segments/
  2. Have you already tried using the repeater field for that? https://processwire.com/modules/fieldtype-repeater/
  3. .. or you can use $input->get() check docs here: https://processwire.com/api/ref/wire-input/get/ if you want to learn how to use ulrSegments, read this: https://processwire.com/docs/front-end/how-to-use-url-segments/
  4. ProcessWire can be checked? https://www.zdnet.com/article/google-releases-new-open-source-security-software-program-scorecards/ https://github.com/ossf/scorecard
  5. I implemented that previously. In my experience, if you create a page for each event (using child pages or repeater) you will end up with hundreds of thousands of pages quickly, and in each one you will recorded only a minimum data. I think that is very inefficient. Maybe using ProTable is a better solution. I finally ended up using a textarea and saved one event in each line, when I was going to show the timeline I parsed it with regex, as well to update the tracking info this is very easy. Maybe if I do that again, I would avoid parsing every request for the tracking info by saving/reading/updating the events in JSON format.
  6. I think the "correct" way to do it, is how you have it implemented now: for each portfolio, you query the related user to obtain the additional data. It's true that if you are constantly making queries of this type (ex: inside a loop), that performance is not optimal. Maybe if you use some kind of page/template cache you can solve it. Another way could be to keep a copy of the user's data in a "user" field of the portfolio template (using a textarea field and save all user data in JSON, or use the new ProFields Combo field) and implement a synchronization system based on hooks, then in the users' Page Save hook, find the related portfolio and updates that JSON field. 🤷‍♂️
  7. I have been using exactly that workflow for a long time now, with total success in medium to complex projects. Additionally I add components and partials using wireRenderFile or wireIncludeFile and that's all I have needed. It's important to note that all my projects are one man projects.
  8. Check this: https://www.fastcomet.com/processwire-hosting I never try this Managed Processwire Hosting, but I used their regular hosting plans, and they comes with cpanel + softaculous, so you can install PW easily.. fast hosting
  9. https://processwire.com/api/ref/page/set-and-save/ // Not needed: $order->of(false); $order->setAndSave([ 'pad_user' => $u->id, 'expire_date' => $expireDate, ]);
  10. Tip: always use Google to find information about Processwire
  11. You can use this too: <?php echo $pages->get(1025)->FIELD ?? ''; ?>
  12. In the meantime you can go using this: https://www.uniformserver.com/ it has worked wonderfully for me
  13. I'm sorry.. I did not want to distort this forum topic, it is just that this fact caught my attention .. ProcessFileManager is an interesting solution to fix something in a hurry, you just have to apply a very good access control. Years ago, when I was traveling and I was using ICE Coder (https://icecoder.net/) in a project and it worked well for me, then when I return I uninstalled it.
  14. Is Processwire losing traction?? ... lately I have read many comments in this forum from several of the most prominent people in the discussions who are no longer working with Processwire .. 😱??
  15. ADVICE: Jump directly to this: https://processwire.com/docs/front-end/output/markup-regions/
  16. Pixrael

    Webwaste

    That's right .. in my company we have debated many times about the current trend of web design with so many graphics and stock photos, and too much bombast in the texts. After a couple of minutes looking at the pages you still do not understand what exactly they are trying to sell, offer or inform. A total loss of the message, and all for the "beauty" of the page. It's the sublimation of "an image is worth a thousand words", but incoherent words I suppose!
  17. @bernhard several days ago I found this free image cache & resize service https://images.weserv.nl/ just in case you want to create a Rock module for that 😉
  18. I agree.. today everything is SaaS like.. membership+subscription is the thing
  19. You're right, but I think it depends on the project. In my case, it's an internal company system, and only the admin accesses the user's url in the backend. I also take into account a future situation, when the user needs to enter his profile on the front-end, in that situation he is the only one who has access to the url that shows the name of the page. For me it works perfectly. The developer just needs to think ahead and decide. Any page name you want to use in PW should be sanitize first as a rule.
  20. In my current project, I have the user's email field as required, and realizing that the email is unique to each user, I use base64_encode () successfully, having john.doe@email.com the page name of that user is unique like am9obi5kb2VAZW1haWwuY29t, in addition, this keeps a record of the initial email used when registration was made. Initially I had thought of using the email with $sanitizer->pageName() but I did not want to expose the email address so obvious in the url.
  21. This happened to me once and the problem was a non writable folder, check this comment:
  22. Hi, I am trying to organize a new project (admin UI style) and the urls structure should be as follows: /products/ Products list /products/discontinued Products list filtered /products/draft Products list filtered /products/new New product form /products/edit/P0123456789 Edit product form /products/inventory Inventory page /products/P0123456789 Product detail view I am analyzing that if I implement the page relationships in the regular Processwire way for routing, I will end up having something unwanted like this: home - products -- new -- P0123456789 -- edit -- P0123456788 -- P0123456787 -- inventory -- P0123456786 I was thinking in a page structure that contains "static" pages in a "visual" tree and keep constantly growing pages/data in a separate Tree node, then use urlSegments to load/display them, it will be something like this: home - products -- new -- edit -- inventory - data -- products -- P0123456789 -- P0123456788 -- P0123456787 -- shipments -- S0123456789 -- S0123456788 -- S0123456787 -- orders -- D0123456789 Having activated URLSegments in the Products list template I can do the following: /products/ ("list-products.php" all products) /products/discontinued ("list-products.php" filter products with urlSegment) /products/draft ("list-products.php" filter products with urlSegment) But for the Product details view case, I have Four possible scenarios here: 1st. The product node (in the "data" nodes) will have the template file "detail-product.php" assigned to it. The "list-products.php" will use urlSegment to render the requested product page instead of rendering its own "list-products.php" markup. ex: /products/0123456789 2nd. A "item" node with template file "detail-product.php" assigned, will use urlSegments to load product info from "data" product nodes. In this case product nodes do not have template file associated, they only store information. If the url "/products/items/" is requested without segment, it will redirect to parent "/products/". ex: /products/item/0123456789 The "static" page structure will ending like this: home - products -- new -- edit -- item -- inventory 3rd. Following the 2nd scenario, have the product pages directly in the "item" node (the natural processwire structure, no urlSegment implemented). ex: /products/item/0123456789 The page structure will ending like this: home - products -- new -- edit -- item -- P0123456789 -- P0123456788 -- P0123456787 -- inventory 4th. Is the inverse solution to 1st. scenario. Have the product pages directly in the products list node (the PW way), and use the urlSegments in Product list page for the other operations. For ex. New, Edit, Inventory, etc. will be rendered instead the Product list page. The markup of this pages should be placed in other hidden nodes or can be placed only in the file system. The page structure will ending like this: home - products -- P0123456789 -- P0123456788 -- P0123456787 What do you think? Which option is better: the first or the second? Do you think there is another way to organize this? PS: I know that it's a bit heavy to be asking about this again, but is an important decision for a complex project.. and maybe the answers here will serve in the future for someone else in the same situation. Thanks
  23. @szabesz your Tampermonkey script should looks like this: // ==UserScript== // @name New Userscript // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author You // @match http://domain.test/pw/module/edit?name=TracyDebugger // @icon https://www.google.com/s2/favicons?domain=domain.test // @require https://cdnjs.cloudflare.com/ajax/libs/jets/0.14.1/jets.min.js // @grant none // ==/UserScript== (function() { 'use strict'; $("#ModuleEditForm").prepend('<input type="search" id="jetsSearch">'); var jets = new Jets({ searchTag: '#jetsSearch', contentTag: '.Inputfields' }); })(); the @match parameter is the URL where the script will run each time your browser visit it.. then you will see a small form input before the Module Information Fieldset
×
×
  • Create New...