Jump to content

flydev

Members
  • Posts

    1,366
  • Joined

  • Last visited

  • Days Won

    49

Everything posted by flydev

  1. I will add a new answer once I have made some tests, comments are welcome. https://github.com/flydev-fr/Duplicator/issues/37
  2. Just my two cents here, I vote to extend the module's developer doc and/or a note in the coding style guide. That's maybe the role of the community to (help) write it and send it as proposal to @ryan by filling a github issue for an eventual revision.
  3. @Flashmaster82 what's the version of your PHP install ? If I am correct, you need PHP 8.1 to get it working. Just saw the posted issue on the github repo, will comment it there, but @Juergen, as you are using arbitrary Union Type on property declaration in the module, it make it available only on php-8.
  4. On my last post in the thread of AdminStyleDark, when I said: I was refering to this one in particulary. I will send a github PR.
  5. (In my first message, I didn't understood that you was going to modify an existing ProcessWire site). But the message is still valid to get an introduction before the update. What do you mean by "just find the code" ? You mean in an admin page ? You have everything you are looking for in `home.php`, read below. Not really, you could even forget the admin, (even if it's not really the case, but that's how I still see it and saw it), the admin pages, fields and templates let you manage and organize what's inside the db, it's just easier. On your screenshot, we can see that the code of the homepage, is in `/site/templates/home.php` and pull from the database the title of the page from the field `title`, some images for what it look to be, a carousel or hero block `hero_image`, also some client testimonials from `testimonials` field. As you are old, to refresh your memory, remember when you was getting theses data from a database with `select * fields from site_db where page="home"`, now you have it at hand, in an admin page, with a lot of API helpers given by ProcessWire to get/set all of that. Now, if you understand that the $page call give you the current visited page, called `home` in your example, in the page-tree, with a template (file with code) `home.php` then you can understand that $page->title, $page->hero_image and $page->testimonials give you the value (from the db) of theses fields. Anyway, please open with notepad the file /site/templates/home.php and paste it here in the thread so we can get the strategy used (I bet it's the simple one with php include() calls) and we will be able to make things more clear to you.
  6. @protro do you get same result with jsConfig() ? Also, I think it's only exposed on admin pages by default. For frontend you will need (as always) to make it available yourself, as nothing is done on frontend things by default, except processwire api: On your <head> tag in frontend, eg. _main.php : <!-- credit to @soma --> <script type="text/javascript"> var config = <?php echo json_encode($jsConfig); ?>; </script> Then // Set a property from PHP // $config->js() is still here for backward compatibility, use jsConfig() $config->jsConfig('mySettings', [ 'foo' => 'bar', 'bar' => 123, ]); // Get a property (from PHP) $mySettings = $config->jsConfig('mySettings'); // Get a property (from Javascript): var mySettings = ProcessWire.config.mySettings; console.log(mySettings.foo); console.log(mySettings.bar);
  7. @Juergen I needed a solution to start with a quite complex form. I tried the module, thats was fast. Freaking cool ! Thanks .
  8. Hi Mike, welcome, as you are used with Notepad, then you are on the best solutionware to keep using it, easier than wordpress really. Read a bit there and choose an output strategy that feel your dev experience (biased suggestion: Delayed Strat.) : https://processwire.com/docs/front-end/output/ https://processwire.com/docs/tutorials/default-site-profile/ Then watch this vid: And enjoy ? edit: before you ask, when you will stumb on some ten years answer forum thread, yes they almost still work in 2022. But at least upgrade your php 3 install ?
  9. What about setting the flag as Notice::log || Notice::logOnly ? Also check @ryan comment :
  10. @gebeer Interesting. You want to hook WireLog::___save() and recover the type log on arguments(0) ? https://github.com/processwire/processwire/blob/dev/wire/core/WireLog.php#L96-L175
  11. I commited some fixes, will push it at the end of the day. But yes, some modules need to be taken case by case, thats why I think everyone using it could make it better by sending pull-requests. There is also some hardcoded style set by js calls, I put already comments on a todo/known bugs section. About the switch, I think the better solution is to reload the page to apply the default theme set by the user, brainstorming needed there. Thanks for your interest ✌️
  12. Bro, I feel very sad for you in term of having fun while developing (working). I feel lucky to be one of those guys who can refuse tasks that should be done on these pieces of software mentioned above, even more when you worked with ProcessWire. However, it is true that you have to take into account an "architecture" already in place. Bosses are "afraid" of change that concerns the backbone of their business, especially when it works as is. What I would do personally, - it also depends on the "size" of the internal architecture and context - would be to rewrite the mess under processwire in your spare time and give them a demonstration of why and how it's better, with arguments about the added value in terms of maintaining and possible future hiring of developer(s). I think it's easier and safer to hire "pure" developers rather than "closed and trained" developers on a given CMS (multi-skilled). I mean there, a pure PHP developer can jump on ProcessWire, where like a guy like me, can't take the other the opposite way. "courage brother"..
  13. @Violet the only thing which could help here is to check the logs as php-8.1 contain new features and incompatible changes. You can check the logs from the admin side in ProcessWire to see if something weird happen, and/or the PHP log of your hosting provider.
  14. Short answer from mobile. Try with that in .htaccess: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /2022/$1
  15. @tires the hook need to be Session::loginSuccess - the one given by @adrian - to redirect the user, after he log in. You can write the target url in the session, and you do not really need the GET variable. But as I said in the first idea, if you need to differentiate a user which come from the mailed url, you "have" to give a GET variable or a segment. If you do not do that, the url set in the session will be for all users. It might not be an issue for you. I all needed template, just set $page->url in the session. Apply logic there. And as I said, without distinction, it will apply for all users.
  16. Quite easy ? (see: https://github.com/baumrock/AdminStyleHello/issues/1#issue-1401993078) https://github.com/flydev-fr/AdminStyleDark/tree/dev
  17. ? Perfect, checking it, thanks.
  18. @bernhard could you take a look at https://github.com/flydev-fr/AdminStyleDark Is this the right way to do it?
  19. Its a matter of taste and organization. You can have 3 pages and only one template. If services and about was using the same template basic-page, you end with only one basic-page.php template to work with. The strategy used and the templates are two distinct things. Add Pages to it, and its 3 differents things.
  20. You can write a simple hook, and to redirect to a specific url, you can set the url in the user session, once logged, redirect and unset it. An idea could be to set a GET variable in the link you send to your users so it will work only for theses links, then do the logic in the hook (about checking for the existing GET var and setting the url in the session). Check this thread for the hook :
  21. I must admit that I didn't understood this statement as it was working as expected lol
  22. @Boost I think yes, I never used markup-region, maybe pw-3.0.61 introduced new api functions or markup-regions things which are required from there. https://processwire.com/blog/posts/processwire-3.0.39-core-updates/ Edit: I read the ProcessWire 3.0.61 core update, I think I am missing some details as I don't use this strategy, but clearly, the region strategy seem to be introduced on this update yes. Let's wait others users to give us more details in this thread.
  23. I was sure I had already saw an update made by @ryan to make SkyScrapers using markup-region (https://weekly.pw/issue/129/). The demo I linked previously is made with it. There you go: https://github.com/ryancramerdesign/skyscrapers2 ?
×
×
  • Create New...