Jump to content

Jonathan Lahijani

Members
  • Posts

    794
  • Joined

  • Last visited

  • Days Won

    40

Everything posted by Jonathan Lahijani

  1. From time to time, I copy/paste snippets of code in the forum here to my editor (SublimeText). Unfortunately, I think the forum software sometimes throws in invalid, INVISIBLE unicode characters that break the copied code and usually will throw PHP errors that at first sight don't make any sense. These characters are impossible to detect in SublimeText, but with the following plugin I just discovered, it will identify them: https://packagecontrol.io/packages/Gremlins
  2. Just a note, better to update the recipe code to: if($page->template=="admin" && $page->parent->id==2 && $page->name=="settings") $input->get->id = $pages->get("/settings/")->id;
  3. @horst I filed this bug report a few weeks ago (includes a video of the bug). Any insight as to why it may be re-generating already generated images? https://github.com/horst-n/PageImageManipulator/issues/4
  4. In regards to API Variables in the documentation, is there a reason why the $notices variable is not listed with all the other API variables? It does have its own documentation page: https://processwire.com/api/ref/notices/ Also, same for $options, which I got a mixed response about here (2015):
  5. This is great life advice!
  6. Going here causes internal server error: https://processwire.com/blog/posts/
  7. How about a new favicon of the ProcessWire logo instead of being lost in the clouds? I attached two 512x512 PNG files (PNGs can be used for Favicons by the way and all browsers support it; worth ditching .ico).
  8. I'm not a Mac user, but for Windows, Xyplorer is freaking amazing. It's like the ProcessWire of file managers. ?
  9. Working on this, which I hope to finish off at some point in a couple weeks after the main site launch: It will be 2 minutes and 11 seconds long, which is the length of the audio (full audio here). I will try to make it show off the power of ProcessWire as much as possible (tree, fields, matrix, front-end editing, api, docs, formbuilder, procache, github activity). I may need to extend the music a bit for it all to fit. Anyway, this is happening!
  10. When scrolling down the home page, the animations of the 8 callouts cause a horizontal scrollbar to temporarily appear while they animate in. Adding the 'uk-overflow-hidden' class to the #content-container div should fix that.
  11. The offcanvas toggle icon is using the slightly older approach (the markup got updated at some point during UIkit 3's development): Replace: <a id=offcanvas-toggle class=uk-hidden@m href=#offcanvas-nav uk-toggle> <span uk-icon='icon: menu; ratio: 1.3'></span></a> With: <a id='offcanvas-toggle' class="uk-navbar-toggle uk-hidden@m" uk-navbar-toggle-icon href="#offcanvas-nav" uk-toggle></a>
  12. Tampermonkey will let you modify the code of a page: https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo?hl=en You could create your own CSS file, and then establish a setting in TM to load that file (other's would have to do it on their browsers as well however).
  13. One nitpick about the server in general. You can access it (the home page for example) without https. Ideally http should redirect to https.
  14. Never used Craft professionally... just tried the demo a couple years ago.
  15. I put this feature request in a couple months ago which relates to this conversation about migrating structural changes: https://github.com/processwire/processwire-requests/issues/230
  16. If you run multiple PW under the same hostname, then setting $config->sessionName to something unique is recommended as well as it prevents one installations logged in state from clashing with another (and other weird admin caching things). I usually set its value to $config->dbName since that's easily unique enough. $config->sessionName = $config->dbName; $config->sessionFingerprint = 2;
  17. Note: whether I use Page(template=mytemplate)::added or Pages(template=mytemplate)::added does not make a difference.
  18. In 2015, Ryan introduced conditional hooks: https://processwire.com/blog/posts/new-ajax-driven-inputs-conditional-hooks-template-family-settings-and-more/ I have the following hook which works properly: $wire->addHookAfter('Pages::added', function($event) { $page = $event->arguments[0]; if($page->template=='mytemplate') { // ... } }); Now if I want to take advantage of conditional hooks, I should be able to do this: $wire->addHookAfter('Pages(template=mytemplate)::added', function($event) { // ... }); however the hook doesn't get hooked. Any ideas?
  19. User-specific timezones is on Ryan's todo list: https://github.com/processwire/processwire-issues/issues/270
  20. That video got me hooked as well. I'd love to help out with making a new marketing video. I can do the screen recording, video editing and voice-over. If someone can concept out a script/storyboard, I can take care of the rest. Maybe it can be featured on the new PW homepage hero section to hook more people.
  21. Try Adminer instead: https://www.adminer.org/ It's only one file. phpmyadmin feels bloated compared to it.
  22. That would depend on the nature of what one needs. But perhaps if you wanted to name it the name of the page (assuming it's an existing page) you could do: $p->your_single_image_field->first->rename("{$p->name}.png"); // need 'first' here
  23. Let's say you want to add an image using the PW API from an outside service that doesn't provide a clean filename like my-cool-image.jpg (such as from dummyimage.com, urlbox.io, etc). Doing it this way will add the image successfully, but the filename will be problematic and have an invalid extension (bad): $p = $pages->get(1); $p->your_single_image_field = "https://dummyimage.com/600x400/000/fff"; $p->save(); Instead, you need to rename the file right before save (good): $p = $pages->get(1); $p->your_single_image_field = "https://dummyimage.com/600x400/000/fff"; $p->your_single_image_field->first->rename("better.png"); // need 'first' here $p->save();
  24. UIkit3 is a bit more of a utility class oriented CSS framework. The benefits of utility based CSS are excellently summarized in this article, which I side with given my own evolution with CSS: https://adamwathan.me/css-utility-classes-and-separation-of-concerns/ Gridlex is just a grid system from what I can tell. If you need all the usual components (accordions, tabs, etc.), UIkit3 has it covered extremely well, especially compared to the other big CSS frameworks. Many great options. I rarely pull in other libraries since UIkit has it covered, and since it's all under one roof, it's very consistent and doesn't lead to conflicts.
  25. Does this work with FormBuilder?
×
×
  • Create New...