Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/07/2022 in all areas

  1. Hey Jonathan, I think this post should get you started: https://processwire.com/talk/topic/735-session-time-for-logged-in-user/?do=findComment&comment=6173
    3 points
  2. Thanks for all of your responses! ๐Ÿ™ @wbmnfktr This is a very valuable feedback from your side. Kudos for all the insights you gave me! @pwired As I mentioned at the beginning of the post, my course will be for the benefit of those beginning and/or intermediate developers. So I think the sweetspot will be to not leave out the basic aspects of approaching processwire but at the same time focus on somewhat more advanced aspects, such as the ones you suggested, which seem to me to be excellent and absolutely doable. So, let's try to get serious here: I prepared a small landing page to validate how many of you would be willing to take the course, so that we would have a rough estimate of how many people would be willing to take the course. ๐Ÿ”— Show me your interest here ๐Ÿ”— It goes without saying that if, a month or so from now, I see a small number of consents perhaps I will understand that it will not be the case to proceed further. In any case, go visit the page and leave me your contact information (it is mentioned on the page but I would like to reiterate: none of your contact information will be retained by me, each e-mail is salted and hashed and handled securely by the newsletter service I have hooked up -- Mailjet in this case). Let me know what you think, let's keep comparing ideas. ๐Ÿ’ช
    3 points
  3. Even easy with this module: https://processwire.com/modules/fieldtype-select-ext-option/ โœŒ๏ธ
    2 points
  4. @Marco Ro get and post also works from here, at least we receive http answer code, like @BrendonKoz Also, FYI if it help, GET request on HTTP get redirected to /auth from the js code (window.location.href = "/auth/") and the same request on HTTPS is forbidden. On a VPS or private server, you have to adjust the firewall from the OVH dashboard. If it's an hosting plan, then you have nothing to do. https://docs.ovh.com/it/dedicated/firewall-network/#prerequisiti
    2 points
  5. Maybe @teppo can mention that signup form in pw weekly? My guess is that the mention of RockFrontend in pw weekly was responsible for most of the traffic I got on that video and why it performed a lot better than the following videos.
    2 points
  6. Just issued a simple GET request to the provided domain and it redirected (without error) to what I suspect is an expected subfolder. So...either it's working as expected now, it's an issue with your network/computer (and is working), or perhaps you're not taking into consideration URL forwarding from rewrite rules (whereas Postman likely is)?
    2 points
  7. I'm now at 1 1/2 hour from the laravel video and he's still copying database entries to php-files to import it... I think the videos should be split into (short) comparisons to other frameworks/cms and an introduction (longer) to processwire. That way, users of other systems could be attracted to watch the introduction. For the comparisons, it would be great to have experts from other systems doing the same things someone does with processwire. But one could also take videos like that one from laravel and do the same in processwire.
    2 points
  8. I'd find it more intuitive to use these labels: But it could use the same code as yours ๐Ÿ™‚
    1 point
  9. Short answer from mobile, yes. Welcome ๐Ÿ™‚
    1 point
  10. I think only the hoster can (perhaps) help you.
    1 point
  11. Had a similar situation some time ago, at least it turned out that the hoster had blocked the port ๐Ÿ˜ญ
    1 point
  12. Yes, you can use https://processwire.com/blog/posts/processwire-3.0.74-adds-new-fieldsetpage-field-type/ exactly for that so you can reuse other fields inside the FieldsetPage fields. Think of repeaters without repeating ๐Ÿ™‚
    1 point
  13. I've had a conversion with @3fingers over the last few days regarding that topic. I contacted him via PM because I am planning something similar and I did not want to give the impression that I was torpedoing his plan (or that he spends much time that in the end does not pay off because there is a similar free course by someone else). To be more specific, what I have had in my mind for quite some time now is to make a ProcessWire version of this video: ProcessWire from Scratch 2022 | Laravel Alternative? (on processwire.rocks) I thought that might be a good idea for several reasons: While watching that video to get an impression of laravel I thought so many times: "That would be so much easier in PW", so I wanted to show that to others I thought such a video could maybe catch brad's attention and he might be willing to share the video across his audience or even try PW and make a video about it himself I thought it's a good starter project with a good structure that shows a lot of the most important concepts and it would be nice to have a side-by-side comparison @3fingers asked me to post this publicly to get some feedback from the community so that we can then decide how we should proceed so that everybody benefits from it.
    1 point
  14. Been over a year since last update, so another quick heads-up: MarkupMenu 0.11.0 adds support for menu items as an array (as an alternative for the module figuring the menu structure out from current and root page, or reading it from a PageArray) and template strings as callables. Needed these two for a project I'm working on ๐Ÿ™‚ echo $modules->get('MarkupMenu')->render([ 'current_page' => $page, 'menu_items' => [ [ 'title' => 'Home', 'url' => '/', 'id' => 1, ], [ 'title' => 'About', 'url' => '/about/', 'id' => 29, ], [ 'title' => 'Parent', 'children' => [ // ... ], ], ], 'templates' => [ 'item' => function($item) { return empty($item->url) ? '<span>{item.title}</span>' : '<a href="{item.url}" class="{classes} {class}--level-{level}">{item.title}</a>'; }, ], ]);
    1 point
  15. I agree. However, to make a tutorial series complete, one needs to introduce the basics as well. Perhaps a concise but not too long overview would do the trick (especially if it links to all the official docs and blog posts in order to point out where to learn more about the basics). @3fingers In order to teach as much as possible in the shortest possible time, you might want to provide your learners an installable site-profile which does all the basics already, and you "just" finish it off by implementing the rest (which is everything beyond the basics). I would also pay for such a course, so that I can think outside of my box (and to support your efforts, of course).
    1 point
  16. Short answer is "no", at least not for now ๐Ÿ™‚ SE populates a search index for a piece of content (page) and compares provided query string against said index. It's a tool for handling "regular" site search, from indexing to front-end rendering. The index is a textarea field, so complex queries (advanced text search) and a few special cases ("link:https://www.processwire.com") are supported, but the module has little to do with facets/filters. On a loosely related note, in recent projects I've been leaning towards implementing filters/facets on the front-end based on static data generated by the backend and cached on disk. The main reasons are performance and scalability: real-time search using ProcessWire can be pretty quick, but won't achieve the speed of a front-end only implementation. This is especially tempting approach when the amount of data is relatively small (i.e. you don't have to deal with tens of thousands of pages (or more) with numerous searchable properties each.) Which approach makes most sense โ€” and how vigorously the search should / needs to be optimized โ€” depends on the case at hand ๐Ÿ™‚
    1 point
  17. As of today's latest commit to the dev branch, the solution to the original question of sorting results by a specific order of page IDs is now possible. // get page 2, then 1, then 3 in that specific order using the new 'id.sort'; you can also use "limit" for pagination without any downsides $pages->find("id.sort=2|1|3"); More info: https://github.com/processwire/processwire-issues/issues/1477#issuecomment-982928688
    1 point
  18. Here is my Caddy 2 config for a PW site: mysite.fi, www.mysite.fi { encode gzip tls my@email.com root * /var/www/mysite/pw file_server php_fastcgi unix//var/run/php-fpm/php-fpm.sock { health_timeout 10000s } @deny_hidden path_regexp /\. @deny_root path_regexp /(CONTRIBUTING|COPYRIGHT|LICENSE|README|htaccess)\.txt @deny_assets path_regexp ^/site(-[^/]+)?/assets/(.*\.php|backups|cache|config|install|logs|sessions) @deny_install path_regexp ^/site(-[^/]+)?/install @deny_config path_regexp ^/(site(-[^/]+)?|wire)/(config(-dev)?|index\.config)\.php @deny_modules path_regexp ^/((site(-[^/]+)?|wire)/modules|wire/core)/.*\.(inc|module|php|tpl) @deny_templates path_regexp ^/(site(-[^/]+)?|wire)/templates(-admin)?/.*\.(inc|html?|php|tpl) rewrite @deny_hidden /denyaccess rewrite @deny_root /denyaccess rewrite @deny_assets /denyaccess rewrite @deny_install /denyaccess rewrite @deny_config /denyaccess rewrite @deny_modules /denyaccess rewrite @deny_templates /denyaccess # global rule try_files {path} {path}/ /index.php?it={path}&{query} log { format single_field common_log output file /var/log/www/access.log { roll_size 50MiB roll_keep 5 roll_keep_for 168h } } }
    1 point
  19. Both $pages->find("id=1|2|3"); and $pages->getById([1216,1217,1218]) worked. My original $formnav = $pages->getById([1216,1217,1218]); // Get specific pages wasn't returning the correct pages because the menu options needed this removing 'show_root' => true, Thanks everyone
    1 point
  20. I think get() always returns a single page. Have you tried $pages->find("id=1|2|3"); which will return a PageArray.
    1 point
  21. You'd have to use a little bit different approach because a session has to be active before we know who the user is. The session hasn't yet started when the config file is being loaded. So you'd detect who the user is somewhere else (like in your main site template) and then set a cookie before any output starts: setcookie('guest', $user->isGuest() ? 1 : 0); Then detect the cookie in your config.php: $config->sessionExpireSeconds = empty($_COOKIE['guest']) ? 86400 : 23200; You wouldn't want to use this method for anything security related, but session time is really not a security concern I don't think.
    1 point
ร—
ร—
  • Create New...