-
Posts
813 -
Joined
-
Last visited
-
Days Won
41
Everything posted by Jonathan Lahijani
-
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.
-
@apeisa Would you consider merging this PR? https://github.com/apeisa/ProcessRedirects/pull/17
-
Creating thousands of pages via the API
Jonathan Lahijani replied to David Beesley's topic in API & Templates
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 -
One big reason: Adobe CC doesn't run on Linux ? https://forums.adobe.com/thread/1057800 https://forums.adobe.com/thread/2444095
-
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.
-
What are your favorite VSCode extensions?
Jonathan Lahijani replied to OrganizedFellow's topic in Dev Talk
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. -
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.
-
What are your favorite VSCode extensions?
Jonathan Lahijani replied to OrganizedFellow's topic in Dev Talk
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." -
Detecting invalid, invisible characters in your editor
Jonathan Lahijani replied to Jonathan Lahijani's topic in Dev Talk
VSCode plugin: https://marketplace.visualstudio.com/items?itemName=nhoizey.gremlins -
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.
-
for a local site on local pc...
Jonathan Lahijani replied to franciccio-ITALIANO's topic in Dev Talk
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 -
for a local site on local pc...
Jonathan Lahijani replied to franciccio-ITALIANO's topic in Dev Talk
If I understand your question correctly, as long as you use relative URLs instead of hardcoded absolute URLs, this shouldn't be a problem. -
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/
-
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. ?
-
Maintain separate configs for live/dev like a boss :)
Jonathan Lahijani replied to bernhard's topic in Tutorials
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> -
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).
-
Regarding the price, it remains to be seen how much "Apple Tax" there will be in it, but with higher end hardware, Apple's price offering sometimes matches comparable non Apple systems, and you get Apple's cool design and better resale value.
-
No, web development doesn't need that kind if power, not even close. This system is targetted to high end video and audio production. Plus I'm a Windows guy.
-
"Modular" is just a fancy word Apple used to say it's a normal tower design whereby the components can be upgraded and are not soldered in.
-
It will be free, open-source, like other starter tools out there.
-
For the last couple months, I've been working on a module that does exactly this. It's not a site profile, it's not a theme. I don't know what term would accurately describe it, but its a ProcessWire module that's an opinionated, update-able starting point, oriented towards developers, and brings in a bunch of boilerplate like: an installer that will create fields, templates, pages, hannacodes; it runs through a thorough check before doing anything that may result in an error (module installation errors are aggravating; i'm testing it very thoroughly) the installer will rename your 'templates' dir to something temporary, and then copy a starting 'templates' folder that's prepped for the module (you should only do this on dev) if you try to add it to an existing site with a bunch of data, it will work as long as there are not collisions in some fields and templates; if there are, the module won't install and tell you what you need to change around to allow it to install establishes some new $config variables ('env', 'disableTemplateCache', a few others) built with UIkit 3 in mind, but not hardcoded to it a menu builder based on Repeaters with its own Process Module has its own seo+og+twitter+sitemap metadata fields and uses Profields FieldGroup since that is the best module for handling such a grouping has it's own templates inside the module which can be used, or overridden in /site/templates/; this includes blog sitemap.xml maintenance search in addition to template files being able to be overridden, partial files can be overridden too! some module configuration fields (site_name, maintenance, etc.) the module has documentation and other statistics built into it for easy reference takes full advantage of setting() and markup regions; applies attributes like UIkit 'uk-grid' and other data attributes without "touching" the html; keeps the module flexible and easily allows you to rip out UIkit and swap it for another CSS framework (Bootstrap 4); you'll never need to touch edit the _main.php file because of how regions has been set up has it's on RepeaterMatrix fields with boilerplate matrix-types (headline, text, slideshow, etc. etc.); if the user makes new custom matrix types and a later version of my module brings in a new matrix-type, it will update the RepeaterMatrix field and merge it correctly (tricky to do!); the matrix types use many of the same base fields, thereby allowing you to switch from one matrix type to another without data being destroyed (this was only possible as of 2 weeks ago with the new matrix update) to avoid creating a bunch of 1-off fields for the matrix field for block configuration, it uses the new and quite amazing Mystique fieldtype in a unique way (this was tricky to do); this module is critical to establishing a page-builder that is clean (this was only possible as of April 2019 since the module is brand new) brings in PW's debugger to the frontend (brings in jQuery UI); can be disabled all field and template names don't use any prefixes; this would allow you to dump the module one day in the future if you don't like it, without having a bunch of field and template names that sound too specific to the module Laravel Mix based asset compiler pre-configured with UIkit works with FormBuilder and other modules I often use; works and may require certain Pro modules; eliminates the need for any modules that do blogging, menu building, sitemap, maintenance or seo since this module does it using native ProcessWire login/logout/account/register templates it may include a 'collection' generator for common things like events, products, people, properties, along with some templates for those. don't like the templates my module provides? then just create your own template file in /site/templates/the-template-file.php which will override /site/modules/my-module-name/templates/the-template-file.php Right now I just started building a few sites with it (spent the last 2 months developing it) which will hammer it out further. I will release it late summer, early fall.
- 18 replies
-
- 21
-
-
If you follow high-end, professional grade hardware like I do, then this announcement today by Apple will blow your socks off: https://www.apple.com/mac-pro/ Hopefully Nvidia graphics cards will be supported in the near future.
-
Gutenberg For ProcessWire ?!
Jonathan Lahijani replied to Mustafa-Online's topic in Module/Plugin Development
RepeaterMatrix is going to be the best choice for any type of page builder in ProcessWire (at least at this time). The recent updates to the module improve its flexibility further, such as being able to change the matrix-type of an item that's already been added to a page (this is similar to Gutenberg functionality of being able to change block-types... nice). After using RepeaterMatrix and its equivalents in other CMSes over the years (such as WordPress ACF Flexible Content field), my suggestion is you're better off NOT providing fully customizable layout functionality within your builder (that is, avoid the capability of allowing users to add things like containers, rows, columns). I've personally found that even other CMSes that do this well and are built around that concept are just too clunky. It's the nature of the beast. The better approach in my opinion is to provide a good set (5-10) of matrix-types/blocks that can instead achieve this. Once again, the recent feature addition whereby matrix types can be changed is going to help here since switching a matrix-type retains its content as long as the matrix-type you are switching to uses the same fields. -
Unexpected FileCompiler behaviour with "require"
Jonathan Lahijani replied to noodles's topic in General Support
While rare, there are some situations where the FileCompiler may not convert code correctly. If you are using an older version of PW it may have already been resolved in a newer version. Besides, you could probably simplify that code to something more simple. Adjust this accordingly with your language variable if needed: -
You should be able to. Just assign the Hannacode Textformatter to the fields of your choice and it should work.