Jump to content

Jonathan Lahijani

Members
  • Content Count

    334
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by Jonathan Lahijani

  1. I don't use a Mac but I've heard great things about Quiver: https://happenapps.com/
  2. I'm using this now on a site that needs that extra level of metadata. It's working great. Thank you.
  3. https://craigmod.com/essays/fast_software/
  4. https://blog.theodo.com/2019/07/vscode-php-development/
  5. I'm looking to improve my editor (VSCode) in a way whereby it will tell me the value of a ProcessWire setting() value that's been defined in another file as I write an override setting. Let's say I have a file called /site/templates/settings-default.php with the following: setting("my-div", "my-default-class"); And I have another file called /site/templates/settings-override.php with the following: setting("my-div", "my-override-class"); As I'm writing that specific line in "settings-override.php", is it possible through some sort of auto-suggest / intellisense for it to tell me the value of the setting in "settings-default.php" so that it provides context in realtime as I write the override setting? This would prevent me from having to switch between the two files in my editor and improve my workflow. Any suggestions would be appreciated.
  6. A sneak preview of a new page builder concept that I'm close to completing. I'll write more about this in coming weeks, but this video demonstrates a lot of unique things going on:
  7. Yes but that doesn't work for some reason. I believe it may have to do with partials being involved.
  8. One little hackish way around this is to redirect to the same page with "?livepreview=1" appended to the URL: <?php namespace ProcessWire; if(!$_GET['livepreview']) { $session->redirect($page->url."?livepreview=1"); } Good enough for my use-case.
  9. I have PageFrontEdit enabled. I have a template that includes a bunch of partials. Those partials contain the PageFrontEdit tags in the following format: <edit field="body" page="<?php echo $page->id; ?>">...</edit> This is all working well, however I have a particular template whereby I don't want Frontend Page Editing to be activated at all, as if you were logged out. https://processwire.com/docs/front-end/front-end-editing/ What's the best way to disable it for a particular template? Is there a proper hook for this perhaps? Or some hackish JS approach?
  10. I follow Linux desktop trends quite a bit. This post has got me thinking if it's time for Linux on the desktop for me despite MS innovations. I gave it a bit of thought and I think I can make it happen, even if I have to run Adobe CS through a VM. I'm much more comfortable with the idea now that I've been using WSL funny enough (also since I install Linux for customers every now and then... Ubuntu, RHEL, CENTOS, Suse). I'm thinking Arch w/ i3, VSCode, ranger and a bunch of text user interface apps, bash scripts, etc. Minimalism as much as possible, kind of like ProcessWire.
  11. @apeisa Would you consider merging this PR? https://github.com/apeisa/ProcessRedirects/pull/17
  12. How about deleting thousands of pages using the API? Right now I'm using this hackish approach, but it's only when syncing my live db to my dev db, so even though it's not clean and may leave orphan records (which aren't causing any problems if they are even there), it's ok for my purposes: Github Request: https://github.com/processwire/processwire-requests/issues/131
  13. One big reason: Adobe CC doesn't run on Linux 😞 https://forums.adobe.com/thread/1057800 https://forums.adobe.com/thread/2444095
  14. Is there a reason why you guys use Laragon instead of WSL? I used WampServer for years, but like Laragon, its using the Windows version of Apache, MySQL and PHP. While that works, I feel the Windows versions of those will always be second class. Add in things like node and Windows' character limits for file paths (which I think has now been resolved) and it gets more dicey. Also, it's probably slower. I don't use a Mac or Linux, so when WSL came out, Microsoft basically fixed a huge problem for people like us (Windows users doing non-Windows development... that is, LAMP stuff). Why not just use WSL? You get rsync and all the Linux utilities that I don't know how I lived without. There's a little bit of initial setup, but I've boiled that down into 10 minutes with a set of commands that'll make ProcessWire run perfectly.
  15. I discovered indent-rainbow today: https://marketplace.visualstudio.com/items?itemName=oderwat.indent-rainbow I don't like visual distractions when coding, and I thought this might contribute to that, but the colors are very very subtle so I'm keeping this one installed.
  16. Windows Terminal has been released and can be downloaded from the Microsoft Store. Article: https://www.theverge.com/2019/6/22/18701365/microsoft-windows-terminal-10-download-store-features WSL (WSL2 in the near future) + VSCode + Terminal... Microsoft is awesome.
  17. I just switched over to VSCode (Insiders) a couple weeks ago now that it integrates with WSL using the new extensions. Version Lens seems useful if using NPM: https://marketplace.visualstudio.com/items?itemName=pflannery.vscode-versionlens "Shows package version information for npm, jspm, bower, dub and dotnet core in the Visual Studio Code editor."
  18. VSCode plugin: https://marketplace.visualstudio.com/items?itemName=nhoizey.gremlins
  19. Ah, the early days of discovering ProcessWire and enjoying the constant feedback loops of development bliss. This is a great site. I love seeing PW + ecommerce.
  20. This article goes through many different techniques: https://css-tricks.com/deployment/ My approach is using rsync inside a bash script: https://css-tricks.com/deployment/#article-header-id-9 @wbmnfktr This is for you: https://css-tricks.com/deployment/#article-header-id-5
  21. If I understand your question correctly, as long as you use relative URLs instead of hardcoded absolute URLs, this shouldn't be a problem.
  22. Very nice. For context, this is like custom fields for images by using repeaters. This request for custom fields for images natively is one that is open, and slated for core one day: https://github.com/processwire/processwire-requests/issues/21 https://processwire.com/about/roadmap/
  23. Tip: How to "rename" an image field when the name you want to rename it to already exists I ran into a situation when I had two single-file image fields. Let's call them A and B. I didn't like the field name of 'A' and I wanted to give it a new name of 'B', but that field name was already being used in OTHER templates and had content populated. Therefore we need a clever way to rename A into B. With non-image fields this isn't a problem, but with an image field, there's files involved, so it gets a little more complicated. Admin Actions can handle this using the "Copy Content to Other Field" action. Set Source to 'A' and Destination to 'B'. The way it seems to be programmed is that it won't actually make a copy of the file (which is good because I don't want to duplicate the image), but instead it seems to copy the name of the file to the destination image field. Once the action has been run, if you view the a page using the template you applied to the action to, you will see that the image exists in both fields. DO NOT TOUCH THEM because whether you delete from A or B, it will delete in both fields. So now to complete this renaming, edit your template file and remove field "A". It will remove the field, but it will NOT remove the image, which is good. The end result is you now have image field 'B' with the contents from 'A', without having had to duplicate the image (meaning any references to that image will still be intact and not 404) and without ProcessWire having deleted the image when you removed "A" from your template. 🕺
  24. In regards to dev vs live htaccess, you can also use htaccess's "if" conditional for blocks of code you want to selectively enable/disable depending on the site being loaded. By doing so, you don't need two separate htaccess files to maintain. When using ProCache combined with it's htaccess recommendations at the top, I wrap it inside a conditional like this: ################################################################################################# # ProcessWire ProCache recommended .htaccess tweaks for expires and gzip performance settings. # PWPC-3.0 Keep this line here for ProCache identification purposes. ################################################################################################# <If "%{HTTP_HOST} == 'my-live-website.com'"> ...the code here... </If>
  25. You can upgrade every component in this new Mac Pro... it's basically a normal tower. Also, you could upgrade the CPU in the trashcan... it was just difficult (my friend runs a Mac business and has upgraded them hundreds of times).
×
×
  • Create New...