Jump to content

Pixrael

Members
  • Posts

    341
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Pixrael

  1. What if… Visual Studio Code became the editor of in-browser Developer Tools? www.youtube.com/watch?v=77qEmDlFtzg https://www.youtube.com/watch?v=g_TpkkmYzXs
  2. Yes, it works with this three lines in the home template file, but you must enable the urlSegments in the home template.. now the AppApi configuration still have the "domain.com/api/users" as endpoint but "domain.com/users/" works too.. if you try "domain.com/foo/" the api respond with a 404 json response
  3. @kongondo This does not work, these new hook functions only work when the requested URLs are not mapped directly to a page and the home page is "always there". @Sebi Could it be possible to use the homepage template file to "wireIncludeFile" the routes file, or to directly pass the request to your module, ex. initialize a module static function with the input object? AppApi::Execute($input);
  4. @Sebi How to set the "API Endpoint" module configuration correctly? I need to create a website (subdomain) that is an API server only, no web pages will be served from there.. I test the parameter like "/" in order to works like: https://api.domain.com/users/ but this show a "404 Not Found".. I need the endpoint entry of the API in the "home" of the website
  5. $import_timestamp = time(); foreach($jsonData as $jsonDataItem) { // Search for the page $imported_page = $pages->findOne("template=import_page, title=$jsonDataItem->name"); // Check if the page exist if ($imported_page->id) { // update values $imported_page->setAndSave([ 'field_A' => $jsonDataItem->source_A, 'field_B' => $jsonDataItem->source_B, 'field_C' => $jsonDataItem->source_C ]); } else { // create new page $p = new Page(); $p->template = 'import_page'; $p->parent = $pages->get(xxxx); $p->title = $jsonDataItem->name; $p->save(); } } // use this because if the pages were not updated/created during this import it means they don't come in the json $old_imported_pages = $pages->findMany("template=import_page, modified<$import_timestamp"); // hide/delete all $old_imported_pages..
  6. 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/
  7. Have you already tried using the repeater field for that? https://processwire.com/modules/fieldtype-repeater/
  8. .. 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/
  9. ProcessWire can be checked? https://www.zdnet.com/article/google-releases-new-open-source-security-software-program-scorecards/ https://github.com/ossf/scorecard
  10. 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.
  11. 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. 🤷‍♂️
  12. 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.
  13. 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
  14. https://processwire.com/api/ref/page/set-and-save/ // Not needed: $order->of(false); $order->setAndSave([ 'pad_user' => $u->id, 'expire_date' => $expireDate, ]);
  15. Tip: always use Google to find information about Processwire
  16. You can use this too: <?php echo $pages->get(1025)->FIELD ?? ''; ?>
  17. In the meantime you can go using this: https://www.uniformserver.com/ it has worked wonderfully for me
  18. 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.
  19. 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 .. 😱??
  20. ADVICE: Jump directly to this: https://processwire.com/docs/front-end/output/markup-regions/
  21. 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!
  22. @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 😉
  23. I agree.. today everything is SaaS like.. membership+subscription is the thing
×
×
  • Create New...